/* 使用者確認的貼圖大小與錨點；不依賴文字氣泡版本的 body 標記。 */
.npc .bub.tt-chat-sticker,body.artBub.bub3s .npc .bub.tt-chat-sticker{position:absolute!important;left:calc(50% + var(--sticker-x))!important;top:var(--sticker-top)!important;bottom:auto!important;width:var(--sticker-width)!important;height:var(--sticker-width)!important;min-width:0!important;max-width:none!important;aspect-ratio:auto!important;transform:translateX(-50%)!important;background:none!important;border:0!important;padding:0!important;box-shadow:none!important;animation:none!important;overflow:visible!important}
.npc .bub.tt-chat-sticker::before,.npc .bub.tt-chat-sticker::after{display:none!important}
.tt-chat-sticker .tt-sticker-visual{position:absolute;inset:0;transform-origin:50% calc(100% + var(--sticker-padding) + var(--sticker-tail));filter:drop-shadow(0 3px 3px #4c2d4530);animation:ttStickerPop var(--sticker-entry) cubic-bezier(.2,.75,.3,1) both}
.tt-chat-sticker .tt-sticker-plate{position:absolute;inset:calc(-1 * var(--sticker-padding));border-radius:var(--sticker-radius);background:#fff}
.tt-chat-sticker .tt-sticker-plate::after{content:'';position:absolute;left:50%;top:calc(100% - 1px);width:calc(var(--sticker-tail) * 2);height:calc(var(--sticker-tail) + 1px);background:white;transform:translateX(-50%);clip-path:polygon(0 0,100% 0,50% 100%)}
.tt-chat-sticker .tt-sticker-art{position:relative;display:block;width:100%;height:100%;object-fit:contain;image-rendering:auto;border:0;max-width:none;z-index:1}
#chatrow{position:relative}#chatin{flex:1;min-width:0}
#ttStickerButton{flex:0 0 auto;border:1px solid #d2b5ca;border-radius:4px;background:#f4e6f1;color:#825674;font:12px 'Tavern Numerals','TT Latin','TT Huninn','LINE Seed TW',sans-serif;padding:5px 8px}#ttStickerButton[aria-expanded=true]{background:#a76b91;color:#fff}
#ttStickerPicker{position:absolute;bottom:calc(100% + 8px);left:0;right:0;z-index:80;background:#fffafb;color:#73556c;border:1px solid #d5b5cb;border-radius:12px;padding:11px;box-shadow:0 8px 24px #4d2e5138;max-height:45dvh;overflow:auto;font:12px 'Tavern Numerals','TT Latin','TT Huninn','LINE Seed TW',sans-serif}#ttStickerPicker[hidden]{display:none!important}
.tt-sticker-heading{display:flex;align-items:center;gap:8px;margin-bottom:8px}.tt-sticker-heading b{font-size:13px}.tt-sticker-heading span{font-size:10px;color:#9a8595}.tt-sticker-heading button{margin-left:auto;border:0;background:transparent;color:#805d76;font-size:22px;line-height:1;padding:2px 5px;cursor:pointer}
.tt-sticker-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.tt-sticker-grid button{min-width:0;padding:4px 2px;background:#f7eef4;border:1px solid transparent;border-radius:7px;cursor:pointer;color:#876a80;font:10px 'Tavern Numerals','TT Latin','TT Huninn','LINE Seed TW',sans-serif}.tt-sticker-grid button:hover{background:#f4dce9;border-color:#cf9fbb}.tt-sticker-grid img{display:block;width:100%;aspect-ratio:1;object-fit:contain;image-rendering:auto}.tt-sticker-grid span{display:block;margin-top:2px}#ttStickerPicker button:focus-visible,#ttStickerButton:focus-visible{outline:2px solid #96639e;outline-offset:2px}.tt-sticker-status{font-size:11px;color:#a45071;margin:6px 0 0}.tt-sticker-status:empty{display:none}
#chatlog .tt-sticker-log{display:inline-block;width:48px;height:48px;object-fit:contain;vertical-align:middle;background:white;padding:3px;border-radius:7px;margin:3px 0;image-rendering:auto}
@keyframes ttStickerPop{0%{opacity:0;transform:translateY(12px) scale(.65)}65%{opacity:1;transform:translateY(-2px) scale(1.055)}100%{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.tt-chat-sticker .tt-sticker-visual{animation:ttStickerFade .15s linear both}@keyframes ttStickerFade{from{opacity:0}to{opacity:1}}}

/* 圖示按鈕：折角笑臉貼紙，保留鍵盤與螢幕閱讀器名稱。 */
#chatrow #ttStickerButton{display:grid;place-items:center;width:38px;min-width:38px;height:38px;padding:6px;color:#825674;background:#fff5fb;border:1px solid #d2b5ca;border-radius:8px;cursor:pointer}
#chatrow #ttStickerButton svg{display:block;width:24px;height:24px}#chatrow #ttStickerButton:hover{background:#f4dce9}#chatrow #ttStickerButton[aria-expanded=true]{color:#fff;background:#a76b91}
