:root{--ink:#1b3239;--gold:#fac94e;--paper:#f8f6ef}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px Arial,sans-serif}header,main{max-width:1220px;margin:auto;width:92%}header{height:92px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce1d6}header>a{display:flex;align-items:center;gap:15px;color:var(--ink);text-decoration:none;font-weight:900;font-size:27px}header a span{font-size:14px;letter-spacing:2px}small{display:block;font-size:9px;letter-spacing:1px;margin-top:5px}header>span{font-size:10px;letter-spacing:2px}nav{display:flex;gap:10px;margin:24px 0}nav a{padding:13px 20px;border:1px solid #d5dccf;border-radius:8px;text-decoration:none;color:var(--ink);font-size:12px;font-weight:bold}nav a[aria-current]{background:var(--ink);color:var(--gold)}.heading{display:flex;align-items:center;justify-content:space-between;margin:30px 0}.eyebrow{font-size:10px;font-weight:bold;letter-spacing:2px}h1{font-size:clamp(32px,4.5vw,56px);letter-spacing:-2px;margin:8px 0}h1 em{font-style:normal;color:#6a8460}.heading p:last-child{color:#748176}.tag{font: bold 12px monospace;line-height:1.8;border:1px dashed #a9b49d;padding:16px;transform:rotate(3deg)}.machine{border:1px solid #cbd4c1;border-radius:14px;overflow:hidden;box-shadow:0 12px 28px #213d3410}.hud{background:#fffdf6;display:flex;align-items:center;gap:32px;padding:18px 24px}.hud small{font-size:8px;color:#748176}.hud strong{display:block;font: bold 23px monospace;margin-top:5px}.hud button{margin-left:auto}.stage{position:relative;background:#80aa6b}canvas{display:block;width:100%;image-rendering:pixelated;outline-offset:-4px}.veil{position:absolute;inset:0;display:grid;place-items:center;background:#142d3b99;padding:16px;overflow:auto}.panel{background:#fffdf4;border:3px solid var(--ink);box-shadow:7px 7px 0 #172b3670;max-width:520px;width:100%;padding:28px;text-align:center}.panel h2{font-size:32px;margin:12px 0}.panel p{line-height:1.6}.note{font-size:12px;color:#6b786a}button{font: bold 13px Arial;cursor:pointer;padding:12px 18px;border:1px solid #b4c0a9;background:#edf1e5;border-radius:6px;color:var(--ink)}button:hover{filter:brightness(.96)}button:focus-visible,a:focus-visible{outline:3px solid #dd7c28;outline-offset:3px}.primary{background:var(--gold);border-color:#d4a936;padding:15px 25px}#choices{display:grid;gap:8px}#feedback{font-size:13px;min-height:20px;font-weight:bold}.other{display:block;margin-top:18px;color:var(--ink);font-size:12px}.foot{background:var(--ink);color:white;display:flex;justify-content:space-between;padding:15px 22px;font-size:11px;gap:12px}.foot>span+span{font-size:9px;color:#bdcabc}.touch{display:flex;justify-content:space-between;align-items:center;padding:18px 0;touch-action:none;user-select:none}.pad{display:grid;grid-template-columns:50px 50px 50px;gap:5px}.pad button{padding:14px}.pad button:first-child{grid-column:2}.pad button:nth-child(2){grid-column:1}.tips{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;padding:20px 0;border-bottom:1px solid #dce1d6}.tips b{font-size:13px}.tips p,footer{font-size:12px;line-height:1.7;color:#788273}footer{padding:24px 0}[hidden]{display:none!important}@media(max-width:600px){header{height:75px}header>span,.tag{display:none}nav{gap:6px}nav a{padding:11px;font-size:10px;flex:1}.heading{margin:22px 0}h1{letter-spacing:-1px}.heading p:last-child{font-size:12px}.hud{gap:14px;padding:12px}.hud strong{font-size:15px}.hud small{font-size:6px;letter-spacing:.3px}.hud button{padding:9px;font-size:10px}.stage{height:430px}canvas{height:100%;object-fit:contain}.panel{padding:16px}.panel h2{font-size:25px}.panel p{font-size:12px}.foot>span+span{display:none}.tips{grid-template-columns:1fr;gap:10px}.tips p{margin:6px 0}.touch{position:sticky;bottom:0;background:var(--paper);z-index:2;padding:10px 0}}

.task-card{background:#e8eddd;padding:14px 22px;font-size:13px;font-weight:bold;border-top:1px solid #cbd4c1;line-height:1.5}.stage:has(#dialogue:not([hidden])){min-height:520px}#dialogue .panel{max-height:100%;overflow:auto}#choices button{text-align:left;line-height:1.5}#feedback:empty{display:none}@media(max-width:600px){.task-card{padding:12px;font-size:11px}.stage:has(#dialogue:not([hidden])){min-height:460px}.panel{max-height:100%;overflow:auto}}

.scene-bar{display:flex;justify-content:space-between;gap:12px;padding:14px 22px;background:#24434a;color:#fff3c9;font:12px monospace;line-height:1.6}.scene-bar span{color:#d6dfc5}.task-card{font-size:14px;background:#fff0bc;border-top:0;border-bottom:1px solid #d4bd7c;min-height:52px}@media(max-width:600px){.scene-bar{flex-direction:column;gap:2px;padding:10px 12px;font-size:10px}.task-card{font-size:12px}.stage{height:auto;min-height:280px}canvas{height:auto;object-fit:initial}.stage:has(#intro:not([hidden])),.stage:has(#dialogue:not([hidden])),.stage:has(#ending:not([hidden])),.stage:has(#paused:not([hidden])){min-height:460px}}

canvas{image-rendering:auto;touch-action:none}.joystick-wrap{text-align:center;user-select:none}.joystick-wrap small{font-size:8px;font-weight:bold;letter-spacing:1px;color:#6b7f76;margin-top:8px}#joystick{width:112px;height:112px;border:2px solid #c1ccbb;border-radius:50%;background:radial-gradient(circle,#d4dec9,#e8eddf);position:relative;touch-action:none;box-shadow:inset 0 2px 8px #27473c15}#joystick:before{content:'↑';position:absolute;top:4px;left:48px;color:#617d69;font-size:15px}#joystick-knob{display:block;position:absolute;left:34px;top:34px;width:40px;height:40px;border-radius:50%;background:#24434a;border:3px solid #f8cb55;box-shadow:0 3px 6px #24434a40;pointer-events:none}.stage{min-height:0}.stage canvas{aspect-ratio:8/5}.touch{padding:12px 0}@media(max-width:600px){.stage{height:400px;min-height:400px}.stage canvas{height:400px;object-fit:fill;aspect-ratio:auto}#joystick{width:102px;height:102px}#joystick-knob{left:29px;top:29px}#joystick:before{left:43px}.touch{padding:8px 4px}}
