/* Small native images; names remain visible during loading and failure. */
.shiwu-emoji{position:relative;display:inline-flex;height:2.25rem;min-width:2.25rem;align-items:center;justify-content:center;vertical-align:middle;flex-shrink:0}
.shiwu-emoji .shiwu-emoji__image{display:none;height:100%;width:auto;max-width:100%;max-height:100%;border-radius:.35rem;object-fit:contain;margin:0}
.shiwu-emoji__fallback{display:inline-block;font-size:.75rem;line-height:1.5;white-space:nowrap}
.shiwu-emoji[data-image-state="ready"] .shiwu-emoji__image{display:block}
.shiwu-emoji[data-image-state="ready"] .shiwu-emoji__fallback{display:none}
/* Preserve the poster's three overlapping decoration boundaries. */
.shiwu-emoji[data-emoji="sleepy"] .shiwu-emoji__image{clip-path:polygon(2% 0,100% 0,100% 100%,0 100%,0 28%,2% 28%)}
.shiwu-emoji[data-emoji="kiss"] .shiwu-emoji__image{clip-path:polygon(0 0,93% 0,93% 27%,100% 27%,100% 67%,93% 67%,93% 100%,0 100%)}
.shiwu-emoji[data-emoji="please"] .shiwu-emoji__image{clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 72%,9% 72%,9% 35%,0 35%)}
.shiwu-emoji-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.3rem;width:100%;padding:.5rem;border:1px solid var(--line,#e9e3d6);border-radius:.85rem;background:var(--surface,#fffdf8);box-sizing:border-box}
.shiwu-emoji-picker__button{display:flex;min-width:0;min-height:5.1rem;padding:.15rem;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;border:1px solid transparent;border-radius:.6rem;background:transparent;color:inherit;font:inherit;cursor:pointer;touch-action:manipulation}
.shiwu-emoji-picker__button .shiwu-emoji{height:2.5rem;max-width:100%}
.shiwu-emoji-picker__button:hover{background:#fff2cf}
.shiwu-emoji-picker__button:focus-visible{outline:2px solid var(--primary,#c97c20);outline-offset:1px;background:#fff2cf}
.shiwu-emoji-picker__label{font-size:.7rem;line-height:1.35;white-space:nowrap}
/* Pure emoji messages keep metadata and art while removing only the speech bubble. */
.message.emoji-message .bubble{padding:0;border:0;background:transparent;box-shadow:none;display:flex;flex-wrap:wrap;gap:.35rem;max-width:100%}
.message.emoji-message .shiwu-emoji{height:6rem;min-width:6rem;max-width:100%}
.thread-row{-webkit-touch-callout:none;user-select:none}

/* Authenticated photos reserve existing layout while loading. */
img[data-media-src]:not([src]){background:#edf2ed;color:#526c59;object-fit:contain}
img[data-media-state="error"]{outline:1px dashed #a4b5a9;cursor:pointer}
.lightbox img[data-media-src]:not([src]){min-width:min(80vw,300px);min-height:180px;color:white;background:#34443a}
