/* Tower Guard - all UI styles. rem based (root font size is set by game.js from the window size); safe-area insets + 100dvh keep phones tidy.
   Sections: base, top bar + HUD, build rail, tower card + confirm, banner + hint, overlays (menu, maps, sheet, help, settings, cards), responsive */
:root { --acc: #FFC53D; --pn: linear-gradient(180deg, #2A2362, #181340); --top: 54px; --rw: 82px; --rh: 0px; --sat: 0px; --sar: 0px; --sab: 0px; --sal: 0px; --gold: #FFD23F; --heart: #FF5C7A; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: #14102f; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-b); color: var(--paper); }
button { font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.fill, .fill svg { fill: currentColor; stroke: none; }
#app, .tg { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; background: #14102f; }
.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
body.playing .cv { cursor: crosshair; }
.btn { gap: .5em; white-space: nowrap; min-height: 2.6em; font-size: 1rem; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn em { font-style: normal; opacity: .8; font-size: .85em; }
.btn--ghost { --bg: rgba(255, 255, 255, .09); --sh: rgba(0, 0, 0, .35); }
.btn--big { font-size: 1.35rem; }
.btn.dis, .btn:disabled { opacity: .45; filter: grayscale(.5); pointer-events: none; }
.shake { animation: tgshake .35s; }
@keyframes tgshake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.bar { position: absolute; z-index: 30; left: 0; right: 0; top: 0; height: var(--top); padding: var(--sat) calc(var(--sar) + 8px) 0 calc(var(--sal) + 8px); display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 10, 40, .88), rgba(14, 10, 40, .6) 75%, rgba(14, 10, 40, 0)); transition: opacity .25s; }
.bar > * { pointer-events: auto; }
body:not(.playing) .bar { background: none; pointer-events: none; }
body:not(.playing) .bar .bl > :not(.home), body:not(.playing) .bc, body:not(.playing) .br { display: none; }
.bl, .br, .bc { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.home { display: none; align-items: center; gap: 10px; text-decoration: none; padding: 6px 14px 6px 6px; border-radius: 14px; background: rgba(15, 12, 34, .55); }
.home img { width: 2.2rem; height: 2.2rem; } .home b { font-family: var(--font-d); font-size: .95rem; font-weight: 400; } .home b i { font-style: normal; color: var(--lime); }
.tool { position: relative; width: 2.9rem; height: 2.9rem; border: 0; padding: 0; display: grid; place-items: center; border-radius: .85rem; background: rgba(34, 28, 80, .85); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 3px 0 rgba(0, 0, 0, .35); flex: none; transition: transform .12s, background .15s; }
.tool:hover { background: rgba(60, 50, 130, .95); transform: translateY(-1px); }
.tool:active { transform: translateY(2px); }
.tool svg { width: 1.4rem; height: 1.4rem; }
.tool kbd { position: absolute; right: -.15rem; bottom: -.2rem; font: 800 .62rem var(--font-b); padding: .05rem .3rem; border-radius: .3rem; background: #fff; color: var(--ink); box-shadow: none; }
.tool.spd { width: auto; padding: 0 .7rem; gap: .25rem; grid-auto-flow: column; } .tool.spd b { font-family: var(--font-d); font-weight: 400; font-size: 1.05rem; }
.tool.spd svg { width: 1.1rem; height: 1.1rem; }
.tool.ab { background: linear-gradient(180deg, #4A3A9A, #2A2068); }
.tool.ab.fz { background: linear-gradient(180deg, #2F7FB8, #1B4F7E); }
.tool.ab.on { box-shadow: 0 0 0 2.5px var(--acc) inset, 0 0 1rem rgba(255, 197, 61, .6); }
.tool.ab i { position: absolute; inset: 0; border-radius: inherit; display: none; place-items: center; font: 400 1.05rem var(--font-d); font-style: normal; color: #fff; background: conic-gradient(rgba(10, 6, 30, .72) calc(var(--cd, 0) * 360deg), transparent 0); text-shadow: 0 2px 3px #000; }
.tool.ab.cd i { display: grid; }
.tool.ab:not(.cd) { animation: abready 2.4s ease-in-out infinite; }
@keyframes abready { 50% { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 0 .9rem rgba(255, 255, 255, .45), 0 3px 0 rgba(0, 0, 0, .35); } }
.pill { display: inline-flex; align-items: center; gap: .4rem; height: 2.6rem; padding: 0 .85rem 0 .6rem; border-radius: .85rem; background: rgba(20, 14, 56, .85); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; flex: none; }
.pill svg { width: 1.4rem; height: 1.4rem; } .pill b { font-family: var(--font-d); font-weight: 400; font-size: 1.3rem; font-variant-numeric: tabular-nums; min-width: 1.4ch; }
.pill.lives svg { color: var(--heart); } .pill.gold svg { color: var(--gold); }
.bc { position: absolute; left: 50%; top: calc(var(--sat) + 4px); transform: translateX(-50%); height: calc(var(--top) - var(--sat) - 8px); }
.wv { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 4.8rem; padding: 0 .7rem; height: 100%; border-radius: .85rem; background: rgba(20, 14, 56, .85); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; cursor: pointer; line-height: 1.05; }
.wv small { font-size: .62rem; font-weight: 800; letter-spacing: .14em; color: #B8B2E8; } .wv b { font-family: var(--font-d); font-weight: 400; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: .3rem; height: 100%; }
.chip { position: relative; display: flex; align-items: center; height: 100%; padding: 0 .35rem 0 .1rem; border-radius: .7rem; background: rgba(20, 14, 56, .78); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; }
.chip canvas { width: 2rem; height: 2rem; } .chip b { font-family: var(--font-d); font-weight: 400; font-size: .85rem; margin-left: -.1rem; }
.chip.fly { box-shadow: 0 0 0 1.5px rgba(150, 215, 255, .7) inset; } .chip.boss { box-shadow: 0 0 0 1.5px #FF5C7A inset; background: rgba(90, 20, 50, .8); }
.call { position: relative; min-width: 4.8rem; height: 100%; border: 0; border-radius: .85rem; padding: 0 .8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: linear-gradient(180deg, #FF7A5C, #D93A3A); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25) inset, 0 3px 0 #7a1a22; }
.call span { font-family: var(--font-d); font-size: 1.05rem; } .call em { font-style: normal; font-size: .72rem; font-weight: 800; color: #FFE9A0; min-height: .8em; }
.call:active { transform: translateY(2px); } .call.dis { opacity: .5; pointer-events: none; filter: grayscale(.6); }
.call.pulse { animation: callp 1.2s ease-in-out infinite; } @keyframes callp { 50% { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25) inset, 0 3px 0 #7a1a22, 0 0 1.3rem rgba(255, 110, 90, .9); } }
.wvpop { position: absolute; z-index: 35; left: 50%; top: calc(var(--top) + 2px); transform: translateX(-50%) translateY(-6px); display: none; gap: .6rem; padding: .7rem; border-radius: 1rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 18px 40px rgba(0, 0, 0, .5); max-width: 94vw; }
.wvpop.show { display: flex; animation: tgpop .2s ease; }
.wp h4 { margin: 0 0 .3rem; font: 400 .9rem var(--font-d); color: var(--acc); } .wr { display: flex; align-items: center; gap: .4rem; margin: .1rem 0; } .wr canvas { width: 2.2rem; height: 2.2rem; flex: none; } .wr b { display: block; font-size: .8rem; } .wr small { display: block; font-size: .7rem; color: #B8B2E8; font-weight: 600; max-width: 12rem; line-height: 1.15; }
@keyframes tgpop { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

/* ---------- build rail ---------- */
.rail { position: absolute; z-index: 28; right: calc(var(--sar) + 4px); top: var(--top); bottom: calc(var(--sab) + 4px); width: calc(var(--rw) - 6px); display: none; flex-direction: column; gap: 6px; }
body.playing .rail { display: flex; }
.tw { position: relative; flex: 1 1 0; min-height: 0; border: 0; padding: .1rem 0 .2rem; border-radius: .9rem; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: var(--pn); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 3px 0 rgba(0, 0, 0, .4); transition: transform .12s, box-shadow .15s; }
.tw:hover { transform: translateX(-2px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .3) inset, 0 3px 0 rgba(0, 0, 0, .4); }
.tw.on { box-shadow: 0 0 0 3px var(--acc) inset, 0 0 1.1rem rgba(255, 197, 61, .6); background: linear-gradient(180deg, #4A3A9A, #281F6A); transform: translateX(-3px); }
.tw.dim .twi { opacity: .45; filter: grayscale(.6); } .tw.dim b { color: #FF8A98; }
.tw .twi { width: auto; height: 68%; max-width: 100%; aspect-ratio: 1; flex: 0 1 auto; } .tw b { font-family: var(--font-d); font-weight: 400; font-size: .95rem; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.tw b::before { content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #E8A21A); margin-right: .25em; vertical-align: -.02em; }
.tw kbd { position: absolute; left: .25rem; top: .2rem; font: 800 .62rem var(--font-b); padding: .05rem .3rem; border-radius: .3rem; background: rgba(255, 255, 255, .85); color: var(--ink); box-shadow: none; }
body.is-touch .tw kbd, body.is-touch .tool kbd { display: none; }
.tt { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); width: 15rem; display: none; text-align: left; padding: .7rem .8rem; border-radius: .9rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .16) inset, 0 16px 36px rgba(0, 0, 0, .55); pointer-events: none; z-index: 60; }
.tt strong { display: block; font: 400 1rem var(--font-d); color: var(--acc); margin-bottom: .2rem; } .tt em { display: block; font-style: normal; font-size: .8rem; font-weight: 600; color: #DCD7FF; line-height: 1.3; margin-bottom: .3rem; } .tt u { display: block; text-decoration: none; font-size: .75rem; font-weight: 800; color: #B8B2E8; }
@media (hover: hover) and (pointer: fine) { .tw:hover .tt { display: block; } }

/* ---------- tower card + touch confirm ---------- */
.card { position: absolute; z-index: 32; left: 0; top: 0; width: 15rem; display: none; padding: .55rem .6rem .6rem; border-radius: 1rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .16) inset, 0 16px 40px rgba(0, 0, 0, .55); }
.card.show { display: block; animation: cardin .18s ease; } @keyframes cardin { from { opacity: 0; } }
.ch { display: flex; align-items: center; gap: .5rem; } .ch .cic { width: 2.8rem; height: 2.8rem; flex: none; } .ch b { display: block; font: 400 1rem var(--font-d); line-height: 1.05; } .ch > div { flex: 1; min-width: 0; }
.x { border: 0; width: 1.9rem; height: 1.9rem; padding: 0; border-radius: .6rem; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; } .x svg { width: 1rem; height: 1rem; }
.stl { display: inline-flex; gap: .15rem; } .st { width: 1.3rem; height: 1.3rem; color: rgba(255, 255, 255, .2); display: inline-block; } .st svg { width: 100%; height: 100%; } .st.on { color: var(--gold); filter: drop-shadow(0 0 .4rem rgba(255, 210, 63, .7)); }
.st.sm { width: .95rem; height: .95rem; } .stl.big .st { width: 3rem; height: 3rem; }
.cs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; margin: .45rem 0 .3rem; } .cs > div { background: rgba(255, 255, 255, .07); border-radius: .6rem; padding: .25rem .2rem; text-align: center; line-height: 1.05; }
.cs small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #B8B2E8; } .cs b { font-family: var(--font-d); font-weight: 400; font-size: 1.05rem; } .cs i { color: var(--gold); font-style: normal; }
.cn2 { font-size: .74rem; font-weight: 700; color: #DCD7FF; line-height: 1.25; margin-bottom: .4rem; } .cn2 i { color: var(--gold); font-style: normal; } .cn2.nx { margin: .4rem 0 0; color: #B8B2E8; }
.cb { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; } .cb .btn { font-size: .85rem; padding: .5em .6em; min-height: 2.6rem; } .cb .btn:last-child:nth-child(odd) { grid-column: 1 / -1; } .cb small { font-size: .65rem; opacity: .7; text-transform: none; }
.cfm { position: absolute; z-index: 32; left: 0; top: 0; display: none; align-items: center; gap: .4rem; padding: .35rem .4rem .35rem .8rem; border-radius: 1.1rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2) inset, 0 12px 30px rgba(0, 0, 0, .55); }
.cfm.show { display: flex; animation: cardin .15s ease; } .cn b { display: block; font: 400 .85rem var(--font-d); } .cn small { font-size: .72rem; font-weight: 800; color: var(--gold); }
.ck { width: 3rem; height: 3rem; border: 0; border-radius: .9rem; display: grid; place-items: center; color: #fff; padding: 0; } .ck svg { width: 1.5rem; height: 1.5rem; stroke-width: 3.2; }
.ck.ok { background: linear-gradient(180deg, #8EE04A, #4C9A1E); box-shadow: 0 3px 0 #2d5a10; } .ck.no { background: linear-gradient(180deg, #FF6A7A, #C23048); box-shadow: 0 3px 0 #6a1426; }

/* ---------- banner + hint ---------- */
.ban { position: absolute; z-index: 26; left: 50%; top: 22%; transform: translate(-50%, 0); text-align: center; pointer-events: none; opacity: 0; width: 90vw; }
.ban b { display: block; font: 400 clamp(1.8rem, 5vw, 3.6rem) var(--font-d); letter-spacing: .02em; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .45), 0 0 1.6rem var(--acc); }
.ban small { display: inline-block; margin-top: .4rem; padding: .25rem .9rem; border-radius: 999px; background: rgba(14, 10, 40, .7); font-size: .95rem; font-weight: 800; color: #E8E4FF; }
.ban.show { animation: banin 2.4s ease forwards; } .ban.boss b { color: #FF5C7A; text-shadow: 0 4px 0 rgba(0, 0, 0, .5), 0 0 2rem #FF2040; }
@keyframes banin { 0% { opacity: 0; transform: translate(-50%, -20px) scale(.85); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 20% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.hint { position: absolute; z-index: 27; left: 50%; bottom: calc(var(--sab) + var(--rh) + 10px); transform: translate(-50%, 10px); max-width: min(86vw, 40rem); padding: .55rem 1.1rem; border-radius: 999px; text-align: center; font-weight: 700; font-size: .92rem; line-height: 1.3; background: rgba(14, 10, 40, .9); box-shadow: 0 0 0 2px rgba(255, 197, 61, .6) inset, 0 8px 24px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.hint.show { opacity: 1; transform: translate(-50%, 0); } .hint b { color: var(--acc); } .hint.bad { box-shadow: 0 0 0 2px #FF5C7A inset, 0 8px 24px rgba(0, 0, 0, .5); }
body.portrait .hint { bottom: calc(var(--sab) + var(--rh) + 6px); }

/* ---------- overlays ---------- */
.ovl { position: absolute; inset: 0; z-index: 40; display: none; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1rem) calc(var(--sal) + 1rem); }
.ovl::-webkit-scrollbar { display: none; }
.ovl.show { display: grid; animation: ovin .25s ease; } @keyframes ovin { from { opacity: 0; } }
.ovl.center { place-items: center; background: rgba(12, 8, 36, .62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ovl.maps { background: rgba(12, 8, 36, .84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); align-content: start; }
.ovl.menuov { place-items: center start; background: linear-gradient(90deg, rgba(14, 10, 40, .92) 0%, rgba(14, 10, 40, .62) 38%, rgba(14, 10, 40, 0) 70%), linear-gradient(0deg, rgba(14, 10, 40, .5), transparent 35%); padding-left: calc(var(--sal) + clamp(1.2rem, 6vw, 7rem)); }
.menu { width: min(34rem, 100%); animation: arpop .5s var(--ease); } @keyframes arpop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.kick { display: inline-flex; align-items: center; gap: .6em; font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); } .kick::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.kick span { color: #CFC9F5; letter-spacing: .1em; padding: .15em .7em; border-radius: 99px; background: rgba(255, 255, 255, .09); }
.logo { margin: .1em 0 .1em; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .86; font-size: clamp(3rem, 8vw, 6.6rem); text-shadow: 0 6px 0 rgba(0, 0, 0, .4); position: relative; }
.logo span, .logo b { display: block; font-weight: 400; } .logo span { color: #fff; } .logo b { background: linear-gradient(100deg, #FFE27A 0%, #FFB020 40%, #FF7A3C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .4)); }
.logo i { position: absolute; left: calc(100% + .1em); top: -.05em; width: .95em; height: 1.1em; transform: translateX(-120%); } .logo i svg { width: 100%; height: 100%; stroke: none; fill: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.tag { margin: .5rem 0 1.1rem; font-size: 1.1rem; font-weight: 600; color: #DCD7FF; max-width: 28em; line-height: 1.45; }
.cta { display: flex; gap: .7rem; flex-wrap: wrap; } .sub2 { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.stats { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; } .stats > div { padding: .45rem .9rem; border-radius: .9rem; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1.05; }
.stats small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); } .stats b { font-family: var(--font-d); font-weight: 400; font-size: 1.4rem; } .stats em { font-style: normal; font-size: .8rem; opacity: .6; }
.orient { display: none; align-items: center; gap: .6rem; margin-top: .9rem; padding: .5rem .8rem; border-radius: .8rem; background: rgba(47, 214, 255, .12); box-shadow: 0 0 0 1.5px rgba(47, 214, 255, .35) inset; font-size: .8rem; font-weight: 700; color: #CDEFFF; } .orient.on { display: flex; } .orient svg { width: 1.4rem; height: 1.4rem; flex: none; stroke: var(--cyan); }
.scr { width: min(84rem, 100%); margin: 0 auto; } .scr-h { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; flex-wrap: wrap; } .scr-h h2 { margin: 0; font: 400 clamp(1.3rem, 2.6vw, 2.2rem) var(--font-d); text-transform: uppercase; flex: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.tot { display: flex; align-items: center; gap: .3rem; font-family: var(--font-d); font-size: 1.2rem; color: var(--gold); } .tot svg { width: 1.5rem; height: 1.5rem; fill: currentColor; stroke: none; } .tot b { font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.mapc { position: relative; border: 0; padding: 0; text-align: left; color: #fff; border-radius: 1.1rem; overflow: hidden; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 8px 0 rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s; display: block; }
.mapc:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c) inset, 0 11px 0 rgba(0, 0, 0, .35), 0 0 1.5rem var(--c); }
.mapc .th { position: relative; aspect-ratio: 320 / 150; background: #222; } .mapc canvas { width: 100%; height: 100%; display: block; } .mapc .no { position: absolute; left: .5rem; top: .4rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: var(--ink); font: 400 1rem var(--font-d); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.mapc .mi { padding: .45rem .7rem .6rem; } .mapc .mi b { display: block; font: 400 1rem var(--font-d); line-height: 1.1; } .mapc small { display: block; font-size: .72rem; font-weight: 700; color: #B8B2E8; margin-top: .15rem; } .mapc .stl { margin-top: .15rem; } .mapc .st { width: 1.1rem; height: 1.1rem; }
.mapc.lock .th canvas { filter: grayscale(.9) brightness(.45); } .mapc.lock { cursor: default; opacity: .9; } .mapc .lk { position: absolute; inset: 0; display: grid; place-items: center; } .mapc .lk svg { width: 2.4rem; height: 2.4rem; color: #fff; filter: drop-shadow(0 2px 4px #000); }
.mapc.fresh { animation: fresh 1.8s ease-in-out infinite; } @keyframes fresh { 50% { box-shadow: 0 0 0 2px var(--c) inset, 0 8px 0 rgba(0, 0, 0, .35), 0 0 1.6rem var(--c); } }
.sheet { width: min(62rem, 100%); display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; padding: 1rem; border-radius: 1.6rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 30px 80px rgba(0, 0, 0, .6); animation: arpop .35s var(--ease); }
.sh-l canvas { width: 100%; border-radius: 1rem; box-shadow: 0 0 0 3px var(--c), 0 10px 30px rgba(0, 0, 0, .5); display: block; }
.kick2 { font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--c); } .sh-r h2 { margin: .1em 0 .2em; font: 400 clamp(1.5rem, 3vw, 2.4rem) var(--font-d); text-transform: uppercase; line-height: 1; } .sh-r p { margin: 0 0 .7rem; font-weight: 600; color: #DCD7FF; }
.facts { display: flex; gap: .4rem; flex-wrap: wrap; } .facts > div { padding: .35rem .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .07); line-height: 1.05; } .facts small, .tps small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); } .facts b { font: 400 1.15rem var(--font-d); }
.fls { display: inline-flex; gap: .2rem; margin-top: .2rem; } .fl { width: .7rem; height: 1.1rem; border-radius: .3rem .3rem .5rem .5rem; background: rgba(255, 255, 255, .15); } .fl.on { background: linear-gradient(180deg, #FFD23F, #FF5B2E); }
.sh-st { display: flex; align-items: center; gap: .8rem; margin: .7rem 0 .4rem; } .sh-st .stl.big .st { width: 2.2rem; height: 2.2rem; } .sh-st small { font-weight: 800; color: #B8B2E8; }
.tps { margin-bottom: .8rem; } .tps > div { display: flex; flex-wrap: wrap; gap: .2rem; } .tp canvas { width: 2.4rem; height: 2.4rem; display: block; background: rgba(255, 255, 255, .06); border-radius: .6rem; }
.acts { display: grid; gap: .6rem; } .acts.row { display: flex; flex-wrap: wrap; gap: .6rem; } .acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cardw { width: min(30rem, 100%); text-align: center; padding: 1.6rem 1.6rem 1.4rem; border-radius: 1.8rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 30px 80px rgba(0, 0, 0, .6); animation: arpop .35s var(--ease); max-height: 100%; overflow: auto; scrollbar-width: none; }
.cardw.wide { width: min(36rem, 100%); text-align: left; } .cardw h2 { margin: 0 0 .3rem; font: 400 clamp(1.8rem, 4vw, 2.8rem) var(--font-d); text-transform: uppercase; text-shadow: 0 4px 0 rgba(0, 0, 0, .4); line-height: 1; } .cardw.wide h2 { text-align: center; margin-bottom: 1rem; }
.sub { margin: 0 0 .8rem; color: #CFC9F5; font-weight: 600; } .sub.tip { font-size: .85rem; margin: .8rem 0; color: #B8B2E8; }
.big { font: 400 clamp(3.5rem, 8vw, 5.5rem) var(--font-d); color: var(--acc); line-height: 1; text-shadow: 0 5px 0 rgba(0, 0, 0, .4); } .biglab { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.rec { display: inline-block; margin: .6rem 0 0; padding: .3em 1em; border-radius: 999px; background: var(--sun); color: var(--ink); font: 400 .9rem var(--font-d); transform: rotate(-3deg); box-shadow: 0 3px 0 #B68A00; }
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; margin: 1rem 0; } .stats4 > div { padding: .5rem .3rem; border-radius: .9rem; background: rgba(255, 255, 255, .06); line-height: 1.1; } .stats4 small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-bottom: .2rem; } .stats4 b { font: 400 1.25rem var(--font-d); }
.res.win .stl.big { margin: .4rem 0 .2rem; } .stl.pop .st { transform: scale(.5); opacity: .4; transition: transform .35s cubic-bezier(.3, 1.8, .5, 1), opacity .2s; } .stl.pop .st.hit { transform: scale(1.1); opacity: 1; }
.res.win h2 { color: var(--acc); } .res.lose h2 { color: #FF8A98; } .cardw.fin { width: min(34rem, 100%); } .crown { width: 3.6rem; margin: 0 auto .4rem; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); } .crown svg { stroke: none; fill: none; }
.ovl.fin { background: rgba(12, 8, 36, .35); backdrop-filter: none; }
.tabs { display: flex; gap: .3rem; } .tab { border: 0; padding: .5rem 1rem; border-radius: .8rem; background: rgba(255, 255, 255, .08); color: #DCD7FF; font: 400 .85rem var(--font-d); text-transform: uppercase; } .tab.on { background: var(--acc); color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; } .step { display: flex; gap: .7rem; padding: .8rem; border-radius: 1rem; background: rgba(255, 255, 255, .06); } .step i { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font: 400 1.1rem var(--font-d); font-style: normal; background: var(--acc); color: var(--ink); } .step b { font: 400 1rem var(--font-d); } .step p { margin: .2rem 0 0; font-size: .85rem; font-weight: 600; color: #DCD7FF; line-height: 1.4; }
.enc { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; } .enc.en { grid-template-columns: repeat(4, 1fr); } .ec { padding: .7rem; border-radius: 1rem; background: rgba(255, 255, 255, .06); } .ec .eh { display: flex; gap: .2rem; margin-bottom: .3rem; } .ec .eh canvas { width: 3.4rem; height: 3.4rem; } .enc.en .eh canvas { width: 4rem; height: 4rem; } .ec b { font: 400 1rem var(--font-d); display: block; } .ec p { margin: .2rem 0 .3rem; font-size: .8rem; font-weight: 600; color: #DCD7FF; line-height: 1.3; } .es { font-size: .7rem; font-weight: 800; color: #B8B2E8; }
.et > div { display: flex; gap: .4rem; align-items: center; margin-top: .25rem; font-size: .78rem; font-weight: 800; } .et u { text-decoration: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: .7rem; flex: none; } .et span { flex: 1; line-height: 1.15; } .et small { display: block; font-size: .68rem; font-weight: 600; color: #B8B2E8; } .et em { font-style: normal; font-family: var(--font-d); color: var(--gold); font-size: .8rem; }
.rows { display: grid; gap: .7rem; } .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 800; }
.sw { border: 0; padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font: 800 .85rem var(--font-b); min-width: 5rem; } .sw.on { background: linear-gradient(180deg, #8EE04A, #4C9A1E); color: #10220a; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 55%; height: 1.6rem; background: transparent; touch-action: pan-x; } input[type=range]::-webkit-slider-runnable-track { height: .55rem; border-radius: 99px; background: linear-gradient(90deg, var(--acc) var(--v, 100%), rgba(255, 255, 255, .15) var(--v, 100%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.4rem; height: 1.4rem; margin-top: -.43rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); } input[type=range]::-moz-range-track { height: .55rem; border-radius: 99px; background: rgba(255, 255, 255, .15); } input[type=range]::-moz-range-progress { height: .55rem; border-radius: 99px; background: var(--acc); } input[type=range]::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border: 0; border-radius: 50%; background: #fff; }
.ic { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); gap: .5rem; } .steps { grid-template-columns: 1fr 1fr; } .enc, .enc.en { grid-template-columns: repeat(3, 1fr); } }
body.short { }
body.short .home { display: none !important; }
body.short .logo { font-size: clamp(2.2rem, 11vh, 4rem); } body.short .tag { font-size: .9rem; margin: .3rem 0 .6rem; } body.short .stats { margin-top: .6rem; } body.short .stats > div { padding: .25rem .6rem; } body.short .stats b { font-size: 1.1rem; }
body.short .btn--big { font-size: 1.1rem; padding: .6em 1.3em; } body.short .sub2 { margin-top: .5rem; } body.short .kick { font-size: .7rem; }
body.short .ovl { padding-top: calc(var(--sat) + .5rem); padding-bottom: calc(var(--sab) + .5rem); }
body.short .bl, body.short .br { gap: .35rem; } body.short .tool { width: 2.5rem; height: 2.5rem; } body.short .pill { height: 2.3rem; padding: 0 .6rem 0 .4rem; } body.short .pill b { font-size: 1.1rem; }
body.short .wv { min-width: 4rem; padding: 0 .5rem; } body.short .call { min-width: 4rem; padding: 0 .5rem; } body.short .chip canvas { width: 1.7rem; height: 1.7rem; }
body.short .scr-h { margin-bottom: .4rem; } body.short .scr-h .btn { min-height: 0; padding: .45em .9em; } body.short .grid { gap: .45rem; } body.short .mapc .mi { padding: .3rem .5rem .4rem; } body.short .mapc .mi b { font-size: .8rem; } body.short .mapc small { font-size: .62rem; } body.short .mapc .st { width: .9rem; height: .9rem; }
body.short .sheet { padding: .6rem; gap: .8rem; } body.short .sh-r p { display: none; } body.short .tps { display: none; } body.short .sh-st { margin: .3rem 0; } body.short .facts > div { padding: .2rem .5rem; }
body.short .cardw { padding: .9rem 1.2rem; } body.short .cardw h2 { font-size: 1.6rem; } body.short .stats4 { margin: .5rem 0; } body.short .stl.big .st { width: 2.3rem; height: 2.3rem; } body.short .big { font-size: 3rem; }
body.short .card { width: 13.4rem; padding: .4rem .5rem .5rem; } body.short .ch .cic { width: 2.2rem; height: 2.2rem; } body.short .cn2.nx { display: none; } body.short .cb .btn { min-height: 2.5rem; font-size: .8rem; }
body.short .tw kbd { display: none; } body.short .tw b { font-size: .8rem; }
body.short .ban { top: 16%; } body.short .hint { font-size: .8rem; padding: .35rem .8rem; bottom: calc(var(--sab) + 6px); }
body.short .step p { font-size: .75rem; } body.short .step { padding: .5rem; } body.short .ec p { font-size: .72rem; }
body.short .enc { grid-template-columns: repeat(3, 1fr); } body.short .enc.en { grid-template-columns: repeat(4, 1fr); }
body.narrow:not(.short) .bc { transform: translateX(-50%) scale(.9); }
body.portrait .rail { top: auto; left: calc(var(--sal) + 4px); right: calc(var(--sar) + 4px); bottom: calc(var(--sab) + 4px); width: auto; height: calc(var(--rh) - 8px); flex-direction: row; }
body.portrait .tt { display: none !important; } body.portrait .grid { grid-template-columns: repeat(2, 1fr); } body.portrait .sheet { grid-template-columns: 1fr; } body.portrait .steps { grid-template-columns: 1fr; } body.portrait .enc, body.portrait .enc.en { grid-template-columns: 1fr 1fr; } body.portrait .ovl.menuov { padding-left: calc(var(--sal) + 1rem); background: rgba(14, 10, 40, .78); } body.portrait .chips { display: none; }
@media (max-width: 760px) and (min-height: 521px) { .chips { display: none; } }
body:not(.playing) .home { display: inline-flex; position: fixed; left: calc(var(--sal) + 10px); top: calc(var(--sat) + 10px); z-index: 50; }
body.ov-on:not(.playing) .home { display: inline-flex; }
body.short:not(.playing) .home { display: inline-flex !important; padding: 4px 10px 4px 4px; } body.short:not(.playing) .home b { display: none; }
body.short:not(.playing) .ovl.maps, body.short:not(.playing) .ovl.center { padding-top: calc(var(--sat) + 3.3rem); }
body.short:not(.playing) .ovl.menuov { padding-top: calc(var(--sat) + .3rem); }
@media (prefers-reduced-motion: reduce) { .ban.show { animation-duration: .01s; } .tool.ab:not(.cd), .call.pulse, .mapc.fresh { animation: none; } .menu, .cardw, .sheet { animation: none; } }
