/* Speelveld eerst. De spelcoördinaten en aanraakbediening blijven gelijk. */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100% }
body.game-page .app{max-width:1280px;width:100%;min-height:0;padding:10px 12px}
body.game-page header{margin-bottom:8px;gap:8px}
body.game-page .heading,body.game-page .title{margin-bottom:8px}
body.game-page .heading h1,body.game-page .title h1,body.game-page .app>h1{font-size:26px;margin:0}
body.game-page .app>.eyebrow,body.game-page .heading .eyebrow,body.game-page .title .eyebrow,body.game-page .intro,body.game-page .note,body.game-page .footer,body.game-page .option-note{display:none}
body.game-page .stage{min-width:0;width:min(100%,var(--menu-cw,900px));margin:0 auto;aspect-ratio:auto}
body.game-page .stage>canvas{width:100%;height:auto}
body.game-page .stats{padding:7px 12px;margin:8px auto;max-width:900px}
body.game-page .controls{margin:8px auto;width:100%;max-width:900px}
body.game-page .small{min-height:44px;padding:7px 10px;font-size:13px}
body.game-page .board{max-width:1000px;margin:auto}
body.game-page .board-size{margin:8px 0}
body.game-page .game-enter{display:block;margin:8px auto;min-height:44px;padding:8px 18px;border-radius:12px;background:var(--panel,#fffdf4);color:inherit;border:1px solid var(--edge,#b9c9bc);font:inherit}
.game-back{display:none}
.game-scorebar{display:none}
/* Ook zonder de Fullscreen API: alle beschikbare paginaruimte gebruiken. */
html.game-immersive,body.game-immersive{height:100%;overflow:hidden;overscroll-behavior:none}
body.game-immersive .app,body.platform-input.game-immersive .flight-app{position:fixed;inset:0;width:100%;max-width:none;height:var(--play-h,100dvh);min-height:0;margin:0;padding:0;display:block;overflow:hidden}
body.game-immersive .app>header,body.game-immersive .heading,body.game-immersive .title,body.game-immersive .app>h1,body.game-immersive .app>.intro,body.game-immersive .app>.eyebrow,body.game-immersive .options,body.game-immersive .level-row,body.game-immersive .route,body.game-immersive .note,body.game-immersive .footer,body.game-immersive .game-enter,body.game-immersive .board-size{display:none!important}
body.game-immersive .race-wrap{display:contents}
body.game-immersive .stage,body.platform-input.game-immersive .stage{position:absolute;inset:0;margin:0;min-width:0;max-width:none;width:100%;height:100%;border:0;border-radius:0;box-shadow:none;aspect-ratio:auto;overflow:hidden}
body.game-immersive .stage>canvas{position:absolute;width:var(--play-cw);height:var(--play-ch);max-width:none;max-height:none;left:50%;top:50%;transform:translate(-50%,-50%)}
body.game-immersive .game-back{display:block;position:fixed;top:max(5px,env(safe-area-inset-top));left:max(5px,env(safe-area-inset-left));z-index:80;min-height:40px;min-width:68px;margin:0;padding:7px 9px;font:600 13px system-ui;border:1px solid #95a6b680;border-radius:10px;background:#fffef0e8;color:#273e45;touch-action:manipulation}
body.game-immersive .game-scorebar{display:flex;position:fixed;top:max(5px,env(safe-area-inset-top));left:max(80px,calc(env(safe-area-inset-left) + 80px));right:max(5px,env(safe-area-inset-right));z-index:60;justify-content:flex-end;pointer-events:none;gap:4px}
body.game-immersive .game-scorebar .hud,body.game-immersive .game-scorebar .stats{position:static;inset:auto;display:flex;justify-content:space-between;align-items:center;gap:5px;width:auto;max-width:100%;min-width:0;margin:0;padding:3px 7px;background:#fffef0e8;border:0;border-radius:10px;color:#273e45;box-shadow:none;line-height:1.1;flex-wrap:nowrap}
body.game-immersive .game-scorebar .hud>div,body.game-immersive .game-scorebar .stats>div{min-width:0;padding:1px 4px;background:transparent;border:0;border-radius:0;text-align:center}
body.game-immersive .game-scorebar small{display:block;font-size:8px;letter-spacing:.3px;color:#4e626a;white-space:nowrap}
body.game-immersive .game-scorebar b,body.game-immersive .game-scorebar strong,body.game-immersive .game-scorebar #lives{font-size:16px;letter-spacing:0;white-space:nowrap;color:#273e45;line-height:1.2}
body.game-immersive .game-scorebar #lives{color:#a4443a}
body.game-immersive .game-scorebar .distance{font-size:20px;letter-spacing:0;white-space:nowrap}
body.game-immersive .game-scorebar .distance small{display:inline}
body.game-immersive .game-scorebar .speed{width:115px;font-size:9px}
body.game-immersive .game-scorebar .speed-label{font-size:10px;margin-bottom:3px;gap:4px}
body.game-immersive .game-scorebar .speed-cap{display:none}
body.game-immersive .controls,body.platform-input.game-immersive .controls,body.game-immersive .under{position:fixed;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));z-index:65;width:auto;max-width:none;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:0;padding:0;pointer-events:none}
body.game-immersive .controls>p{display:none}
body.game-immersive .controls button,body.game-immersive .under button{pointer-events:auto;opacity:.88;touch-action:none}
body.game-immersive .controls .steer,body.platform-input.game-immersive .controls .steer{height:64px;min-height:64px;min-width:72px;width:72px;font-size:30px;border-radius:16px;border-width:1px}
body.platform-input.game-immersive .controls{justify-content:flex-start}
body.platform-input.game-immersive .controls .jump{margin-left:auto;width:120px;min-width:120px;font-size:20px}
body.game-immersive .controls .brake{font-size:16px;width:100px}
body.game-immersive .under .dpad{pointer-events:auto}
body.game-immersive .under .steer{min-width:49px;height:44px}
body.game-immersive .under .peek{font-size:12px;min-height:44px}
body.game-immersive .overlay{position:fixed;inset:0;padding:50px 12px 12px;align-items:center;justify-content:center;z-index:70;overflow:auto}
body.game-immersive .overlay .card,body.game-immersive .overlay .result{max-width:360px;width:min(100%,360px);padding:16px;margin:auto;max-height:100%;overflow:auto}
body.game-immersive .overlay h2{font-size:24px;margin:0 0 8px}
body.game-immersive .overlay p{font-size:13px;line-height:1.4;margin:0 0 10px}
body.game-immersive .overlay .eyebrow,body.game-immersive .overlay .stamp,body.game-immersive .overlay .hint{display:none}
body.game-immersive .overlay .primary{min-height:44px;padding:9px 16px;font-size:16px}
body.game-immersive .view-label{bottom:4px}
body.game-immersive .checkpoint{top:55px;bottom:auto;font-size:13px}
body.game-immersive.game-cards .board{position:absolute;inset:52px 8px 8px;max-width:none;grid-template-columns:repeat(var(--card-cols,4),minmax(0,1fr));grid-template-rows:repeat(var(--card-rows,3),minmax(0,1fr));gap:6px}
body.game-immersive.game-cards .tile{min-height:0;aspect-ratio:auto;border-radius:10px;overflow:hidden}
body.game-immersive.game-cards .tile svg{width:58%;height:75%;max-height:75%}
body.game-immersive #win:not([hidden]){position:fixed;z-index:75;top:50%;left:50%;transform:translate(-50%,-50%);width:min(90%,350px);margin:0;padding:18px}
@media(pointer:coarse){body.game-immersive.touch-direct .controls{display:none!important}}
@media(max-height:400px){body.game-immersive .controls .steer,body.platform-input.game-immersive .controls .steer{height:52px;min-height:52px;min-width:60px;width:60px}body.platform-input.game-immersive .controls .jump{width:105px;min-width:105px}body.game-immersive .overlay h2{font-size:20px}body.game-immersive .overlay .card,body.game-immersive .overlay .result{padding:12px}body.game-immersive .overlay p{font-size:12px}body.game-page .heading,body.game-page .title{display:none}}
@media(max-width:500px){body.game-immersive .game-scorebar .hud,body.game-immersive .game-scorebar .stats{gap:2px;padding:4px}body.game-immersive .game-scorebar .hud>div,body.game-immersive .game-scorebar .stats>div{padding:1px 3px}body.game-immersive .game-scorebar b,body.game-immersive .game-scorebar strong,body.game-immersive .game-scorebar #lives{font-size:13px}body.game-immersive .game-scorebar small{font-size:7px}}

body.game-page{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overscroll-behavior:none}
body.game-page button,body.game-page a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
body.game-page canvas,body.game-immersive .stage{touch-action:none;-webkit-user-select:none;user-select:none}
body.game-immersive .app>.label,body.game-immersive .app>.foot{display:none}
body.game-page:not(.game-immersive) .overlay{padding:10px;overflow:auto;align-items:center;justify-content:center}
body.game-page:not(.game-immersive) .overlay .result,body.game-page:not(.game-immersive) .overlay .card{padding:14px;width:min(100%,350px);max-height:100%;overflow:auto}
body.game-page:not(.game-immersive) .overlay h2{font-size:23px;margin:0 0 8px}
body.game-page:not(.game-immersive) .overlay p{font-size:13px;margin:0 0 10px;line-height:1.4}
body.game-page:not(.game-immersive) .overlay .eyebrow{display:none}
body.game-page:not(.game-immersive) .overlay .primary{min-height:44px;padding:9px 18px;font-size:16px}
