:root { --night: #0B1616; --moss: #1F4A43; --cream: #F6EBD9; --amber: #FFB347; --red: #E24A68; --disp: "Bowlby One", Impact, sans-serif; --body: "Barlow", system-ui, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--night); color: var(--cream); font-family: var(--body); font-weight: 600; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; cursor: pointer; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.score { position: absolute; left: max(18px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); font-family: var(--disp); font-weight: 400; font-size: 40px; line-height: 1; }
.mid { position: absolute; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: rgba(246,235,217,.8); }
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(246,235,217,.5); }
.dots i.done { background: var(--amber); border-color: var(--amber); }
.dots i.now { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,179,71,.35); }
.dots i.bossdot { width: 16px; height: 16px; margin-top: -2px; border-radius: 4px; transform: rotate(45deg); border-color: var(--red); }
.dots i.bossdot.now { background: var(--red); }
.apples { position: absolute; right: calc(max(14px, env(safe-area-inset-right)) + 54px); top: calc(max(14px, env(safe-area-inset-top)) + 8px); display: flex; align-items: center; gap: 6px; font-size: 20px; }
.apples svg { width: 24px; height: 24px; }
.quiver { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(26px, env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; gap: 7px; }
.quiver i { width: 10px; height: 32px; border-radius: 2px 2px 6px 6px; background: linear-gradient(180deg, #E8ECF0 0 48%, var(--amber) 48% 54%, #6B3F22 54%); }
.quiver i.used { opacity: .18; }
.ib { position: fixed; z-index: 7; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(246,235,217,.35); background: rgba(0,0,0,.25); color: var(--cream); }
.ib svg { width: 20px; height: 20px; }
.mute .offi { display: none; } .mute.off .on { display: none; } .mute.off .offi { display: block; }
.boss { position: fixed; z-index: 6; left: 0; right: 0; top: 58%; text-align: center; pointer-events: none; }
.boss small { display: block; font-size: 16px; letter-spacing: .3em; text-transform: uppercase; color: var(--red); }
.boss b { font-family: var(--disp); font-weight: 400; font-size: clamp(40px, 10vw, 64px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.boss.go { animation: boss 1.6s ease-out forwards; }
@keyframes boss { from { opacity: 0; transform: scale(1.5); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } to { opacity: 0; } }

.menu { position: fixed; z-index: 9; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 420px); max-height: 60vh; overflow: auto; padding: 18px 20px 14px; text-align: center; border-radius: 24px; background: rgba(11,22,22,.82); border: 1.5px solid rgba(246,235,217,.18); backdrop-filter: blur(6px); }
.over { top: 50%; bottom: auto; transform: translate(-50%, -50%); max-height: 94vh; }
.logo { margin: 0; font-family: var(--disp); font-weight: 400; font-size: 64px; line-height: .95; color: var(--amber); text-shadow: 0 5px 0 #6B3F22; letter-spacing: .02em; }
.tag { margin: 6px 0 14px; color: rgba(246,235,217,.75); }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0 0 10px; padding: 13px; border-radius: 16px; border: 0; background: var(--amber); color: #3A1F10; font-family: var(--disp); font-size: 22px; font-weight: 400; box-shadow: 0 5px 0 #A8661C; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #A8661C; }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(246,235,217,.35); font-size: 18px; }
.btn svg { width: 20px; height: 20px; }
.shophead { display: flex; justify-content: space-between; align-items: center; margin: 12px 2px 8px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: rgba(246,235,217,.7); }
.have { display: flex; align-items: center; gap: 5px; color: var(--cream); letter-spacing: 0; font-size: 16px; }
.shop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid rgba(246,235,217,.15); background: rgba(255,255,255,.04); font-size: 13px; }
.skin canvas { width: 90px; height: 30px; }
.skin.sel { border-color: var(--amber); background: rgba(255,179,71,.12); }
.skin .cost::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; background: #E8394D; vertical-align: -1px; }
.skin:disabled { opacity: .4; cursor: default; }
.foot { margin: 10px 0 0; } .foot a { color: rgba(246,235,217,.7); }
.over .kicker { margin: 0; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; color: var(--red); }
.over h2 { margin: 2px 0 12px; font-family: var(--disp); font-weight: 400; font-size: 44px; color: #fff; }
.over dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); }
.over dt { grid-row: 1; font-size: 13px; opacity: .7; } .over dd { grid-row: 2; margin: 0; font-family: var(--disp); font-size: 26px; }
.btn:focus-visible, .ib:focus-visible, .skin:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.ogmark { display: none; }
body.og .ogmark { display: block; position: fixed; z-index: 8; left: 7%; top: 50%; transform: translateY(-50%); }
body.og .ogmark .logo { font-size: 130px; }
body.og .ogmark p { margin: 14px 0 0 4px; font-size: 28px; }
body.demo .hud, body.demo .menu, body.demo .ib, body.demo .boss { display: none !important; }
@media (prefers-reduced-motion: reduce) { .boss.go { animation: none; } }
