/* Shared visual language for first access and all investigative conversations. */
.is-flow > .flow-page { flex:1; height:auto; }
.onboarding-progress, .conversation-progress { flex:none; padding:9px 23px 10px; }
.progress-caption { display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px;line-height:1.5;margin:0 0 8px; }
.conversation-bar { width:100%;height:10px;background:var(--app-surface-hover);border-radius:7px;overflow:hidden; }
.conversation-bar-fill { position:relative;display:block;width:100%;height:100%;transform-origin:left;transform:scaleX(0);background:#51cbbb;border-radius:inherit;transition:transform 240ms var(--ease-out); }
.conversation-bar-fill::after { content:"";position:absolute;left:5px;right:5px;top:2px;height:2px;background:#d0f3ec;opacity:.35;border-radius:2px; }
.conversation-progress .progress-caption { margin-bottom:3px; }
.conversation-progress .flow-text-button { min-height:27px;min-width:32px;padding:2px;color:var(--muted); }
.conversation-progress .flow-text-button svg { width:18px;height:18px; }
.flow-question-toolbar { padding-top:0;padding-bottom:0; }
.flow-question-toolbar button { min-height:34px; }
.conversation-stage { flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden; }
.conversation-head { display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;align-items:start;padding:12px 20px 14px;flex:none; }
.conversation-avatar { position:relative;width:96px;aspect-ratio:1199/1312;align-self:start;filter:brightness(var(--art-brightness,1));margin-top:8px; }
.conversation-avatar > img, .conversation-avatar > canvas { position:absolute;inset:0;width:100%;height:100%;object-fit:contain; }
.conversation-avatar[data-front-rig="true"] > img { visibility:hidden; }
.conversation-avatar > canvas { z-index:1; }
.conversation-avatar::after { content:"";position:absolute;z-index:3;left:-3%;right:-3%;bottom:-2px;height:16%;background:#29413f;border-top:3px solid #a68d5c;border-radius:4px 4px 5px 5px;box-shadow:0 3px 5px #07151c66;pointer-events:none; }
.conversation-avatar .conversation-ink { position:absolute;inset:0;width:100%;height:100%;z-index:2;fill:none;stroke:#6d5134;stroke-width:.65;stroke-linecap:round;opacity:0;pointer-events:none; }
.flow-question[data-writing="true"] .conversation-ink { animation:notebook-ink 360ms var(--ease-out) both; }
@keyframes notebook-ink { 0% { opacity:0;clip-path:inset(0 60% 0 0); } 40% { opacity:.9; } 75% { opacity:.9;clip-path:inset(0 45% 0 0); } 100% { opacity:0;clip-path:inset(0 45% 0 0); } }
#conversationPrompt { min-width:0; }
.conversation-speech { position:relative;border:1px solid #607c8b;background:#20343f;border-radius:15px;padding:15px 14px;min-height:76px; }
.conversation-speech::before { content:"";position:absolute;left:-7px;top:31px;width:12px;height:12px;background:#20343f;border-left:1px solid #607c8b;border-bottom:1px solid #607c8b;transform:rotate(45deg); }
.conversation-speech h1 { font-size:17px;line-height:1.5;letter-spacing:-.015em;font-weight:550;margin:0;text-wrap:wrap;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none; }
.spoken-word { opacity:0;animation:speak-word 100ms var(--ease-out) both;animation-delay:var(--word-delay,0ms); }
@keyframes speak-word { from { opacity:0; } to { opacity:1; } }
.speech-emphasis { color:var(--gold);font-weight:650; }
.flow-question[data-receipt="true"] .conversation-speech { background:var(--success);border-color:var(--success);color:#173529; }
.flow-question[data-receipt="true"] .conversation-speech::before { background:var(--success);border-color:var(--success); }
.flow-question[data-receipt="true"] .speech-emphasis { color:inherit; }
.conversation-preparing { margin:13px 0 0;padding-top:11px;border-top:1px solid #17352933;color:#244b36;font-size:12px;line-height:1.6;font-weight:550; }
[data-speech-finished="true"] .spoken-word { opacity:1;animation:none; }
#conversationAnswers { flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 23px 20px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--app-line) transparent; }
.conversation-answer-content { min-height:100%; }
.conversation-answer-content.is-text { display:flex;flex-direction:column; }
.conversation-answer-content .flow-question-hint { margin:0 0 14px;font-size:12px; }
.conversation-answer-content .flow-choices, .conversation-answer-content .flow-choices.tiles { grid-template-columns:1fr;gap:9px; }
.conversation-answer-content .flow-choices.tiles .flow-choice { min-height:54px;padding:13px 42px 13px 14px; }
.conversation-answer-content .flow-choice.compact { min-height:51px; }
.conversation-answer-content .flow-choice-check { top:calc(50% - 9px); }
.conversation-answer-content .flow-protected { margin-top:16px;padding-top:12px; }
.conversation-answer-content .flow-more { margin-bottom:10px; }
.conversation-answer-content.is-text .flow-field { flex:1;min-height:140px; }
.conversation-answer-content.is-text textarea { flex:1;resize:none;min-height:112px;max-height:220px;line-height:1.6;caret-color:var(--gold); }
.conversation-answer-content .flow-note { margin-top:0;margin-bottom:12px;padding-top:8px; }
.conversation-stage[data-compact="true"] { overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin; }
.conversation-stage[data-compact="true"] #conversationAnswers { flex:none;overflow:visible; }
.conversation-stage[data-compact="true"] .conversation-answer-content.is-text .flow-field { min-height:135px; }
.flow-intro .flow-greeting { justify-content:center;min-height:0;gap:24px;padding:8px 0; }
.flow-intro .flow-character { width:210px;height:auto;aspect-ratio:1199/1312;max-width:68%;margin:0 auto;flex-shrink:0; }
.flow-character[data-front-rig="true"] > img { visibility:hidden; }
.flow-character > canvas { width:100%;height:100%; }
.flow-intro .flow-speech { background:#20343f;border:1px solid #607c8b;color:var(--text);border-radius:16px;padding:19px;margin:0; }
.flow-intro .flow-speech::after { background:#20343f;width:17px;height:17px;bottom:-9px;left:calc(50% - 9px);border-right:1px solid #607c8b;border-bottom:1px solid #607c8b; }
.flow-intro .flow-speech h1 { font-size:23px;line-height:1.3;font-weight:700;letter-spacing:-.025em;text-wrap:wrap; }
.flow-intro .flow-speech p { color:#d4e1e7;font-size:14px;line-height:1.65; }
.flow-intro .flow-speech p .spoken-word { animation-delay:calc(var(--word-delay,0ms) + 240ms); }
.flow-prototype-caption { color:var(--muted);font-size:11px;line-height:1.4;text-align:center;margin:0; }
.app-shell[data-large-text="true"] .conversation-speech h1 { font-size:19px; }
.app-shell[data-large-text="true"] .conversation-answer-content .flow-choice { font-size:16px; }
body[data-page-hidden="true"] .spoken-word,body[data-page-hidden="true"] .conversation-ink { animation-play-state:paused; }
body[data-reduced-motion="true"] .spoken-word { opacity:1;animation:none; }
@media(prefers-reduced-motion:reduce){ .spoken-word { opacity:1;animation:none; } }
@media(max-width:380px){ .conversation-head { grid-template-columns:82px minmax(0,1fr);gap:8px;padding-left:16px;padding-right:16px; } .conversation-avatar { width:82px; } .conversation-speech { padding:13px 12px; } .conversation-speech h1 { font-size:16px; } }
@media(max-height:650px) and (max-width:767px){ .flow-intro .flow-character { width:156px; } .flow-intro .flow-greeting { gap:16px; } }

/* A grounded full-body asset belongs to the introductory stage. The bust and
   its foreground counter are reserved for the compact conversation header. */
.flow-intro .flow-greeting { gap:16px; }
.intro-figure-stage { position:relative;isolation:isolate;flex:none;height:300px;height:min(300px,38dvh);width:200px;max-width:78%;margin:0 auto; }
.flow-intro .intro-figure-stage .flow-character { position:relative;z-index:1;width:100%;height:100%;max-width:none;aspect-ratio:auto;margin:0; }
.intro-stage-floor { position:absolute;z-index:0;left:14%;right:14%;height:8px;bottom:2.5%;border-radius:50%;background:#09191db3;box-shadow:0 3px 8px #09191d66; }
.conversation-speech { overflow:visible; }
.conversation-speech::before { z-index:0; }
#conversationUtterance { position:relative;min-width:0; }
.map-stop.is-concealed { --map-face:#263b32;--map-focus:#2e493d;--map-edge:#182a22;--map-ink:#a6b8ab;--map-label:#a6b8ab;--map-panel:#243b32;--map-panel-ink:#e2eee5;--map-action:var(--gold);--map-action-ink:var(--gold-ink); }
.map-stop.is-concealed .stop-label { display:none; }
.map-stop.is-concealed .stop-glyph svg { width:22px;height:22px; }
@media (max-width:767px), (max-width:1024px) and (max-height:600px) and (pointer:coarse) {
  body[data-keyboard="true"] .conversation-progress { padding:4px 16px 6px; }
  body[data-keyboard="true"] .conversation-stage { overflow:hidden; }
  body[data-keyboard="true"] .conversation-head { grid-template-columns:48px minmax(0,1fr);padding:4px 16px 8px;gap:8px;max-height:48%;overflow-y:auto;scrollbar-width:thin; }
  body[data-keyboard="true"] .conversation-avatar { width:48px;margin-top:4px; }
  body[data-keyboard="true"] .conversation-speech { min-height:0;padding:10px 12px; }
  body[data-keyboard="true"] .conversation-speech h1 { font-size:16px;line-height:1.45; }
  body[data-keyboard="true"] .conversation-stage #conversationAnswers { flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 16px 12px;overscroll-behavior:contain;scroll-padding:10px; }
  body[data-keyboard="true"] .conversation-answer-content.is-text .flow-field { flex:none;min-height:0;margin-bottom:14px; }
  body[data-keyboard="true"] .conversation-answer-content.is-text textarea { flex:none;height:96px;min-height:96px;max-height:144px;font-size:16px;scroll-margin:10px; }
}
@media(max-height:650px) and (max-width:767px){ .intro-figure-stage { height:210px; } }
