:root { color-scheme: light; font-family: ui-rounded, 'Trebuchet MS', system-ui, sans-serif; color: #fff2d5; background: #123d3c; }
* { box-sizing:border-box; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; -webkit-user-drag:none; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; height:100%; overflow:hidden; overscroll-behavior:none; touch-action:pan-y; }
body { display:flex; justify-content:center; background-color:#173e3d; background-image:linear-gradient(45deg,#ffffff05 25%,transparent 25%,transparent 75%,#ffffff05 75%),linear-gradient(45deg,#ffffff05 25%,transparent 25%,transparent 75%,#ffffff05 75%); background-size:46px 46px; background-position:0 0,23px 23px; }
button { font:inherit; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
button:focus-visible,canvas:focus-visible { outline:3px solid #ffa835; outline-offset:-3px; }
.game-shell { width:100%; max-width:650px; height:100%; height:100dvh; display:flex; flex-direction:column; padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background:#184946; box-shadow:0 0 65px #071d1b88; }
.hud { flex:none; display:flex; align-items:center; gap:clamp(10px,3vw,24px); padding:5px clamp(12px,3vw,28px); height:54px; background:linear-gradient(175deg,#275b55,#133e3b); border-bottom:3px solid #d8af72; box-shadow:inset 0 -2px #0b312f; }
.stat { display:flex; align-items:center; gap:7px; font-size:19px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.coin { display:grid; place-items:center; width:23px; height:23px; color:#a9571b; font-size:13px; border-radius:50%; border:2px solid #ffdf86; background:linear-gradient(#ffe699,#efaa39); box-shadow:0 2px #9b602a,inset 0 0 0 1px #dfa138; }
.goal { flex:1; max-width:270px; margin:auto; } .goal-line { display:flex; align-items:baseline; justify-content:space-between; font-size:12px; font-weight:700; } .goal-line b { font-size:14px; }
.progress { height:6px; margin-top:4px; border-radius:5px; overflow:hidden; background:#092f2e; } .progress i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#e9a846,#ffe09a); transition:width .25s; }
.clock i { width:16px; height:16px; border:2px solid #e7c994; border-radius:50%; position:relative; } .clock i:before { content:''; position:absolute; left:5px; top:2px; width:3px; height:4px; border-left:1.5px solid #e7c994; border-bottom:1.5px solid #e7c994; }
#sound { position:relative; width:44px; height:44px; border:0; background:transparent; color:#efd4a4; font-size:22px; line-height:1; } #sound[aria-pressed=false]:after { content:''; position:absolute; left:13px; top:22px; width:19px; height:2px; transform:rotate(-45deg); background:currentColor; box-shadow:0 1px #194742; }
.canvas-wrap { flex:1; min-height:0; position:relative; background:#ffe7be; } canvas { display:block; width:100%; height:100%; touch-action:none; outline:none; }
#toast { position:absolute; top:42%; left:50%; transform:translate(-50%,8px); opacity:0; transition:.18s; border-radius:18px; padding:7px 16px; font-size:14px; font-weight:750; white-space:nowrap; background:#17453ded; color:#fff5d8; box-shadow:0 3px 9px #31211436; pointer-events:none; } #toast.show { opacity:1; transform:translate(-50%,0); }
.overlay { position:absolute; inset:0; display:grid; place-items:center; background:#213c3559; backdrop-filter:blur(3px); padding:12px; } .overlay.hidden { display:none; }
.ticket { position:relative; width:min(330px,100%); padding:34px 25px 24px; text-align:center; color:#4c3425; background:linear-gradient(#fffaf0,#fff0d4); border-radius:17px; box-shadow:0 16px 46px #35251d50; overflow:hidden; animation:arrive .3s ease-out; } .ticket:before { content:''; position:absolute; inset:0 0 auto; height:12px; background:repeating-linear-gradient(90deg,#cd5441 0 16px,#fff6de 16px 32px); }
.eyebrow { color:#94714d; font-size:12px; letter-spacing:1.3px; font-weight:800; } .ticket h1 { margin:12px 0; font-size:28px; } .ticket p { font-size:15px; line-height:1.5; } .ticket-total { border-top:2px dashed #d8c4a6; padding:12px 0; font-size:13px; color:#765d41; } #start { width:100%; min-height:48px; border:0; border-radius:13px; color:white; font-size:17px; font-weight:800; background:#ba4835; box-shadow:inset 0 -3px #933c2e; }
@keyframes arrive { from { opacity:0; transform:translateY(12px) scale(.96); } }
@media(orientation:landscape){.game-shell{max-width:min(1100px,147dvh)}.hud{height:44px}.ticket{padding:17px 22px 15px}.ticket p,.ticket h1{margin:8px 0}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
#openMenu { width:42px; min-height:42px; padding:0; border:0; background:transparent; color:#fff2d5; font-size:22px; }
#menu { background:#203b35aa; }
.menu-ticket { width:min(385px,100%); max-height:100%; display:flex; flex-direction:column; padding:19px 18px 18px; text-align:left; }
.menu-heading { display:flex; align-items:center; justify-content:center; gap:16px; border-bottom:2px dashed #d9c49f; margin-bottom:12px; }
.menu-heading img { width:72px; height:84px; object-fit:cover; object-position:top; }
.menu-heading h1 { color:#ac4132; font:bold italic 34px/1 Georgia,serif; margin:0; }
.menu-heading p { margin:7px 0 0; font-size:14px; font-weight:700; color:#536d5e; }
#levelList { display:grid; gap:6px; overflow:auto; min-height:54px; max-height:clamp(155px,34dvh,300px); padding:2px; }
.level-row { display:grid; grid-template-columns:38px 1fr auto; gap:10px; align-items:center; width:100%; min-height:55px; border:1px solid #d5c4a4; background:#fffaf0; color:#503f2f; border-radius:11px; padding:6px 10px; text-align:left; }
.level-row img { width:36px; height:36px; object-fit:contain; }
.level-row strong,.level-row small { display:block; } .level-row small { color:#776449; font-size:12px; margin-top:2px; }
.level-row[aria-pressed=true] { background:#e4f0dc; border:2px solid #527c68; padding:5px 9px; }
.level-row:disabled { background:#f0e8d9; color:#756b5d; cursor:default; } .level-row:disabled img { opacity:.6; }
.level-tag { color:#54745d; font-size:12px; font-weight:bold; }
.menu-record { color:#795f42; font-size:13px; text-align:center; padding:12px 2px; }
#playLevel { flex:none; width:100%; min-height:47px; border:0; border-radius:12px; background:#b64836; color:#fff9ed; font-size:16px; font-weight:800; box-shadow:inset 0 -3px #923529; }
.back-menu { border:0; background:transparent; margin-top:6px; min-height:40px; color:#345c50; font-weight:750; }
@media(max-width:420px){.hud{gap:5px;padding-inline:5px}.goal{margin-inline:5px}#sound,#openMenu{width:40px}}
@media(max-height:500px){.menu-ticket{padding:13px 12px 9px}.menu-heading{margin-bottom:4px;gap:10px}.menu-heading img{width:38px;height:39px}.menu-heading h1{font-size:22px}.menu-heading p{font-size:11px;margin:1px 0}.menu-record{padding:4px}.menu-ticket #playLevel{min-height:36px}#levelList{max-height:36dvh}.level-row{min-height:42px}.level-row img{height:28px}}
