@import url("/assets/type.css");
:root{color-scheme:light dark}*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f3efe4;color:#183b2d;font:16px/1.5 var(--tb-type,Arial,sans-serif)}
.gate{width:min(92vw,400px);margin-block:20px;padding:28px clamp(18px,6vw,32px);background:#fffdf7;border:1px solid #e0dccf;border-radius:18px;box-shadow:0 12px 40px rgba(24,59,45,.12)}
.gate-emblem{display:block;width:104px;height:auto;margin:0 auto 14px}
.gate h1{margin:0 0 6px;text-align:center;font-size:30px;line-height:1.15;letter-spacing:-.04em}.gate p{margin:0 0 20px;text-align:center;color:#4f6659}
.gate label{display:block;margin-bottom:6px;font-size:13px;font-weight:700}
.gate input{width:100%;min-height:48px;padding:10px 14px;border:1px solid #b9c6bb;border-radius:12px;font:inherit;background:#fff;color:#183b2d}
.gate input:focus{outline:3px solid #2f7d5b;outline-offset:1px}
.gate button{width:100%;min-height:48px;margin-top:14px;border:0;border-radius:999px;background:#205243;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.gate button:hover,.gate button:focus-visible{background:#183b2d}.gate button:focus-visible{outline:3px solid #2f7d5b;outline-offset:3px}
.gate-error{padding:10px 12px;border-radius:10px;background:#fde8e6;color:#8a1c12!important;font-size:14px}
.gate-access{margin-top:12px}.gate-access summary{display:grid;place-items:center;min-height:48px;border:1px solid currentColor;border-radius:999px;font-weight:700;cursor:pointer}.gate-access form,.gate-access .gate-error{margin-top:16px}
#garage-game{width:min(92vw,380px);max-height:94dvh;border:1px solid #648471;border-radius:18px;padding:14px;background:#18251e;color:#f1efe6}
#garage-game::backdrop{background:#080e0bce}.game-head,.game-score,.game-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}.game-head h2{margin:0;font-size:23px}.game-head-actions{display:flex;align-items:center;gap:6px}.game-head #garage-sound{width:auto;padding:0 9px;font-size:11px;white-space:nowrap}.game-head #garage-sound[aria-pressed=true]{background:#b0debf;color:#14241c}.game-score{margin:6px 0;font-variant-numeric:tabular-nums}
#garage-road{display:block;width:auto;max-width:100%;height:auto;max-height:48dvh;margin:auto;border-radius:8px;touch-action:none}
#garage-game button{margin:0;min-height:44px}.game-head button,.game-controls button:not(#garage-replay){width:44px;flex:none}.game-controls #garage-replay{flex:1}#garage-status{margin:8px 0;color:#d4e0d8;font-size:14px}
@media(prefers-color-scheme:dark){body{background:#101a15;color:#f1efe6}.gate{background:#18251e;border-color:#2c3f35}.gate p{color:#b7c6bb}.gate input{background:#101a15;color:#f1efe6;border-color:#648471}.gate button{background:#76ba94;color:#0d1712}.gate button:hover,.gate button:focus-visible{background:#8fd2ab}.gate button:focus-visible,.gate input:focus{outline-color:#8fd2ab}}

#garage-game{width:min(94vw,398px);padding:clamp(12px,4vw,20px);border:1px solid #405852;background:#111b1a;color:#eef5e8;box-shadow:0 20px 80px #0009}
.game-stage-label{color:#9fc0ad;font:bold 10px/1.3 var(--tb-type,Arial,sans-serif);letter-spacing:.18em}.game-head h2{font-size:31px;line-height:1.1;letter-spacing:-.055em}.game-head button{background:#243632;color:#e9f1e8}.game-score{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin:12px 0 8px;background:#364c45;border:1px solid #364c45;border-radius:8px;overflow:hidden}.game-score span{background:#1b2b27;padding:4px 10px;display:flex;align-items:center;justify-content:space-between;color:#b3cdbd;font-size:12px;font-weight:bold;text-transform:uppercase;letter-spacing:.08em}.game-score output{color:#f7e9bb;font:bold 18px/1.4 var(--tb-type,Arial,sans-serif)}.gate #garage-road{width:min(100%, calc(50dvh * 300 / 360));height:auto;max-height:none;background:#141d21;border:1px solid #45534c}.game-controls button{background:#263b33;color:#f1f7ed}.game-controls #garage-replay{background:#83d3a5;color:#12231a}.gate #garage-status{color:#bcd1c2;margin:8px 0;text-align:center;font-size:12px;min-height:18px}

.game-score{grid-template-columns:1fr 1fr 1.15fr}.game-score span{padding-inline:8px;gap:5px;font-size:10px}.game-score #garage-pace{font-size:12px;color:#a6e5bb;text-transform:none;letter-spacing:0}

.game-track{position:relative;width:min(100%, calc(50dvh * 300 / 360));margin:auto}.gate .game-track #garage-road{width:100%;max-width:none}.game-end{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:5px;border-radius:8px;background:#0b1719d9;color:#fff6db;text-align:center}.game-end[hidden],#garage-replay[hidden]{display:none}.game-end span{font:bold 10px var(--tb-type,Arial,sans-serif);letter-spacing:.19em;color:#9ec6b1}.game-end h3{margin:0;font-size:clamp(25px,7vw,40px);line-height:1.15;letter-spacing:-.06em}.gate .game-end p{margin:3px 0 0;color:#dcefdf;font-size:13px}.game-end output{margin-left:5px;color:#f5dfa9;font:bold 17px var(--tb-type,Arial,sans-serif)}#garage-game[data-phase=cutscene] .game-end{animation:run-end-in .3s ease-out both}@keyframes run-end-in{from{opacity:0}to{opacity:1}}.game-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px}.game-controls #garage-left{grid-column:1}.game-controls #garage-right{grid-column:3}.game-controls #garage-replay{grid-column:2}.game-controls button:disabled{opacity:.46;cursor:default}@media(prefers-reduced-motion:reduce){#garage-game[data-phase=cutscene] .game-end{animation:none}}

html[lang|=ar] :where(h1,h2,h3,h4,button,summary,label,output){letter-spacing:normal}
