/* Machi Days: quiet paper dialogue beside a single blue-glass response panel. */
.machi-conversation{--ink:#304b50;--muted:#6b8081;--paper:#fbfaf5;--glass:#24495ec9;--mint:#b7ebdc;position:fixed;inset:0;z-index:8;isolation:isolate;color:var(--ink);font-family:'Helvetica Neue','Avenir Next',sans-serif;overflow:hidden;animation:cv-enter .28s ease-out}
body.in-lesson #controls{visibility:hidden}
.cv-vignette{position:absolute;inset:0;z-index:-2;background:linear-gradient(0deg,#132b3344,transparent 65%)}
.cv-portrait{position:absolute;bottom:-18%;left:1%;width:47%;height:114%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 6px 18px #17242630);z-index:-1}
.cv-top{position:absolute;top:max(16px,env(safe-area-inset-top));right:max(26px,env(safe-area-inset-right))}
.cv-button{font:inherit;font-size:14px;color:inherit;border:1px solid #76939b40;border-radius:9px;padding:11px 16px;background:transparent;min-height:42px;cursor:pointer;line-height:1.5;text-align:left;touch-action:manipulation;transition:background .15s}
.cv-button:hover{background:#d2efe926}.cv-button:focus-visible{outline:2px solid #89b6b1;outline-offset:3px}.cv-button:disabled{opacity:.55}
.cv-top .cv-button{color:#fff;background:#29495770;border:1px solid #ffffff65;min-height:36px;font-size:12px;padding:7px 16px;backdrop-filter:blur(8px)}
.cv-layout{--rail:clamp(210px,22vw,288px);position:absolute;inset:76px max(28px,env(safe-area-inset-right)) 30px max(28px,env(safe-area-inset-left));pointer-events:none}.cv-layout>*{pointer-events:auto}
.cv-dialogue{position:absolute;left:12%;right:calc(var(--rail) + 28px);bottom:0;max-height:75%;box-sizing:border-box;display:flex;flex-direction:column;background:linear-gradient(135deg,#fffefaf7,#f8f8f1f5);border:1px solid #fffefa;border-radius:18px;box-shadow:0 8px 30px #18364128;padding:27px 30px 19px;color:var(--ink)}
.cv-speaker{position:absolute;top:-32px;left:24px;border-radius:9px 9px 0 0;background:#ebe8daf5;color:#536869;font-size:13px;letter-spacing:.025em;padding:9px 17px;display:flex;gap:18px}
.cv-speaking{font-size:11px;color:#758982;animation:cv-breathe 1s ease-in-out infinite alternate}
.cv-dialogue-scroll{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.machi-conversation .jp,.cv-chunk-jp{font-family:'Hiragino Sans','Noto Sans CJK JP',sans-serif}
.cv-japanese{font-size:clamp(24px,2.45vw,34px);line-height:1.75;font-weight:400;margin:0 0 15px;letter-spacing:.045em;min-height:1.75em}
.cv-translation-toggle{display:inline-flex;align-items:center;font-size:12px;letter-spacing:.02em;min-height:36px;padding:4px 0;border:0;border-radius:0;color:#627b7e;background:transparent}
.cv-translation-toggle:hover{background:transparent;color:#274f52;text-decoration:underline;text-underline-offset:5px}
.cv-breakdown{border-top:1px solid #b9c8c355;margin-top:13px;padding:18px 0 5px;animation:cv-enter .2s ease-out}
.cv-translation{font-family:Georgia,'Times New Roman',serif;font-size:clamp(18px,1.9vw,24px);line-height:1.55;margin:0 0 24px;color:#405c61}
.cv-kicker{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 12px;font-weight:400}
.cv-chunks{display:flex;flex-wrap:wrap;gap:18px 24px;margin:8px 0}
.cv-chunk{display:flex;flex-direction:column;gap:8px;flex:1;min-width:88px;padding:0 0 8px;box-sizing:border-box}
.cv-chunk-jp{font-size:21px;line-height:1.6;border-bottom:2px solid #99b6b270;padding-bottom:8px}
.cv-chunk.particle .cv-chunk-jp,.cv-chunk.question .cv-chunk-jp{border-color:#b8a58680}.cv-chunk.predicate .cv-chunk-jp{border-color:#a3b79780}
.cv-chunk small{color:#73868a;font-size:12px;line-height:1.5}.cv-chunk-meaning{font-size:13px;line-height:1.6}
.cv-assistance{position:absolute;right:0;top:0;bottom:0;width:var(--rail);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;background:linear-gradient(145deg,#7899aa50,var(--glass));border:1px solid #d1ecf580;box-shadow:0 8px 30px #0d2d3c24,0 1px 0 #ffffff33 inset;border-radius:20px;padding:25px 24px;text-align:center;color:#f5fafb;backdrop-filter:blur(13px) saturate(.8);scrollbar-width:thin;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.cv-demo-label{font-size:9px;letter-spacing:.13em;opacity:.65;margin:0 0 14px}.cv-aside-title{font-family:Georgia,'Times New Roman',serif;font-size:28px;line-height:1.25;font-weight:400;margin:8px 0 18px}
.cv-assistance>.cv-button{display:block;margin:10px 0;width:100%;text-align:center;font-size:13px;color:inherit;border-color:#d8ebef33}
.cv-assistance .cv-coach-trigger{background:#edf8ff0a;font-size:12px;min-height:38px;margin:0 0 22px}
.cv-assistance .cv-copy{font-size:13px;line-height:1.7;color:#d5e5e9}
.cv-assistance .cv-kicker{color:#d4e4e9;font-size:12px}.cv-rail-intent{font-size:14px;line-height:1.6;margin:12px 0;color:#e4eef1}
.cv-coach-popover{position:static;box-sizing:border-box;margin:0 0 18px;padding:18px 0 4px;border-top:1px solid #deedf230;text-align:left;color:inherit;background:none}
.cv-pop-intent{font-size:15px;line-height:1.6;margin:0 0 10px}.cv-model{font-size:23px;line-height:1.65;margin:16px 0 8px}.cv-reading{font-size:13px;line-height:1.65;color:#d1e3e8;margin:6px 0}.cv-intents{display:flex;flex-direction:column;gap:9px;margin:0 0 10px}
.cv-intents .cv-button{position:relative;font-size:14px;background:#ffffff08;border-color:#ffffff35;padding:10px 14px}.cv-intents .cv-button.selected{background:#e0f0e91a;border-color:#bce8d8;box-shadow:inset 3px 0 #badccd}
.cv-pop-more{border:0;border-bottom:1px solid #badccd66;border-radius:0;padding:6px 0;min-height:36px;font-size:12px;color:#d6efe6}
.cv-wave{height:24px;display:flex;align-items:center;justify-content:center;gap:5px;margin:14px 0 4px}.cv-wave i{width:2px;height:8px;border-radius:4px;background:#baf3eb;animation:cv-wave 1s ease-in-out infinite alternate}.cv-wave i:nth-child(2n){height:16px;animation-delay:.12s}.cv-wave i:nth-child(3n){height:23px;animation-delay:.24s}.cv-wave i:nth-child(4n){height:12px;animation-delay:.36s}
.cv-voice{display:flex;flex-direction:column;align-items:center;gap:14px;margin:18px 0 24px}.cv-button.cv-mic{width:78px;height:78px;min-height:78px;border-radius:50%;background:#66c2ad18;color:#ddfff0;text-align:center;border:1px solid #b1f2dc;box-shadow:0 0 20px #69ecd233,inset 0 0 14px #7df5d822;position:relative;padding:19px}.cv-mic svg{width:27px;height:36px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.cv-mic.listening{animation:cv-glow 1.5s ease-in-out infinite alternate}.cv-mic.listening:after{content:'';position:absolute;inset:-7px;border:1px solid #a4ffff70;border-radius:50%;animation:cv-window 10s linear forwards;animation-delay:var(--elapsed,0s)}
.cv-listen-label{font-size:12px;letter-spacing:.025em;color:#d3e6e9}.cv-assistance>.cv-demo-accept,.cv-button.primary{background:#e6eee1;color:#355653;border:1px solid #f2f6eb;text-align:center}.cv-assistance>.cv-quiet,.cv-assistance>.cv-repeat{display:inline-block;width:49%;border:0;font-size:12px;margin:3px 0;padding:8px 0}.cv-feedback{font-size:11px;line-height:1.6;opacity:.8;margin:14px 0 0}
.cv-title{font-family:Georgia,'Times New Roman',serif;font-size:28px;font-weight:400;line-height:1.4;margin:0 0 20px}.cv-copy{font-size:16px;line-height:1.75;margin:12px 0 20px}.cv-success{text-align:center;padding:28px 0 16px}.cv-check{font-size:37px;font-weight:300;border:1px solid #b0ffe6;border-radius:50%;width:80px;height:80px;display:grid;place-items:center;margin:0 auto 24px;color:#d4ffed;box-shadow:0 0 25px #5ce7ca50;animation:cv-enter .3s ease-out}.cv-demo-success{font-size:12px;opacity:.75}
.cv-summary-heading{font-size:14px;margin:24px 0 12px}.cv-totals{display:flex;flex-wrap:wrap;gap:8px}.cv-summary-item{display:flex;flex-direction:column;gap:10px;padding:20px 0;border-bottom:1px solid #d2ded4}.cv-summary-item b{font-size:22px;font-weight:400}.cv-summary-item small{opacity:.65}.cv-summary-item span{font-size:15px}
.machi-conversation[data-stage^="coach"] .cv-dialogue,.machi-conversation[data-stage="summary"] .cv-dialogue{left:25%;max-height:95%;padding:28px}.machi-conversation[data-stage="coach_practice"] .cv-dialogue,.machi-conversation[data-stage="coach_success"] .cv-dialogue{left:12%;max-height:65%}
.large-text .machi-conversation .cv-copy,.large-text .machi-conversation .cv-button{font-size:16px}.large-text .machi-conversation .cv-japanese{font-size:32px}
@keyframes cv-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes cv-breathe{to{opacity:.4}}@keyframes cv-wave{to{transform:scaleY(.35);opacity:.6}}@keyframes cv-glow{to{box-shadow:0 0 25px #86ffdb55,inset 0 0 18px #7df5d833}}@keyframes cv-window{to{clip-path:inset(100% 0 0 0)}}
@media(max-height:500px){
 .cv-top{top:7px;right:16px}.cv-top .cv-button{min-height:30px;padding:5px 12px;font-size:11px}.cv-layout{--rail:clamp(184px,25vw,240px);inset:46px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
 .cv-portrait{height:116%;width:47%;left:-3%;bottom:-23%}.cv-dialogue{left:10%;right:calc(var(--rail) + 18px);padding:18px 20px 12px;max-height:88%;border-radius:14px}.cv-speaker{font-size:11px;top:-27px;left:16px;padding:7px 13px}.cv-japanese{font-size:23px;line-height:1.6;margin-bottom:8px;min-height:1.6em}.cv-translation-toggle{font-size:11px;min-height:32px}.cv-breakdown{margin-top:8px;padding-top:14px}.cv-translation{font-size:18px;margin-bottom:18px}.cv-chunks{gap:14px 18px}.cv-chunk{min-width:76px;gap:6px}.cv-chunk-jp{font-size:18px}.cv-chunk small,.cv-chunk-meaning{font-size:11px}
 .cv-assistance{padding:16px 18px;border-radius:16px}.cv-demo-label{font-size:8px;margin-bottom:10px}.cv-aside-title{font-size:23px;margin:6px 0 12px}.cv-assistance .cv-coach-trigger{margin-bottom:14px;min-height:34px}.cv-coach-popover{padding-top:14px;margin-bottom:10px}.cv-kicker,.cv-assistance .cv-kicker{font-size:11px;margin-bottom:10px}.cv-intents{gap:8px}.cv-intents .cv-button{font-size:12px;padding:8px 10px;min-height:38px}.cv-model{font-size:20px;margin:12px 0 8px}.cv-reading{font-size:12px}.cv-copy{font-size:13px}.cv-assistance .cv-copy{font-size:12px}.cv-wave{margin:10px 0 0;height:20px}.cv-voice{margin:12px 0 16px;gap:10px}.cv-button.cv-mic{width:60px;height:60px;min-height:60px;padding:12px}.cv-mic svg{width:23px;height:32px}.cv-assistance>.cv-button{font-size:12px;min-height:38px;margin:7px 0}.cv-assistance>.cv-quiet,.cv-assistance>.cv-repeat{font-size:11px;margin:0}.cv-title{font-size:23px;margin-bottom:16px}.machi-conversation[data-stage^="coach"] .cv-dialogue,.machi-conversation[data-stage="summary"] .cv-dialogue{left:20%;padding:20px;max-height:92%}.machi-conversation[data-stage="coach_practice"] .cv-dialogue,.machi-conversation[data-stage="coach_success"] .cv-dialogue{left:10%}.cv-check{width:60px;height:60px}.cv-success{padding:14px 0}
}
@media(prefers-reduced-motion:reduce){.machi-conversation,.cv-speaking,.cv-mic.listening,.cv-check,.cv-wave i,.cv-breakdown{animation:none}.cv-mic.listening:after{animation:none}.cv-button{transition:none}}
/* Keep speaking controls visible on short landscape screens; only the hints scroll. */
.cv-response-head .cv-coach-trigger{width:100%;text-align:center}
.cv-response-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.cv-response-actions .cv-demo-accept{width:100%;background:#e6eee1;color:#355653;text-align:center;border-color:#f2f6eb}
.cv-response-actions .cv-quiet,.cv-response-actions .cv-repeat{flex:1;text-align:center;border:0;padding:8px 0;font-size:12px}
@media(max-height:500px){
 .cv-layout{--rail:clamp(260px,36vw,355px)}
 .cv-assistance.cv-response{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:10px 16px;padding:15px 16px;overflow:hidden}
 .cv-response>.cv-demo-label{grid-column:1/-1;margin:0;font-size:8px;text-align:left}
 .cv-response-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid #deedf230}
 .cv-response-head .cv-aside-title{margin:0;font-size:22px;white-space:nowrap}
 .cv-response-head .cv-coach-trigger{width:auto;margin:0;min-height:32px;padding:5px 8px;font-size:11px;white-space:nowrap}
 .cv-response-hints{overflow-anchor:none;min-height:0;overflow:auto;text-align:left;scrollbar-width:thin;overscroll-behavior:contain;touch-action:pan-y}
 .cv-response-hints .cv-coach-popover{border:0;margin:0;padding:0}.cv-response-hints .cv-kicker{font-size:11px;line-height:1.5;margin-bottom:10px}.cv-response-hints .cv-intents .cv-button{font-size:12px;min-height:40px;padding:8px 10px}.cv-response-hints .cv-rail-intent{font-size:13px;line-height:1.6;margin:0}
 .cv-response-voice{align-self:center;min-width:0}.cv-response-voice .cv-wave{margin:0 0 12px}.cv-response-voice .cv-voice{margin:0;gap:15px}.cv-response-voice .cv-listen-label{font-size:11px}
 .cv-response-actions{grid-column:1/-1;display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:5px;margin:0;padding-top:10px;border-top:1px solid #deedf230}
 .cv-response-actions .cv-button{min-height:38px;font-size:11px;padding:7px 4px}.cv-response-actions .cv-demo-accept{width:auto}
 .cv-response>.cv-feedback{display:none}
}

/* Reading replaces response controls on phones, leaving Grandma's face visible. */
@media(max-height:500px){
 .machi-conversation[data-translated="true"] .cv-dialogue{left:34%;right:0;top:5px;bottom:0;max-height:none}
 .machi-conversation[data-translated="true"] .cv-assistance{visibility:hidden;pointer-events:none}
 .machi-conversation[data-translated="true"] .cv-translation{margin-bottom:12px}
 .machi-conversation[data-translated="true"] .cv-breakdown{padding-top:10px}
 .machi-conversation[data-translated="true"] .cv-chunks{gap:14px}
 .machi-conversation[data-translated="true"] .cv-japanese{font-size:21px;line-height:1.6}
}

/* Coaching is a separate focus state above the paused conversation world. */
.cv-coach-focus{position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(#263b473d,#263b4757);backdrop-filter:blur(12px) saturate(.85);-webkit-backdrop-filter:blur(12px) saturate(.85)}
.cv-layout,.cv-top{z-index:1}
.machi-conversation[data-stage^="coach"] .cv-speaker{background:#dae9e2;color:#345753}
/* Speaker labels float clear of the paper; translation stays at one touch anchor. */
.cv-speaker{top:auto;bottom:calc(100% + 12px);border-radius:9px}
.machi-conversation:not([data-stage^="coach"]):not([data-stage="summary"]):not([data-stage="retry"]) .cv-dialogue{bottom:60px;max-height:calc(100% - 110px)}
.cv-translation-toggle,.cv-summary-done{position:absolute;left:12%;bottom:0;width:260px;height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:8px 16px;border:1px solid #d1ecf580;border-radius:11px;background:linear-gradient(135deg,#7899aa66,#24495ec9);color:#f5fafb;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-size:13px;text-decoration:none;box-shadow:0 4px 14px #0d2d3c24}
.cv-translation-toggle:hover,.cv-summary-done:hover{color:#fff;background:#456878d9;text-decoration:none}
/* One summary surface beside Grandma, without a second navigation panel. */
.machi-conversation[data-stage="summary"] .cv-dialogue{left:43%;right:0;top:0;bottom:60px;max-height:none;padding:25px 28px}
.machi-conversation[data-stage="summary"] .cv-dialogue-scroll{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.machi-conversation[data-stage="summary"] .cv-title{font-size:28px;margin:0 0 23px}
.cv-summary-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;min-height:0;flex:1}
.cv-summary-column{display:flex;flex-direction:column;min-height:0}
.cv-summary-heading{display:flex;align-items:center;gap:12px;font:23px Georgia,serif;margin:0;padding:0 0 14px;border-bottom:1px solid #b9c8c377}
.cv-summary-count{font:13px 'Helvetica Neue',sans-serif;color:#73868a;border:1px solid #b9c8c377;border-radius:50%;min-width:25px;height:25px;display:grid;place-items:center}
.cv-summary-entries{overflow:auto;min-height:0;scrollbar-width:thin;overscroll-behavior:contain;touch-action:pan-y;padding-right:8px}
.cv-summary-kind{font-size:11px;font-weight:400;letter-spacing:.035em;color:#73868a;margin:20px 0 4px}
.cv-summary-item{padding:12px 0;gap:5px;border-bottom:1px solid #b9c8c333}.cv-summary-item b{font-size:21px;line-height:1.6}.cv-summary-item span{font-size:13px;line-height:1.6;color:#61777c}
.cv-summary-empty{font-size:14px;line-height:1.7;color:#73868a;margin:18px 0}.cv-summary-footnote{font-size:11px;line-height:1.5;color:#73868a;margin:18px 0 0}
.cv-summary-done{left:43%;width:240px}
@media(max-height:500px){
 .cv-speaker{bottom:calc(100% + 10px)}
 .machi-conversation:not([data-stage^="coach"]):not([data-stage="summary"]):not([data-stage="retry"]) .cv-dialogue{bottom:54px;max-height:calc(100% - 94px)}
 .cv-translation-toggle{left:10%;width:230px;font-size:12px}
 .machi-conversation[data-translated="true"] .cv-dialogue{top:28px;bottom:54px;max-height:none!important}
 .machi-conversation[data-stage="summary"] .cv-dialogue{left:34%;top:0;bottom:54px;padding:17px 20px;max-height:none}
 .machi-conversation[data-stage="summary"] .cv-title{font-size:23px;margin-bottom:14px}.machi-conversation[data-stage="summary"] .cv-kicker{font-size:9px;margin-bottom:7px}
 .cv-summary-grid{gap:18px}.cv-summary-heading{font-size:20px;gap:9px;padding-bottom:10px}.cv-summary-kind{margin-top:14px}.cv-summary-item{padding:10px 0}.cv-summary-item b{font-size:18px}.cv-summary-item span,.cv-summary-empty{font-size:12px}.cv-summary-footnote{font-size:10px;margin-top:10px}.cv-summary-done{left:34%;width:220px;font-size:12px}
}

/* Compact translation dock; the paper stays close to the bottom of the scene. */
.machi-conversation:not([data-stage^="coach"]):not([data-stage="summary"]):not([data-stage="retry"]) .cv-dialogue{bottom:0}
.cv-translation-toggle{left:0;bottom:0;width:104px;height:44px;min-height:44px;padding:8px 12px;font-size:12px}
.cv-dialogue .cv-japanese{margin-bottom:0}
.cv-success{padding:18px 0 8px}
.cv-reply-jp{font-size:25px;line-height:1.65;margin:16px 0 12px;font-weight:400}
.cv-reply-meaning{font-size:15px;line-height:1.65;color:#deecec;margin:0 0 32px}
.cv-success .cv-check{width:48px;height:48px;font-size:25px;margin:12px auto}
/* The right edge is fixed while assistance opens towards the centre. */
.machi-conversation[data-help="true"] .cv-assistance{width:62%;visibility:visible;pointer-events:auto}
.machi-conversation[data-help="true"] .cv-dialogue,.machi-conversation[data-help="true"] .cv-translation-toggle{visibility:hidden;pointer-events:none}
.machi-conversation[data-help="true"] .cv-response{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(125px,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:18px 32px;overflow:hidden;text-align:left}
.machi-conversation[data-help="true"] .cv-demo-label{grid-column:1/-1;margin:0}
.machi-conversation[data-help="true"] .cv-response-head{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid #deedf230;padding-bottom:16px}
.machi-conversation[data-help="true"] .cv-response-head .cv-aside-title{margin:0}
.machi-conversation[data-help="true"] .cv-response-head .cv-coach-trigger{width:auto;margin:0;white-space:nowrap}
.machi-conversation[data-help="true"] .cv-response-hints{overflow-anchor:none;min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain;padding-right:8px}
.machi-conversation[data-help="true"] .cv-coach-popover{border:0;margin:0;padding:4px 0}
.machi-conversation[data-help="true"] .cv-response-voice{align-self:center;text-align:center}
.machi-conversation[data-help="true"] .cv-response-actions{grid-column:1/-1;display:flex;flex-wrap:nowrap;align-items:center;gap:16px;border-top:1px solid #deedf230;padding-top:14px;margin:0}
.machi-conversation[data-help="true"] .cv-response-actions .cv-button{flex:1;width:auto}
.machi-conversation[data-help="true"] .cv-feedback{display:none}
@media(max-height:500px){
 .machi-conversation:not([data-stage^="coach"]):not([data-stage="summary"]):not([data-stage="retry"]) .cv-dialogue{left:14%;bottom:0;padding:16px 20px;max-height:calc(100% - 46px)}
 .machi-conversation[data-translated="true"] .cv-dialogue{left:34%!important;top:28px;bottom:0}
 .cv-translation-toggle{left:0;width:96px;font-size:12px}
 .cv-reply-jp{font-size:22px;margin:10px 0 8px}.cv-reply-meaning{font-size:13px;margin:0 0 15px}.cv-success{padding:0}.cv-success .cv-kicker{margin:0}.cv-success .cv-aside-title{font-size:22px;margin:12px 0}.cv-success .cv-check{width:34px;height:34px;font-size:22px;margin:8px auto}
 .machi-conversation[data-help="true"] .cv-assistance{width:66%}
 .machi-conversation[data-help="true"] .cv-response{gap:10px 18px;padding:15px 18px;grid-template-columns:minmax(0,1.7fr) minmax(100px,1fr)}
 .machi-conversation[data-help="true"] .cv-response-head{gap:10px;padding-bottom:10px}
 .machi-conversation[data-help="true"] .cv-response-actions{padding-top:10px;gap:8px}
}
/* Secondary help actions stay separate and tappable in the scrolling hint column. */
.cv-response-hints > .cv-pop-more{display:block;min-height:40px;margin:10px 0 0;text-align:left;line-height:1.4;white-space:normal}
button.cv-chunk{font:inherit;text-align:left;cursor:pointer;border:0;border-bottom:1px solid #6c8d8240;background:transparent;color:inherit;padding:8px}
button.cv-chunk:hover,button.cv-chunk:focus-visible{background:#71968115;outline:1px solid #70968866}
.cv-audio-replay{font-size:12px!important;min-height:32px!important;margin:4px 0!important;color:#597c79!important;background:none!important;border:0!important}
.cv-voice-status{font-size:12px;line-height:1.5;color:#e6f0f0}

.cv-audio-replay{position:absolute;left:28px;bottom:104px;width:96px;height:30px!important;margin:0!important;padding:4px 8px!important;border:1px solid #d1ecf580!important;border-radius:9px!important;background:#29495780!important;color:#f5fafb!important;backdrop-filter:blur(12px)}
@media(max-height:500px){.cv-audio-replay{left:16px;bottom:88px}}
/* Only the paper/hint panes scroll; focus must never pan the entire scene overlay. */
.machi-conversation{overflow:clip}
/* Paper nameplate, ink model controls, and a compact pair of glass dialogue tools. */
.cv-speaker{position:static;align-self:flex-start;flex:none;border-radius:0;background:transparent!important;color:#48635f!important;padding:0 0 8px;margin:0 0 13px;font-size:12px;letter-spacing:.045em;border-bottom:1px solid #9cafaa66;display:flex;gap:12px}
.cv-dialogue>.cv-dialogue-scroll{min-height:0}
.machi-conversation:not([data-stage^="coach"]):not([data-stage="summary"]):not([data-stage="retry"]) .cv-dialogue{left:88px;max-height:calc(100% - 12px)}
.cv-tools{position:absolute;left:0;bottom:0;display:flex;flex-direction:column;gap:7px;width:74px}
.cv-tools .cv-tool{position:static;width:74px;min-height:38px;height:38px;padding:7px 4px;border:1px solid #e7f0ec75;border-radius:10px;background:#29495780;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:#f7faf5;font-size:11px;text-align:center;display:block;box-shadow:none;line-height:1.4}
.cv-tools .cv-tool:hover{background:#486a78b0}
.machi-conversation[data-help="true"] .cv-tools{display:none}
.cv-model-listen{display:inline-flex;align-items:center;gap:8px;border:0;border-bottom:1px solid #54746c55;border-radius:0;color:#345c54;background:none;padding:7px 0;min-height:36px;font-size:12px;letter-spacing:.02em;margin-top:14px}
.cv-model-listen:hover{background:none;color:#152f2a;border-color:#345c54}
.cv-dialogue .cv-reading{color:#48605c;font-size:14px;line-height:1.65;margin-top:12px;font-weight:500}
.machi-conversation[data-stage="retry"] .cv-dialogue{left:32%;right:0;top:0;bottom:0;max-height:none;padding:20px 26px}
.machi-conversation[data-stage="retry"] .cv-dialogue-scroll{flex:1;overflow:auto;touch-action:pan-y}
.cv-heard{border-left:2px solid #9aafa7;padding:10px 0 10px 18px;margin:18px 0}
.cv-retry-jp{font-size:24px;line-height:1.6;margin:6px 0}
.cv-retry-example{border-top:1px solid #b9c8c355;padding-top:16px;margin-top:18px}
.cv-retry-example .cv-model{color:#304b50;margin:8px 0}
.cv-retry-actions{display:flex;gap:18px;flex:none;border-top:1px solid #b9c8c355;margin-top:14px;padding-top:12px}
.cv-retry-actions .primary{background:#49695e;color:#fbfaf5;border-color:transparent}
@media(max-height:500px){.cv-speaker{margin-bottom:10px;padding-bottom:6px;font-size:11px}.cv-dialogue .cv-reading{font-size:13px}.machi-conversation[data-stage="retry"] .cv-dialogue{left:27%;padding:15px 20px}.cv-retry-jp{font-size:21px}.cv-retry-actions .cv-button{font-size:12px;min-height:38px}.cv-heard{margin:12px 0}}

.cv-retry-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:24px;align-items:start}.cv-retry-grid .cv-heard{margin:0;padding-top:0}.cv-retry-grid .cv-copy{font-size:13px;line-height:1.65;margin:8px 0 12px}.cv-retry-grid .cv-kicker{margin-bottom:8px}.cv-retry-grid .cv-retry-jp{font-size:21px}.cv-retry-explanation{padding-top:0}.machi-conversation[data-stage="retry"] .cv-title{font-size:25px;margin:0 0 18px}

/* One coaching workspace: generous paper beside the voice glass, at equal height. */
.machi-conversation[data-coach="true"] .cv-layout{--rail:clamp(210px,25vw,300px)}
.machi-conversation[data-coach="true"] .cv-dialogue{left:8%;right:calc(var(--rail) + 20px);top:0;bottom:0;max-height:none;padding:24px 26px;visibility:visible;pointer-events:auto}
.machi-conversation[data-coach="true"] .cv-assistance{width:var(--rail)}
.machi-conversation[data-coach="true"] .cv-dialogue-scroll{flex:1;padding:2px 16px 12px 2px;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#8da09a88 transparent}
.cv-dialogue-scroll::-webkit-scrollbar{width:4px}
.cv-dialogue-scroll::-webkit-scrollbar-thumb{background:#8da09a88;border-radius:4px}
.cv-dialogue-scroll::-webkit-scrollbar-track{background:transparent}
.machi-conversation[data-coach="true"] .cv-title{font-size:27px;line-height:1.35;margin:0 0 16px}
.machi-conversation[data-coach="true"] .cv-copy{line-height:1.7;margin:0 0 18px}
.machi-conversation .cv-chunks{gap:10px;margin:16px 1px;padding:2px 0;align-items:stretch}
.machi-conversation .cv-chunk{flex:1 1 90px;min-width:0;border:1px solid #91aaa14d;border-radius:9px;padding:11px 10px;background:#edf1e73d;color:#304b50;overflow-wrap:anywhere;box-sizing:border-box}
.machi-conversation button.cv-chunk:hover,.machi-conversation button.cv-chunk:focus-visible{background:#dce7df80;outline:1px solid #70968866;outline-offset:-2px}
.cv-chunk-jp{font-size:20px;line-height:1.5;padding-bottom:7px}
.cv-chunk small{color:#56736d}
.cv-chunk-meaning{font-size:12px;line-height:1.5}
.cv-model-row{display:flex;align-items:flex-start;gap:12px}
.cv-model-row .cv-japanese{flex:1;margin:0;min-width:0;line-height:1.6}
.cv-model-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;min-height:38px;border:1px solid #8da89e66;border-radius:50%;padding:9px;background:transparent;color:#42665e;margin-top:4px}
.cv-model-icon:hover{background:#dce7df80}
.cv-model-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.cv-coach-options{display:flex;flex-direction:column;gap:7px;color:#617973;font-size:12px;line-height:1.5;margin:0 0 21px}
.cv-coach-options select{width:100%;min-width:0;min-height:40px;border:0;border-bottom:1px solid #94aaa466;background:transparent;color:#304b50;padding:6px 22px 8px 0;font:inherit;font-size:15px;border-radius:0;cursor:pointer}
.cv-full-meaning{font-family:Georgia,'Times New Roman',serif;font-size:21px;line-height:1.5;color:#344e4c;margin:18px 0 15px}
.cv-guidance{font-size:14px;line-height:1.75;color:#526d66;margin:0;padding-top:15px;border-top:1px solid #a6b9b04d}
.machi-conversation[data-coach="true"] .cv-assistance.cv-response{display:flex;flex-direction:column;gap:14px;overflow:hidden;text-align:center}
.machi-conversation[data-coach="true"] .cv-response-head{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:0 0 12px;flex:none}
.machi-conversation[data-coach="true"] .cv-response-head .cv-aside-title{margin:0}
.machi-conversation[data-coach="true"] .cv-response-head .cv-coach-trigger{width:100%;margin:0;white-space:normal;font-size:12px;min-height:34px;padding:6px 8px}
.machi-conversation[data-coach="true"] .cv-response-hints{flex:0 1 auto;overflow:auto;padding:0 5px;min-height:0}
.machi-conversation[data-coach="true"] .cv-response-hints .cv-rail-intent{font-size:12px;line-height:1.5;margin:0}
.machi-conversation[data-coach="true"] .cv-response-voice{align-self:stretch;flex:1;display:flex;flex-direction:column;justify-content:center;min-height:116px}
.machi-conversation[data-coach="true"] .cv-response-voice .cv-wave{margin:0 0 8px;height:18px}
.machi-conversation[data-coach="true"] .cv-response-voice .cv-voice{margin:0;gap:8px}
.machi-conversation[data-coach="true"] .cv-response-actions{flex:none;display:flex;gap:8px;margin:0;padding-top:8px;align-items:center}
.machi-conversation[data-coach="true"] .cv-response-actions .cv-button{flex:1;min-height:34px;padding:6px 3px;font-size:11px}
.cv-top{right:max(28px,env(safe-area-inset-right));top:24px}
.cv-top .cv-close{border:0;background:transparent;box-shadow:none;backdrop-filter:none;font-family:'Helvetica Neue',sans-serif;font-weight:300;font-size:27px;line-height:1;width:36px;height:36px;min-height:36px;padding:0;text-align:center;color:#f7faf5;text-shadow:0 1px 5px #243d49}
.cv-top .cv-close:hover{background:#29495755;border-radius:50%}
@media(max-height:500px){
 .cv-assistance.cv-response{grid-template-rows:auto minmax(0,1fr) auto}
 .machi-conversation[data-coach="true"] .cv-layout{--rail:clamp(186px,25vw,244px)}
 .machi-conversation[data-coach="true"] .cv-dialogue{left:0;right:calc(var(--rail) + 14px);padding:16px 18px;max-height:none}
 .machi-conversation[data-coach="true"] .cv-dialogue-scroll{padding-right:14px}
 .machi-conversation[data-coach="true"] .cv-title{font-size:23px;margin-bottom:12px}
 .machi-conversation[data-coach="true"] .cv-kicker{font-size:10px;margin-bottom:7px}
 .machi-conversation[data-coach="true"] .cv-copy{font-size:13px;margin-bottom:14px}
 .machi-conversation .cv-chunks{gap:8px;margin:12px 1px}
 .machi-conversation .cv-chunk{padding:9px 8px;gap:5px;flex-basis:80px}
 .cv-chunk-jp{font-size:18px}.cv-chunk small,.cv-chunk-meaning{font-size:11px}
 .cv-full-meaning{font-size:18px;margin:13px 0 11px}.cv-guidance{font-size:12px;line-height:1.65;padding-top:12px}
 .cv-coach-options{margin-bottom:15px;font-size:11px}.cv-coach-options select{font-size:13px;min-height:36px}
 .machi-conversation[data-coach="true"] .cv-assistance.cv-response{gap:8px;padding:16px}
 .machi-conversation[data-coach="true"] .cv-response-head{gap:8px;padding-bottom:8px}
 .machi-conversation[data-coach="true"] .cv-response-head .cv-coach-trigger{font-size:11px;min-height:30px;padding:5px}
 .cv-top{right:max(16px,env(safe-area-inset-right));top:6px}
 .cv-top .cv-close{font-size:25px;width:32px;height:32px;min-height:32px}
}
/* A persistent, draggable hairline indicator, including iOS overlay-scrollbar mode. */
.machi-conversation .cv-chunk{min-width:min-content}
.cv-chunk-jp{white-space:nowrap}
.cv-dialogue-scroll.cv-custom-scroll{scrollbar-width:none;scrollbar-gutter:auto}
.cv-dialogue-scroll.cv-custom-scroll::-webkit-scrollbar{display:none}
.cv-scroll-track{position:absolute;right:9px;top:59px;bottom:18px;width:9px;touch-action:none;cursor:pointer}
.cv-scroll-track::before{content:'';position:absolute;left:3px;top:0;bottom:0;width:3px;border-radius:3px;background:#9cafaa18}
.cv-scroll-track span{display:block;position:absolute;left:3px;top:0;width:3px;border-radius:3px;background:#8da09a80}
@media(max-height:500px){.cv-scroll-track{top:51px;bottom:16px;right:7px}}

.cv-voice-status:empty{display:none}

/* Live voice shows measured input, not a simulated listening animation. */
.cv-wave.cv-wave-live i{animation:none;transform:scaleY(var(--mic-level,.08));transition:transform .1s linear;opacity:.9}

/* Clearly distinguish actual capture from ready/connecting states. */
.cv-button.cv-mic.listening{background:#319c808c;color:#effff8;border:2px solid #c3ffe6;box-shadow:0 0 0 5px #69e9bf24,0 0 34px #69e9bf99,inset 0 0 20px #8affd94d;animation:cv-recording-glow 1.15s ease-in-out infinite alternate}
.cv-mic.listening::after{inset:-9px;border:2px solid #9affdd;clip-path:none;animation:cv-recording-ring 1.65s ease-out infinite;animation-delay:0s}
@keyframes cv-recording-glow{to{box-shadow:0 0 0 7px #69e9bf36,0 0 46px #69e9bfcc,inset 0 0 24px #8affd966}}
@keyframes cv-recording-ring{from{transform:scale(.94);opacity:.8}to{transform:scale(1.2);opacity:0}}
@media(prefers-reduced-motion:reduce){.cv-button.cv-mic.listening,.cv-mic.listening::after{animation:none}.cv-mic.listening::after{opacity:.65}}

/* Authored cafe choices: illustrations belong to the paper, not extra UI panels. */
.cv-cafe-menu{display:flex;align-items:end;gap:20px;margin:6px 0 18px;}
.cv-cafe-menu figure{margin:0;text-align:center;color:#49625b;font-size:12px;letter-spacing:.03em;}
.cv-cafe-cup{display:block;width:90px;height:90px;background-image:url('assets/conversation/cafe-drinks.png');background-size:300% 200%;background-repeat:no-repeat;}
.cv-assistance .cv-cafe-menu{justify-content:center;}.cv-assistance .cv-cafe-menu figure{color:#edf6f3;}
@media(max-height:500px){.cv-cafe-cup{width:66px;height:66px}.cv-cafe-menu{margin-bottom:12px;gap:16px;}}
