:root{color-scheme:light;--ink:#17153e;--navy:#132d8c;--cyan:#5deaff;--gold:#ffdc6c;--purple:#6f46cb;--paper:#f5f0ff;--chrome:#c9c9dc;--shadow:#73718d;--edge:#fff;font-family:'Courier New',Courier,monospace}
*{box-sizing:border-box}body{margin:0;background:#141b45;color:var(--ink);min-height:100svh;overscroll-behaviour:none}button,a,input{ -webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ffbe3d;outline-offset:3px}button:disabled{cursor:default;opacity:.5}img{image-rendering:pixelated}button{border-radius:0}a{color:inherit}button:active{transform:translateY(1px)}kbd{font:inherit;font-size:.78em;border:1px solid #8c87a2;padding:0 3px;box-shadow:0 1px #fff;color:#504b69}#desktop{min-height:100svh;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:24px 28px 18px;background:radial-gradient(ellipse at 60% 30%,#34477755,transparent 65%),radial-gradient(#7075b52a 1px,transparent 1px);background-size:auto,12px 12px}.desktop-label,.desktop-footer{width:min(1390px,100%);display:flex;align-items:center;gap:12px;color:#c2c2e0;font-size:12px;letter-spacing:1px}.desktop-label{padding:0 2px 12px}.mini-square{font-size:20px;color:#96d7ef}.version{margin-left:auto;color:#929ab8}.desktop-footer{justify-content:space-between;padding:16px 2px 0;letter-spacing:.1px;font-size:12px}.desktop-footer a{color:#d9eaff;text-underline-offset:4px}.desktop-hint{font-size:11px;color:#a7a9ce}.desktop-hint b{color:#5b6089;margin:0 6px}#game-window{width:min(1390px,100%);border:3px solid var(--chrome);border-top-color:#f7f3ff;border-left-color:#fff;box-shadow:2px 2px 0 #080d2b,0 22px 55px #060923a6;background:var(--chrome);position:relative}.titlebar{height:34px;background:linear-gradient(90deg,#132e90,#294eae 80%,#4966c0);display:flex;align-items:center;justify-content:space-between;color:white;padding:3px 4px 3px 7px}.window-title{display:flex;align-items:center;gap:8px;min-width:0;font-size:17px;text-shadow:2px 2px #111c57;letter-spacing:.2px}.window-title img{width:25px;height:25px;object-fit:contain}.title-edition{font-size:11px;color:#d2dafa;font-weight:normal;letter-spacing:1px;margin-left:8px;white-space:nowrap}.window-actions{display:flex;gap:3px}.chrome-button{width:25px;height:25px;padding:0;display:grid;place-content:center;background:#d5d3e3;color:#12152c;border:2px outset #f4f2fd;line-height:20px;font-weight:bold;font-family:Arial,sans-serif;font-size:24px}.chrome-button:active{border-style:inset}.menubar{display:flex;justify-content:space-between;min-height:33px;padding:3px 6px;border-bottom:2px solid #8f8aab}.menu-group{display:flex;gap:3px}.menubar button{background:none;border:1px solid transparent;padding:2px 9px;font-size:13px;color:#211d40}.menubar button:hover{background:#e7e4f5;border-color:#fff #878294 #878294 #fff}.menubar kbd{margin-left:4px}#viewport{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;background:#739df9;isolation:isolate}#game{display:block;width:100%;height:100%;image-rendering:pixelated;outline:none}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:25px;background:#171e4c6b;z-index:20;overflow:auto}.overlay.home-overlay{justify-content:flex-start;background:linear-gradient(90deg,#1c2259e8 0,#232a62b0 38%,#172b5415 71%);padding:35px 42px}.hidden{display:none!important}.home-content{max-width:450px;width:49%;color:#fff;filter:drop-shadow(0 3px 0 #14184244)}.edition-pill{font-size:11px;letter-spacing:2px;color:#bcefff;display:inline-flex;gap:8px;align-items:center;margin-bottom:19px}.edition-pill::before{content:'';display:inline-block;width:7px;height:7px;background:#8ee7be;box-shadow:2px 2px #173f71}.game-logo{font-size:clamp(36px,5.3vw,78px);letter-spacing:-4px;line-height:.95;font-weight:900;margin:0 0 22px;text-shadow:3px 3px #4161b2,6px 6px #121b57;font-family:'Courier New',monospace}.game-logo em{font-style:normal;color:var(--gold)}.home-content h2{font-size:clamp(17px,1.6vw,25px);line-height:1.35;margin:0 0 13px;font-weight:700;max-width:370px}.home-copy{font-size:14px;line-height:1.65;color:#e4e3f9;max-width:380px;margin:0 0 21px}.home-buttons{display:flex;flex-direction:column;gap:9px;max-width:320px}.btn{padding:11px 17px;border:2px solid #f8f5ff;border-right-color:#6b6296;border-bottom-color:#6b6296;background:#d4d0e8;color:#1a1645;box-shadow:2px 2px 0 #11132e;line-height:1.25;font-weight:bold;font-size:14px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px}.btn:hover{background:#f6efff}.btn:active{border-style:inset;box-shadow:1px 1px #11132e}.btn.primary{background:var(--gold);border-top-color:#fff2b7;border-left-color:#fff4b9;border-bottom-color:#c39032;border-right-color:#b9872b;color:#30234c}.btn.primary:hover{background:#ffe898}.btn.subtle{background:#26275b9c;border:1px solid #8e92bc;box-shadow:none;color:#e9efff}.btn.subtle:hover{background:#4a4a87b8}.home-meta{font-size:11px;color:#b8c9ee;margin:15px 0 0}.home-stamp{position:absolute;right:35px;bottom:25px;color:#fff4ce;text-shadow:2px 2px #26275c;background:#20205eae;border:1px solid #c4bded77;padding:9px 13px;font-size:11px;letter-spacing:1px}.modal-window{background:#e1dded;border:3px outset #fff;width:min(630px,100%);box-shadow:8px 8px 0 #1114337a;color:#201d40;max-height:100%;display:flex;flex-direction:column}.modal-window.wide{width:min(800px,100%)}.small-title{display:flex;justify-content:space-between;align-items:center;gap:12px;background:linear-gradient(90deg,#162f8d,#4c58ac);color:white;padding:8px 11px;font-size:13px;font-weight:bold;letter-spacing:.5px}.small-title button{font-size:17px;width:21px;height:21px;line-height:15px;padding:0;border:2px outset #f5f0ff;background:#d8d3e6;color:#282240}.modal-body{padding:23px;overflow:auto}.modal-body h1,.modal-body h2{font-size:24px;margin:0 0 10px;letter-spacing:-.5px}.modal-body p{font-size:14px;line-height:1.6;margin:0 0 16px}.modal-body .eyebrow{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:#64528b;margin-bottom:8px}.modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.modal-actions .btn{flex:1}.muted{color:#625d78}.world-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.world-card{text-align:left;background:#f2eff9;border:2px outset white;padding:0;overflow:hidden;color:#252047;display:flex;flex-direction:column;position:relative}.world-card:hover{border-color:#725bd1;box-shadow:0 0 0 1px #725bd1}.world-card img{width:100%;aspect-ratio:3.2;object-fit:cover;object-position:center 43%;image-rendering:pixelated}.world-card>span{display:block;padding:10px 12px;font-size:15px;font-weight:bold}.world-card small{display:block;padding:0 12px 12px;color:#665a8c;font-size:11px;line-height:1.4}.world-card .clear-badge{position:absolute;top:7px;right:7px;background:#264d64;color:#c0f7c4;padding:4px 6px;font-size:10px;border:1px solid #a7e9c6}.toggle-row{display:flex;gap:10px;align-items:center;margin-top:16px;background:#cbc7df;padding:12px;font-size:13px;line-height:1.5}.toggle-row input{width:20px;height:20px;accent-color:#6440b8}.toggle-row small{display:block;font-size:11px;color:#605976}.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.control-card{background:#f4f0fa;border:1px solid #bbb2d3;padding:13px;font-size:13px;line-height:1.6}.control-card strong{display:block;margin-bottom:4px}.key{display:inline-block;background:#e0daec;border:2px outset #fff;padding:0 5px;font-size:12px;min-width:23px;text-align:center}.help-list{margin:12px 0;padding-left:20px;font-size:13px;line-height:1.8}.portfolio-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.project-card{padding:14px;background:#f4f1fb;border:1px solid #bcb3d6}.project-card h3{margin:0 0 7px;font-size:16px}.project-card p{font-size:12px;line-height:1.6;margin:0}.project-card a{display:inline-block;margin-top:9px;font-size:12px;color:#4e35ad}.profile-heading{display:flex;gap:15px;align-items:center;margin-bottom:14px}.profile-heading img{width:65px;height:65px;object-fit:cover;border:3px outset #fff}.profile-heading h2{margin:0 0 4px}.profile-heading p{margin:0;font-size:12px}.result-strip{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.result-stat{padding:13px;background:#f5f1ff;border:2px inset #eee7f8;flex:1;min-width:90px;text-align:center}.result-stat strong{display:block;font-size:25px;color:#4f3d91}.result-stat span{display:block;font-size:10px;letter-spacing:.6px;margin-top:4px}.interview-answers{display:flex;flex-direction:column;gap:9px;margin:17px 0}.answer-btn{text-align:left;justify-content:flex-start;font-size:13px}.interview-response{background:#f5f2fd;border:2px inset #f8f4ff;padding:16px;margin-top:15px;line-height:1.7;font-size:14px}.interview-progress{display:flex;gap:7px;margin-bottom:18px}.interview-progress i{height:5px;background:#bdb4d7;flex:1}.interview-progress i.done{background:#6550bb}.success-icon{font-size:38px;line-height:1.2;color:#6751b8;margin-bottom:10px}.tiny-note{font-size:11px!important;color:#6d6380;line-height:1.5!important;margin-top:14px!important}.pause-actions{display:grid;gap:10px}.pause-actions .btn{width:100%}#hud{position:absolute;inset:0 0 auto;display:flex;align-items:center;gap:22px;padding:12px 18px;background:linear-gradient(180deg,#16235cdb,#1d2a6996 78%,transparent);color:#fff;text-shadow:2px 2px #211b55;pointer-events:none;height:83px;z-index:5}.player-hud{display:flex;gap:10px;align-items:center}.portrait{width:53px;height:53px;border:3px outset #cfdeff;object-fit:cover}.hud-label{display:block;font-size:11px;letter-spacing:1px;color:#cfe9ff;font-weight:bold}.world-hud{margin-right:auto}.world-hud strong{display:block;font-size:15px;line-height:1.6}.counter{display:flex;align-items:center;gap:7px}.counter img{width:26px;height:30px;object-fit:contain}.counter strong{font-size:22px}#hearts{display:flex;gap:3px;margin-top:5px}#hearts img{width:21px;height:20px;object-fit:contain}#hearts img.empty{opacity:.25;filter:grayscale(1)}.dash-hud{width:70px}#dash-meter{height:8px;margin-top:7px;background:#1b1a4d;border:1px solid #b1a7df}#dash-meter i{display:block;background:#60e8f4;width:100%;height:100%}.toast{position:absolute;z-index:12;bottom:20px;left:50%;transform:translateX(-50%);background:#171b4aeb;color:#fff4cd;border:2px solid #beb8e8;box-shadow:3px 3px #12152b8c;padding:10px 17px;max-width:76%;width:max-content;font-size:13px;line-height:1.45;text-align:center;pointer-events:none}.level-ribbon{position:absolute;left:22px;top:96px;padding:9px 13px;background:#e5def8e8;border:2px outset #fff;box-shadow:3px 3px #19174d5c;font-size:13px;font-weight:bold;z-index:4}.statusbar{min-height:27px;padding:3px 4px;display:flex;gap:4px;font-size:11px;color:#4d4564}.statusbar>span{border:1px inset #ece8f5;padding:3px 6px;display:flex;align-items:center}#status{flex:1}#mode-label{font-size:10px;letter-spacing:.5px}.resize-grip{padding:0 3px!important}.loading{position:absolute;inset:0;background:#232452d9;z-index:40;display:flex;align-items:center;justify-content:center}.loading-window{width:min(330px,86%);border:3px outset #fff;background:#dcd6e9;box-shadow:8px 8px #12173888}.loading-body{padding:25px;text-align:center}.loading-body>img{width:52px;height:52px;object-fit:contain}.loading-body p{font-size:14px;margin:10px 0 16px}.loading-body small{display:block;font-size:11px;color:#6a5b83;margin-top:17px}.loading-track{height:14px;border:2px inset white;background:#b5adc8;padding:1px}.loading-track i{height:100%;display:block;background:repeating-linear-gradient(90deg,#2b408d 0 12px,transparent 12px 15px);width:65%;animation:loading 1.3s steps(10) infinite}@keyframes loading{from{width:8%}to{width:100%}}#touch-controls{display:none;justify-content:space-between;align-items:center;background:#d2cce2;padding:9px 12px;border-top:2px solid #f4edff;gap:8px;user-select:none;touch-action:none}.touch-group{display:flex;gap:8px}.touch-group button{width:58px;height:50px;background:#eee8f7;border:3px outset white;box-shadow:2px 2px #8d80aa;font-weight:bold;font-size:21px;color:#28234f;touch-action:none;user-select:none}.touch-group button.is-held{border-style:inset;background:#b9aece;box-shadow:none}.touch-group .touch-dash,.touch-group .touch-jump{font-size:11px;width:64px}.touch-group .touch-jump{background:#ffe29a}.touch-note{color:#8c80a7;font-size:10px;letter-spacing:1px}.no-script{background:#fff5db;padding:20px}.review-warning{display:none}
@media (min-width:1400px){#desktop{padding-top:18px;padding-bottom:15px}#game-window{max-width:min(1390px,calc((100svh - 148px)*16/9))}.desktop-label,.desktop-footer{max-width:min(1390px,calc((100svh - 148px)*16/9))}.home-content{width:46%}}
@media (pointer:coarse){#touch-controls{display:flex}.desktop-hint{display:none}.menubar button{min-height:30px}.home-content .home-meta{display:none}}
@media (max-width:800px){#desktop{padding:12px 8px;justify-content:center}.desktop-label{font-size:10px;letter-spacing:.4px;padding-bottom:8px}.desktop-footer{font-size:10px;padding:11px 1px;flex-wrap:wrap;gap:10px}.desktop-hint{display:none}.titlebar{height:31px}.title-edition{font-size:9px;letter-spacing:.3px}.window-title{font-size:14px}.menubar{min-height:31px}.menubar button{font-size:11px;padding:3px 5px}.menubar kbd{display:none}.overlay{padding:15px}.overlay.home-overlay{padding:25px}.home-content{width:55%;max-width:380px}.edition-pill{font-size:9px;letter-spacing:1px;margin-bottom:12px}.game-logo{font-size:43px;margin-bottom:16px;letter-spacing:-2px}.home-content h2{font-size:16px;margin-bottom:10px}.home-copy{font-size:11px;line-height:1.5;margin-bottom:14px}.home-buttons{gap:6px}.btn{font-size:12px;min-height:34px;padding:8px 12px}.home-meta{font-size:9px;margin-top:11px}.home-stamp{right:17px;bottom:17px;font-size:9px;padding:7px}.modal-body{padding:17px}.modal-body h1,.modal-body h2{font-size:21px}.modal-body p{font-size:12px}.small-title{font-size:11px;padding:6px 9px}#hud{height:63px;padding:7px 11px;gap:12px}.portrait{width:39px;height:39px}.player-hud{gap:6px}.hud-label{font-size:8px}#hearts{gap:1px;margin-top:3px}#hearts img{width:16px;height:15px}.world-hud strong{font-size:11px}.counter img{width:20px;height:24px}.counter strong{font-size:17px}.dash-hud{width:44px}#dash-meter{height:6px;margin-top:5px}.level-ribbon{top:66px;left:12px;font-size:10px;padding:6px 8px}.toast{font-size:11px;padding:8px 12px;bottom:11px}.statusbar{font-size:9px;min-height:24px}#mode-label{font-size:8px}.world-card>span{font-size:13px;padding:8px}.world-card small{padding:0 8px 8px;font-size:10px}}
@media (max-width:540px){#desktop{padding:9px 5px;justify-content:flex-start;min-height:100svh}.desktop-label{padding:6px 3px 9px}.desktop-label .version{font-size:9px}.title-edition{display:none}.menubar button{padding:4px;font-size:10px}.menu-group{gap:0}.menubar{padding:2px 3px}.titlebar{height:32px}.chrome-button{height:24px;width:25px}#viewport{aspect-ratio:16/9;height:auto;min-height:0}#viewport.menu-open{height:calc(100svh - 201px);min-height:440px;max-height:720px}#viewport.menu-open #game{object-fit:cover;width:177.78%;transform:translateX(-38%);height:100%}.overlay.home-overlay{padding:30px 24px;background:linear-gradient(90deg,#182052e8,#27315dba 70%,#26356288)}.home-content{width:100%;max-width:340px}.game-logo{font-size:51px;margin-bottom:23px}.edition-pill{font-size:10px;margin-bottom:19px}.home-content h2{font-size:21px;max-width:290px;margin-bottom:13px}.home-copy{font-size:13px;max-width:310px;margin-bottom:22px}.home-buttons{max-width:100%;gap:9px}.home-buttons .btn{font-size:13px;min-height:42px}.home-stamp{display:none}.home-meta{font-size:10px}.modal-window{max-height:100%;width:100%}.overlay{padding:9px}.modal-body{padding:17px 14px}.modal-body h1,.modal-body h2{font-size:22px}.modal-body p{font-size:13px}.world-grid{gap:9px}.world-card img{aspect-ratio:1.9}.world-card>span{font-size:12px;padding:8px}.world-card small{font-size:9px}.controls-grid{gap:9px}.control-card{font-size:11px;padding:10px}.help-list{font-size:12px}.portfolio-grid{grid-template-columns:1fr}.project-card{padding:12px}.project-card h3{font-size:14px}.project-card p{font-size:12px}.profile-heading img{width:53px;height:53px}.profile-heading{gap:10px}.modal-actions{margin-top:15px;gap:8px}.modal-actions .btn{font-size:12px}.interview-answers .btn{font-size:12px;padding:12px}.interview-response{font-size:13px;padding:12px}#touch-controls{display:flex;padding:10px 9px}.touch-group button{width:54px;height:51px}.touch-group .touch-dash,.touch-group .touch-jump{width:57px}.touch-note{font-size:8px}#hud{height:49px;padding:5px 8px;gap:10px}.portrait{width:30px;height:30px;border-width:2px}.hud-label{font-size:6px;letter-spacing:.3px}.world-hud strong{font-size:8px;line-height:1.6}.world-hud{max-width:112px}.player-hud{gap:4px}#hearts{margin-top:3px}#hearts img{width:11px;height:10px}.counter{gap:3px}.counter img{width:15px;height:17px}.counter strong{font-size:13px}.dash-hud{width:30px}.level-ribbon{top:48px;left:7px;font-size:8px;padding:4px 6px}.toast{font-size:9px;max-width:88%;padding:5px 8px;bottom:8px}.statusbar{font-size:8px}#mode-label{font-size:7px;max-width:39%;overflow:hidden;white-space:nowrap}.desktop-footer{font-size:9px;justify-content:center}.desktop-footer a{font-size:10px}.result-stat strong{font-size:22px}.result-stat span{font-size:9px}}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){#desktop{padding:0;justify-content:center}.desktop-label,.desktop-footer,.statusbar{display:none}#game-window{max-width:100%;border-width:2px}.titlebar{height:26px}.menubar{position:absolute;right:58px;top:0;z-index:50;padding:0;border:0;background:transparent}.menubar button{color:#e7ecff;font-size:10px;min-height:24px}.menubar .menu-group:first-child{display:none}.window-title .title-edition{display:none}.chrome-button{height:21px;width:22px;font-size:19px}#viewport,#viewport.menu-open{height:calc(100svh - 30px);width:calc((100svh - 30px)*16/9);margin:0 auto;max-width:100%;min-height:0;aspect-ratio:16/9}#viewport.menu-open #game{width:100%;transform:none;object-fit:fill}.overlay.home-overlay{padding:20px 30px}.home-content{width:50%;max-width:350px}.game-logo{font-size:40px;margin-bottom:14px}.home-content h2{font-size:16px}.home-copy{font-size:11px;margin-bottom:12px}.edition-pill{font-size:9px;margin-bottom:10px}.home-buttons .btn{min-height:30px;font-size:11px;padding:6px}.home-buttons{gap:5px}.home-meta{display:none}.home-stamp{display:none}#touch-controls{position:absolute;bottom:8px;left:12px;right:12px;z-index:15;background:transparent;border:0;padding:0;pointer-events:none}.touch-group{pointer-events:auto}.touch-group button{width:48px;height:45px;opacity:.75;box-shadow:1px 1px #31284c}.touch-note{display:none}.menu-open~#touch-controls{display:none}.modal-body{padding:13px;max-height:80svh}.modal-window.wide{width:min(720px,100%)}.world-card img{aspect-ratio:5}.world-grid{gap:8px}.world-card>span{padding:5px 8px;font-size:12px}.world-card small{padding:0 8px 5px;font-size:9px}.portfolio-grid{grid-template-columns:1fr 1fr}.modal-body h2{font-size:19px}.modal-body p{font-size:11px}.world-hud strong{font-size:10px}}
@media (prefers-reduced-motion:reduce){.loading-track i{animation:none;width:70%}button:active{transform:none}}
#game-window:fullscreen{width:100vw;max-width:none;height:100svh;display:flex;flex-direction:column;border:0;background:#151a41}#game-window:fullscreen #viewport{flex:1;min-height:0;aspect-ratio:auto;max-width:calc((100svh - 94px)*16/9);width:100%;margin:auto}#game-window:fullscreen #game{object-fit:contain}#game-window:fullscreen .statusbar{background:#c9c9dc}

/* The title stage leaves the atlas character and city visible beside the menu. */
.overlay.home-overlay { background:linear-gradient(90deg,#131c45f7 0%,#162451ec 27%,#18275590 43%,transparent 60%); }
.home-content { max-width:440px; }
.home-content h2 { font-size:clamp(17px,1.75vw,24px); }
.home-links { display:flex; gap:18px; flex-wrap:wrap; }
.home-links button { background:transparent; color:#fff; padding:10px 0; border:0; text-decoration:underline; text-underline-offset:4px; font-size:13px; }
.home-links button:hover { color:var(--gold); }
.menu-open~#touch-controls { display:none; }
@media (min-width:801px) and (min-height:601px) {
  #desktop { padding:14px 20px; }
  #game-window,.desktop-label,.desktop-footer { width:min(1390px, 100%, calc((100svh - 153px)*16/9)); }
}
@media (max-width:540px) and (orientation:portrait) {
  #desktop { padding-top:max(10px,env(safe-area-inset-top)); }
  #viewport { aspect-ratio:480/540; }
  #viewport.menu-open { min-height:450px; height:calc(100svh - 153px); }
  #viewport.menu-open #game { width:100%; height:100%; transform:none; object-fit:cover; }
  .overlay.home-overlay { align-items:flex-end; padding:20px; background:linear-gradient(0deg,#141d46 0%,#172349fb 24%,#16264be8 45%,#18275344 68%,transparent 85%); }
  .home-content { width:100%; max-width:none; }
  .home-copy { max-width:34ch; margin-bottom:14px; }
  .home-content h2 { font-size:18px; max-width:none; margin-bottom:8px; }
  .edition-pill { margin-bottom:12px; }
  .game-logo { margin-bottom:14px; }
  .home-links { justify-content:space-between; }
  .home-links button { min-height:44px; }
  #touch-controls { padding:10px max(9px,env(safe-area-inset-right)) 14px max(9px,env(safe-area-inset-left)); }
  .touch-group button { height:55px; }
  #hud { height:55px; background:linear-gradient(#15204fe8,#15204f88,transparent); gap:7px; }
  .world-hud strong { font-size:10px; }
  .hud-label { font-size:8px; }
  .toast { font-size:12px; bottom:12px; }
  .level-ribbon { top:58px; font-size:11px; }
}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
  #touch-controls { left:max(12px,env(safe-area-inset-left)); right:max(12px,env(safe-area-inset-right)); bottom:max(8px,env(safe-area-inset-bottom)); }
  .home-links button { padding:6px 0; }
}
.field-notes { margin-top:14px; padding:12px; background:#f3f0fc; border:1px solid #bcb3d6; }
.field-notes summary { cursor:pointer; font-weight:bold; }
.field-notes p { margin:12px 0 0; }
@media (max-width:365px) {
  #touch-controls { padding-inline:6px; gap:3px; }
  .touch-group { gap:4px; }
  .touch-group button,.touch-group .touch-jump,.touch-group .touch-dash { width:46px; }
}

/* Story panels composite the production sprites over the world plates. */
.overlay.comic-overlay {
  padding:clamp(8px,2vw,26px);
  background:radial-gradient(ellipse at 50% 28%,#443275,#201737 73%);
  align-items:center;
}
.comic {
  width:min(100%,850px);
  max-height:100%;
  overflow:auto;
  color:#251a43;
  background:#fff1cf;
  border:4px solid #251a43;
  box-shadow:5px 6px #0f0a21;
}
.comic-header,.comic-actions {
  display:flex;
  align-items:center;
  gap:12px;
  padding:9px 16px;
}
.comic-header {
  justify-content:space-between;
  color:#fff1cf;
  background:#251a43;
}
.comic-header h2 {margin:0;font-size:clamp(15px,2vw,23px);line-height:1.1}
.comic-header span {white-space:nowrap;font-size:12px;color:#ffe077}
.comic-art {
  position:relative;
  min-height:125px;
  height:clamp(150px,26vw,300px);
  overflow:hidden;
  isolation:isolate;
  background:#fff1cf;
}
.comic-frame {
  display:grid;
  position:absolute;
  inset:0 18% 0 0;
  overflow:hidden;
  clip-path:polygon(0 0,100% 0,84% 100%,0 100%);
}
.comic-frame img {width:100%;height:100%;min-height:0;object-fit:cover;object-position:center 49%;filter:saturate(.75) brightness(.8)}
.comic-rays {
  position:absolute;
  inset:0;
  opacity:.55;
  background:repeating-conic-gradient(from 14deg at 56% 55%,transparent 0 10deg,#251a43 10.5deg 12deg,transparent 13deg 18deg);
  mask-image:radial-gradient(ellipse at 56% 55%,transparent 20%,black 78%);
}
.comic-inset {
  position:absolute;
  inset:5% 1.7% 6% auto;
  width:33%;
  overflow:hidden;
  background:radial-gradient(circle,#fbe197 0%,#f38b6f 69%,#7a4b89 100%);
  clip-path:polygon(33% 0,100% 0,100% 100%,0 100%);
}
.comic-inset::before {
  position:absolute;
  inset:0;
  content:"";
  opacity:.22;
  background:radial-gradient(#251a43 1px,transparent 1.5px) 0 0/5px 5px;
}
.comic-sprite {width:auto;background-repeat:no-repeat;image-rendering:pixelated}
.comic-hero {
  position:absolute;
  height:124%;
  bottom:-20%;
  left:28%;
  translate:-50% 0;
  filter:drop-shadow(3px 6px 0 #251a43ab);
}
.comic-prop {position:absolute;height:75%;left:52%;top:14%;translate:-50% 0;filter:drop-shadow(3px 4px 0 #251a4388)}
.comic-effect {
  position:absolute;
  left:46%;
  top:16%;
  max-width:47%;
  background:#fff1cf;
  padding:.25em .55em;
  transform:rotate(-8deg);
  border:2px solid #251a43;
  box-shadow:3px 3px #251a43;
  font:900 clamp(12px,2.9vw,34px)/1.05 system-ui,sans-serif;
  letter-spacing:-.035em;
}
.comic-burst .comic-frame img {filter:saturate(1.25) contrast(1.12)}
.comic-burst .comic-rays {opacity:.96}
.comic-burst .comic-effect {background:#ffd35a}
.comic-burst .comic-hero {animation:comic-breakout .26s cubic-bezier(.2,.85,.24,1) both}
@keyframes comic-breakout {from{transform:translate(-12%,14%) scale(.8)}to{transform:translate(0,-5%) scale(1.13)}}
@media (prefers-reduced-motion:reduce) {
  .comic-burst .comic-hero {animation:none;transform:translate(0,-5%) scale(1.13)}
}
.comic-dialogue {border-top:4px solid #251a43;background:#fff8e7;padding:11px 16px 12px}
.comic-dialogue strong {display:block;color:#543781;font-size:12px;margin-bottom:3px}
.comic-dialogue p {margin:0;font:600 clamp(14px,1.7vw,19px)/1.35 system-ui,sans-serif}
.comic-actions {flex-wrap:wrap}
.comic-actions .btn {padding:7px 10px;min-height:38px;font-size:12px}
.comic-skip {background:none;border:0;margin-left:auto;min-height:38px;padding:5px;font-size:12px;text-decoration:underline}
.experience-list {display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px;list-style:none;margin:0 0 16px;padding:0}
.experience-list li {display:grid;gap:4px;background:#ede7f8;border-left:3px solid #654aab;padding:9px;font-size:12px}
.experience-list span,.modal-body .project-work {color:#51446d}
.modal-body .project-work {font-size:12px}
.modal-body .bonus-result {font-weight:bold;color:#4f3d91;margin:0 0 10px}
@media (max-width:540px) {
  .comic-art {height:clamp(123px,42vw,185px)}
  .comic-header,.comic-dialogue,.comic-actions {padding-inline:9px}
  .comic-actions {gap:6px}
  .comic-actions .btn,.comic-skip {min-height:42px}
  .comic-effect {left:43%;font-size:clamp(12px,4vw,21px)}
}
@media (orientation:landscape) and (max-height:500px) {
  .comic-art {height:clamp(112px,35vh,178px);min-height:0}
}

.comic-illustrated {
  display:grid;
  place-items:center;
  background:#171226;
}
.comic-illustration {
  width:min(100%,600px,max(300px,52vw));
  aspect-ratio:2;
  background-size:200% 300%;
  background-repeat:no-repeat;
  box-shadow:0 0 0 4px #251a43;
}
.comic-illustrated .comic-effect {left:7%;top:12%}
.comic-illustrated.comic-burst .comic-illustration {animation:comic-print .24s ease-out both}
@keyframes comic-print {from{transform:scale(.96)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce) {
  .comic-illustrated.comic-burst .comic-illustration {animation:none}
}
@media (max-width:540px) {
  .comic-illustrated {height:auto}
  .comic-illustration {width:100%}
}
@media (orientation:landscape) and (max-height:500px) {
  .comic-illustration {width:min(100%,calc(2 * clamp(112px,35vh,178px)))}
}

.player-hud .lives{color:#ffd35a;margin-left:4px;font-variant-numeric:tabular-nums}
