@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#101a24;--ink:#f5eedf;--muted:#a7b4bd;--amber:#ffc16c;--red:#ff796a;--line:#35424c}*{box-sizing:border-box}body{margin:0;background:#09111a;color:var(--ink);font:16px/1.45 'DM Sans',system-ui,sans-serif}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #fff;outline-offset:4px}button:disabled{cursor:default}#app{max-width:520px;min-height:100svh;margin:auto;background:var(--bg);position:relative;overflow:hidden}.screen{padding:24px 24px max(24px,env(safe-area-inset-bottom));min-height:100svh;display:flex;flex-direction:column;animation:arrive .3s ease}.eyebrow,.meta,.number{font:500 12px/1.5 'Space Grotesk',monospace;letter-spacing:.15em;text-transform:uppercase}.eyebrow{color:var(--amber)}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:'Space Grotesk',sans-serif}h1{font-size:clamp(46px,12vw,66px);line-height:.98;letter-spacing:-.055em}h2{font-size:32px;line-height:1.05;letter-spacing:-.04em}p{color:var(--muted)}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px;gap:10px}.brand{font:700 14px 'Space Grotesk',sans-serif;letter-spacing:-.02em}.quiet{background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:100px;padding:9px 14px;font-size:14px;min-height:42px}.hero{position:relative;flex:1;min-height:260px;margin:20px -24px 0;background:linear-gradient(0deg,var(--bg),transparent 50%),url('robot.jpg') center 45%/cover}.hero:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,var(--bg),transparent 40%)}.intro-copy{font-size:17px;max-width:330px;margin-top:18px;color:var(--ink)}.bottom{margin-top:auto;padding-top:20px}.primary,.secondary{width:100%;min-height:56px;border-radius:8px;padding:14px 18px;font-weight:700}.primary{background:var(--amber);color:#17202a;border:0;box-shadow:0 3px 0 #b77829}.secondary{background:transparent;color:var(--ink);border:1px solid var(--line);margin-top:10px}.tiny{text-align:center;font-size:12px;color:var(--muted);margin-top:13px}.status{font-size:12px;color:var(--amber)}.bad{color:var(--red)!important}.progress{display:flex;gap:5px;margin-bottom:22px}.progress i{height:3px;background:#33424e;flex:1}.progress i.done{background:var(--amber)}.story{margin:12px 0 20px;min-height:46px;font-size:16px}.machines{display:grid;grid-template-columns:1fr 1fr;gap:12px}.machine{min-height:138px;text-align:left;background:#192631;color:var(--ink);border:1px solid #3b4d5a;border-radius:12px;padding:15px;position:relative;overflow:hidden}.machine .symbol{font-size:30px;display:block;margin-bottom:8px}.machine strong{display:block;font:600 17px 'Space Grotesk',sans-serif}.machine small{display:block;font-size:13px;color:var(--muted);margin-top:5px;min-height:19px}.machine.ready{border-color:var(--amber);background:#2e302c}.machine.ready small{color:var(--amber)}.machine.thanked{opacity:.6}.machine.missed{border-color:var(--red)}.meter{height:3px;background:#3d4850;position:absolute;bottom:0;left:0;right:0}.meter span{display:block;height:100%;background:var(--amber);width:100%}.dialogue{margin-top:18px;border-left:2px solid var(--amber);padding:0 0 0 15px;min-height:94px}.dialogue p{color:var(--ink);margin:6px 0 10px}.choices{display:flex;gap:8px}.choices button{background:#22313e;color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:10px 12px;flex:1;font-size:14px;min-height:44px}.hint{font-size:14px;color:var(--muted);margin:16px 0}.footline{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:16px}.sceneEnd{margin-top:18px}.big-age{font:700 clamp(80px,25vw,140px)/1 'Space Grotesk',sans-serif;letter-spacing:-.07em;margin:28px 0 8px;color:var(--amber)}.end-copy{font-size:18px;line-height:1.6;margin:20px 0}.receipt{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:20px 0;padding:16px 0;font-size:14px}.receipt div{display:flex;justify-content:space-between;gap:20px;margin:7px 0}.receipt span{color:var(--muted)}.interlude{justify-content:center}.interlude h2{font-size:42px;margin:20px 0}.interlude .primary{margin-top:24px}.toast{min-height:22px;color:var(--amber);font-size:14px;margin-top:12px}.settings{display:flex;gap:8px;align-items:center;margin-top:16px}.settings label{font-size:14px;color:var(--muted)}.paused{position:absolute;inset:0;z-index:10;background:#0b1426ed;display:flex;justify-content:center;align-items:center;padding:30px;text-align:center}.paused h2{margin-bottom:12px}.paused button{margin-top:20px}.ending-art{height:170px;background:url('robot.jpg') center 47%/cover;border-radius:10px;margin:20px 0 0}.intro .bottom{padding-top:0;position:relative}.intro .hero{min-height:230px;max-height:330px}.intro{height:100svh;min-height:680px}.chapter-label{margin-bottom:6px}@media(min-width:650px){body{padding:24px}#app{border:1px solid var(--line);border-radius:18px;min-height:850px}.screen{min-height:850px}.intro{height:850px}}@media(max-height:730px) and (max-width:649px){.screen{padding-top:16px}.top{margin-bottom:16px}.machine{min-height:120px;padding:12px}.machine .symbol{font-size:24px;margin-bottom:4px}.story{margin:10px 0 14px}.dialogue{margin-top:14px}.intro{min-height:620px}.intro .hero{min-height:180px}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}@keyframes arrive{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}

.top-controls{display:flex;gap:6px;align-items:center}.top .brand{font-size:12px;flex-shrink:0}.top .quiet{padding:8px 10px;font-size:12px;min-height:44px}.sound[aria-pressed="true"]{color:var(--amber);border-color:#82704c}@media(max-width:360px){.top{flex-wrap:wrap;gap:8px}}

.intro-controls{justify-content:flex-end}
.release-link{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);text-underline-offset:3px;font-size:14px}
.release-link:hover{color:var(--amber)}
.release-link:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
/* The game is a single viewport, including browser chrome and safe areas. */
html{height:100%;overflow:hidden}
body{height:100dvh;overflow:hidden;padding:12px;display:flex;align-items:center;justify-content:center}
#app{width:100%;height:100%;max-height:900px;min-height:0;max-width:520px;margin:0;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.screen,.intro{height:auto;min-height:100%;padding:16px 20px;transform-origin:top left;animation:none}
.top{margin-bottom:14px;flex-wrap:nowrap}
h1{font-size:clamp(40px,10vw,58px)}
h2{font-size:28px}
.progress{margin-bottom:14px}
.story{min-height:0;margin:10px 0 14px}
.machines{gap:10px}
.machine{min-height:105px;padding:12px}
.machine .symbol{font-size:24px;margin-bottom:3px}
.machine strong{font-size:16px}
.machine small{font-size:14px;line-height:1.25;margin-top:4px}
.dialogue{min-height:0;margin-top:14px;padding-left:12px}
.dialogue p{margin:4px 0 8px;line-height:1.3}
.choices button{padding:8px 10px}
.toast{margin-top:8px;min-height:20px}
.bottom{padding-top:10px}
.hint{margin:6px 0;font-size:14px}
.footline{margin-top:8px}
.sceneEnd{margin-top:10px}
.primary,.secondary{min-height:48px;padding:11px 16px}
.intro .hero{flex:1 1 auto;min-height:60px;height:clamp(80px,25dvh,250px);max-height:250px;margin-top:14px}
.intro-copy{margin-top:12px}
.settings{margin-top:10px}
.tiny{margin-top:8px}
.ending-art{height:clamp(60px,16dvh,150px);flex-shrink:1;margin-top:12px}
.interlude h2{font-size:34px;margin:12px 0}
.interlude .primary{margin-top:12px}
.end-copy{font-size:16px;line-height:1.45;margin:14px 0}
.big-age{font-size:clamp(64px,13dvh,108px);margin:12px 0 6px}
.receipt{margin:12px 0;padding:10px 0}
.receipt div{margin:5px 0}
@media(max-width:649px){body{padding:0}#app{max-height:none;border:0;border-radius:0}.screen,.intro{padding:max(12px,env(safe-area-inset-top)) 16px max(12px,env(safe-area-inset-bottom))}}
@media(max-height:700px){.top{margin-bottom:8px}.progress{margin-bottom:10px}h2{font-size:25px}.story{margin:8px 0 10px}.machine{min-height:94px;padding:10px}.machine .symbol{font-size:20px}.dialogue{margin-top:10px}.intro .hero{height:17dvh}.ending-art{height:70px}.end-copy{margin:10px 0}.interlude h2{margin:8px 0}.receipt{margin:8px 0;padding:6px 0}.tiny{margin-top:6px}}
@media(orientation:landscape) and (max-height:600px){#app{max-width:900px}.screen{padding:10px 18px}.machines{grid-template-columns:repeat(4,1fr)}.intro .hero,.ending-art{display:none}.intro h1{font-size:38px}.intro-copy{font-size:16px}.intro .bottom{max-width:500px;width:100%;align-self:center}.top{margin-bottom:6px}.story{margin:6px 0}.dialogue p{display:inline}.dialogue .choices{margin-top:5px}.interlude h2{font-size:28px}.end-copy{margin:8px 0}.big-age{font-size:52px}.receipt{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.screen:has(.big-age) .bottom{display:flex;flex-wrap:wrap;gap:8px}.screen:has(.big-age) .bottom button{flex:1;margin:0}.screen:has(.big-age) .tiny{width:100%}}

/* Painted story panels and a shared object atlas keep downloads small. */
.world-art{height:clamp(100px,19dvh,180px);position:relative;overflow:hidden;border-radius:10px;margin:12px 0 0;flex-shrink:0;background:#142331}
.world-art>div{position:absolute;width:100%;aspect-ratio:1;top:50%;transform:translateY(-50%);background-image:url('art/world.jpg');background-size:300% 200%}
.world-0>div{background-position:0 0}.world-1>div{background-position:50% 0}.world-2>div{background-position:100% 0}.world-3>div{background-position:0 100%}.world-4>div{background-position:50% 100%}.world-5>div{background-position:100% 100%}
.machine-art{display:block;float:left;width:64px;height:64px;margin:0 10px 0 -4px;background-image:url('art/machines.jpg');background-size:400% 400%;border-radius:8px;flex-shrink:0}
.illustrated-play .machine{min-height:104px;padding:10px 8px}
.illustrated-play .machine strong{font-size:15px;line-height:1.2}
.illustrated-play .machine small{font-size:13px;line-height:1.25}
.illustrated-play .machine.ready{box-shadow:0 0 0 2px var(--amber),0 0 20px #ffc16c25}
.illustrated-play .machine.missed .machine-art{filter:grayscale(1)}
.illustrated-play .machines:has(>button:only-child){grid-template-columns:1fr}
.illustrated-play .machines:has(>button:only-child) .machine-art{width:84px;height:84px}
.illustrated-play .machines:has(>button:only-child) .machine strong{font-size:20px;margin-top:10px}
.illustrated-play .top{margin-bottom:8px}.illustrated-play .progress{margin-bottom:8px}
.illustrated-play .story{margin:8px 0 10px}.illustrated-play .hint{font-size:13px}
.interlude .world-art{height:clamp(140px,25dvh,240px)}
@media(max-width:400px){.machine-art{width:50px;height:50px;margin-right:6px}.illustrated-play .machine{min-height:100px}}
@media(max-height:720px){.illustrated-play .world-art{height:90px}.illustrated-play .dialogue{margin-top:8px}.illustrated-play .machine{min-height:90px}.illustrated-play .toast{min-height:16px;font-size:13px}.illustrated-play .bottom{padding-top:4px}}
@media(orientation:landscape) and (max-height:600px){.illustrated-play .world-art{height:65px}.interlude .world-art{height:80px}.machine-art{width:44px;height:44px}}
@media(max-height:720px){.illustrated-play .primary{min-height:54px}}
