/* A single quiet return action, anchored above the floating composer. */
.chat-navigation{position:absolute;left:50%;bottom:130px;z-index:5;transform:translateX(-50%);width:28px;height:28px;display:block}
.chat-navigation[hidden],.full-open .chat-navigation{display:none}
.chat-navigation .circle{position:relative;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;box-sizing:border-box;border-radius:50%;color:var(--theme-ink);display:grid;place-items:center;background:rgba(var(--theme),.65);background-image:none;box-shadow:0 2px 8px #0000000c;border:1px solid #ffffff40;backdrop-filter:blur(12px)}
.chat-navigation svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:16px;height:16px;margin:0}.chat-navigation button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.chat-unread-dot{display:none;position:absolute;right:1px;top:1px;width:5px;height:5px;border-radius:50%;background:currentColor;box-shadow:0 0 0 2px rgba(var(--theme),.8)}.chat-navigation.has-unread .chat-unread-dot{display:block}
.composer-expand{border:0;background:transparent;color:inherit;opacity:.6}
.composer-input-surface:has(#composerVoiceSlot:not([hidden])) .composer-expand{display:none}
.chat-editor{position:absolute;left:0;right:0;bottom:0;height:50%;z-index:5;display:flex;flex-direction:column;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:rgba(var(--theme),.97);color:var(--theme-ink);box-sizing:border-box}
.chat-editor header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}.chat-editor header button{font:inherit;border:0;border-radius:20px;padding:8px 14px;width:auto;height:auto}
.chat-editor textarea{flex:1;min-height:0;width:100%;resize:none;border:0;outline:none;background:transparent;color:inherit;font:inherit;font-size:16px;line-height:1.8;box-sizing:border-box}
@media(prefers-reduced-motion:reduce){.chat-navigation{transition:none}}

.chat-demo-label{position:sticky;top:48px;z-index:1;width:fit-content;max-width:calc(100% - 30px);margin:4px auto 16px;padding:5px 12px;border-radius:18px;background:rgba(var(--theme),.92);color:var(--theme-ink);font-size:11px;text-align:center;pointer-events:none}

/* Equal text insets and the capsule center are the single-line alignment reference. */
.composer-input-surface{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;column-gap:4px;padding:3px 10px;min-height:44px}
.composer-input-surface #message{width:100%;min-height:0;padding:2px 0;line-height:calc(24px * var(--font-scale,1));max-height:105px}
.composer-input-surface .composer-expand{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:grid;place-items:center;align-self:center;width:24px;height:24px;padding:4px;margin:0;box-sizing:border-box;line-height:1}
.composer-expand svg{display:block;width:16px;height:16px}
.composer-input-surface .composer-voice-slot{grid-column:1 / -1}

.composer-input-surface #message::placeholder{line-height:inherit}
.composer-input-surface:has(#message[data-multiline="true"]) .composer-expand{top:auto;bottom:10px;transform:none}

/* Keep the original bubble selectable; the action surface never blocks the feed. */
.bubble:not(.sticker-bubble){-webkit-user-select:text;user-select:text}
.chat-bubble-menu{position:absolute;z-index:9;width:256px;max-width:calc(100% - 20px);overflow:auto;overscroll-behavior:contain;border-radius:18px;padding:9px;border:1px solid rgba(var(--menu-rgb),.6);background-color:rgba(var(--menu-rgb),var(--menu-alpha));background-image:var(--menu-shine);backdrop-filter:blur(var(--menu-blur));-webkit-backdrop-filter:blur(var(--menu-blur));color:var(--menu-ink);box-shadow:0 6px 24px #0002;user-select:none;-webkit-user-select:none}
.chat-bubble-menu header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 3px 6px;font-size:calc(11px * var(--font-scale,1));opacity:.75}
.chat-bubble-menu header button{width:28px;height:28px;padding:0;border-radius:50%;background:transparent;color:inherit;font-size:20px}
.chat-bubble-menu .message-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.chat-bubble-menu .message-menu button{display:flex;align-items:center;gap:7px;padding:9px 6px;border-radius:10px;background:#ffffff18;color:inherit;text-align:left;line-height:1.4;font-size:calc(11px * var(--font-scale,1))}
.chat-bubble-menu button:disabled{opacity:.4;cursor:default}.chat-bubble-menu .lucide{width:15px;height:15px;flex:none}
/* Earlier history joins from the top on demand; styled like the date chip. */
.chat-load-earlier{display:flex;justify-content:center;margin:4px 0 18px}
.chat-load-earlier button{font:inherit;font-size:calc(11px * var(--font-scale,1));letter-spacing:1px;color:#697268;background:#fff6;border:0;border-radius:20px;padding:5px 12px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.night .chat-load-earlier button{color:#c5ccc3;background:#0003}
.chat-load-earlier button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
