/* MEC Play — arcade look (approved preview v6, 2026-10-23). One dark theme on purpose. */
:root {
	--void: #0b0710;
	--crypt: #16101d;
	--ash: #2a2132;
	--bone: #efe6da;
	--fog: #a89cad;
	--ember: #ff6a1a;
	--blood: #d01f2b;
	--gold: #ffc44d;
	--toxic: #7dff9a;
	--px: "Press Start 2P", ui-monospace, Menlo, monospace;
	--ui: "Chakra Petch", "Trebuchet MS", system-ui, sans-serif;
	--num: "VT323", ui-monospace, Menlo, monospace;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--bone); }
body { font: 15px/1.5 var(--ui); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.phone { position: relative; max-width: 480px; min-height: 100%; margin: 0 auto; overflow-x: clip; }
.app { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 70% at 50% 0%, #2a1020 0%, var(--void) 60%); }
.scr { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: calc(18px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.scr--tabs { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--fog); }
.logo { display: block; width: 78%; max-width: 320px; margin: 4px auto 0; }
.hero-hm { width: 96px; display: block; margin: 0 auto; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255, 106, 26, .5)); }
.hero-hm--sad { filter: grayscale(.7) drop-shadow(0 0 12px rgba(208, 31, 43, .5)); }
.hero-hm--sm { width: 52px; }

h1, h2 { position: relative; font: 400 19px/1.45 var(--px); margin: 6px 0 0; text-wrap: balance; color: #ffe3c2; text-shadow: 2px 2px 0 var(--blood), 0 0 12px rgba(255, 106, 26, .45); animation: flick 5s linear infinite; }
.center { text-align: center; }
p { margin: 0; color: var(--fog); font-size: 14px; }
.hint { font-size: 12px; color: var(--fog); text-align: center; }
.err { color: #ff8a8a; font-size: 13px; text-align: center; min-height: 1.2em; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); }
.field input { font: 500 16px var(--ui); color: var(--bone); background: #120c17; border: 1px solid var(--ash); border-radius: 10px; padding: 12px 14px; width: 100%; }
.field input[readonly] { color: var(--fog); }
.code { font: 400 32px var(--num) !important; letter-spacing: .4em; text-align: center; padding: 6px 0 !important; }

.btn { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 12px; padding: 14px 16px; cursor: pointer; font: 400 12px/1.4 var(--px); letter-spacing: .02em; text-transform: uppercase; color: #1a0700; background: linear-gradient(180deg, #ffa04d, var(--ember)); box-shadow: 0 4px 0 #9a3200, 0 0 24px rgba(255, 106, 26, .35); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #9a3200; }
.btn[disabled] { opacity: .6; }
.btn--ghost { background: transparent; color: var(--bone); border: 1px solid var(--ash); box-shadow: none; font-size: 10px; }
.link { background: none; border: 0; color: var(--gold); font: 500 14px var(--ui); cursor: pointer; padding: 4px 0; text-align: center; }
.link--mute { color: var(--fog); font-size: 13px; }

/* wordmark */
.mpl { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.mpl .tag { font: 400 10px var(--px); color: #1a0700; background: var(--gold); padding: 4px 4px 3px; border-radius: 3px; transform: rotate(-4deg); box-shadow: 2px 2px 0 var(--blood); }
.mpl .word { font: 400 24px "Bungee", Impact, sans-serif; color: #ffe3c2; letter-spacing: .02em; text-shadow: 1px 1px 0 var(--ember), 2px 2px 0 var(--ember), 3px 3px 0 var(--blood), 4px 4px 0 var(--blood), 0 0 14px rgba(255, 106, 26, .55); display: inline-block; animation: neon 3s linear infinite, rgb 3.7s steps(1, end) infinite; }
.mpl .word b { display: inline-block; width: .62em; height: .7em; margin: 0 .04em 0 .02em; background: var(--toxic); clip-path: polygon(0 0, 100% 50%, 0 100%); filter: drop-shadow(2px 2px 0 #116b2a); vertical-align: -.02em; }

/* home */
.hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hud div { background: rgba(22, 16, 29, .85); border: 1px solid var(--ash); border-radius: 10px; padding: 6px 8px; text-align: center; }
.hud b { display: block; font: 400 28px/1 var(--num); color: var(--toxic); }
.hud b.g { color: var(--gold); }
.hud span { font: 400 8px var(--px); color: var(--fog); }
.stage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--ash); aspect-ratio: 350 / 250; max-width: 100%; }
.stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.stage .hmc { position: absolute; left: 50%; top: 14%; width: 34%; transform: translateX(-50%); animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)) drop-shadow(0 0 14px rgba(255, 106, 26, .45)); }
.stage .say { position: absolute; right: 8px; top: 10px; font: 400 8px/1.5 var(--px); color: #1a0700; background: var(--bone); border-radius: 6px; padding: 5px 6px; max-width: 46%; }
.stage .slot { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(11, 7, 16, .78); border: 1px dashed rgba(255, 196, 77, .55); border-radius: 10px; padding: 7px 10px; font: 400 8px/1.5 var(--px); color: var(--gold); }
.stage .slot b { font: 400 18px var(--num); color: var(--bone); }
.stage #game { position: absolute; inset: 0; }
.sect { display: flex; justify-content: space-between; align-items: baseline; }
.sect h3 { margin: 0; font: 400 10px var(--px); color: var(--fog); }
.bar { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 6px; }
.ch { flex: 0 0 140px; scroll-snap-align: start; background: var(--crypt); border: 1px solid var(--ash); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--bone); }
.ch .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #24152a; color: var(--ember); font: 400 20px var(--num); }
.ch .nm { font: 400 9px/1.55 var(--px); }
.ch .pt { font: 400 18px var(--num); color: var(--toxic); animation: twinkle 2.4s ease-in-out infinite; }
.ch:nth-child(2) .pt { animation-delay: .4s; } .ch:nth-child(3) .pt { animation-delay: .8s; } .ch:nth-child(4) .pt { animation-delay: 1.2s; }
.ch .pr { height: 4px; border-radius: 2px; background: #2b2131; overflow: hidden; }
.ch .pr i { display: block; height: 100%; background: var(--ember); }
.ch.done { border-color: rgba(125, 255, 154, .5); }
.ch.done .ic { color: var(--toxic); }
.prize { display: flex; gap: 12px; align-items: center; background: linear-gradient(90deg, rgba(255, 196, 77, .14), rgba(255, 196, 77, .02)); border: 1px solid rgba(255, 196, 77, .4); border-radius: 12px; padding: 12px; }
.prize .cup { font: 400 38px/1 var(--num); color: var(--gold); width: 44px; text-align: center; flex: none; }
.prize b { display: block; font: 400 10px/1.6 var(--px); color: var(--gold); margin-bottom: 3px; }
.prize span { font-size: 12px; color: var(--fog); }

.tabs { position: fixed; z-index: 4; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); background: #0e0913; border-top: 1px solid var(--ash); padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.tabs button { background: none; border: 0; color: var(--fog); font: 400 8px var(--px); padding: 6px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tabs button i { font: 400 22px/1 var(--num); font-style: normal; }
.tabs button[aria-current="page"] { color: var(--ember); }

/* ranking */
.rk { display: flex; flex-direction: column; gap: 6px; }
.row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; background: var(--crypt); border: 1px solid var(--ash); border-radius: 10px; padding: 8px 10px; animation: slidein .45s cubic-bezier(.2, .9, .3, 1.3) both; }
.row .pos { font: 400 24px var(--num); color: var(--fog); text-align: center; }
.row .who { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who small { display: block; font-weight: 400; font-size: 11px; color: var(--fog); }
.row .pts { font: 400 22px var(--num); color: var(--toxic); }
.row.top1 { border-color: var(--gold); background: linear-gradient(90deg, rgba(255, 196, 77, .16), var(--crypt)); }
.row.top1 .pos { color: var(--gold); }
.row.top1 .who span { background: linear-gradient(90deg, var(--bone) 0 40%, #fff6c9 50%, var(--bone) 60% 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.2s linear infinite; }
.row.me { border-color: var(--ember); }
.gap { font-size: 12px; color: var(--gold); text-align: center; animation: blink 1.4s steps(1, end) infinite; }
.empty { text-align: center; color: var(--fog); padding: 26px 10px; border: 1px dashed var(--ash); border-radius: 12px; font-size: 13px; }

/* share */
.mylink { display: flex; gap: 8px; align-items: center; background: #120c17; border: 1px solid var(--ember); border-radius: 12px; padding: 10px 12px; }
.mylink span { flex: 1; min-width: 0; font: 400 19px var(--num); color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mylink button { font: 400 9px var(--px); background: var(--ember); color: #1a0700; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.funnel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.funnel div { background: var(--crypt); border: 1px solid var(--ash); border-radius: 10px; padding: 8px; text-align: center; }
.funnel b { display: block; font: 400 30px/1 var(--num); }
.funnel span { font-size: 11px; color: var(--fog); }
.rules { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rules div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--ash); padding-bottom: 6px; color: var(--bone); }
.rules div b { font: 400 18px var(--num); color: var(--toxic); white-space: nowrap; font-weight: 400; }
.hist { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hist div { display: flex; justify-content: space-between; gap: 10px; color: var(--fog); }
.hist div b { font: 400 18px var(--num); color: var(--toxic); font-weight: 400; }
.hist div b.neg { color: #ff8a8a; }

.toast { position: fixed; z-index: 9; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--toxic); color: #062010; font: 400 11px var(--px); padding: 10px 14px; border-radius: 999px; opacity: 0; pointer-events: none; white-space: nowrap; }
.toast.on { animation: pop 1.8s ease-out forwards; }
.toast.bad { background: #ff8a8a; color: #2a0606; }

/* arcade text effects */
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.glitch::before { color: #3ff6ff; animation: glA 4.2s steps(1, end) infinite; }
.glitch::after { color: #ff2e88; animation: glB 4.2s steps(1, end) infinite; }
.typing::after { content: "\2588"; color: var(--toxic); margin-left: 2px; animation: cur .5s steps(1, end) infinite; text-shadow: none; }
.scramble { color: var(--toxic) !important; }
.hud b.count { animation: tick .08s steps(1, end) infinite; }
.hmglitch { animation: hmg .4s steps(1, end) !important; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes flick { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .55; } 98% { opacity: 1; } 99% { opacity: .7; } }
@keyframes glA { 0%, 91%, 100% { opacity: 0; transform: none; } 92% { opacity: .85; transform: translate(-3px, 0); clip-path: inset(10% 0 55% 0); } 94% { opacity: .85; transform: translate(2px, 0); clip-path: inset(60% 0 8% 0); } 96% { opacity: 0; } }
@keyframes glB { 0%, 91%, 100% { opacity: 0; transform: none; } 92% { opacity: .8; transform: translate(3px, 0); clip-path: inset(45% 0 20% 0); } 95% { opacity: .8; transform: translate(-2px, 0); clip-path: inset(5% 0 70% 0); } 97% { opacity: 0; } }
@keyframes cur { 50% { opacity: 0; } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes neon { 0%, 100% { filter: none; } 50% { filter: hue-rotate(-18deg) brightness(1.15); } }
@keyframes rgb { 0%, 88%, 100% { transform: none; } 89% { transform: translate(2px, -1px) skewX(-8deg); text-shadow: -3px 0 0 #3ff6ff, 3px 0 0 #ff2e88, 0 0 14px rgba(255, 106, 26, .55); } 91% { transform: translate(-2px, 1px); } 93% { transform: none; text-shadow: 3px 0 0 #3ff6ff, -3px 0 0 #ff2e88; } 95% { transform: none; } }
@keyframes tick { 50% { color: #fff; } }
@keyframes twinkle { 50% { text-shadow: 0 0 8px var(--toxic); color: #d9ffe2; } }
@keyframes slidein { from { transform: translateX(40px); opacity: .2; } }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes pop { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 1; } 15% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 25% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -40px) scale(1); opacity: 0; } }
@keyframes hmg { 0% { transform: translate(-4px, 0); filter: drop-shadow(4px 0 0 #3ff6ff) drop-shadow(-4px 0 0 #ff2e88); } 25% { transform: translate(5px, -2px) skewX(10deg); filter: drop-shadow(-5px 0 0 #3ff6ff) drop-shadow(5px 0 0 #ff2e88) hue-rotate(90deg); } 50% { transform: translate(-2px, 1px); clip-path: inset(0 0 40% 0); filter: invert(1); } 75% { transform: translate(3px, 0); clip-path: none; filter: drop-shadow(3px 0 0 #3ff6ff); } 100% { transform: none; filter: none; } }
@keyframes hmbob { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg); } 50% { transform: translateX(-50%) translateY(-6px) rotate(3deg); } }
.stage .hmc { animation-name: hmbob; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.toast.on { opacity: 1; }
}

/* ── Game screens (approved design v6, 2026-10-23) ─────────── */
:root { --candy: #ff5fb4; --disp: "Jacquard 24", Georgia, serif; }
.phone { max-width: 440px; }
.pill { font: 400 8px var(--px); color: var(--gold); border: 1px solid rgba(255, 196, 77, .5); border-radius: 999px; padding: 5px 8px; white-space: nowrap; }
.btn--sm { width: auto; padding: 8px 10px; font-size: 9px; }
.warn { font-size: 13px; color: #1a0700; background: var(--gold); border-radius: 10px; padding: 8px 10px; margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--crypt); border: 1px solid var(--ash); border-radius: 12px; padding: 4px; }
.seg button { font: 400 9px var(--px); color: var(--fog); background: none; border: 0; border-radius: 9px; padding: 10px 0; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ember); color: #1a0700; }
.steps { display: flex; flex-direction: column; gap: 6px; }
.st { display: flex; gap: 10px; align-items: center; background: var(--crypt); border: 1px solid var(--ash); border-radius: 10px; padding: 9px 10px; font-size: 14px; color: var(--bone); text-align: left; }
.st span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: #1a0700; font: 400 10px var(--px); }
.bell { font-size: 72px; text-align: center; animation: bob 1.4s ease-in-out infinite; }
.ben { display: flex; flex-direction: column; gap: 6px; }
.ben > div { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: var(--crypt); border: 1px solid var(--ash); border-radius: 12px; padding: 10px 12px; text-align: left; }
.ben span { grid-row: span 2; font-size: 24px; text-align: center; }
.ben b { font-size: 14px; color: var(--bone); }
.ben small { font-size: 12px; color: var(--fog); }
.cos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cos button { font-size: 44px; line-height: 1; padding: 14px 0; border-radius: 14px; border: 2px solid var(--ash); background: var(--crypt); cursor: pointer; }
.cos button[aria-pressed="true"] { border-color: var(--ember); background: linear-gradient(180deg, rgba(255, 106, 26, .2), var(--crypt)); box-shadow: 0 0 18px rgba(255, 106, 26, .35); }

.ticker { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid var(--ash); border-radius: 999px; padding: 0 12px; height: 30px; line-height: 30px; font-size: 12px; color: var(--bone); background: rgba(22, 16, 29, .85); }
.ticker span { display: inline-block; }
.ticker span.in { animation: tin .45s ease-out; }
@keyframes tin { from { opacity: 0; } }
.lvlhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lvlhead b { display: block; font: 400 11px/1.5 var(--px); color: #ffe3c2; text-shadow: 2px 2px 0 var(--blood); }
.lvlhead small { font-size: 12px; color: var(--fog); }
.lvlhead small b { display: inline; font: 600 12px var(--ui); color: var(--toxic); text-shadow: none; }
.house { border-radius: 14px; overflow: hidden; border: 1px solid var(--ash); background: linear-gradient(180deg, #1d0d2b, #120a14); padding: 10px; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.door { position: relative; aspect-ratio: 1 / 1.02; border-radius: 26px 26px 6px 6px; border: 2px solid #3a2244; background: linear-gradient(180deg, #2a1530, #1a0d1f); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--fog); font: 400 7px/1.5 var(--px); padding: 4px; }
.door .d { font: 400 24px/1 var(--num); color: var(--bone); }
.door .i { font-size: 34px; line-height: 1.1; }
.door.today { border-color: var(--toxic); box-shadow: 0 0 18px rgba(125, 255, 154, .35); color: var(--toxic); animation: glowd 1.4s ease-in-out infinite; }
@keyframes glowd { 50% { box-shadow: 0 0 6px rgba(125, 255, 154, .2); } }
.door.done { border-color: rgba(255, 196, 77, .6); color: var(--gold); }
.door.lock { opacity: .5; }
.door.lock .i { filter: grayscale(1); }
.door .stamp { position: absolute; top: 6px; right: 6px; font-size: 14px; }
.door .gift { position: absolute; top: 4px; left: 6px; font-size: 14px; }
.sect .link { font-size: 12px; padding: 0; }
.track { position: relative; height: 146px; border: 1px solid var(--ash); border-radius: 12px; background: linear-gradient(180deg, #1a0d1f, #120a14); overflow: hidden; }
.tline { position: absolute; left: 3%; right: 4%; top: 56px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, #3a2244 0 8px, #2a1530 8px 14px); }
.tstart { position: absolute; left: 6px; top: 40px; font: 400 6px var(--px); color: var(--fog); }
.tmk { position: absolute; top: 10px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tmk i { font-style: normal; font-size: 18px; filter: grayscale(1) brightness(.6); }
.tmk em { font-style: normal; font: 400 13px var(--num); color: var(--fog); }
.tmk::after { content: ""; width: 2px; height: 10px; background: #3a2244; }
.tmk.on i { filter: none; }
.tmk.on em { color: var(--toxic); }
.tflag { position: absolute; right: 4px; top: 8px; display: flex; flex-direction: column; align-items: center; }
.tflag i { font-style: normal; font-size: 26px; filter: drop-shadow(0 0 10px rgba(255, 196, 77, .7)); }
.tflag em { font-style: normal; font: 400 13px var(--num); color: var(--gold); }
.runner { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left .8s cubic-bezier(.2, .9, .3, 1.2); }
.runner i { font-style: normal; font-size: 24px; line-height: 1; }
.runner small { font: 400 13px/1 var(--num); color: var(--bone); white-space: nowrap; background: rgba(9, 6, 13, .75); border-radius: 4px; padding: 1px 4px; }
.runner.lead small { color: var(--gold); }
.runner.me { z-index: 2; }
.runner.me i { filter: drop-shadow(0 0 8px var(--ember)); animation: bob 1.2s ease-in-out infinite; }
.runner.me small { background: var(--ember); color: #1a0700; }
.raceline { font-size: 13px; color: var(--bone); text-align: center; }
.raceline b { color: var(--gold); }
.tips { display: flex; flex-direction: column; gap: 6px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--crypt); border: 1px solid var(--ash); border-radius: 10px; padding: 8px 10px; }
.tip span { font-size: 20px; line-height: 1.2; }
.tip b { display: block; font: 500 13px var(--ui); color: var(--bone); }
.tip b b { display: inline; color: var(--toxic); font-weight: 700; }
.tip small { color: var(--fog); font-size: 12px; }
.prow { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 6px; scroll-snap-type: x mandatory; }
.pc { flex: 0 0 128px; scroll-snap-align: start; background: var(--crypt); border: 1px solid var(--ash); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.pc .e { font-size: 30px; filter: grayscale(.8) brightness(.7); }
.pc b { font: 400 8px/1.6 var(--px); color: var(--bone); min-height: 3.2em; }
.pc em { font-style: normal; font: 400 18px var(--num); color: var(--ember); }
.pc.on { border-color: rgba(125, 255, 154, .55); }
.pc.on .e { filter: none; }
.pc.on em { color: var(--toxic); }
.pc.top { border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 196, 77, .16), var(--crypt)); }
.pc.top .e { filter: none; }
.pc.top em { color: var(--gold); }
.meter { height: 8px; border-radius: 4px; background: #2b2131; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--candy), var(--gold)); }

.road { position: relative; display: flex; flex-direction: column-reverse; gap: 14px; padding: 6px 0 6px 34px; }
.road::before { content: ""; position: absolute; left: 14px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--ash) 0 10px, transparent 10px 18px); }
.stop { position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: var(--crypt); border: 1px solid var(--ash); border-radius: 14px; padding: 10px; }
.stop::before { content: ""; position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ash); }
.stop .big { font-size: 36px; text-align: center; filter: grayscale(1) brightness(.5); }
.stop b { display: block; font: 400 9px/1.6 var(--px); }
.stop small { color: var(--fog); font-size: 12px; }
.stop .pt { font: 400 20px var(--num); color: var(--fog); white-space: nowrap; }
.stop.on { border-color: rgba(125, 255, 154, .55); background: linear-gradient(90deg, rgba(125, 255, 154, .1), var(--crypt)); }
.stop.on::before { background: var(--toxic); box-shadow: 0 0 10px var(--toxic); }
.stop.on .big { filter: none; }
.stop.on .pt { color: var(--toxic); }
.stop.here::after { content: "YOU"; position: absolute; left: -40px; top: -14px; font: 400 7px var(--px); color: var(--ember); }
.stop.top { border-color: var(--gold); background: linear-gradient(90deg, rgba(255, 196, 77, .16), var(--crypt)); }
.stop.top b { color: var(--gold); }
.stop.top .big { filter: drop-shadow(0 0 14px rgba(255, 196, 77, .7)); }
.code-chip { margin-top: 4px; font: 400 9px var(--px); color: #062010; background: var(--toxic); border: 0; border-radius: 6px; padding: 5px 7px; cursor: pointer; }

.goal { display: flex; gap: 10px; align-items: center; background: var(--crypt); border: 1px solid var(--ember); border-radius: 12px; padding: 10px 12px; }
.goal span { font-size: 24px; }
.goal b { display: block; font-size: 14px; color: var(--bone); }
.goal small { font-size: 12px; color: var(--fog); }
.gbar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font: 400 9px var(--px); color: var(--fog); }
.gbar > span:nth-child(2) { text-align: center; }
.gbar b { font: 400 24px var(--num); color: var(--toxic); }
.gbar i { font-style: normal; font: 400 18px var(--num); color: var(--fog); }
.gbar .gp b { color: var(--gold); }
.stars { position: relative; height: 22px; margin: 0 10px; }
.stars .sb { position: absolute; left: 0; right: 0; top: 8px; height: 8px; border-radius: 4px; background: #2b2131; overflow: hidden; }
.stars .sb i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--gold)); }
.stars em { position: absolute; top: -2px; transform: translateX(-50%); font-style: normal; font-size: 20px; color: var(--gold); text-shadow: 0 0 6px rgba(0, 0, 0, .8); }
.gwrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--ash); aspect-ratio: 7 / 9; max-height: min(62vh, 62dvh); overscroll-behavior: contain; margin: 0 auto; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.gwrap canvas { display: block; width: 100%; height: 100%; }
.over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(9, 6, 13, .72); text-align: center; padding: 10px; }
.over b { font: 400 13px/1.5 var(--px); color: var(--gold); }
.over span { font: 400 9px/1.6 var(--px); color: var(--bone); }
.over .blink { color: var(--toxic); animation: blink 1s steps(1, end) infinite; }
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lanes button { font: 400 12px var(--px); padding: 16px 0; border-radius: 10px; border: 0; cursor: pointer; color: #1a0700; background: linear-gradient(180deg, #ffa04d, var(--ember)); box-shadow: 0 4px 0 #9a3200; touch-action: none; }
.lanes button:active { transform: translateY(2px); box-shadow: 0 2px 0 #9a3200; }

.cardwrap { display: flex; justify-content: center; }
.cardwrap canvas { width: min(78%, 300px); border-radius: 12px; box-shadow: 0 0 0 1px var(--ash), 0 16px 40px rgba(255, 106, 26, .25); }
.tg { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--bone); }
.tg input { width: 18px; height: 18px; accent-color: var(--ember); }
.pop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(9, 6, 13, .9); padding: 24px; }
.pop .box { max-width: 400px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

.endg { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.endg .k { font: 400 8px var(--px); color: var(--toxic); animation: blink 1s steps(1, end) infinite; }
.wav { font-size: 96px; line-height: 1; filter: drop-shadow(0 0 24px rgba(255, 196, 77, .8)); animation: bob 1.6s ease-in-out infinite; }
.wname { font: 400 46px/.95 var(--disp); color: var(--gold); text-shadow: 0 0 18px rgba(255, 196, 77, .6); }
.wsub { font-size: 13px; color: var(--bone); }
.pod { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: end; width: 100%; }
.pod div { background: var(--crypt); border: 1px solid var(--ash); border-radius: 10px 10px 4px 4px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 96px; justify-content: flex-end; }
.pod div:empty { visibility: hidden; }
.pod .p1 { height: 124px; border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 196, 77, .2), var(--crypt)); }
.pod i { font-style: normal; font-size: 26px; }
.pod b { font: 400 14px var(--px); color: var(--gold); }
.pod small { font-size: 11px; color: var(--fog); }
.mine { width: 100%; display: flex; flex-direction: column; gap: 4px; background: var(--crypt); border: 1px solid var(--ember); border-radius: 12px; padding: 10px; text-align: left; }
.mine b { font-size: 14px; color: #ffe3c2; }
.mine small { color: var(--fog); font-size: 12px; }
.mine span { font-size: 13px; color: var(--toxic); }
.reset { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px dashed var(--gold); border-radius: 12px; padding: 12px; }
.reset span { font-size: 30px; }
.reset b { font: 400 9px/1.6 var(--px); color: var(--gold); }
.reset small { color: var(--fog); font-size: 12px; }

/* friend page (/p/{code}) */
.fr { justify-content: center; align-items: center; text-align: center; background: radial-gradient(90% 50% at 50% 20%, #3a1424 0%, var(--void) 70%); }
.fr > * { width: 100%; }
.fr .flyer { width: min(55%, 190px); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px var(--ash); display: block; margin: 0 auto; }
.fr .who { font: 400 9px/1.6 var(--px); color: var(--toxic); }
.fr .big { font: 400 40px/.95 var(--disp); color: #ffe3c2; text-shadow: 0 0 16px rgba(255, 106, 26, .6); }
.fr .facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.fr .facts span { font-size: 12px; color: var(--bone); background: var(--crypt); border: 1px solid var(--ash); border-radius: 999px; padding: 4px 10px; }
@media (prefers-reduced-motion: reduce) { .bell, .wav, .endg .k, .door.today, .runner, .runner.me i, .ticker span.in { animation: none !important; transition: none !important; } }

/* Install screen hero: the MEC Play logo, first thing people see */
.p-hero { position: relative; display: grid; place-items: center; height: 210px; margin: 2px auto 4px; width: 100%; overflow: hidden; }
.p-hero__glow { position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 26, .55) 0%, rgba(208, 31, 43, .25) 40%, transparent 70%); filter: blur(6px); animation: phBreath 3.2s ease-in-out infinite; }
.p-hero__ring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgba(255, 196, 77, .55); animation: phRing 2.6s ease-out infinite; }
.p-hero__ring--2 { animation-delay: 1.3s; }
.p-hero__embers { position: absolute; inset: 0; pointer-events: none; }
.p-hero__embers i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 8px #ff6a1a; opacity: 0; animation: phEmber 3.6s linear infinite; }
.p-hero__embers i:nth-child(1) { left: 12%; animation-delay: 0s; } .p-hero__embers i:nth-child(2) { left: 24%; animation-delay: 1.2s; width: 3px; height: 3px; }
.p-hero__embers i:nth-child(3) { left: 38%; animation-delay: 2.4s; } .p-hero__embers i:nth-child(4) { left: 52%; animation-delay: .6s; width: 5px; height: 5px; }
.p-hero__embers i:nth-child(5) { left: 64%; animation-delay: 1.8s; } .p-hero__embers i:nth-child(6) { left: 76%; animation-delay: 3s; width: 3px; height: 3px; }
.p-hero__embers i:nth-child(7) { left: 88%; animation-delay: .9s; } .p-hero__embers i:nth-child(8) { left: 45%; animation-delay: 2.9s; width: 3px; height: 3px; }
.p-hero__logo { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; line-height: 1; animation: phDrop .9s cubic-bezier(.2, .9, .3, 1.35) both; }
.p-hero__logo .tag { font: 400 15px "Press Start 2P", ui-monospace, monospace; color: #1a0700; background: #ffc44d; padding: 6px 6px 5px; border-radius: 4px; transform: rotate(-6deg); box-shadow: 3px 3px 0 #d01f2b; animation: phTag 2.8s ease-in-out infinite 1s; }
.p-hero__logo .word { font: 400 56px "Bungee", Impact, sans-serif; color: #ffe3c2; letter-spacing: .02em; text-shadow: 2px 2px 0 #ff6a1a, 4px 4px 0 #ff6a1a, 6px 6px 0 #d01f2b, 8px 8px 0 #d01f2b, 0 0 30px rgba(255, 106, 26, .7); animation: phNeon 3s ease-in-out infinite 1s, phGlitch 4.6s steps(1, end) infinite 1.6s; }
.p-hero__logo .word b { display: inline-block; width: .62em; height: .7em; margin: 0 .04em 0 .02em; background: #7dff9a; clip-path: polygon(0 0, 100% 50%, 0 100%); filter: drop-shadow(3px 3px 0 #116b2a) drop-shadow(0 0 10px rgba(125, 255, 154, .8)); vertical-align: -.02em; animation: phPlay 1.1s ease-in-out infinite 1s; }
.p-hero__sub { position: absolute; bottom: 14px; z-index: 1; font: 400 9px "Press Start 2P", ui-monospace, monospace; letter-spacing: .14em; color: #7dff9a; text-shadow: 0 0 8px rgba(125, 255, 154, .6); animation: phBlink 1.2s steps(1, end) infinite 1.2s; }
@keyframes phBreath { 50% { transform: scale(1.18); opacity: .75; } }
@keyframes phRing { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes phEmber { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(14px, -220px); opacity: 0; } }
@keyframes phDrop { 0% { transform: translateY(-60px) scale(1.5); opacity: 0; filter: blur(8px); } 60% { transform: translateY(6px) scale(.97); opacity: 1; filter: blur(0); } 100% { transform: none; } }
@keyframes phTag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(4deg) translateY(-3px); } }
@keyframes phNeon { 50% { filter: brightness(1.18); } }
@keyframes phGlitch { 0%, 90%, 100% { transform: none; } 91% { transform: translate(3px, -1px) skewX(-8deg); text-shadow: -4px 0 0 #3ff6ff, 4px 0 0 #ff2e88, 6px 6px 0 #d01f2b, 0 0 30px rgba(255, 106, 26, .7); } 93% { transform: translate(-3px, 1px); } 95% { transform: none; text-shadow: 4px 0 0 #3ff6ff, -4px 0 0 #ff2e88, 6px 6px 0 #d01f2b; } 97% { transform: none; } }
@keyframes phPlay { 50% { transform: scale(1.18); } }
@keyframes phBlink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .p-hero *, .p-hero__logo .word, .p-hero__logo .word b { animation: none !important; } }
.topbar--end { justify-content: flex-end; }

/* How-to guide (3 steps, once per phone) */
.guide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; max-width: 360px; margin: 0 auto; }
.guide__k { font: 400 8px var(--px); color: var(--toxic); letter-spacing: .1em; }
.guide__ic { font-size: 84px; line-height: 1; filter: drop-shadow(0 0 20px rgba(255, 106, 26, .55)); animation: bob 1.8s ease-in-out infinite; }
.guide p { color: var(--bone); font-size: 15px; line-height: 1.5; margin: 0; }
.guide__dots { display: flex; gap: 8px; }
.guide__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ash); }
.guide__dots i.on { background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.guide .btn { width: 100%; }
.topbar__r { display: inline-flex; align-items: center; gap: 8px; }
.help { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 196, 77, .6); background: none; color: var(--gold); font: 400 10px var(--px); cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { .guide__ic { animation: none; } }

/* Get more points now (home): three compact chips under the game */
.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.moves__k { grid-column: 1 / -1; font: 400 8px var(--px); color: var(--toxic); letter-spacing: .1em; }
.mv { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: var(--crypt); border: 1px solid var(--ash); border-radius: 12px; padding: 8px 4px; color: var(--bone); cursor: pointer; font: inherit; min-width: 0; }
.mv span { font-size: 20px; line-height: 1; }
.mv em { font-style: normal; font: 400 22px/1 var(--num); color: var(--toxic); }
.mv b { font: 400 7px/1.5 var(--px); color: var(--fog); }
.mv small { display: none; }
.mv--hot { border-color: var(--ember); background: linear-gradient(180deg, rgba(255, 106, 26, .2), var(--crypt)); }
.mv--hot em { color: var(--gold); }
.mv--info { grid-column: 1 / -1; flex-direction: row; justify-content: center; cursor: default; }
.mv--info small { display: inline; font-size: 12px; color: var(--fog); }
.door .more { position: absolute; bottom: 3px; right: 8px; font: 400 14px var(--num); color: var(--toxic); }

/* Home: game HUD + level map */
.hud2 { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; margin: -6px -6px 0; border-radius: 16px; background: rgba(14, 9, 19, .88); border: 1px solid var(--ash); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud2__me { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hud2__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: radial-gradient(circle, #3a1a2e, #160c1c); border: 2px solid var(--ember); }
.hud2__me b { font: 400 9px var(--px); color: #ffe3c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.hud2__st { display: flex; justify-content: flex-end; gap: 10px; }
.hud2__st span { display: flex; align-items: center; gap: 3px; font-size: 14px; }
.hud2__st b { font: 400 22px/1 var(--num); color: var(--gold); }
.map { position: relative; margin: 0 -6px; border-radius: 22px; overflow: hidden; border: 1px solid var(--ash); background: linear-gradient(180deg, #2a1240 0%, #1c0d2a 35%, #140a1c 70%, #0d0710 100%); }
.map__sky { position: absolute; inset: 0; pointer-events: none; }
.map__sky .moon { position: absolute; top: 26px; right: 22px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6d6, #ffd27a 70%); box-shadow: 0 0 50px rgba(255, 210, 122, .65); }
.map__sky .fog { position: absolute; left: -30%; width: 160%; height: 120px; background: radial-gradient(closest-side, rgba(200, 180, 230, .12), transparent); animation: fogMove 14s linear infinite alternate; }
.map__sky .f1 { top: 30%; } .map__sky .f2 { top: 68%; animation-duration: 19s; animation-direction: alternate-reverse; }
@keyframes fogMove { to { transform: translateX(18%); } }
.map__sky .bat { position: absolute; font-size: 18px; animation: batFly 9s linear infinite; opacity: .8; }
.map__sky .b1 { top: 12%; left: -10%; } .map__sky .b2 { top: 40%; left: -10%; animation-delay: 3s; font-size: 14px; } .map__sky .b3 { top: 76%; left: -10%; animation-delay: 6s; }
@keyframes batFly { 0% { transform: translate(0, 0); } 25% { transform: translate(30vw, -16px); } 50% { transform: translate(60vw, 8px); } 100% { transform: translate(130vw, -10px); } }
.map__deco { position: absolute; font-size: 22px; opacity: .55; transform: translateX(-50%); pointer-events: none; }
.map__path { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__path polyline { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.map__path .p-all { stroke: rgba(255, 227, 194, .22); stroke-width: 10; stroke-dasharray: 2 16; }
.map__path .p-done { stroke: var(--gold); stroke-width: 6; filter: drop-shadow(0 0 6px rgba(255, 196, 77, .8)); }
.castle { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.castle span { font-size: 64px; line-height: 1; filter: drop-shadow(0 0 22px rgba(255, 196, 77, .8)); animation: bob 2.4s ease-in-out infinite; }
.castle b { font: 400 7px/1.6 var(--px); color: var(--gold); background: rgba(9, 6, 13, .7); padding: 4px 8px; border-radius: 999px; }
.nd { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--bone); }
.nd__btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #5a3270, #2a1438 70%); border: 3px solid #4a2a5c; box-shadow: 0 6px 0 #160a1f, 0 10px 18px rgba(0, 0, 0, .5); }
.nd__btn i { font-style: normal; font-size: 28px; line-height: 1; }
.nd__n { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 400 9px var(--px); color: #1a0700; background: var(--bone); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.nd__stars { margin-top: 6px; font-size: 14px; letter-spacing: 1px; color: var(--gold); text-shadow: 0 0 6px rgba(255, 196, 77, .7); }
.nd__stars s { text-decoration: none; color: rgba(255, 227, 194, .25); text-shadow: none; }
.nd__need { margin-top: 6px; font: 400 15px var(--num); color: var(--fog); background: rgba(9, 6, 13, .75); padding: 0 6px; border-radius: 6px; }
.nd--done .nd__btn { background: radial-gradient(circle at 35% 30%, #ffe08a, #e08a1a 70%); border-color: #ffd36b; box-shadow: 0 6px 0 #8a4a00, 0 0 22px rgba(255, 196, 77, .5); }
.nd--open .nd__btn { background: radial-gradient(circle at 35% 30%, #ffb06b, #d4501a 70%); border-color: #ff9a4d; box-shadow: 0 6px 0 #7a2600, 0 0 18px rgba(255, 106, 26, .5); }
.nd--lock .nd__btn { filter: saturate(.4) brightness(.8); }
.nd--lock .nd__btn i { opacity: .8; }
.nd--cur .nd__btn { width: 84px; height: 84px; background: radial-gradient(circle at 35% 30%, #b8ffc6, #23b24c 70%); border-color: #9dffb0; box-shadow: 0 7px 0 #0f5a25, 0 0 0 0 rgba(125, 255, 154, .6); animation: ndPulse 1.4s ease-out infinite; }
.nd--cur .nd__btn i { font-size: 36px; }
@keyframes ndPulse { 0% { box-shadow: 0 7px 0 #0f5a25, 0 0 0 0 rgba(125, 255, 154, .55); } 100% { box-shadow: 0 7px 0 #0f5a25, 0 0 0 26px rgba(125, 255, 154, 0); } }
.nd--cur { z-index: 2; }
.nd__hm { position: absolute; top: -14px; width: 66px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); animation: bob 1.4s ease-in-out infinite; pointer-events: none; }
.nd__play { margin-top: 8px; font: 400 9px var(--px); color: #062010; background: var(--toxic); padding: 5px 9px; border-radius: 999px; box-shadow: 0 3px 0 #187a35; }
.nd__gift { position: absolute; top: 50%; font-size: 26px; transform: translateY(-50%); filter: drop-shadow(0 0 10px rgba(255, 196, 77, .7)); animation: giftWig 2.6s ease-in-out infinite; }
.nd__gift.r { left: calc(100% + 10px); } .nd__gift.l { right: calc(100% + 10px); }
.nd__gift.won { animation: none; filter: none; opacity: .5; }
@keyframes giftWig { 0%, 80%, 100% { transform: translateY(-50%) rotate(0); } 85% { transform: translateY(-50%) rotate(-12deg); } 90% { transform: translateY(-50%) rotate(12deg); } 95% { transform: translateY(-50%) rotate(-6deg); } }
.btn--play { font-size: 13px; padding: 16px 12px; background: linear-gradient(180deg, #9dffb0, var(--toxic)); color: #062010; box-shadow: 0 5px 0 #187a35, 0 0 24px rgba(125, 255, 154, .4); }
.moves--2 { grid-template-columns: repeat(2, 1fr); }
@media (prefers-reduced-motion: reduce) { .map__sky .fog, .map__sky .bat, .castle span, .nd--cur .nd__btn, .nd__hm, .nd__gift { animation: none !important; } }
.nd--cur.hm-l .nd__hm { right: calc(100% + 2px); } .nd--cur.hm-r .nd__hm { left: calc(100% + 2px); }

/* Map, round 2: alive */
.map__sky .stars { position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 12% 8%, #fff, transparent), radial-gradient(1px 1px at 30% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 6%, #fff, transparent), radial-gradient(1px 1px at 72% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 88% 34%, #fff, transparent), radial-gradient(1px 1px at 18% 40%, #fff, transparent), radial-gradient(1px 1px at 42% 52%, #fff, transparent), radial-gradient(1.5px 1.5px at 8% 64%, #fff, transparent), radial-gradient(1px 1px at 64% 70%, #fff, transparent), radial-gradient(1px 1px at 92% 80%, #fff, transparent); opacity: .7; animation: twinkle 3.2s ease-in-out infinite alternate; }
.map__sky .stars.s2 { transform: translate(7%, 11%); animation-delay: 1.6s; opacity: .45; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }
.map__path .p-flow { stroke: #fff6d6; stroke-width: 4; stroke-dasharray: 6 60; animation: flow 2.2s linear infinite; opacity: .9; filter: drop-shadow(0 0 6px #ffd27a); }
@keyframes flow { to { stroke-dashoffset: -66; } }
.nd { z-index: 1; }
.nd__btn { position: relative; }
.nd__lk { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #1a0d22; border: 2px solid #4a2a5c; }
.nd--lock .nd__btn i { filter: grayscale(1); opacity: .45; }
.nd__need { font: 400 13px var(--num); letter-spacing: .02em; }
.nd__say { position: absolute; top: -48px; white-space: nowrap; font: 400 8px var(--px); color: #1a0700; background: #fff6e6; padding: 6px 8px; border-radius: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); animation: say 2.4s ease-in-out infinite; }
.nd--cur.hm-l .nd__say { right: calc(100% + 14px); } .nd--cur.hm-r .nd__say { left: calc(100% + 14px); }
.nd__say::after { content: ""; position: absolute; bottom: -6px; left: 50%; width: 10px; height: 10px; background: #fff6e6; transform: translateX(-50%) rotate(45deg); }
@keyframes say { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.nd__gift { cursor: pointer; pointer-events: auto; }
.hud2__lv { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; }
.hud2__lv span { font: 400 7px var(--px); color: var(--toxic); white-space: nowrap; }
.hud2__lv i { height: 6px; border-radius: 3px; background: #2b2131; overflow: hidden; }
.hud2__lv b { display: block; height: 100%; background: linear-gradient(90deg, var(--toxic), var(--gold)); border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .map__sky .stars, .map__path .p-flow, .nd, .nd__say { animation: none !important; } }
.chips2 { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.code-chip--hot { background: var(--ember) !important; color: #1a0700 !important; border-color: var(--ember) !important; }
.code-small { font-size: 11px; color: var(--fog); }

/* ── Fixes for everyone (2026-10-24) ── */
.nd.nd--cur { z-index: 5; } /* ".nd { z-index: 1 }" came later and pushed the character and its line behind the next circle */
.nd--ink .nd__btn { background: radial-gradient(circle at 35% 30%, #7a4a9c, #24102f 72%) !important; border-color: var(--gold) !important; }
.nd--ink .nd__btn i { filter: brightness(2.2) drop-shadow(0 0 6px rgba(255, 255, 255, .8)) !important; opacity: 1 !important; }

/* ── Redesign v7 (Kevin, 2026-10-24) ── */
.topbar--v2 { margin-bottom: -6px; }
.topbar__r { display: inline-flex; align-items: center; gap: 8px; }
.snd { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ash); background: rgba(14, 9, 19, .8); font-size: 14px; line-height: 1; padding: 0; cursor: pointer; }
.hud2--v2 { grid-template-columns: auto 1fr; }

.gbox { position: relative; display: block; width: 100%; padding: 0; cursor: pointer; color: var(--bone); font: inherit; text-align: center; height: calc(100dvh - 360px); min-height: 330px; max-height: 540px; border-radius: 24px; overflow: hidden; border: 2px solid var(--ember); background: linear-gradient(180deg, #2a1240 0%, #1c0d2a 40%, #140a1c 75%, #0d0710 100%); box-shadow: 0 0 0 4px rgba(255, 106, 26, .12), 0 0 40px rgba(255, 106, 26, .35), inset 0 0 60px rgba(0, 0, 0, .6); animation: gboxGlow 2.4s ease-in-out infinite; }
.gbox:active { transform: scale(.985); }
@keyframes gboxGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 106, 26, .2), 0 0 60px rgba(255, 106, 26, .55), inset 0 0 60px rgba(0, 0, 0, .6); } }
.gbox__castle { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 1; }
.gbox__castle i { font-style: normal; font-size: 38px; line-height: 1; filter: drop-shadow(0 0 16px rgba(255, 196, 77, .8)); animation: bob 2.4s ease-in-out infinite; }
.gbox__castle b { font: 400 7px/1.5 var(--px); color: var(--gold); background: rgba(9, 6, 13, .7); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.gbox__hero { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; pointer-events: none; }
.gbox__hero .p-hero { overflow: visible; } /* clipped, its glow drew a dark box */
.gbox__cta { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 2; font: 400 13px var(--px); color: #062010; background: linear-gradient(180deg, #b8ffc6, var(--toxic)); padding: 12px 18px; border-radius: 999px; box-shadow: 0 5px 0 #187a35, 0 0 30px rgba(125, 255, 154, .6); white-space: nowrap; animation: ctaPulse 1.2s ease-in-out infinite; }
.gbox__cta b { font-weight: 400; }
@keyframes ctaPulse { 50% { transform: translateX(-50%) scale(1.07); } }
.gbox__sub { position: absolute; left: 0; right: 0; bottom: 40px; z-index: 2; font: 400 7px var(--px); color: var(--fog); letter-spacing: .08em; }
.gbox__trail { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 6px; }
.gbox__trail i { width: 9px; height: 9px; border-radius: 50%; background: #3a2547; border: 1px solid #5a3a6c; }
.gbox__trail i.on { background: var(--gold); border-color: #ffe08a; box-shadow: 0 0 6px rgba(255, 196, 77, .8); }
.gbox__trail i.cur { background: var(--toxic); border-color: #c9ffd4; box-shadow: 0 0 10px var(--toxic); animation: blink 1s steps(1, end) infinite; }
.gbox__trail em { font-style: normal; font-size: 14px; }

.btn--share2 { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 14px 12px; }
.btn--share2 span { font-size: 13px; }
.btn--share2 b { font: 400 8px var(--px); opacity: .85; }
.btn--hot { background: linear-gradient(180deg, #ffa04d, var(--ember)); color: #1a0700; }

.mapbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: calc(-18px - env(safe-area-inset-top, 0px)) -20px 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(11, 7, 16, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--ash); }
.map--v2 { margin: 0 -14px; }
.map__pathw { position: absolute; inset: 0; }
.mapcta { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 7; }
.map--draw .map__pathw { animation: pathDraw 1.9s cubic-bezier(.4, .1, .3, 1) .15s both; }
@keyframes pathDraw { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.map--draw .nd { animation: ndIn .5s cubic-bezier(.2, .9, .3, 1.5) both; animation-delay: var(--d); }
@keyframes ndIn { from { transform: translate(-50%, -50%) scale(0); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.map--draw .castle { animation: castleIn .7s cubic-bezier(.2, .9, .3, 1.5) both; animation-delay: var(--d); }
@keyframes castleIn { from { transform: translateX(-50%) scale(0); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.map--draw .mehm, .map--draw .rv { animation: fadeUp .5s ease-out both; animation-delay: var(--d, 1.8s); }
@keyframes fadeUp { from { opacity: 0; translate: 0 14px; } }

.mehm { position: absolute; z-index: 6; width: 0; height: 0; pointer-events: none; }
.mehm img { position: absolute; top: -66px; width: 62px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); animation: bob 1.4s ease-in-out infinite; }
.mehm.l img { right: 38px; } .mehm.r img { left: 38px; }
.mehm__say { position: absolute; top: -106px; white-space: nowrap; font: 400 8px var(--px); color: #1a0700; background: #fff6e6; padding: 7px 9px; border-radius: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); animation: say 2.4s ease-in-out infinite; }
.mehm.l .mehm__say { right: 10px; } .mehm.r .mehm__say { left: 10px; }
.mehm__say::after { content: ""; position: absolute; bottom: -6px; width: 10px; height: 10px; background: #fff6e6; transform: rotate(45deg); }
.mehm.l .mehm__say::after { right: 34px; } .mehm.r .mehm__say::after { left: 34px; }
.rv { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.rv i { font-style: normal; font-size: 22px; line-height: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(14, 9, 19, .85); border: 2px solid #5a3a6c; }
.rv small { font: 400 6px var(--px); color: var(--bone); background: rgba(9, 6, 13, .8); padding: 3px 5px; border-radius: 999px; white-space: nowrap; }

.over--start { gap: 10px; background: radial-gradient(circle at 50% 42%, rgba(60, 26, 80, .55), rgba(9, 6, 13, .82) 70%); }
.ov__ic { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 54px; line-height: 1; background: radial-gradient(circle at 35% 30%, #ffb06b, #d4501a 70%); border: 3px solid #ffd36b; box-shadow: 0 7px 0 #7a2600, 0 0 40px rgba(255, 106, 26, .55); animation: bob 2s ease-in-out infinite; margin-bottom: 6px; }
.ov__ic--ink { background: radial-gradient(circle at 35% 30%, #7a4a9c, #24102f 72%); box-shadow: 0 7px 0 #12071a, 0 0 40px rgba(180, 120, 255, .45); }
.ov__ic--ink, .ov__ic--ink * { filter: none; }
.over--start b { font-size: 16px; }

.pop .box > div { width: 100%; }
.pop h2 { margin: 0; font: 400 24px/1.15 "Bungee", Impact, sans-serif; color: #ffe3c2; text-shadow: 2px 2px 0 var(--ember), 4px 4px 0 var(--blood); }
.pop p { margin: 0; color: var(--bone); }
.res, .unl, .pz, .door { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: linear-gradient(180deg, #1d1226, var(--crypt)); border: 1px solid var(--ash); border-radius: 22px; padding: 22px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: popIn .35s cubic-bezier(.2, .9, .3, 1.3) both; overflow: hidden; }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.res__k { font: 400 8px var(--px); color: var(--toxic); letter-spacing: .1em; }
.res__stars { font-size: 38px; line-height: 1; color: var(--gold); text-shadow: 0 0 14px rgba(255, 196, 77, .8); letter-spacing: 4px; }
.res__stars s { text-decoration: none; color: rgba(255, 227, 194, .2); text-shadow: none; }
.res__pts { font: 400 40px/1 "Bungee", Impact, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 var(--blood), 0 0 24px rgba(255, 196, 77, .6); }
.res__line { color: var(--fog); font-size: 12px; }
.res__next { width: 100%; display: flex; flex-direction: column; gap: 6px; background: rgba(9, 6, 13, .6); border: 1px solid var(--ash); border-radius: 14px; padding: 12px; }
.res__next b { font: 400 9px/1.5 var(--px); color: #ffe3c2; }
.res__next i { height: 8px; border-radius: 4px; background: #2b2131; overflow: hidden; }
.res__next em { display: block; height: 100%; background: linear-gradient(90deg, var(--toxic), var(--gold)); }
.res__next small { color: var(--fog); font-size: 12px; }
.res__how { width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.res__how div { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; background: rgba(255, 255, 255, .03); border-radius: 10px; padding: 8px 10px; }
.res__how i { font-style: normal; font-size: 18px; }
.res__how span { font-size: 13px; }
.res__how b { font: 400 22px/1 var(--num); color: var(--toxic); }
.res__btns { width: 100%; display: grid; gap: 10px; margin-top: 4px; }
.unl__lock { position: relative; width: 90px; height: 90px; font-size: 72px; line-height: 90px; }
.unl__lock span { position: absolute; inset: 0; }
.unl__lock .a { animation: lockOut .5s ease-in .35s both; }
.unl__lock .b { animation: lockIn .5s cubic-bezier(.2, .9, .3, 1.6) .7s both; }
@keyframes lockOut { 40% { transform: rotate(-12deg) scale(1.1); } to { transform: scale(0); opacity: 0; } }
@keyframes lockIn { from { transform: scale(0) rotate(20deg); opacity: 0; } }
.unl__ic { font-size: 56px; line-height: 1; filter: drop-shadow(0 0 18px rgba(125, 255, 154, .6)); }
.pz__e { font-size: 72px; line-height: 1; filter: drop-shadow(0 0 22px rgba(255, 196, 77, .8)); animation: bob 2s ease-in-out infinite; }
.codebig { display: flex; flex-direction: column; gap: 4px; align-items: center; width: 100%; font: 400 22px var(--px); color: #1a0700; background: linear-gradient(180deg, #ffe08a, var(--gold)); border: 0; border-radius: 14px; padding: 14px; cursor: pointer; box-shadow: 0 4px 0 #8a5a00; }
.codebig small { font: 400 7px var(--px); opacity: .7; }
.door__who { width: 100%; display: flex; flex-direction: column; gap: 4px; background: rgba(9, 6, 13, .6); border: 1px dashed var(--gold); border-radius: 14px; padding: 14px; }
.door__who b { font: 400 12px var(--px); color: #ffe3c2; }
.door__who small { color: var(--fog); }
.door__who code { font: 400 28px var(--num); color: var(--gold); letter-spacing: .06em; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: conf 2.4s linear infinite; }
.confetti i:nth-child(3n) { background: var(--gold); } .confetti i:nth-child(3n+1) { background: var(--toxic); } .confetti i:nth-child(3n+2) { background: var(--candy, #ff5fb4); }
.confetti i:nth-child(1) { left: 5%; animation-delay: 0s; } .confetti i:nth-child(2) { left: 12%; animation-delay: .5s; } .confetti i:nth-child(3) { left: 19%; animation-delay: 1.1s; }
.confetti i:nth-child(4) { left: 26%; animation-delay: .2s; } .confetti i:nth-child(5) { left: 33%; animation-delay: 1.6s; } .confetti i:nth-child(6) { left: 40%; animation-delay: .8s; }
.confetti i:nth-child(7) { left: 47%; animation-delay: .3s; } .confetti i:nth-child(8) { left: 54%; animation-delay: 1.3s; } .confetti i:nth-child(9) { left: 61%; animation-delay: .6s; }
.confetti i:nth-child(10) { left: 68%; animation-delay: 1.9s; } .confetti i:nth-child(11) { left: 75%; animation-delay: .1s; } .confetti i:nth-child(12) { left: 82%; animation-delay: 1s; }
.confetti i:nth-child(13) { left: 89%; animation-delay: .4s; } .confetti i:nth-child(14) { left: 95%; animation-delay: 1.4s; } .confetti i:nth-child(15) { left: 9%; animation-delay: 2s; }
.confetti i:nth-child(16) { left: 58%; animation-delay: 1.7s; } .confetti i:nth-child(17) { left: 36%; animation-delay: 2.2s; }
@keyframes conf { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(560px) rotate(540deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .gbox, .gbox__cta, .gbox__castle i, .mehm img, .mehm__say, .confetti, .pz__e, .ov__ic { animation: none !important; } .confetti { display: none; } }
.nd__play { white-space: nowrap; }
.over .ov__ic { font: 400 56px/1 system-ui, sans-serif; color: inherit; } /* ".over span" made it 9px */
.over .ov__ic--ink { text-shadow: 0 0 12px rgba(255, 255, 255, .9); }
.res__how .res__k { font: 400 8px var(--px); color: var(--toxic); }

/* ── iPhone/Android frames (Kevin, 2026-10-24): the status bar area is solid, not see-through glass ── */
body::before { content: ""; position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--void); pointer-events: none; }
.hud2, .mapbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
.hud2 { background: #0e0913; }
.mapbar { background: #0b0710; }
.tabs { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.mapcta { padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
/* In-game: a clear way back */
.topbar__l { display: inline-flex; align-items: center; gap: 10px; }
.backb { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--gold); background: #1a1020; color: var(--gold); font: 400 18px/1 var(--px); cursor: pointer; padding: 0; box-shadow: 0 3px 0 #6b4a00; }
.backb:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4a00; }
.btn--map { font-size: 10px; }
/* Guide: dots are buttons now, and a Back button from step 2 */
.guide__dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--ash); border: 0; padding: 0; cursor: pointer; }
.guide__dots button.on { background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.guide__nav { width: 100%; display: flex; gap: 10px; }
.guide__nav .btn { flex: 1; }
.guide__nav .btn--ghost { flex: 0 0 34%; }
/* Rebalance 2026-10-24: three ways to get points, and a clear "stuck" card */
.moves--3 { grid-template-columns: repeat(3, 1fr); }
.moves--3 .mv b { font-size: 6px; }
.stuck { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #2a1608, var(--crypt)); border: 2px solid var(--ember); box-shadow: 0 0 30px rgba(255, 106, 26, .25); }
.stuck .res__k { font-size: 9px; color: var(--gold); }
.stuck > b { font: 600 15px/1.35 var(--ui); color: var(--bone); }
.stuck > i { height: 8px; border-radius: 4px; background: #2b2131; overflow: hidden; }
.stuck > i em { display: block; height: 100%; background: linear-gradient(90deg, var(--toxic), var(--gold)); }
.stuck__ways { display: grid; gap: 6px; }
.stuck__ways div { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; font-size: 14px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.stuck__ways em { font: 400 22px/1 var(--num); font-style: normal; color: var(--toxic); }
.stuck small { font-size: 13px; color: var(--toxic); text-align: center; }
.btn--stuck { font-size: 11px; }

/* Personal reward + repeatable daily play, 2026-10-26. */
.dailyquest{margin:16px 0;padding:18px;border:1px solid #ffc44d80;border-radius:18px;background:linear-gradient(140deg,#34223d,#19101f);text-align:left;overflow-wrap:anywhere}.dailyquest__tag{color:#ffc44d;font-size:11px;letter-spacing:2px}.dailyquest h3{margin:10px 0;font-size:19px;line-height:1.4;color:#fff4df}.dailyquest p{font-size:13px;line-height:1.6;color:#d4c6db;margin:10px 0}.dailyquest__mission{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#7dff9a;font-size:12px}.dailyquest__mission b{line-height:1.5}.dailyquest__mission span{white-space:nowrap;font-size:18px}.dailyquest__bar{height:9px;border-radius:10px;background:#ffffff15;margin:10px 0;overflow:hidden}.dailyquest__bar i{display:block;height:100%;background:linear-gradient(90deg,#7dff9a,#ffc44d)}.dailyquest .btn{width:100%;margin-top:8px;font-size:13px;white-space:normal}
