.mind-screen{width:min(1320px,100%);margin:0 auto;padding:36px clamp(20px,4vw,60px) 45px}
.mind-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:18px 0 25px}
.mind-heading h1,.ending-screen h1{font-size:clamp(46px,5.7vw,78px);line-height:1;letter-spacing:-.07em;margin:0;font-weight:900}
.mind-heading h1 em,.ending-screen h1 em{font-style:normal;color:var(--cyan)}
.mind-heading p{color:#a8c1ce;margin:12px 0 0;line-height:1.5;max-width:650px}
.mind-progress{text-align:right;white-space:nowrap;color:var(--cyan);font-family:Consolas,monospace}
.mind-progress strong{display:block;font-size:38px;line-height:1}
.mind-progress span{font-size:10px;letter-spacing:.12em;color:#7fa5b7}
.ai-core{height:360px;min-width:280px;border:1px solid #426179;background:radial-gradient(circle,#662e4e55 0,#232743 27%,#0d1b2c 60%);position:relative;overflow:hidden;display:grid;place-items:center;isolation:isolate}
.ai-core:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#77d9e709 1px,transparent 1px),linear-gradient(#77d9e709 1px,transparent 1px);background-size:27px 27px}
.ai-core:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 41px,#ef657025 42px 44px,transparent 45px 96px);animation:noise 5s steps(3) infinite;pointer-events:none}
.ai-core.stability-1:after{opacity:.7}.ai-core.stability-2:after{opacity:.45}.ai-core.stability-3:after{opacity:.25}.ai-core.stability-4:after{opacity:.12}.ai-core.stability-5:after{opacity:0}
.core-orbit{position:absolute;width:220px;height:220px;border:2px solid #dd637780;border-radius:50%;box-shadow:0 0 20px #ea647b33,inset 0 0 20px #ea647b33;animation:spin 26s linear infinite}
.core-orbit:before,.core-orbit:after{content:"";position:absolute;width:9px;height:9px;border-radius:50%;background:#e07995;box-shadow:0 0 14px currentColor;left:30px;top:30px}
.orbit-two{width:165px;height:165px;border-style:dashed;animation-direction:reverse;animation-duration:17s}
.core-heart{width:104px;height:104px;border:1px solid #fa8da2;background:#932f4f55;border-radius:50%;display:grid;place-items:center;color:#ff899d;font-size:58px;text-shadow:0 0 24px currentColor;box-shadow:0 0 45px #e54c7766;z-index:1;animation:portalBreath 3s ease-in-out infinite}
.stability-2 .core-orbit,.stability-3 .core-orbit,.stability-4 .core-orbit,.stability-5 .core-orbit{border-color:#a790e9a8}
.stability-3 .core-heart,.stability-4 .core-heart,.stability-5 .core-heart{border-color:#81dcf3;background:#2e759955;color:#9ff4fb;box-shadow:0 0 48px #68e8f977}
.stability-5 .core-orbit{border-color:#81eff0}
.core-readout{position:absolute;bottom:20px;left:20px;right:20px;display:flex;align-items:baseline;justify-content:space-between;color:#a6c9d2;font:700 10px Consolas,monospace;letter-spacing:.14em}
.core-readout strong{font-size:23px;color:var(--cyan)}
.ai-core.compact{height:230px;min-width:0}.compact .core-orbit{width:145px;height:145px}.compact .orbit-two{width:110px;height:110px}.compact .core-heart{width:70px;height:70px;font-size:40px}
.mind-intro-layout,.core-layout,.module-victory{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:stretch}
.mind-story{border:1px solid #465d77;background:linear-gradient(135deg,#18243a,#101b2d);padding:clamp(24px,4vw,48px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.mind-story p{font-size:clamp(16px,1.7vw,19px);line-height:1.7;color:#d4e5ea;margin:19px 0 26px}
.module-list{display:grid;gap:9px}
.module-node{min-height:62px;background:#13283a;border:1px solid #416176;color:#e8f6f8;padding:9px 15px;display:flex;align-items:center;text-align:left;gap:16px;transition:.2s}
.module-node:hover:not(:disabled){transform:translateX(4px);border-color:var(--cyan)}
.module-node.locked{opacity:.48}.module-node.available{border-color:var(--cyan);box-shadow:inset 0 0 25px #67e5e714}.module-node.restored{border-color:#78cfbf;background:#154247}
.module-symbol{font-size:27px;width:32px;color:var(--cyan)}
.module-node small{display:block;color:#7fa9b9;font:700 10px Consolas,monospace;letter-spacing:.1em}.module-node strong{display:block;font:800 15px Arial,sans-serif;letter-spacing:.06em;margin-top:3px}.module-node em{margin-left:auto;font:700 10px Consolas,monospace;letter-spacing:.1em;font-style:normal;color:#84bdc7}
.room-layout{display:grid;grid-template-columns:280px 1fr;gap:20px;align-items:start}
.room-aside{display:grid;gap:12px}.room-index{border:1px solid #39586d;background:#102337;padding:15px;display:grid;gap:8px;font:700 10px Consolas,monospace;letter-spacing:.1em;color:#67899c}.room-index span{border-left:2px solid #35556a;padding:6px 9px}.room-index span.active{color:var(--cyan);border-color:var(--cyan)}.room-index span.done{color:#89e2c9;border-color:#89e2c9}
.room-work{border:1px solid #426479;background:linear-gradient(145deg,#142b40,#101c30);padding:clamp(18px,3vw,30px);min-height:400px;box-shadow:inset 0 0 45px #61dce709}
.room-panel-head{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #3b6174;padding-bottom:15px;margin-bottom:20px;font:700 11px Consolas,monospace;letter-spacing:.12em;color:#8cb3c4}.room-panel-head strong{color:var(--cyan)}
.memory-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:25px 0}
.memory-card{min-height:100px;border:1px solid #587487;background:#1a3447;color:#e5f8f8;font-size:22px;font-weight:700;position:relative;transition:.2s}.memory-card span{position:absolute;right:9px;top:8px;color:#7dbdcb;font-size:18px}.memory-card:hover{transform:translateY(-2px);border-color:var(--cyan)}.memory-card.selected{border-color:var(--cyan);background:#235367;box-shadow:0 0 25px #66ecf02c}.memory-card.selected span{color:var(--cyan)}
.emotion-room{background:radial-gradient(circle at 80% 20%,#5c266044,transparent 45%),linear-gradient(145deg,#242341,#151d34)}
.emotion-wave{text-align:center;color:#bd82ed;font-size:34px;letter-spacing:.5em;text-shadow:0 0 18px #ad79ff;margin:22px 0}
.perception-room{background:radial-gradient(circle at 80% 20%,#235b7544,transparent 45%),linear-gradient(145deg,#142d3b,#142034)}
.station-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.station{min-height:170px;border:1px solid #588094;background:#18394b;color:#e8f7f8;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;transition:.2s}.station:hover{transform:translateY(-3px);border-color:var(--cyan)}.station.done{background:#1b4a4d;border-color:#74d8c3}.station>span{font-size:47px;color:var(--cyan)}.station strong{font:800 13px Consolas,monospace;letter-spacing:.1em}.station small{font:10px Consolas,monospace;color:#9cbac6}
.station-focus{display:flex;align-items:center;gap:20px;background:#172d40;padding:20px;margin-bottom:22px;border-left:2px solid var(--cyan)}.station-focus span{font-size:55px;color:var(--cyan)}.station-focus p{font-size:17px;line-height:1.5;color:#e8f8fa}.perception-options{display:grid;gap:10px;margin:20px 0}.perception-options .choice{font-size:16px}
.control-room{background:linear-gradient(145deg,#101e2a,#142235)}.experiment-log{background:#071522;border:1px solid #487286;padding:20px 25px;font:16px/1.9 Consolas,'Courier New',monospace;color:#d8edee}.experiment-log p{margin:0 0 15px}.experiment-log p:last-child{margin:0}.log-error{font:inherit;color:#ff9ea4;border:1px dashed #df6679;background:#53243277;padding:0 4px;text-decoration:underline;text-decoration-style:wavy}.log-error:hover,.log-error.selected{background:#8b374a;color:#fff}.log-fixed{background:#1e5d59;color:#bcfff5;padding:1px 4px}.log-correct{color:#96e8cf;border-bottom:1px solid #96e8cf}.log-editor{border:1px solid #61859b;background:#1a3443;padding:16px;margin-top:17px}.log-editor>span{font:700 11px Consolas,monospace;color:var(--cyan);letter-spacing:.1em}.log-editor>div{display:flex;gap:8px;margin-top:12px}.log-editor .choice{flex:1;min-height:54px}
.human-room{background:radial-gradient(circle at 75% 20%,#2b66704f,transparent 50%),linear-gradient(145deg,#142b40,#171e33)}.human-message{border-left:2px solid var(--purple);padding:16px 20px;background:#202845;margin-bottom:24px}.human-message span{font:700 11px Consolas,monospace;color:#c19cf5}.human-message p{color:#bfc9e6;line-height:1.55}.human-message strong{font-size:19px;line-height:1.4}.answer-label{display:block;font:700 11px Consolas,monospace;letter-spacing:.12em;color:var(--cyan);margin:0 0 9px}.human-room textarea{display:block;width:100%;resize:vertical;min-height:125px;background:#091b29;border:1px solid #528294;color:#f0fbfb;padding:15px;font:16px/1.5 Arial,sans-serif}.human-room textarea:focus{outline:2px solid var(--cyan)}.input-note{font-size:12px;line-height:1.5;color:#91b2c0}.human-actions{display:flex;justify-content:space-between;gap:10px;margin-top:20px}.review-list{display:grid;gap:12px}.review-list>div,.answer-report>div{border:1px solid #3e6274;background:#102438;padding:13px 17px}.review-list small,.answer-report small{font:700 11px Consolas,monospace;color:var(--cyan)}.review-list p,.answer-report p{white-space:pre-wrap;overflow-wrap:anywhere;color:#e5f2f3;line-height:1.5}.review-list .text-button{padding:2px 0}.human-room>.button{margin-top:15px}
.human-grammar-feedback{border:1px solid #4a8492;background:#102c3b;padding:10px 14px;margin:10px 0;font-size:13px;line-height:1.4}.human-grammar-feedback.mistake{border-color:#c77480;background:#382332}.human-grammar-feedback.review{border-color:#b99a62;background:#332d25}.human-grammar-feedback strong{font:700 11px Consolas,monospace;letter-spacing:.08em}.human-grammar-feedback p{margin:6px 0;overflow-wrap:anywhere}.human-grammar-feedback mark{background:#9e5360;color:#fff;padding:2px}.human-grammar-feedback small{color:#b8cbd2}
.module-victory{border:1px solid #5fbed0;background:#142d40;padding:20px}.module-victory p{font-size:20px;line-height:1.6;color:#e5f7f7}.module-victory>div:last-child{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:25px}.mind-story.centre{display:flex;text-align:center;align-items:center;max-width:750px;margin:0 auto}.mind-story.centre .reward{width:100%}.all-keys{font:700 11px Consolas,monospace;color:var(--cyan);letter-spacing:.08em;margin-bottom:25px}.all-keys span{padding:0 12px}
.map-exit{margin-top:23px;width:100%}
.exit-layout{display:grid;grid-template-columns:.8fr 1.2fr;gap:20px}.exit-door{height:470px;position:relative;overflow:hidden;border:2px solid #647f8e;background:linear-gradient(90deg,#1b3543 0 48%,#091624 49% 51%,#1b3543 52%);box-shadow:inset 0 0 50px #000}.exit-door:before,.exit-door:after{content:"";position:absolute;top:0;bottom:0;width:49%;background:repeating-linear-gradient(90deg,#42637322 0 3px,transparent 4px 38px);transition:transform 2s}.exit-door:before{left:0;border-right:2px solid #778e9a}.exit-door:after{right:0;border-left:2px solid #778e9a}.exit-door.open:before{transform:translateX(-90%)}.exit-door.open:after{transform:translateX(90%)}.door-core{position:absolute;left:50%;top:38%;transform:translateX(-50%);z-index:2;border:2px solid #ff7985;background:#4b2431;color:#ffa4aa;border-radius:50%;width:105px;height:105px;display:grid;place-items:center;box-shadow:0 0 35px #e7607080;font:700 13px Consolas,monospace}.exit-door.open .door-core{border-color:var(--cyan);color:var(--cyan);background:#1a5b66}.door-keys{position:absolute;bottom:22px;left:0;right:0;display:flex;justify-content:space-around;z-index:2;color:var(--cyan);font:700 10px Consolas,monospace}.exit-puzzle{border:1px solid #426479;background:#152b3b;padding:27px}.exit-puzzle>p{font-size:18px;line-height:1.6;color:#d5e9ee}.exit-puzzle .sentence-assembly{margin-top:26px}
.ending-screen{text-align:center;position:relative;overflow:hidden;min-height:calc(100vh - 112px);display:flex;flex-direction:column;align-items:center;justify-content:center}.ending-light{position:absolute;inset:0;z-index:-2;background:radial-gradient(ellipse at 50% 45%,#65e8ec2b,transparent 60%)}.ending-door{width:min(370px,75vw);height:190px;border:2px solid var(--cyan);border-bottom:0;position:relative;overflow:hidden;box-shadow:0 0 40px #67ecf041,inset 0 0 40px #67ecf041;margin:25px auto}.ending-door:before,.ending-door:after{content:"";position:absolute;top:0;bottom:0;width:50%;background:#16374a;animation:doorOpen 2s 1s ease both}.ending-door:before{left:0}.ending-door:after{right:0}.ending-path{position:absolute;inset:0;background:linear-gradient(#c7fffb,#6ce4eb 45%,#12374d)}.ending-screen h2{font:700 16px Consolas,monospace;letter-spacing:.25em;color:var(--cyan);margin:12px 0 20px}.ending-message{margin:0 auto 25px;border:1px solid #5a8997;background:#102b3a;padding:20px 35px;max-width:620px}.ending-message p{font-size:16px;line-height:1.7;color:#e0f4f4}
.ending-core{width:42px;height:42px;border-radius:50%;border:2px solid var(--cyan);background:var(--cyan);box-shadow:0 0 30px 12px #6deff373;margin:18px auto -6px;animation:coreRecover 2s ease both}
.door-keys span{animation:keyInsert .6s ease both}.door-keys span:nth-child(2){animation-delay:.25s}.door-keys span:nth-child(3){animation-delay:.5s}
@keyframes keyInsert{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}
@keyframes coreRecover{from{background:#ab3855;border-color:#f17b8a;box-shadow:0 0 20px #ef6376}to{background:var(--cyan);border-color:var(--cyan);box-shadow:0 0 30px 12px #6deff373}}
.result-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}.result-panel{border:1px solid #466b7d;background:#102739;padding:24px}.result-panel h2{font:700 13px Consolas,monospace;letter-spacing:.12em;color:var(--cyan);margin:0 0 18px}.result-row{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #36576a;padding:13px 0;font:700 11px Consolas,monospace;color:#b5d0d9}.result-row strong{color:#94e6d1}.result-keys{padding-top:18px;color:var(--cyan);font:700 10px Consolas,monospace;line-height:1.7}.result-stat{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:10px 0}.result-stat strong{font-size:31px;color:#e4ffff}.result-stat span{text-align:right;color:#99baca;font:700 10px Consolas,monospace}.answer-report{margin-top:18px}.answer-report>div{margin-bottom:10px}.answer-report button{margin-top:10px}#copyStatus{color:var(--cyan);font:12px Consolas,monospace;margin-left:15px}.result-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
@keyframes doorOpen{to{transform:translateX(100%)}}.ending-door:before{animation-name:doorOpenLeft}@keyframes doorOpenLeft{to{transform:translateX(-100%)}}
@media(max-width:950px){.room-layout{grid-template-columns:1fr}.room-aside{grid-template-columns:220px 1fr}.room-index{align-content:center}.station-grid{grid-template-columns:repeat(2,1fr)}.exit-layout{grid-template-columns:1fr}.exit-door{height:270px}.result-grid{grid-template-columns:1fr}}
@media(max-width:650px){.mind-heading h1{font-size:43px}.mind-progress strong{font-size:26px}.mind-intro-layout,.core-layout,.module-victory{grid-template-columns:1fr}.ai-core{height:270px}.room-aside{grid-template-columns:1fr}.room-aside .ai-core{display:none}.memory-grid{grid-template-columns:repeat(2,1fr)}.memory-card{min-height:75px}.station-grid{grid-template-columns:repeat(2,1fr)}.station{min-height:120px}.station>span{font-size:36px}.log-editor>div,.human-actions,.result-actions{flex-direction:column}.experiment-log{font-size:14px;padding:14px}.exit-door{height:240px}.door-keys{font-size:8px}.mind-story{padding:22px}}
@media(prefers-reduced-motion:reduce){.ai-core:after,.core-orbit,.core-heart,.ending-door:before,.ending-door:after,.ending-core,.door-keys span{animation:none!important}}

/* The five-room chapter shares one flexible gameplay row on desktop. */
.mind-nav-actions{display:flex;gap:8px}
.mind-side .module-list{grid-template-columns:1fr}
.mind-side .module-node.current{outline:2px solid var(--cyan);outline-offset:1px}
.mind-side .module-node:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.module-victory .button+.button{margin-top:9px}
.mind-objective{align-items:stretch;gap:0}
.mind-objective .echo-tag{align-self:flex-start}
.mind-objective p{max-width:620px}
.mind-primary{width:100%;max-width:440px;min-height:60px;font-size:14px;box-shadow:0 0 28px #65e8ec3d}
.mind-primary:focus-visible{outline:3px solid #fff;outline-offset:4px}
.mind-primary:disabled{opacity:.5;box-shadow:none;cursor:not-allowed}
.mind-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin-top:19px}
.mind-overview>div{border:1px solid #34596c;background:#0d2233;padding:10px}
.mind-overview span,.mind-overview strong{display:block;font:700 10px Consolas,monospace;letter-spacing:.08em}
.mind-overview span{color:#84a9bb}.mind-overview strong{color:var(--cyan);font-size:14px;margin-top:5px}
.mind-side .module-node em{font-size:18px;color:var(--cyan)}
.mind-side .module-node.locked em{color:#7c94a4}
.station em{font:700 10px Consolas,monospace;letter-spacing:.08em;font-style:normal;color:var(--cyan)}
.station.next{border-color:var(--cyan);box-shadow:0 0 20px #65e8ec29}
.station.done em{color:#9ff1d3}
.station:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.station-continue{margin-top:12px;min-height:50px}
.station-complete{display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;border:1px solid #55a5ab;background:#153640;padding:9px 12px;margin-top:9px}
.station-complete strong{font:800 11px Consolas,monospace;letter-spacing:.1em;color:var(--cyan)}
.station-complete span{font:700 10px Consolas,monospace;color:#b1d3d8}
.station-complete p{width:100%;margin:0;color:#d2e8ea;font-size:13px;line-height:1.35}
.log-phrase{font:inherit;color:#d8edee;border:0;border-bottom:1px dotted #9bbdca;background:transparent;padding:0 2px;cursor:pointer}
.log-phrase:hover,.log-phrase.selected{color:#dcffff;background:#1a5361;box-shadow:0 0 0 1px #65e8ec}
.log-phrase:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.log-fixed span{font-size:12px;font-weight:800;color:#bbffe5}
.log-editor p{margin:7px 0 0;color:#d6eaf0;font-size:13px}
.log-editor .text-button{padding:7px 0 0}
.control-room>.button-primary{margin-top:10px}
@media(max-width:650px){.mind-overview{grid-template-columns:1fr}.mind-primary{max-width:none}}
@media(min-width:951px) and (min-height:700px){
  body[data-screen="mind"] .shell{overflow:visible}
  body[data-screen="mind"] .topbar{height:56px}
  body[data-screen="mind"] .footer{min-height:32px;padding-top:7px;padding-bottom:7px}
  body[data-screen="mind"] #app{min-height:0}
  .mind-screen{
    min-height:calc(100vh - 88px);
    min-height:calc(100dvh - 88px);
    display:grid;
    grid-template-rows:auto auto auto minmax(min-content,1fr) auto;
    gap:7px;
    padding:9px clamp(20px,3vw,48px) 7px
  }
  .mind-heading{align-items:center;margin:0}
  .mind-heading h1{font-size:clamp(38px,3.5vw,53px)}
  .mind-heading .section-number{margin-bottom:3px}
  .mind-heading p{margin-top:4px;font-size:13px;line-height:1.3}
  .mind-progress strong{font-size:28px}
  .mind-nav-actions .double-nav-action{padding:5px 9px}
  .mind-main{display:grid;grid-template-columns:minmax(0,28fr) minmax(0,72fr);grid-template-rows:minmax(min-content,1fr);gap:14px;min-height:0}
  .mind-side{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:9px;min-height:0}
  .mind-side .ai-core{height:auto;min-height:140px;min-width:0}
  .mind-side .core-orbit{width:145px;height:145px}
  .mind-side .orbit-two{width:105px;height:105px}
  .mind-side .core-heart{width:66px;height:66px;font-size:38px}
  .mind-side .core-readout{bottom:8px;left:11px;right:11px}
  .mind-side .module-list{gap:5px}
  .mind-side .module-node{min-height:44px;padding:5px 9px;gap:8px}
  .mind-side .module-symbol{font-size:21px;width:24px}
  .mind-side .module-node small{font-size:10px}
  .mind-side .module-node strong{font:700 10px Consolas,monospace;margin-top:2px}
  .mind-content{min-width:0;min-height:0}
  .mind-content>.mind-story,.mind-content>.room-work,.mind-content>.module-victory{height:100%;min-height:0}
  .mind-content>.mind-story{padding:20px 25px}
  .mind-story p{font-size:16px;line-height:1.5;margin:12px 0 17px}
  .room-work{padding:13px 17px}
  .room-panel-head{padding-bottom:9px;margin-bottom:10px}
  .memory-grid{gap:8px;margin:12px 0}
  .memory-card{min-height:72px;font-size:20px}
  .emotion-wave{font-size:27px;margin:8px 0}
  .room-work .sentence-gap{margin:12px 0}
  .station{min-height:108px;gap:5px}
  .station>span{font-size:34px}
  .station-focus{padding:10px 14px;margin-bottom:10px}
  .station-focus span{font-size:40px}
  .station-focus p{font-size:15px;line-height:1.4}
  .perception-options{gap:7px;margin:11px 0}
  .experiment-log{padding:10px 15px;font-size:14px;line-height:1.5}
  .experiment-log p{margin-bottom:7px}
  .log-editor{padding:10px;margin-top:9px}
  .log-editor>div{margin-top:7px}
  .log-editor .choice{min-height:46px}
  .human-message{padding:10px 14px;margin-bottom:10px}
  .human-message p{margin:6px 0;line-height:1.4}
  .human-room textarea{min-height:120px;padding:10px}
  .human-actions{margin-top:10px}
  .module-victory{display:flex;align-items:center;justify-content:center;padding:18px}
  .module-victory>div:last-child{padding:0}
  .module-victory p{margin:12px 0;font-size:18px;line-height:1.45}
  .mind-screen>.chapter-footer{padding-top:0}
  .mind-screen>.chapter-footer .text-button{padding:6px}
}
@media(max-width:950px){
  .mind-main{display:flex;flex-direction:column;gap:14px}
  .mind-side .ai-core{display:none}
  .mind-side .module-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mind-nav-actions{flex-wrap:wrap}
}
.review-room .room-panel-head{margin-bottom:7px}
.review-room .review-list{gap:6px}
.review-room .review-list>div{padding:8px 12px}
.review-room .review-list p{margin:4px 0;font-size:14px;line-height:1.35}
.review-room .input-note{margin:8px 0}
.review-room>.button{margin-top:6px}
.final-question-message span,.final-question-message strong{display:block}
.final-question-message span{margin-bottom:8px}
.exit-success{border:1px solid #65e8ec;background:#123b46;padding:12px 15px;margin:12px 0;color:#defafa}
.exit-success strong,.exit-success span,.exit-success b{display:block}
.exit-success strong{font:600 15px/1.4 Arial,sans-serif;color:#defafa;margin-bottom:8px}
.exit-success span,.exit-success b{font:800 13px/1.4 Consolas,monospace;color:var(--cyan);letter-spacing:.12em;margin-top:4px}
.ending-layout{width:100%}
.report-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:15px 0}
.report-summary span{display:block;border:1px solid #3e6274;background:#102438;padding:11px 13px;color:var(--cyan);font:700 11px/1.4 Consolas,monospace;letter-spacing:.04em}
.results-screen .answer-report>div{padding:10px 14px}
.results-screen .answer-report p{margin:6px 0;line-height:1.45}
@media(min-width:951px) and (min-height:700px){
  body[data-screen="exit"] .topbar,body[data-screen="ending"] .topbar{height:56px}
  body[data-screen="exit"] .footer,body[data-screen="ending"] .footer{min-height:32px;padding-top:7px;padding-bottom:7px}
  body[data-screen="exit"] #app,body[data-screen="ending"] #app{min-height:0}
  .exit-screen{min-height:calc(100dvh - 88px);display:grid;grid-template-rows:auto auto minmax(min-content,1fr);gap:8px;padding:9px clamp(20px,3vw,48px) 7px}
  .exit-screen .mind-heading{margin:0}
  .exit-layout{min-height:0}
  .exit-door{height:auto;min-height:350px}
  .exit-puzzle{padding:15px 18px}
  .exit-puzzle>p{font-size:16px;line-height:1.45;margin:10px 0}
  .exit-puzzle .sentence-assembly{margin:13px 0}
  .exit-puzzle .build-controls{margin-top:10px}
  .ending-screen{min-height:calc(100dvh - 88px);display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;padding:13px clamp(20px,3vw,48px);overflow:visible;text-align:left}
  .ending-layout{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:30px;min-height:0}
  .ending-door{width:min(340px,100%);height:clamp(150px,25vh,230px);margin:12px auto}
  .ending-copy h1{font-size:clamp(45px,4.5vw,65px)}
  .ending-copy h2{margin:7px 0 12px}
  .ending-message{margin:0 0 16px;padding:14px 18px}
  .ending-message p{font-size:15px;line-height:1.5;margin:8px 0 0}
}
@media(max-width:950px){.ending-layout{text-align:center}.report-summary{grid-template-columns:1fr}}

/* Compact final report: one answer at a time and a viewport anchored action row. */
body[data-screen="results"] .topbar{height:56px}
body[data-screen="results"] .footer{min-height:32px;padding-top:7px;padding-bottom:7px}
body[data-screen="results"] #app{min-height:0}
.results-screen{height:calc(100vh - 88px);min-height:540px;padding:12px clamp(20px,4vw,52px);display:flex;flex-direction:column;gap:9px;overflow:visible}
.report-header{display:grid;grid-template-columns:auto 1fr auto;align-items:end;gap:20px}
.report-header .section-number{margin:5px 0 0}.report-header h1{font-size:clamp(34px,4vw,55px);line-height:.9;letter-spacing:-.06em;margin:0}.report-header h1 em{color:var(--cyan);font-style:normal}.report-header p{margin:0;color:#9bb5c4;font-size:13px}
.results-screen .report-summary{display:flex;gap:7px;margin:0}.results-screen .report-summary>span{padding:7px 10px;flex:1}.results-screen .report-summary strong{color:#eaffff}.results-screen .report-summary .summary-keys{flex:1.5;color:#9ceadb}
.report-dashboard{display:grid;grid-template-columns:1.45fr 1fr;gap:9px}.chapter-results,.stat-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.chapter-results>span,.stat-cards>div{border:1px solid #36596b;background:#0e2334;padding:7px 9px;display:flex;flex-direction:column;justify-content:center;min-width:0;color:#91afbd;font:700 9px/1.35 Consolas,monospace}.chapter-results strong{color:#8fe3cc;margin-top:3px}.stat-cards{grid-template-columns:repeat(3,1fr)}.stat-cards>div{flex-direction:row;align-items:center;gap:8px}.stat-cards strong{font-size:23px;color:#e4ffff}.stat-cards span{font:700 9px/1.25 Consolas,monospace;color:#99baca}
.answer-viewer{border:1px solid #466b7d;background:#102739;min-height:0;flex:1;display:flex;flex-direction:column;padding:12px 15px}.answer-viewer-head{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #36576a;padding-bottom:8px}.answer-viewer h2{font:700 12px Consolas,monospace;letter-spacing:.12em;color:var(--cyan);margin:0}.answer-viewer-head>strong{color:#96bcca;font:700 10px Consolas,monospace}.answer-content{flex:1;min-height:70px;overflow:auto;padding:10px 3px}.answer-content>small{font:700 11px/1.4 Consolas,monospace;color:var(--cyan)}.answer-content>p{white-space:pre-wrap;overflow-wrap:anywhere;color:#e5f2f3;line-height:1.45;margin:7px 0;font-size:15px}.answer-content aside{border-left:2px solid var(--purple);padding:5px 9px;color:#aebdca;font:10px/1.35 Consolas,monospace}.answer-content aside strong{color:#c5a8f5;margin-right:8px}
.answer-error{background:#733948;color:#fff3e2;border-bottom:2px solid #ffb56b;padding:1px 2px;text-decoration:underline wavy #ffcf82;text-underline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.answer-content .report-grammar{display:block;margin-top:8px;padding:7px 10px;border-left-color:#6fa9b8;background:#102d3b}.answer-content .report-grammar.mistake{border-left-color:#ff9c67;background:#342631}.answer-content .report-grammar.review{border-left-color:#c5a86b;background:#302c26}.answer-content .report-grammar>strong{display:block;color:#ffbd7a;margin-bottom:4px}.answer-content .report-grammar.passed>strong{color:#89e2c9}.answer-content .report-grammar p{display:block;margin:3px 0;color:#c8d8dd}.answer-content .report-grammar small{display:block;margin-top:4px;color:#819daa}
.answer-correct{background:#17433e;color:#dffff8;border-bottom:2px solid #69d8c0;padding:1px 2px;text-decoration:underline solid #69d8c0;text-underline-offset:3px}
.grammar-feedback{display:grid;gap:7px;margin-top:8px}.grammar-card{border:1px solid #456979;border-left-width:3px;background:#102b38;padding:9px 12px;color:#d1e1e5;font:14px/1.45 Arial,sans-serif}.grammar-card.warning{border-color:#b96d5d;background:#342631}.grammar-card.success{border-color:#4da994;background:#153832}.grammar-card.review{border-color:#a88e59;background:#302c26}.grammar-card.neutral{border-color:#486a79;background:#102936}.grammar-card h3{margin:0 0 6px;font:700 11px/1.3 Consolas,monospace;letter-spacing:.08em;color:#ffbd7a}.grammar-card.success h3{color:#8de8d1}.grammar-card.review h3{color:#e2c17e}.grammar-card p{margin:4px 0;color:#d1e1e5}.grammar-card .grammar-phrase{font:700 13px/1.4 Consolas,monospace;color:#f4fbfc}.grammar-card .grammar-phrase b{color:#8de8d1}.grammar-card.warning .grammar-phrase{color:#ffd0b8}.grammar-suggestion{margin-top:7px;border:1px solid #6f5960;background:#182b36;padding:7px 9px}.grammar-suggestion>b{display:block;color:#ffca91;font:700 10px Consolas,monospace;letter-spacing:.08em}.grammar-suggestion p{color:#fff;margin:3px 0 0}.grammar-card small{display:block;margin-top:6px;color:#8ea8b2;font:11px/1.35 Arial,sans-serif}.human-room .grammar-feedback{margin:10px 0}.human-room .grammar-card{font-size:14px}.answer-content .grammar-feedback{margin-top:9px}
.answer-navigation{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-top:1px solid #36576a;padding-top:8px}.answer-navigation>button{justify-self:start}.answer-navigation>button:last-child{justify-self:end}.answer-navigation button{border:1px solid #416779;background:#102c3e;color:#a8ccd4;padding:6px 10px;font:700 10px Consolas,monospace}.answer-navigation button:hover:not(:disabled),.answer-navigation button[aria-current="true"]{border-color:var(--cyan);color:var(--cyan);background:#174053}.answer-navigation button:disabled{opacity:.38}.answer-navigation div{display:flex;gap:5px}.answer-navigation div button{min-width:30px}
.results-screen .result-actions{margin:0;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:8px}.results-screen .result-actions>div{display:flex;align-items:center;min-width:0}.results-screen .result-actions .button{min-height:42px;padding:0 16px}.results-screen #copyStatus{white-space:nowrap}
@media(max-width:950px){.results-screen{height:auto;min-height:calc(100vh - 88px)}.report-header{grid-template-columns:1fr}.report-header p{display:none}.results-screen .report-summary{display:grid;grid-template-columns:1fr 1fr}.report-dashboard{grid-template-columns:1fr}.results-screen .result-actions{grid-template-columns:1fr}.results-screen .result-actions .button{width:100%}}
@media(max-height:719px){body[data-screen="results"] .shell{overflow:visible}.results-screen{height:auto;min-height:calc(100vh - 88px)}}
