:root{--paper:#e9e9df;--ink:#262938;--yellow:#f4e67b;--muted:#535652}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'Trebuchet MS',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:1px solid var(--ink);background:transparent;padding:10px 16px;border-radius:2px}button:hover{background:var(--yellow)}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #7145a0;outline-offset:4px}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}header,main,footer{width:min(1440px,94%);margin:auto}header{display:flex;justify-content:space-between;align-items:center;padding:22px 0;border-bottom:1px solid #999b92;gap:20px}.brand{display:flex;align-items:center;gap:20px;color:inherit;text-decoration:none}.brand img{width:92px}.brand span,.eyebrow,.choice-label,footer{font-size:11px;letter-spacing:1.7px;font-weight:700}.settings{display:flex;gap:8px}.settings button{font-size:12px;border:0;padding:9px}.intro{display:flex;justify-content:space-between;align-items:center;padding:38px 0 20px}.eyebrow{margin:0 0 15px}h1{font-family:'Arial Narrow',Impact,sans-serif;font-stretch:condensed;font-size:clamp(48px,6vw,88px);letter-spacing:-3px;line-height:.94;margin:0;font-weight:900}h1 br{display:none}h1 br:after{content:' '}h1 em{font-style:normal;background:var(--yellow);padding:0 8px;display:inline-block;transform:rotate(-2deg)}.intro-note{transform:rotate(5deg);padding:0 45px 0 25px}.scribble{font-family:'Comic Sans MS',cursive;font-size:23px}.intro-note p{font-size:13px}.arrow{font-size:40px;line-height:.5}.postcard{position:relative;border:1px solid #a8aaa0;overflow:hidden}.postcard>img{display:block;width:100%;mix-blend-mode:multiply}.stamp{position:absolute;top:18px;right:20px;border:2px solid #71677b;border-radius:50%;padding:18px 12px;color:#71677b;transform:rotate(12deg);font-size:11px;font-weight:700;letter-spacing:2px;text-align:center;background:#e9e9dfbb}.choices{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}.choice{text-align:left;padding:22px 28px;border:2px solid var(--ink);box-shadow:4px 4px 0 var(--ink);transition:transform .15s}.choice:hover{transform:translateY(-4px)}.early{background:var(--yellow)}.late{background:#efeee7}.choice-label{font-size:10px}.choice strong{display:block;font-size:clamp(26px,3vw,42px);letter-spacing:-1px;margin:7px 0}.choice strong span{float:right}.choice small{font-size:14px}.footnote{text-align:center;font-size:12px;color:var(--muted);margin:20px 0 30px}footer{display:flex;justify-content:space-between;padding:20px 0;border-top:1px solid #999b92;font-size:9px;color:var(--muted)}.game-heading{display:flex;align-items:center;justify-content:space-between;padding:24px 0 20px;gap:12px}.game-heading h2{font-size:26px;margin:0;letter-spacing:-.7px}.game-heading .eyebrow{margin-bottom:6px}.game-heading button{font-size:12px}.hud{display:flex;align-items:center;gap:28px;padding:10px 16px;border:1px solid var(--ink);background:var(--yellow);font-size:13px;font-weight:bold}.hud #distance{flex:1}.hud button{padding:5px 10px;font-size:12px}.stage{position:relative;overflow:hidden;border:1px solid var(--ink);border-top:0;background:#e5e7e0}canvas{display:block;width:100%;height:min(59vw,620px);touch-action:none}.caption{position:absolute;left:50%;bottom:22px;transform:translateX(-50%) rotate(-1deg);padding:12px 22px;background:#f7f5eb;border:1px solid var(--ink);box-shadow:3px 3px 0 #26293822;text-align:center;font-family:'Comic Sans MS','Trebuchet MS',sans-serif;font-size:17px;max-width:90%;width:max-content;pointer-events:none}.caption:empty{display:none}.controls{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0 25px;font-size:12px}.keys{display:flex;gap:17px;flex-wrap:wrap}.keys>span{display:flex;align-items:center;gap:5px}kbd{font:inherit;border:1px solid #a3a59c;padding:3px 6px;border-radius:3px;background:#f2f1e9}#hint{color:var(--muted)}#pause-screen{position:absolute;inset:0;background:#e9e9dfed;display:flex;flex-direction:column;align-items:center;justify-content:center}#pause-screen h2{font-size:42px;margin:0}#pause-screen button{background:var(--yellow)}.touch-controls{display:none;gap:8px;padding:0 0 22px}.touch-controls button{min-height:54px;flex:1;touch-action:none;user-select:none;font-weight:bold;background:#f2f1e9}.touch-controls button:active{background:var(--yellow)}#result{padding:48px 0 60px;max-width:820px;margin:auto;text-align:center}#result h1{font-size:clamp(48px,6vw,76px);line-height:1.02}#result-copy{font-size:19px;line-height:1.6;margin:25px auto;max-width:580px}.receipt{text-align:left;max-width:490px;margin:35px auto;background:#f7f5eb;padding:28px 32px;transform:rotate(-1.5deg);box-shadow:6px 7px 0 #26293815;border:1px solid #c0bfb1}.receipt>div{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px dashed #aaa99d;font-size:13px}.receipt .receipt-head{padding:0 0 18px}.receipt-head img{width:90px;object-fit:contain}.receipt-head span{font-size:10px;letter-spacing:2px;line-height:1.8}.receipt .total{font-size:16px}.receipt>p{font-size:11px;text-align:center;margin:20px 0 0}.result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.result-actions button:first-child{background:var(--yellow)}dialog{background:var(--paper);border:1px solid var(--ink);max-width:95vw;padding:20px}dialog::backdrop{background:#262938aa}dialog img{display:block;width:100%;margin-top:16px}dialog p{font-size:13px}dialog button{float:right}@media(max-width:900px){.intro-note{display:none}h1{font-size:7vw}.brand span{display:none}.controls{align-items:flex-start;flex-direction:column}.touch-controls{display:flex}canvas{height:52vh;min-height:320px}.stamp{display:none}.intro{padding-top:28px}.choice{padding:18px}.hud{gap:12px}}@media(max-width:540px){header{padding:15px 0}.brand img{width:70px}.settings{gap:0}.settings button{font-size:10px;padding:8px}.intro h1{font-size:12vw;line-height:1.02}.intro h1 br{display:block}.eyebrow{font-size:9px;line-height:1.5;max-width:260px}.postcard{margin-top:8px}.postcard>img{width:145%;max-width:none;margin-left:-23%}.choices{gap:12px}.choice{padding:16px 12px}.choice-label{font-size:8px;letter-spacing:.8px}.choice strong{font-size:25px;line-height:1.1}.choice small{font-size:12px;line-height:1.5;display:block}.choice strong span{display:none}.game-heading h2{font-size:20px}.hud{font-size:11px;padding:8px}.caption{font-size:14px;padding:10px;width:88%}.keys{gap:10px}#hint{display:none}footer{font-size:8px;line-height:1.5;gap:30px}.receipt{padding:24px 20px}.touch-controls{gap:5px}.touch-controls button{padding:10px 5px;font-size:13px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.handwritten-lesson{display:block;width:100%;height:auto;margin:36px auto;mix-blend-mode:multiply}.settings button[aria-pressed="true"]{background:var(--yellow)}
/* Touch controls also belong on large tablets, not just narrow windows. */
.touch-guide{display:none}
@media(max-width:900px),(any-pointer:coarse){
  .touch-controls{display:flex;position:sticky;bottom:0;z-index:2;background:var(--paper);padding:8px 0 max(12px,env(safe-area-inset-bottom));-webkit-user-select:none}
  .touch-guide{display:block;font-size:12px;margin:12px 0 0;color:var(--muted)}
  .controls{display:none}
  .touch-controls button{-webkit-touch-callout:none;-webkit-user-select:none}
}
@media(orientation:landscape) and (max-height:600px){
  body:has(#play:not([hidden])) header,body:has(#play:not([hidden])) footer{display:none}
  #play .game-heading{padding:6px 0;gap:8px}
  #play .game-heading h2{font-size:16px}
  #play .game-heading .eyebrow{font-size:8px;margin-bottom:3px}
  #play .game-heading button{padding:6px 10px}
  #play .hud{padding:5px 10px}
  #play canvas{height:calc(100svh - 164px);min-height:150px}
  #play .caption{bottom:8px;font-size:12px;padding:5px 12px}
  #play .touch-guide{margin:5px 0 0;font-size:10px}
  #play .touch-controls{padding-top:5px;padding-bottom:max(5px,env(safe-area-inset-bottom))}
  #play .touch-controls button{min-height:44px;padding:5px}
}
/* The illustration is the opening. No additional campaign headline. */
.intro{padding:22px 0 8px}.intro .eyebrow{margin:0 0 12px}.postcard>img{width:100%;margin:0}.choices{margin-top:20px}.game-heading h2{font-size:21px}.caption{font-size:15px;bottom:14px;max-width:85%;padding:9px 16px}canvas{height:min(66vh,720px);min-height:400px}.stage{background:#e5e7e0}.touch-controls{align-items:center;justify-content:space-between}.dpad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,42px);gap:4px}.dpad button{min-height:42px;padding:0;font-size:21px}.dpad [data-key="ArrowUp"]{grid-column:2}.dpad [data-key="ArrowLeft"]{grid-column:1;grid-row:2}.dpad [data-key="ArrowDown"]{grid-column:2;grid-row:2}.dpad [data-key="ArrowRight"]{grid-column:3;grid-row:2}.touch-actions{display:flex;gap:7px}.touch-actions button{min-height:58px}.touch-guide{font-size:11px;line-height:1.5;margin:0 12px!important}.touch-controls button.pressed{background:var(--yellow)}
@media(max-width:900px),(any-pointer:coarse){canvas{height:calc(100svh - 330px);min-height:270px}.touch-controls{padding:8px 0 max(8px,env(safe-area-inset-bottom))}.touch-guide{display:block}.game-heading{padding:13px 0}.game-heading h2{font-size:18px}.touch-actions button{padding:10px;font-size:12px}}
@media(max-width:540px){.touch-guide{display:none}.dpad{grid-template-columns:repeat(3,43px);grid-template-rows:repeat(2,40px)}.dpad button{min-height:40px}.caption{font-size:12px;bottom:8px;padding:7px 10px}.postcard>img{width:100%;margin:0}.game-heading .eyebrow{font-size:8px}.hud{gap:8px}.game-heading h2{font-size:16px}.game-heading button{padding:7px;font-size:11px}}
@media(orientation:landscape) and (max-height:600px){#play canvas{height:calc(100svh - 182px);min-height:150px}#play .touch-controls{padding:4px 0}.dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,35px)}#play .dpad button{min-height:35px}.touch-actions button{min-height:48px!important}#play .game-heading h2{font-size:14px}.touch-guide{display:block}}
.dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px)}.dpad button{min-height:44px}
@media(orientation:landscape) and (max-height:600px){#play .dpad button{min-height:44px}.dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px)}}
