:root{font-family:'Segoe UI',system-ui,sans-serif;color:#263d31;background:#faf9f8;font-synthesis:none;--paper:#fffdf6;--learner-green:#D8FCD3;--green:#254f3c;--muted:#687266}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{opacity:.5;cursor:wait}button,input{-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #b18b28;outline-offset:4px}[hidden]{display:none!important}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button{transition:background-color .18s,box-shadow .18s}button:hover{background:#e9eddf}button:active{filter:brightness(.96)}
.practice{position:relative;min-height:100svh;height:100dvh;isolation:isolate;overflow:hidden}.stage{position:absolute;inset:0;overflow:hidden;background:#c3baa0;z-index:-2}.stage img{display:block}.scenery{position:absolute;width:max(100vw,150dvh);height:max(100dvh,66.667vw);left:50%;top:50%;transform:translate(-50%,-50%)}.room{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}#julien-canvas{display:block;width:100%;height:100%}.scene-vignette{position:absolute;inset:0;z-index:7;background:linear-gradient(180deg,#17281e55,transparent 22%,transparent 53%,#18312465 80%,#152b20b3);pointer-events:none}
.topbar{position:absolute;top:max(22px,env(safe-area-inset-top));left:32px;right:32px;display:flex;align-items:center;justify-content:space-between;gap:16px}.icon-button{display:grid;place-items:center;border:1px solid #ffffff50;background:#fffdf6ed;border-radius:50%;width:44px;height:44px;flex-shrink:0;font-size:26px}.location{text-align:center;color:#fffdf6;text-shadow:0 1px 12px #24342877}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:650}h1{font:400 25px Georgia,serif;margin:4px 0 0}.mission{position:absolute;left:32px;top:105px;width:300px;background:var(--paper);border-radius:16px;box-shadow:0 6px 30px #16291f17;overflow:hidden}.mission>button{display:flex;align-items:center;text-align:left;width:100%;gap:12px;border:0;background:transparent;padding:17px}.mission-icon{display:grid;place-items:center;border-radius:50%;width:36px;height:36px;flex-shrink:0;background:#edf1df;color:#4f6d36}.mission small{display:block;font-size:9px;letter-spacing:.12em;color:#62774e;font-weight:700;margin-bottom:5px}.mission strong{display:block;font-size:14px;font-weight:650}.mission-summary{display:block;font-size:11px;color:var(--muted);margin-top:5px;line-height:1.5}.chevron{margin-left:auto}.mission:has([aria-expanded=true]) .chevron{transform:rotate(180deg)}#mission-detail{padding:0 19px 15px;font-size:13px;line-height:1.6;border-top:1px solid #e7e9de}ol{padding-left:20px}li+li{margin-top:8px}.quiet{color:var(--muted);font-size:13px;line-height:1.6}
.conversation{position:absolute;bottom:max(17px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(540px,calc(100% - 32px))}.dialogue-card{background:var(--paper);border-radius:18px;padding:18px 22px 10px;box-shadow:0 8px 40px #172a2220}.dialogue-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.dialogue-heading>span{display:flex;align-items:center;gap:7px}.dialogue-heading strong{font-size:13px;font-weight:650}.dialogue-heading small{font-size:11px;color:var(--muted)}.status-dot{display:inline-block;width:6px;height:6px;background:#668a49;border-radius:50%}.text-button{background:transparent;border:0;font-size:11px;padding:8px 3px;text-decoration:underline;text-underline-offset:3px;color:#586749}.conversation{--dialogue-font-size:18px}#caption{font-size:var(--dialogue-font-size);line-height:1.55;margin:10px 0 14px;max-height:23dvh;overflow-y:auto}.help-actions{display:flex;justify-content:center;gap:8px;border-top:1px solid #e6e8dc;padding-top:5px}.help-actions button{display:flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;border-radius:8px;min-height:40px;padding:8px 16px;font-size:12px}.help-actions button:hover{background:#edf0e3}.help-actions svg{width:16px;height:16px}.speaking-controls{display:flex;align-items:center;justify-content:center;gap:40px;margin-top:17px;color:var(--paper)}.mic-control{display:flex;align-items:center;flex-direction:column;gap:9px;font-size:12px;font-weight:600}#mic{width:76px;height:76px;border-radius:50%;border:5px solid #e0e9c440;background:#e4f0c6;color:#294b29;box-shadow:0 0 0 7px #e4f0c619,0 4px 16px #14281c33;display:grid;place-items:center}#mic:hover{background:#f0f8dc}#mic svg{width:30px;height:30px;stroke-width:1.8}#mic.recording{background:#a53f35;color:white;border-color:#e9b1a2}#mic.recording svg{animation:recording 1.2s ease-in-out infinite}@keyframes recording{50%{opacity:.5}}.secondary-control,.level-label{width:92px;display:flex;align-items:center;flex-direction:column;gap:8px;font-size:11px;color:inherit}.secondary-control{background:transparent;border:0;padding:10px 0;border-radius:9px}.secondary-control:hover{background:#ffffff1c}.level-label strong{font-size:13px;letter-spacing:.08em;border:1px solid #fffdf660;border-radius:6px;padding:3px 6px;font-weight:600}.speaker-state{text-align:center;font-size:10px;color:#fffdf6c9;margin:8px 0 0;min-height:14px}#notice:empty{display:none}#notice{font-size:12px;line-height:1.5;margin:8px 0 0;background:var(--paper);border-left:3px solid #ab853a;padding:9px 13px;border-radius:7px;max-height:14dvh;overflow:auto}
#hint-panel,#composer{border-top:1px solid #e1e5d7;margin-top:5px;padding:9px 0 6px}.panel-heading{display:flex;align-items:center;justify-content:space-between;font-size:12px}.panel-heading label{font-size:12px;font-weight:600}#hint-text{font-size:13px;line-height:1.55;margin:5px 0 10px}#hint-panel>small,#composer>small{display:block;font-size:10px;color:var(--muted);margin:8px 0 2px}.suggestions{display:flex;flex-wrap:wrap;gap:6px}.suggestions button,.motion-preview button,.pose-options button{background:#edf1e3;border:1px solid #dce2d0;border-radius:7px;padding:9px 10px;font-size:11px}form{display:flex;gap:8px}form input{min-width:0;flex:1;border:1px solid #c6d0bd;border-radius:9px;background:white;padding:12px;font-size:16px;color:#263d31}#send{width:46px;border:0;border-radius:9px;background:var(--green);color:white;display:grid;place-items:center}#send:hover{background:#356b50}
dialog{color:#263d31;width:min(460px,calc(100% - 32px));max-height:85dvh;border:0;border-radius:20px;padding:25px;background:var(--paper);box-shadow:0 24px 100px #14281c44}dialog::backdrop{background:#152a226b;backdrop-filter:blur(5px)}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}h2{font:400 25px Georgia,serif;margin:0;line-height:1.2}.modal-heading .icon-button{border-color:#dfe4d5;width:36px;height:36px}dialog>p{font-size:14px;line-height:1.6}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e3e6da;padding:17px 0;font-size:14px;cursor:pointer}.setting-row small{display:block;font-size:11px;color:var(--muted);margin-top:5px}input[type=checkbox]{width:20px;height:20px;accent-color:var(--green)}.mode-label{background:#eef0e4;border-radius:7px;padding:10px;font-size:12px}details{font-size:12px;margin-top:20px}summary{cursor:pointer;padding:6px 0}.pose-options,.motion-preview{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.primary-button,.restart-button{width:100%;padding:14px;border-radius:10px;border:0;margin-top:12px;font-size:13px}.primary-button{background:var(--green);color:white}.primary-button:hover{background:#346749}.restart-button{background:transparent;text-decoration:underline;text-underline-offset:4px}#history article{border-top:1px solid #e1e5d7;padding:15px 0}#history article strong{font-size:11px;color:var(--muted)}#history article p{font-size:15px;line-height:1.6;margin:6px 0 0}
@media(min-width:1100px){.conversation{width:560px}.mission{top:115px;left:40px}.topbar{left:40px;right:40px}}
@media(max-width:600px){.topbar{top:max(14px,env(safe-area-inset-top));left:16px;right:16px}.location .eyebrow{font-size:8px}h1{font-size:22px}.icon-button{width:38px;height:38px}.mission{top:76px;left:16px;width:calc(100% - 32px);border-radius:12px}.mission>button{padding:12px 14px}.mission-summary{display:none}.mission strong{font-size:13px}.mission-icon{width:30px;height:30px}.mission small{font-size:8px;margin-bottom:3px}.conversation{bottom:max(12px,env(safe-area-inset-bottom))}.dialogue-card{padding:13px 16px 7px;border-radius:15px}.dialogue-heading small{display:none}.dialogue-heading strong{font-size:12px}.conversation{--dialogue-font-size:16px}#caption{font-size:var(--dialogue-font-size);line-height:1.5;margin:8px 0 10px;max-height:18dvh}.help-actions button{min-height:36px}.speaking-controls{margin-top:14px;gap:27px}#mic{width:66px;height:66px}.mic-control{gap:8px;font-size:11px}.speaker-state{margin-top:5px;font-size:9px}.secondary-control,.level-label{width:82px}.conversation:has(#composer:not([hidden])),.conversation:has(#hint-panel:not([hidden])){max-height:calc(100dvh - 152px);overflow:auto;border-radius:15px}.mission:has([aria-expanded=true]){z-index:3;max-height:60dvh;overflow:auto}}
@media(max-height:650px) and (min-width:700px){.mission{width:250px}.conversation{left:auto;right:24px;transform:none;width:380px}.topbar .location{margin-right:auto;text-align:left}.mission{top:95px}.speaking-controls{gap:20px;margin-top:12px}#mic{width:56px;height:56px}.conversation{--dialogue-font-size:16px}.mission-summary{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-height:650px) and (min-width:700px){.mission{top:auto;bottom:24px;width:300px;max-width:calc(50% - 56px)}.mission:has([aria-expanded=true]){max-height:65dvh;overflow:auto}}
@media(max-height:650px) and (max-width:600px){.dialogue-card{padding:10px 14px 5px}.conversation{--dialogue-font-size:14px}#caption{font-size:var(--dialogue-font-size);line-height:1.5;margin:6px 0 8px;max-height:16dvh}.speaking-controls{margin-top:11px}.mic-control{gap:6px}#mic{width:56px;height:56px}.help-actions button{min-height:36px;padding:6px 12px}.speaker-state{font-size:9px}.dialogue-heading .text-button{padding:5px 2px}}







/* Scene geometry owns the portrait and the counter, independent of UI cards.
   The still image counter begins at 70.5% of the shared 3:2 illustration. */
.stage{--counter-line:76dvh;--scene-height:max(108dvh,66.666667vw);--portrait-width:min(90vw,46dvh);--portrait-center:50%}
.scenery{width:calc(var(--scene-height)*1.5);height:var(--scene-height);top:calc(var(--counter-line) - var(--scene-height)*.705);left:50%;transform:translateX(-50%)}
.character{position:absolute;width:var(--portrait-width);aspect-ratio:2/3;left:calc(var(--portrait-center) - var(--portrait-width)/2);top:auto;bottom:calc(100% - var(--counter-line) - 3dvh);z-index:4;mask-image:none}
.counter-foreground{clip-path:inset(70.5% 0 0);z-index:5;pointer-events:none}
.counter-foreground img{width:100%;height:100%;object-fit:fill}
/* Add only the two edited regions; the approved café artwork stays intact. */
.coffee-machine-detail{mask-image:linear-gradient(to right,transparent 34.8%,#000 35.8%,#000 64.6%,transparent 65.5%),linear-gradient(to bottom,transparent 33%,#000 34%,#000 58%,transparent 59%);mask-composite:intersect}
.wall-clock-detail{mask-image:radial-gradient(ellipse 7.2% 11.3% at 51.7% 21%,#000 84%,transparent 100%)}
@media(max-width:600px){.wall-clock-detail{transform:translateX(-2%)}}
@media(max-width:900px) and (min-height:651px){.mission{top:76px;left:16px;width:calc(100% - 32px);border-radius:12px}.mission>button{padding:12px 14px}.mission-summary{display:none}.mission strong{font-size:13px}.mission-icon{width:30px;height:30px}.mission small{font-size:8px;margin-bottom:3px}}
@media(max-width:600px){.stage{--portrait-width:min(90vw,43dvh)}.scenery{left:calc(50% + 30vw)}}
@media(max-height:650px) and (min-width:700px){.stage{--portrait-width:42dvh;--portrait-center:34%}}
@media(max-height:650px) and (max-width:600px){.stage{--counter-line:84dvh;--scene-height:max(120dvh,66.666667vw);--portrait-width:40dvh}}
/* All tasks remain visible, aligned with the left edge of the dialogue. */
.task-prompt{margin:0 0 16px;color:#fff;text-align:left;text-shadow:0 1px 4px #10291c,0 2px 12px #10291c99}
.task-prompt ul{display:grid;gap:8px;list-style:none;padding:0;margin:0}
.task-prompt li{display:flex;align-items:center;justify-content:flex-start;gap:10px;margin:0;font-size:var(--dialogue-font-size);line-height:1.4;font-weight:600}
.task-circle{display:grid;place-items:center;width:1em;height:1em;flex:0 0 1em;border:1.5px solid #fff;border-radius:50%;box-shadow:0 1px 5px #10291c55;transition:background-color .18s,border-color .18s}
.task-circle svg{width:.75em;height:.75em;stroke-width:2.5;opacity:0}
[data-goal][data-complete="true"] .task-circle{background:var(--learner-green);border-color:var(--learner-green);color:#294b29}
[data-goal][data-complete="true"] .task-circle svg{opacity:1}
#task-retry{border:0;background:transparent;color:#fff;font-size:11px;padding:6px 0;margin-top:4px;text-decoration:underline;text-underline-offset:3px;text-shadow:inherit}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){.task-prompt{margin-bottom:14px}}
@media(max-height:650px) and (max-width:600px){.stage{--portrait-width:50dvh}}

/* Keep the title and microphone centered after removing optional controls. */
.topbar{display:grid;grid-template-columns:1fr auto 1fr}.topbar #leave{justify-self:start}
.speaking-controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.speaking-controls .secondary-control{justify-self:end}

/* The café stays visible between messages; only individual bubbles have a surface. */
.chat-panel{position:relative;background:transparent;box-shadow:none;padding:0}
.chat-window{height:calc(clamp(180px,32dvh,310px) + var(--chat-controls-space));overflow-y:scroll;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#fffdf6a8 #263d3140;padding:8px 12px 14px 8px;border-radius:4px;outline-offset:3px}
.chat-window::-webkit-scrollbar{width:5px}.chat-window::-webkit-scrollbar-track{background:#263d3140;border-radius:5px}.chat-window::-webkit-scrollbar-thumb{background:#fffdf6b8;border-radius:5px}
.chat-messages{display:flex;flex-direction:column;justify-content:flex-end;gap:18px;min-height:100%}
.message-bubble{position:relative;max-width:86%;padding:18px 23px;border-radius:18px;background:var(--paper);color:#263d31;align-self:flex-start;box-shadow:0 2px 8px #16291f12;font-size:calc(var(--dialogue-font-size) + 2px);line-height:1.55;overflow-wrap:anywhere}
.message-bubble p{margin:0}.message-bubble::after{content:'';position:absolute;left:20px;bottom:-13px;width:24px;height:26px;background:inherit;clip-path:polygon(0 0,100% 0,0 100%)}
.message-bubble.user{align-self:flex-end;background:var(--learner-green)}
.message-bubble.user::after{left:auto;right:20px;clip-path:polygon(0 0,100% 0,100% 100%)}
.delivery-status{display:block;margin:7px 0 0;font-size:11px;color:#37533b;line-height:1.4}.delivery-status:is(button){padding:5px 0;border:0;background:transparent;text-decoration:underline;text-underline-offset:3px}
.latest-message{position:absolute;right:18px;top:8px;border:1px solid #dce5d4;background:var(--paper);border-radius:20px;padding:8px 12px;font-size:12px;box-shadow:0 3px 12px #18312433}
.chat-panel .help-actions{border:0;color:var(--paper);padding-top:9px;gap:4px}.chat-panel .help-actions button{background:#203e3270;text-shadow:0 1px 3px #16291f;border-radius:20px;min-height:36px}.chat-panel .help-actions button:hover{background:#203e32c0}
.chat-panel #hint-panel,.chat-panel #composer{background:var(--paper);padding:12px 16px;border:0;border-radius:14px;margin-top:10px;max-height:25dvh;overflow-y:auto}
.connection-status{text-align:center;color:#fffdf6ba;font-size:10px;line-height:1.4;margin:3px 0 0;text-shadow:0 1px 4px #16291f}
.task-prompt{margin-bottom:8px}.task-prompt ul{gap:6px}
.conversation:has(#composer:not([hidden])) .chat-window,.conversation:has(#hint-panel:not([hidden])) .chat-window{height:calc(22dvh + var(--chat-controls-space));min-height:96px}
@media(max-width:600px){.chat-window{height:calc(30dvh + var(--chat-controls-space));min-height:140px}.message-bubble{padding:16px 21px;max-width:88%;border-radius:16px}.speaking-controls{margin-top:12px}.chat-panel .help-actions button{padding:7px 13px}.conversation:has(#composer:not([hidden])),.conversation:has(#hint-panel:not([hidden])){max-height:calc(100dvh - 100px);border-radius:0}.chat-panel #composer>small{font-size:9px}}
@media(max-height:650px){.chat-window{height:calc(30dvh + var(--chat-controls-space));min-height:100px}.chat-messages{gap:14px}.message-bubble{padding:14px 19px}.task-prompt{margin-bottom:5px}.task-prompt ul{gap:4px}.chat-panel .help-actions{padding-top:5px}.chat-panel .help-actions button{min-height:30px;padding:5px 11px}.connection-status{font-size:9px}.chat-panel #hint-panel,.chat-panel #composer{max-height:26dvh}.conversation:has(#composer:not([hidden])) .chat-window,.conversation:has(#hint-panel:not([hidden])) .chat-window{height:calc(18dvh + var(--chat-controls-space));min-height:80px}}

.chat-viewport{position:relative}.chat-window{scrollbar-width:none;padding-right:18px}.chat-window::-webkit-scrollbar{display:none}.scroll-indicator{position:absolute;right:1px;top:8px;bottom:8px;width:4px;border-radius:4px;background:#fffdf62e;pointer-events:none}.scroll-indicator span{position:absolute;top:0;width:4px;border-radius:4px;background:#fffdf6bb;min-height:24px}.scroll-indicator[data-overflow="false"] span{opacity:.25}

@media(max-height:650px) and (min-width:700px){.topbar{right:calc(50% + 24px);grid-template-columns:44px 1fr}.topbar .location{margin-right:0;text-align:left}}

.chat-window{mask-image:linear-gradient(to bottom,transparent,#000 12px,#000)}

/* Mission stays beneath the exit control, independent of the scrolling chat. */
.practice>.task-prompt{--dialogue-font-size:18px;position:absolute;top:calc(max(22px,env(safe-area-inset-top)) + 96px);left:32px;width:min(350px,calc(100% - 64px));margin:0;z-index:1}
.practice>.task-prompt li{align-items:baseline}.practice>.task-prompt .task-circle{align-self:flex-start;margin-top:.2em}
@media(min-width:1100px){.practice>.task-prompt{left:40px}}
@media(max-width:600px){.practice>.task-prompt{--dialogue-font-size:16px;top:calc(max(14px,env(safe-area-inset-top)) + 88px);left:16px;width:calc(100% - 32px)}}
@media(max-height:650px) and (min-width:700px){.practice>.task-prompt{--dialogue-font-size:16px;width:calc(50% - 56px)}}
@media(max-height:650px) and (max-width:600px){.practice>.task-prompt{--dialogue-font-size:14px}}
.message-bubble.typing-bubble{display:flex;align-items:center;gap:6px;min-height:48px;padding:17px 20px;width:fit-content}
.typing-dot{width:7px;height:7px;border-radius:50%;background:#68766c;animation:typing-pulse 1.35s ease-in-out infinite}
.typing-dot:nth-of-type(2){animation-delay:.16s}.typing-dot:nth-of-type(3){animation-delay:.32s}
@keyframes typing-pulse{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1}}
@media(prefers-reduced-motion:reduce){.typing-dot{animation:none;opacity:.7}}

.location h1{font-size:34px;line-height:1.2;margin:0}
@media(max-width:600px){.location h1{font-size:30px}}

/* Keep the composer to a single input row, with Close beneath Send. */
.chat-panel #composer{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;margin-top:12px;max-height:none;overflow:visible}
#reply-form{display:grid;grid-template-columns:minmax(0,1fr) 46px;grid-template-rows:48px auto;column-gap:8px;row-gap:2px}
#reply{grid-column:1;grid-row:1;background:var(--paper)}
#reply:focus,#reply:focus-visible{outline:none;box-shadow:none;border-color:#54725d}
#send{grid-column:2;grid-row:1;width:46px;height:48px}
#type-close{grid-column:2;grid-row:2;justify-self:center;color:var(--paper);padding:5px 3px;font-size:11px;line-height:1.3;text-shadow:0 1px 4px #203e32}
#type-close:hover{background:#203e3270;border-radius:5px}

/* Side actions share a stable two-row position beside the microphone. */
.conversation{--chat-controls-space:45px}
.speaking-controls{column-gap:60px}
.speaking-controls .secondary-control{width:78px;padding:6px 0;gap:6px}
@media(max-width:600px){.speaking-controls{column-gap:28px}}
@media(max-height:650px){.conversation{--chat-controls-space:35px}}
@media(max-height:650px) and (min-width:700px){.speaking-controls{column-gap:36px}}

/* Learner messages and microphone share one color. Corrections stay outside the bubble. */
#mic:not(.recording){background:var(--learner-green);border-color:#D8FCD340;box-shadow:0 0 0 7px #D8FCD319,0 4px 16px #14281c33}
.user-message{align-self:flex-end;max-width:86%;min-width:0}
.user-message>.message-bubble{max-width:100%}
.message-correction{font-size:12px;line-height:1.5;color:#fff;margin:12px 5px 0;text-shadow:0 1px 4px #10291c;overflow-wrap:anywhere}.message-correction p{margin:0}.message-correction-explanation{font-size:11px;margin-top:4px!important;color:#fffdf6d9}.correction-change{color:#c7ffc0;font-weight:700;text-decoration-line:underline;text-decoration-color:currentColor;text-decoration-thickness:2px;text-underline-offset:.18em}.history-guidance .correction-change{color:#2f7442;text-shadow:none}
@media(max-width:600px){.user-message{max-width:88%}}

.location-subtitle{margin:5px 0 0;font-size:11px;line-height:1.4;font-weight:600;letter-spacing:.12em;color:var(--paper)}
.topbar{align-items:start}

/* Symmetric lower controls; each assistant message owns its replay control. */
.speaking-controls #hint{justify-self:start}
.secondary-control:is(:hover,:focus-visible){background:#ffffff1c}
.assistant-message{display:flex;align-items:center;gap:10px;align-self:flex-start;max-width:100%;min-width:0}
.assistant-message>.message-bubble{max-width:calc(100% - 46px);min-width:0}
.message-audio{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:8px;border:0;border-radius:50%;background:#203e3299;color:var(--paper)}
.message-audio:hover{background:#203e32dd}
.message-audio svg{width:19px;height:19px;grid-area:1/1}
.message-audio .stop-symbol{display:none}
.message-audio[data-state=playing] .repeat-symbol,.message-audio[data-state=loading] .repeat-symbol{display:none}
.message-audio[data-state=playing] .stop-symbol,.message-audio[data-state=loading] .stop-symbol{display:block}

.scroll-indicator{opacity:0;transition:opacity .18s ease}
.scroll-indicator[data-scrolling="true"][data-overflow="true"]{opacity:1}
/* Each illustrated scene shares UI geometry; only the art's measured table edge differs. */
[data-scene="jacqueline"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.686);left:50%}
[data-scene="jacqueline"] .counter-foreground{clip-path:inset(68.6% 0 0)}
[data-scene="jacqueline"] .stage{--scene-height:max(112dvh,66.666667vw);--portrait-width:56dvh}
[data-scene="jacqueline"] .character{bottom:calc(100% - var(--counter-line) - 20dvh)}
@media(max-width:600px){[data-scene="jacqueline"] .stage{--portrait-width:min(106vw,56dvh)}[data-scene="jacqueline"] .character{bottom:calc(100% - var(--counter-line) - 21dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="jacqueline"] .stage{--portrait-width:52dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="jacqueline"] .stage{--scene-height:max(126dvh,66.666667vw)}}

/* The apartment worktop occludes the thighs; the belt and jeans stay visible. */
/* Léa stays behind the pharmacy counter independently of chat height. */
[data-scene="lea"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.653);left:50%}
[data-scene="lea"] .counter-foreground{clip-path:inset(65.3% 0 0)}
[data-scene="lea"] .stage{--counter-line:78dvh;--scene-height:max(122dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="lea"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="lea"] .stage{--portrait-width:min(112vw,51dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="lea"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="lea"] .stage{--counter-line:84dvh;--scene-height:max(132dvh,66.666667vw)}}
[data-scene="lefevre"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.754);left:50%}
[data-scene="lefevre"] .counter-foreground{clip-path:inset(75.4% 0 0)}
[data-scene="lefevre"] .stage{--counter-line:78dvh;--scene-height:max(108dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="lefevre"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="lefevre"] .stage{--portrait-width:min(112vw,51dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="lefevre"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="lefevre"] .stage{--counter-line:84dvh;--scene-height:max(120dvh,66.666667vw)}}
/* Théo sits across the dinner table; its image edge owns body occlusion. */
[data-scene="theo"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.682);left:50%}
[data-scene="theo"] .counter-foreground{clip-path:inset(68.2% 0 0)}
[data-scene="theo"] .stage{--counter-line:78dvh;--scene-height:max(116dvh,66.666667vw);--portrait-width:55dvh}
[data-scene="theo"] .character{bottom:calc(100% - var(--counter-line) - 20dvh)}
[data-scene="sandrine"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.673);left:50%}
[data-scene="sandrine"] .counter-foreground{clip-path:inset(67.3% 0 0)}
[data-scene="sandrine"] .stage{--counter-line:78dvh;--scene-height:max(116dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="sandrine"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="sandrine"] .stage{--portrait-width:min(112vw,51dvh)}[data-scene="sandrine"] h1{font-size:clamp(22px,6vw,30px)}}
@media(max-height:650px) and (min-width:700px){[data-scene="sandrine"] .stage{--portrait-width:49dvh}[data-scene="sandrine"] h1{font-size:22px}}
@media(max-height:650px) and (max-width:600px){[data-scene="sandrine"] .stage{--counter-line:84dvh;--scene-height:max(125dvh,66.666667vw)}}
@media(max-width:600px){[data-scene="theo"] .stage{--portrait-width:min(118vw,55dvh)}[data-scene="theo"] h1{font-size:clamp(22px,6vw,30px)}}
@media(max-height:650px) and (min-width:700px){[data-scene="theo"] .stage{--portrait-width:53dvh}[data-scene="theo"] h1{font-size:22px}}
@media(max-height:650px) and (max-width:600px){[data-scene="theo"] .stage{--counter-line:84dvh;--scene-height:max(125dvh,66.666667vw)}}

/* Marco stands behind the padded spectator ledge, independently of chat. */
[data-scene="marco"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.625);left:50%}
[data-scene="marco"] .counter-foreground{clip-path:inset(62.5% 0 0)}
[data-scene="marco"] .stage{--counter-line:78dvh;--scene-height:max(128dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="marco"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="marco"] .stage{--portrait-width:min(112vw,51dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="marco"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="marco"] .stage{--counter-line:84dvh;--scene-height:max(138dvh,66.666667vw)}}

/* Bruno stands behind the fixed horizontal market counter. */
[data-scene="bruno"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.555);left:50%}
[data-scene="bruno"] .counter-foreground{clip-path:inset(55.5% 0 0)}
[data-scene="bruno"] .stage{--counter-line:78dvh;--scene-height:max(144dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="bruno"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="bruno"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="bruno"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="bruno"] .stage{--counter-line:84dvh;--scene-height:max(154dvh,66.666667vw)}}

/* Céline stands behind the apartment island, independently of chat. */
[data-scene="celine"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.539);left:50%}
[data-scene="celine"] .counter-foreground{clip-path:inset(53.9% 0 0)}
[data-scene="celine"] .stage{--counter-line:78dvh;--scene-height:max(148dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="celine"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="celine"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="celine"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="celine"] .stage{--counter-line:84dvh;--scene-height:max(158dvh,66.666667vw)}}

/* Gilles stands beyond the entry console; the scene owns lower-body occlusion. */
[data-scene="gilles"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.628);left:50%}
[data-scene="gilles"] .counter-foreground{clip-path:inset(62.8% 0 0)}
[data-scene="gilles"] .stage{--counter-line:78dvh;--scene-height:max(128dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="gilles"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="gilles"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="gilles"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="gilles"] .stage{--counter-line:84dvh;--scene-height:max(138dvh,66.666667vw)}}

/* Nadia stays behind the railway ticket counter. */
[data-scene="nadia"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.63);left:50%}
[data-scene="nadia"] .counter-foreground{clip-path:inset(63% 0 0)}
[data-scene="nadia"] .stage{--counter-line:78dvh;--scene-height:max(128dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="nadia"] .character{bottom:calc(100% - var(--counter-line) - 11dvh)}
@media(max-width:600px){[data-scene="nadia"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="nadia"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="nadia"] .stage{--counter-line:84dvh;--scene-height:max(138dvh,66.666667vw)}}

/* Amélie sits across the oak table; its measured edge owns occlusion. */
[data-scene="amelie"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.664);left:50%}
[data-scene="amelie"] .counter-foreground{clip-path:inset(66.4% 0 0)}
[data-scene="amelie"] .stage{--counter-line:78dvh;--scene-height:max(124dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="amelie"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="amelie"] .stage{--portrait-width:min(100vw,47dvh)}[data-scene="amelie"] h1{font-size:clamp(22px,6vw,30px)}}
@media(max-height:650px) and (min-width:700px){[data-scene="amelie"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="amelie"] .stage{--counter-line:84dvh;--scene-height:max(134dvh,66.666667vw)}}

/* Fatou is anchored behind the salon reception counter, independently of chat. */
[data-scene="fatou"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.644);left:50%}
[data-scene="fatou"] .counter-foreground{clip-path:inset(64.4% 0 0)}
[data-scene="fatou"] .stage{--counter-line:78dvh;--scene-height:max(124dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="fatou"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="fatou"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="fatou"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="fatou"] .stage{--counter-line:84dvh;--scene-height:max(134dvh,66.666667vw)}}

/* Dr Lambert stands behind his consultation counter, independent of chat. */
[data-scene="lambert"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.676);left:50%}
[data-scene="lambert"] .counter-foreground{clip-path:inset(67.6% 0 0)}
[data-scene="lambert"] .stage{--counter-line:78dvh;--scene-height:max(124dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="lambert"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="lambert"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="lambert"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="lambert"] .stage{--counter-line:84dvh;--scene-height:max(134dvh,66.666667vw)}}
@media(max-width:600px){[data-scene="lambert"] .location h1{font-size:clamp(22px,6vw,30px)}[data-scene="lambert"] .practice>.task-prompt{top:calc(max(14px,env(safe-area-inset-top)) + 108px)}}

/* Manon sits behind the family table, independently of the conversation. */
[data-scene="manon"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.652);left:50%}
[data-scene="manon"] .counter-foreground{clip-path:inset(65.2% 0 0)}
[data-scene="manon"] .stage{--counter-line:78dvh;--scene-height:max(124dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="manon"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="manon"] .stage{--portrait-width:min(100vw,47dvh)}[data-scene="manon"] .location h1{font-size:clamp(22px,6vw,30px)}}
@media(max-height:650px) and (min-width:700px){[data-scene="manon"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="manon"] .stage{--counter-line:84dvh;--scene-height:max(134dvh,66.666667vw)}}

/* Ti-Jean stands behind the maple counter; chat never anchors his body. */
[data-scene="tijean"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.674);left:50%}
[data-scene="tijean"] .counter-foreground{clip-path:inset(67.4% 0 0)}
[data-scene="tijean"] .stage{--counter-line:78dvh;--scene-height:max(124dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="tijean"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="tijean"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="tijean"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="tijean"] .stage{--counter-line:84dvh;--scene-height:max(134dvh,66.666667vw)}}

/* Chantal stands behind the friterie counter; chat never anchors her body. */
[data-scene="chantal"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.623);left:50%}
[data-scene="chantal"] .counter-foreground{clip-path:inset(62.3% 0 0)}
[data-scene="chantal"] .stage{--counter-line:78dvh;--scene-height:max(130dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="chantal"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="chantal"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="chantal"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="chantal"] .stage{--counter-line:84dvh;--scene-height:max(140dvh,66.666667vw)}}

/* Sarah stands behind the optical fitting desk; chat never anchors her body. */
[data-scene="sarah"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.586);left:50%}
[data-scene="sarah"] .counter-foreground{clip-path:inset(58.6% 0 0)}
@media(max-width:600px){[data-scene="sarah"] .scenery{left:calc(50% + var(--scene-height)*.30)}}
[data-scene="sarah"] .stage{--counter-line:78dvh;--scene-height:max(138dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="sarah"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="sarah"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="sarah"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="sarah"] .stage{--counter-line:84dvh;--scene-height:max(148dvh,66.666667vw)}}

/* Sophie stands behind the party table; chat never anchors her body. */
[data-scene="sarah"] .stage,[data-scene="sophie"] .stage{--portrait-center:calc(50% - var(--portrait-width)*.0703125)}
[data-scene="sophie"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.682);left:50%}
[data-scene="sophie"] .counter-foreground{clip-path:inset(68.2% 0 0)}
[data-scene="sophie"] .stage{--counter-line:78dvh;--scene-height:max(122dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="sophie"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="sophie"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="sophie"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="sophie"] .stage{--counter-line:84dvh;--scene-height:max(140dvh,66.666667vw)}}

/* Maxime is anchored behind the pool welcome counter at the image's front edge. */
[data-scene="maxime"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.648);left:50%}
[data-scene="maxime"] .counter-foreground{clip-path:inset(64.8% 0 0)}
[data-scene="maxime"] .stage{--counter-line:78dvh;--scene-height:max(125dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="maxime"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="maxime"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="maxime"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="maxime"] .stage{--counter-line:84dvh;--scene-height:max(140dvh,66.666667vw)}}
/* Mme Faure stays behind the library desk at every viewport size. */
[data-scene="faure"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.747);left:50%}
[data-scene="faure"] .counter-foreground{clip-path:inset(74.7% 0 0)}
[data-scene="faure"] .stage{--counter-line:78dvh;--scene-height:max(122dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="faure"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="faure"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="faure"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="faure"] .stage{--counter-line:84dvh;--scene-height:max(140dvh,66.666667vw)}}
/* The chalet table independently occludes Yannick, including its visible top. */
[data-scene="yannick"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.609);left:50%}
[data-scene="yannick"] .counter-foreground{clip-path:inset(60.9% 0 0)}
[data-scene="yannick"] .stage{--counter-line:78dvh;--scene-height:max(132dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="yannick"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="yannick"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="yannick"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="yannick"] .stage{--counter-line:84dvh;--scene-height:max(142dvh,66.666667vw)}}

/* The vendor and foreground share the market image's level table edge. */
[data-scene="dede"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.723);left:50%}
[data-scene="dede"] .counter-foreground{clip-path:inset(72.3% 0 0)}
[data-scene="dede"] .stage{--counter-line:78dvh;--scene-height:max(122dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="dede"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="dede"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="dede"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="dede"] .stage{--counter-line:84dvh;--scene-height:max(140dvh,66.666667vw)}}

/* Anchor Baptiste to the chairlift service counter, not the conversation. */
[data-scene="baptiste"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.642);left:50%}
[data-scene="baptiste"] .counter-foreground{clip-path:inset(64.2% 0 0)}
[data-scene="baptiste"] .stage{--counter-line:78dvh;--scene-height:max(132dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="baptiste"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="baptiste"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="baptiste"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="baptiste"] .stage{--counter-line:84dvh;--scene-height:max(142dvh,66.666667vw)}}

/* Mme Dubreuil and Napoleon stay together behind the park picnic table. */
[data-scene="dubreuil"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.637);left:50%}
[data-scene="dubreuil"] .counter-foreground{clip-path:inset(63.7% 0 0)}
[data-scene="dubreuil"] .stage{--counter-line:78dvh;--scene-height:max(132dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="dubreuil"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="dubreuil"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="dubreuil"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="dubreuil"] .stage{--counter-line:84dvh;--scene-height:max(142dvh,66.666667vw)}}
/* Thomas stays behind the stone park railing, independent of the chat. */
[data-scene="thomas"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.683);left:50%}
[data-scene="thomas"] .counter-foreground{clip-path:inset(68.3% 0 0)}
[data-scene="thomas"] .stage{--counter-line:78dvh;--scene-height:max(132dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="thomas"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="thomas"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="thomas"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="thomas"] .stage{--counter-line:84dvh;--scene-height:max(142dvh,66.666667vw)}}
/* Completion confetti stays above the scene without intercepting any controls. */
.mission-celebration{position:fixed;inset:0;z-index:100;pointer-events:none;overflow:hidden;contain:strict}
.mission-celebration img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}
@media(prefers-reduced-motion:reduce){.mission-celebration{display:none!important}}

/* Yann stands behind the terrace railing, never attached to chat UI. */
[data-scene="yann"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.630);left:50%}
[data-scene="yann"] .counter-foreground{clip-path:inset(63% 0 0)}
[data-scene="yann"] .stage{--counter-line:78dvh;--scene-height:max(132dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="yann"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="yann"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="yann"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="yann"] .stage{--counter-line:84dvh;--scene-height:max(142dvh,66.666667vw)}}

/* Kenza stands behind the restaurant counter, independent of chat UI. */
[data-scene="kenza"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.610);left:50%}
[data-scene="kenza"] .counter-foreground{clip-path:inset(61% 0 0)}
[data-scene="kenza"] .stage{--counter-line:78dvh;--scene-height:max(136dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="kenza"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="kenza"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="kenza"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="kenza"] .stage{--counter-line:84dvh;--scene-height:max(146dvh,66.666667vw)}}

/* Mme Leroy remains anchored to the apartment landing. */
[data-scene="leroy"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.638);left:50%}
[data-scene="leroy"] .counter-foreground{clip-path:inset(63.8% 0 0)}
[data-scene="leroy"] .stage{--counter-line:78dvh;--scene-height:max(136dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="leroy"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="leroy"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="leroy"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="leroy"] .stage{--counter-line:84dvh;--scene-height:max(146dvh,66.666667vw)}}

/* Mme Martin stands at the school gate independently of chat. */
[data-scene="martin"] .scenery{top:calc(var(--counter-line) - var(--scene-height)*.544);left:50%}
[data-scene="martin"] .counter-foreground{clip-path:inset(54.4% 0 0)}
[data-scene="martin"] .stage{--counter-line:78dvh;--scene-height:max(150dvh,66.666667vw);--portrait-width:51dvh}
[data-scene="martin"] .character{bottom:calc(100% - var(--counter-line) - 15dvh)}
@media(max-width:600px){[data-scene="martin"] .stage{--portrait-width:min(100vw,47dvh)}}
@media(max-height:650px) and (min-width:700px){[data-scene="martin"] .stage{--portrait-width:49dvh}}
@media(max-height:650px) and (max-width:600px){[data-scene="martin"] .stage{--counter-line:84dvh;--scene-height:max(160dvh,66.666667vw)}}

/* The scene paints the full layout viewport, including iOS safe areas. */
html{height:100%;min-height:100%;}body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}.practice{height:100%;min-height:0}

/* Full-screen, current-attempt learning review. */
#chat-history{justify-self:end}
.history-dialog{border-radius:0;position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100%;max-height:none;border:0;padding:0;background:#faf9f8;color:#1c2238;overflow:hidden}
.history-dialog[open]{display:flex;flex-direction:column}.history-dialog::backdrop{background:#1c2238aa}
.history-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:calc(18px + env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 16px max(24px,env(safe-area-inset-left));border-bottom:1px solid #e4dccf}
.history-header p{margin:0 0 5px;font:600 10px system-ui;letter-spacing:.12em}.history-header h2{margin:0;font:400 28px Georgia,serif}.history-header button{border-color:#ded7ca;background:white}
.history-tabs{display:flex;gap:8px;padding:14px 24px;justify-content:center}.history-tabs button,.history-retry{transition:none;border:1px solid #ddd5c8;border-radius:24px;background:white;padding:10px 22px;color:#1c2238;font-size:15px}.history-tabs button[aria-pressed="true"],.history-retry{background:#1c2238;color:white;border-color:#1c2238}
.history-scroll{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:12px max(24px,env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}
.history-scroll section{max-width:740px;margin:auto}.history-message{background:white;border:1px solid #e7dfd2;border-radius:20px;padding:18px 22px;margin:0 12% 18px 0}.history-user{background:#d8fcd3;margin:0 0 18px 12%;border-color:#c3e6bf}.history-message h3{font:600 12px system-ui;margin:0 0 8px}.history-message p,.history-fix p,.history-phrase p{font-size:18px;line-height:1.6;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}.history-message h4,.history-fix h4{font:600 12px system-ui;margin:16px 0 5px}.history-better{font-weight:600}.history-why{font-size:15px!important;color:#526078}.history-empty,.history-note{font:15px/1.6 system-ui;color:#526078}.history-note{margin-top:28px}.history-fix,.history-phrase,.history-win{padding:18px 22px;border:1px solid #e7dfd2;border-radius:16px;background:white;margin-bottom:14px}.history-win{background:#edf7e9}.history-scroll section>h3{font:400 24px Georgia,serif;margin:24px 0 14px}
@media(max-width:600px){.history-header{padding-left:16px;padding-right:16px}.history-header h2{font-size:25px}.history-scroll{padding-left:16px;padding-right:16px}.history-message{margin-right:5%;padding:16px}.history-user{margin-right:0;margin-left:5%}.history-tabs{padding:12px 16px}}
@media(max-height:650px) and (min-width:700px){.topbar{right:24px;grid-template-columns:44px 1fr 44px}}
/* Each exchange keeps the prompt, learner reply and guidance together. */
.history-exchange{background:#fff;border:1px solid #e7dfd2;border-radius:20px;padding:24px;margin:8px 0 22px}
.history-exchange h3,.history-guidance h4{font:600 12px system-ui;margin:0 0 8px}
.history-exchange p{font-size:18px;line-height:1.6;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.history-character{padding-bottom:18px}.history-answer{border-top:1px solid #ece7de;padding:18px 0}
.history-guidance{background:#f0f6ec;border-radius:12px;padding:16px 18px}.history-guidance h4{color:#36543a}
.history-guidance .history-fix{border:0;border-radius:0;background:transparent;padding:0;margin:0}.history-guidance .history-fix+.history-fix{margin-top:18px}
.history-label{font:600 12px system-ui!important}.history-takeaways{margin-top:30px}.history-takeaways>h3{font:400 24px Georgia,serif}
@media(max-width:600px){.history-exchange{padding:18px}.history-guidance{padding:14px}.history-scroll{padding-top:18px}}
