.user-sticker { display: block; object-fit: contain; width: 120px; height: 120px; max-width: 100%; }
.custom-sticker-display { gap: 3px; }
.custom-sticker-display .sticker-caption { max-width: 160px; overflow-wrap: anywhere; color: var(--muted); }
.selected-sticker .user-sticker { width: 76px; height: 76px; }
.comment-body .user-sticker, .guess-item .user-sticker { width: 110px; height: 110px; }
.sticker-choice.custom-sticker-choice { background: var(--surface-two); color: var(--ink); }
.custom-sticker-choice .user-sticker { width: 74px; height: 74px; }
.custom-sticker-choice > span { max-width: 100%; overflow-wrap: anywhere; }
.custom-picker-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; padding: 0 10px; border-top: 1px dashed var(--line); }
.custom-picker-heading strong { font-size: 14px; }
.custom-picker-heading button { min-height: 44px; font-size: 14px; color: var(--accent-text); }
.custom-picker-grid { max-height: 275px; overflow-y: auto; overscroll-behavior: contain; }
.custom-picker-empty { grid-column: 1 / -1; margin: 8px 5px; color: var(--muted); font-size: 14px; }
.sticker-studio { max-width: 880px; width: min(880px, calc(100% - 32px)); padding: 26px; }
.sticker-studio-shell { min-width: 0; }
.sticker-studio .dialog-heading { margin-bottom: 15px; }
.sticker-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 5px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-two); gap: 4px; margin-bottom: 22px; }
.sticker-mode-tabs button { min-height: 46px; font-size: 16px; background: transparent; color: var(--muted); border: 0; border-radius: 12px; padding: 8px 5px; font-weight: 700; }
.sticker-mode-tabs button[aria-pressed="true"] { background: var(--soft); color: var(--accent-text); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 15%, transparent); }
.sticker-library-intro { display: flex; gap: 20px; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 22px; padding: 22px; background: linear-gradient(135deg, var(--soft), var(--soft-two)); margin-bottom: 20px; overflow: hidden; }
.sticker-library-intro h3 { font-size: 23px; margin-bottom: 5px; }
.sticker-library-intro p { margin-bottom: 0; color: var(--muted); font-size: 16px; max-width: 345px; }
.sticker-intro-art { flex: none; position: relative; width: 145px; height: 120px; }
.sticker-intro-art span { position: absolute; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--surface); border-radius: 18px; box-shadow: var(--depth); font-size: 56px; width: 88px; height: 88px; rotate: -10deg; right: 30px; top: 10px; }
.sticker-intro-art span:nth-child(2) { width: 48px; height: 48px; font-size: 27px; right: 0; top: 0; rotate: 12deg; }
.sticker-intro-art span:nth-child(3) { width: 53px; height: 53px; font-size: 30px; right: 92px; top: 63px; rotate: 9deg; }
:root[data-motion="full"] .sticker-studio[open] .sticker-intro-art span { animation: sticker-bob 5s ease-in-out infinite; }
:root[data-motion="full"] .sticker-studio[open] .sticker-intro-art span:nth-child(2) { animation-delay: -.8s; }
.sticker-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sticker-library-heading h3 { margin: 0; font-size: 19px; }
#stickerLibraryCount { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 9px; background: var(--soft); color: var(--accent-text); font-size: 14px; }
.custom-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 16px 0 6px; }
.library-sticker { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 7px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-two); color: var(--ink); min-width: 0; transition: transform .18s, border-color .18s; }
.library-sticker:hover { transform: translateY(-3px) rotate(-2deg); border-color: var(--accent); }
.library-sticker-picture { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 12px; background: radial-gradient(circle, var(--soft-two), transparent 72%); }
.library-sticker-picture img { width: 100%; height: 100%; object-fit: contain; }
.library-sticker strong { font-size: 15px; overflow-wrap: anywhere; max-width: 100%; }
.library-sticker small { font-size: 12px; color: var(--muted); }
.custom-library-empty { grid-column: 1 / -1; padding: 28px 15px 40px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; }
.custom-library-empty > span { font-size: 48px; }
.custom-library-empty h3 { font-size: 22px; margin-bottom: 5px; }
.custom-library-empty p { font-size: 16px; color: var(--muted); }
.sticker-maker-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 25px; }
.sticker-preview-column { min-width: 0; align-self: start; position: sticky; top: 0; }
.sticker-preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: var(--muted); font-size: 14px; font-weight: 700; }
.sticker-preview-chip { border-radius: 8px; background: var(--soft); padding: 3px 8px; }
.sticker-canvas-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background-color: var(--surface); background-image: conic-gradient(var(--surface-two) 25%, transparent 0 50%, var(--surface-two) 0 75%, transparent 0); background-size: 24px 24px; box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--surface) 55%, transparent); }
.sticker-canvas-stage canvas, .sticker-canvas-stage > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sticker-canvas-stage canvas { touch-action: none; cursor: grab; }
.sticker-canvas-stage canvas:active { cursor: grabbing; }
.sticker-canvas-stage canvas.eraser-active { cursor: crosshair; }
.sticker-canvas-stage canvas:focus-visible { outline-offset: -5px; }
#stickerUploadEmpty { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; color: var(--muted); }
#stickerUploadEmpty span { font-size: 68px; }
#stickerUploadEmpty p { margin: 6px 10px; font-size: 16px; text-align: center; }
.sticker-maker-controls { min-width: 0; }
.sticker-maker-controls label { margin-top: 13px; }
.sticker-file-label { width: 100%; margin: 0!important; cursor: pointer; }
.sticker-file-label[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.sticker-file-label:has(+ input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.sticker-option-field { border: 0; padding: 0; margin: 14px 0; }
.sticker-option-field legend { font-size: 15px; margin: 0 0 7px; }
.sticker-option-row, .sticker-tool-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sticker-option-row button, .sticker-tool-row button, .sticker-nudge button { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-two); color: var(--ink); min-height: 44px; padding: 8px 10px; font-size: 15px; }
.sticker-option-row button[aria-pressed="true"], .sticker-tool-row button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-text); background: var(--soft); }
.sticker-tool-row { margin-top: 8px; }
.outline-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #b9adc9; }
.outline-white { background: #fff; }.outline-purple { background: #7852c9; }
.sticker-nudge { display: flex; justify-content: center; gap: 8px; direction: ltr; margin: 10px 0; }
.sticker-nudge button { width: 44px; padding: 5px; font-size: 24px; }
.sticker-maker-emojis { display: grid; grid-template-columns: repeat(auto-fill,minmax(44px,1fr)); gap: 5px; }
.sticker-maker-emojis button { min-width: 44px; min-height: 44px; background: var(--surface-two); border: 1px solid transparent; border-radius: 11px; color: var(--ink); font-size: 24px; padding: 3px; }
.sticker-maker-emojis button[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); }
.sticker-maker-emojis .sticker-emoji-none { font-size: 13px; }
.sticker-studio input:not([type="file"]), .sticker-studio .field-hint { font-size: 16px; }
.sticker-studio input[type="range"] { padding: 0; accent-color: var(--accent); border: 0; background: transparent; min-height: 44px; }
.sticker-studio .field-hint { font-size: 14px; line-height: 1.7; }
.sticker-save-progress { display: grid; gap: 7px; margin: 18px 0 8px; }
.sticker-save-progress progress { width: 100%; height: 9px; accent-color: var(--accent); }
.sticker-save-progress span { font-size: 14px; color: var(--muted); }
.sticker-studio .dialog-actions { background: var(--surface); }
.sticker-studio[aria-busy="true"] canvas { pointer-events: none; }
@keyframes sticker-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (max-width: 900px) {
  .sticker-studio { width: 100%; max-width: 600px; padding: 0; }
  .sticker-studio-shell { padding: 0 max(18px,env(safe-area-inset-right)) 0 max(18px,env(safe-area-inset-left)); }
  .sticker-studio .dialog-heading { background: var(--surface); }
  .sticker-mode-tabs { margin-bottom: 17px; }
  .sticker-mode-tabs button { font-size: 16px; padding: 8px 3px; }
  .sticker-maker-layout { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .sticker-preview-column { position: static; max-width: 320px; width: 100%; margin: auto; }
  .sticker-canvas-stage { width: min(100%,270px); margin: auto; }
  .sticker-library-intro { padding: 16px; gap: 8px; }
  .sticker-library-intro h3 { font-size: 21px; }
  .sticker-library-intro p { font-size: 15px; }
  .sticker-intro-art { width: 80px; height: 90px; }
  .sticker-intro-art span { width: 65px; height: 65px; right: 5px; top: 10px; font-size: 42px; }
  .sticker-intro-art span:nth-child(2) { width: 33px; height: 33px; right: 0; top: 0; font-size: 20px; }
  .sticker-intro-art span:nth-child(3) { width: 38px; height: 38px; right: 45px; top: 52px; font-size: 24px; }
  .custom-library-grid { grid-template-columns: repeat(auto-fill,minmax(95px,1fr)); gap: 8px; padding-bottom: 30px; }
  .sticker-maker-controls label, .sticker-option-field legend { font-size: 16px; }
  .sticker-studio .dialog-actions { margin: 20px -18px 0; }
  .sticker-studio .dialog-actions .button { padding: 12px 7px; }
}
@media (prefers-reduced-motion: reduce) { .sticker-studio * { animation: none!important; transition: none!important; } }
:root[data-motion="quiet"] .sticker-studio * { animation: none!important; transition: none!important; }
