/* Poppy: content-sized conversation, optional discovery, functional reply tools. */
.reference-design .conversation-screen .assistant-message{width:fit-content;min-width:70px;max-width:92%;align-self:flex-start;margin:0 0 16px}
.reference-design .conversation-screen .reply-card{width:fit-content;min-width:70px;max-width:100%;padding:11px 13px 3px;border-radius:18px 18px 18px 5px}
.reply-copy{overflow-wrap:anywhere;white-space:normal}
.reference-design .conversation-screen .reply-copy p{font-size:16px;line-height:1.6}
.reply-tools{display:flex;align-items:center;justify-content:flex-end;gap:0;height:40px;margin-top:2px}
.reply-tools button{min-height:44px;min-width:44px;height:44px;color:var(--balu-muted);border-radius:12px;display:flex;align-items:center;justify-content:center;padding:0 6px;background:transparent}
.reply-tools .reply-listen{width:44px}
.reply-tools .reply-language{position:relative;width:48px;min-width:48px;height:44px;padding:0}
.reply-tools button:hover,.reply-tools button:focus-visible{background:var(--balu-success-surface)}
.reply-tools .icon{width:18px;height:18px}
.reference-design .conversation-screen .user-message{position:relative;width:fit-content;min-width:40px;max-width:85%;margin-left:auto;align-self:flex-end;padding:8px 11px;margin-bottom:18px;overflow:visible}
.reference-design .conversation-screen .user-message>.bubble{font-size:16px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap;padding:0;min-width:0;max-width:100%}
.user-reaction{position:absolute;right:8px;top:-10px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:2px 5px;background:var(--balu-on-primary);border:1px solid var(--balu-border);border-radius:20px;font-size:15px;line-height:20px;box-shadow:0 2px 4px color-mix(in srgb,var(--balu-on-sage) 6.27%,transparent)}
.hint-wrap{margin:7px 0 0}
.hint-button{display:flex;gap:6px;align-items:center;justify-content:center;border:1px dashed var(--balu-border);border-radius:15px;min-height:44px;padding:0 12px;font-size:13px;color:var(--balu-muted);background:var(--balu-paper)}
.hint-button>.icon{width:17px;height:17px}.hint-button>.icon:last-child{width:12px}
.hint-button[aria-expanded=true]>.icon:last-child{transform:rotate(180deg)}
.hint-wrap .choices{max-width:100%}.hint-wrap .choice{font-size:14px;min-height:44px}
.reference-design .trending-carousel .float-title{font-family:var(--font-ui);font-size:16px;line-height:1.4;letter-spacing:-.3px;min-height:44px;font-weight:400}
.reference-design .trending-carousel .floating-card{padding-top:47px;padding-bottom:7px;border-radius:23px}
.ask-pill{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:20px;padding:4px 10px;margin:5px auto 0;background:color-mix(in srgb,var(--balu-on-primary) 86.27%,transparent);color:var(--balu-on-sage);border:1px solid var(--balu-on-primary);box-shadow:0 2px 3px color-mix(in srgb,var(--balu-on-sage) 10.20%,transparent);font-family:var(--font-ui);font-size:12px;font-weight:500;line-height:19px}
.ask-pill .icon{width:11px;height:11px;fill:currentColor;stroke-width:1}
.reference-design .trending.is-collapsed{background:transparent;border:0;box-shadow:none;position:relative;padding:0;margin:0 12px;transform:none}
.reference-design .trending.is-collapsed:before{content:'';position:absolute;inset:8px 0;background:var(--balu-border);border:1px solid var(--balu-border);border-radius:10px;pointer-events:none;box-shadow:0 1px 2px color-mix(in srgb,var(--balu-on-sage) 3.53%,transparent)}
.reference-design .trending.is-collapsed .trending-toggle{position:relative;min-height:44px;height:44px;padding:0 12px;background:transparent;border:0;box-shadow:none}
.trending.is-collapsed .trending-toggle strong{font-size:12px}.trending.is-collapsed .trending-toggle .icon{width:14px;height:14px}
.language-options{max-height:46dvh;overflow-y:auto;overscroll-behavior:contain}
.language-option{width:100%;display:flex;gap:12px;align-items:center;min-height:54px;padding:10px 13px;margin-bottom:8px;text-align:left;background:var(--balu-paper);border:1px solid var(--balu-border);border-radius:15px;font-size:16px}
.language-option[aria-pressed=true]{border-color:var(--balu-secondary);background:var(--balu-success-surface)}
.language-option>.icon{margin-left:auto}.language-letter{font-size:22px;color:var(--balu-muted);min-width:25px;text-align:center}
.language-scope{font-size:14px!important}.language-coming{font-size:12px!important;color:var(--balu-muted);margin:18px 4px 8px!important}
.language-unavailable{font-size:14px;padding:9px 12px;color:var(--balu-muted);border-bottom:1px solid var(--balu-sage)}
.reference-design .story-header .header-portrait,.reference-design .story-header.has-conversation .header-portrait{width:70px;height:68px;object-fit:contain}
.story-header .mascot-stage{width:70px;height:68px}
.reference-design .story-header.is-working .header-portrait{width:76px;height:68px;margin-left:-3px}
.reference-design .is-working .mascot-stage{animation:balu-work 2s ease-in-out infinite}
@keyframes balu-work{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(1px) rotate(1deg)}}
@media(prefers-reduced-motion:reduce){.reference-design .is-working .mascot-stage{animation:none}}
@container(max-width:350px){.reference-design .trending-carousel .float-title{font-size:16px;letter-spacing:-.5px}.reference-design .trending-carousel .floating-card{padding-left:3px;padding-right:3px}.reference-design .story-header .header-portrait,.reference-design .story-header.has-conversation .header-portrait{width:65px;height:64px}.story-header .mascot-stage{width:65px;height:64px}}

/* A longer Hinglish word must fit at 320px without shrinking the reading size. */
.reference-design .trending-carousel .floating-card{width:max(108px,var(--capability-width));flex-basis:max(108px,var(--capability-width))}
/* Existing content must stay visible when a new turn or status is rendered. */
.reference-design .conversation-screen .message,.reference-design .conversation-screen .trending-drawer{animation:none!important}

/* Reply utilities sit just beyond the lower-right bubble boundary. */
.reference-design .conversation-screen .reply-card{padding:10px 13px;min-width:54px}
.conversation-screen .reply-tools{height:36px;margin:0 -4px 1px 0;min-width:0}
.conversation-screen .reply-tools button{height:44px;min-height:44px;color:var(--balu-muted)}
.conversation-screen .reply-tools .reply-to{width:36px;min-width:36px}
.conversation-screen .assistant-message{position:relative;touch-action:pan-y}
.conversation-screen .assistant-artifact{position:relative;max-width:100%;touch-action:pan-y;margin-bottom:12px}
.assistant-artifact>.plan,.assistant-artifact>.permission,.assistant-artifact>.receipt{margin-bottom:0}
.swiping{transition:none;user-select:none}.swiping:before{content:'↩';position:absolute;left:-30px;top:12px;color:var(--balu-muted);font-size:25px}
.message-quote{display:block;text-align:left;border-left:3px solid var(--balu-secondary);background:var(--balu-success-surface);border-radius:8px;padding:7px 9px;width:100%;min-height:42px;margin:0 0 7px;font-size:12px;line-height:1.4;color:var(--balu-muted);overflow:hidden}
.message-quote strong{display:block;font-size:11px;color:var(--balu-on-sage);font-weight:500;margin-bottom:3px}
.message-quote span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.composer-quote{display:flex;align-items:center;margin:0 4px 7px;padding:6px 5px 1px;border:1px solid var(--balu-border);border-radius:14px;background:var(--balu-paper);animation:quote-appear .16s ease-out}
.composer-quote .message-quote{flex:1;min-width:0;background:transparent;margin:0 0 4px}
.quote-cancel{width:44px;min-width:44px;min-height:44px;align-self:center}
.quote-highlight{outline:2px solid var(--balu-secondary);outline-offset:3px;border-radius:12px}
.hint-wrap{margin-top:0}
.topic-intro-sheet{text-align:center;position:relative;background:var(--balu-on-primary)!important;padding:25px 22px 20px}
.intro-art{width:96px;height:100px;margin:0 auto 4px;display:flex;align-items:center;justify-content:center}
.intro-art .ink-illustration{width:96px;height:100px;mix-blend-mode:normal}
.topic-intro-sheet h2{font-family:var(--font-ui);font-size:22px!important;line-height:1.3;margin:6px 0 10px}
.topic-intro-sheet>p{font-size:14px!important;margin:0 auto 15px;max-width:290px}
.intro-voice{margin:12px 0 20px;padding:10px 12px 0;background:var(--balu-success-surface);border:1px solid var(--balu-border);border-radius:18px;text-align:left}
.intro-audio-row{display:flex;gap:10px;align-items:center}.intro-audio-row .round{background:var(--balu-on-primary);border:1px solid var(--balu-border);min-width:44px}
.intro-audio-row .wave{flex:1;overflow:hidden}.intro-audio-row>span:last-child{font-size:11px;white-space:nowrap;color:var(--balu-muted)}
.intro-voice .wave i{background:var(--balu-secondary);animation:none!important}.intro-voice.is-playing .wave i{animation:intro-level .8s ease-in-out infinite alternate!important}.intro-voice.is-playing .wave i:nth-child(3n){animation-delay:.2s!important}.intro-voice.is-playing .wave i:nth-child(2n){animation-delay:.4s!important}
.intro-voice .intro-status{margin:6px 0!important;font-size:12px!important;line-height:1.4}.intro-status:empty{display:none}
.intro-voice summary{font-size:12px;color:var(--balu-muted);min-height:36px;padding:9px 0;cursor:pointer}.intro-voice details>p{font-size:14px!important;line-height:1.7;margin:4px 0 12px!important}
.topic-intro-sheet .intro-input-note{font-size:11px!important;margin:12px 0 0;color:var(--balu-muted)}.intro-input-note .icon{width:14px;height:14px}
.feature-sheet .intro-voice{margin-bottom:20px}.feature-sheet>p{margin-bottom:12px}
.time-dawn .header-atmosphere{background:radial-gradient(circle at 15% 45%,var(--balu-honey) 0 19px,transparent 20px),radial-gradient(ellipse at 78% -40%,var(--balu-border),transparent 75%),linear-gradient(var(--balu-border),var(--balu-peach) 64%,var(--balu-paper))}
.time-afternoon .header-atmosphere{background:radial-gradient(circle at 82% -7%,var(--balu-honey) 0 32px,transparent 33px),radial-gradient(ellipse at 10% -25%,var(--balu-border),transparent 80%),linear-gradient(var(--balu-honey),var(--balu-paper))}
@keyframes intro-level{from{transform:scaleY(.5)}to{transform:scaleY(1)}}
@keyframes quote-appear{from{transform:translateY(5px);opacity:.4}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.composer-quote,.intro-voice.is-playing .wave i{animation:none!important}.swiping{transform:none!important}}

/* Re-render restoration must be immediate; explicit quote jumps may animate. */
.reference-design .conversation-screen .chat-content{scroll-behavior:auto}
.reference-design .conversation-screen{animation:none}
.conversation-screen .reply-tools .reply-to{width:44px;min-width:44px}

.user-message-meta{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;min-height:0;margin-top:5px}.user-message-meta:has(.user-reaction){position:relative;margin-top:0;padding-top:19px;min-height:19px}.user-message-meta:empty{display:none}.user-message-meta .message-time{padding:0}.user-message-meta .voice-meta{margin:0}
