@font-face { font-family: 'Orbitron'; font-weight: 500; font-display: swap; src: url(../fonts/orbitron-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 700; font-display: swap; src: url(../fonts/orbitron-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 900; font-display: swap; src: url(../fonts/orbitron-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 500; font-display: swap; src: url(../fonts/rajdhani-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 600; font-display: swap; src: url(../fonts/rajdhani-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 700; font-display: swap; src: url(../fonts/rajdhani-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #060914; --panel: rgba(14, 20, 44, .86); --panel2: rgba(22, 30, 64, .9); --line: #26346e;
  --text: #e6ecff; --dim: #8a96c8; --accent: #3dd8ff; --accent2: #ff5ce1; --good: #3dff8b; --warn: #ffc23d; --bad: #ff3d5a;
  --display: 'Orbitron', system-ui, sans-serif; --body: 'Rajdhani', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --r: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
.ico { display: inline-block; vertical-align: middle; flex: none; }

#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
#popups, #cascade, #flash { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#flash { background: #fff; opacity: 0; z-index: 6; mix-blend-mode: screen; }

/* ---------------- boot */
#boot { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(ellipse at 50% 40%, #121a44 0%, #060914 70%); transition: opacity .5s; }
#boot.hide { opacity: 0; pointer-events: none; }
.boot-logo, .logo { font-family: var(--display); font-weight: 900; letter-spacing: .06em; font-size: clamp(34px, 9vw, 72px); line-height: 1; text-align: center; }
.boot-logo .n, .logo .n { color: var(--accent); text-shadow: 0 0 12px #3dd8ffaa, 0 0 34px #3dd8ff66; }
.boot-logo .b, .logo .b { color: var(--accent2); text-shadow: 0 0 12px #ff5ce1aa, 0 0 34px #ff5ce166; margin-left: .25em; }
.boot-bar { width: min(280px, 70vw); height: 4px; background: #1b2550; border-radius: 4px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 12px var(--accent); transition: width .3s; }
.boot-msg { font-family: var(--display); font-size: 11px; letter-spacing: .3em; color: var(--dim); }

/* ---------------- generic */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: calc(14px + var(--safe-t)) 16px calc(16px + var(--safe-b)); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; animation: fadeIn .28s ease-out; }
.screen.dim { background: radial-gradient(ellipse at 50% 30%, rgba(18, 26, 68, .72), rgba(6, 9, 20, .92)); backdrop-filter: blur(3px); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
.wrap { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.wrap.wide { max-width: 900px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 1px #0004, 0 10px 40px #0008, inset 0 1px 0 #ffffff0d; padding: 16px; position: relative; }
.panel.glow { border-color: #3dd8ff88; box-shadow: 0 0 22px #3dd8ff33, 0 10px 40px #0008; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: .08em; }
h2 { font-size: 18px; }
h3 { font-size: 13px; color: var(--dim); letter-spacing: .2em; font-weight: 500; }
.title-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.title-row h2 { flex: 1; text-align: center; }
.muted { color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.center { text-align: center; }

.btn { font-family: var(--display); font-weight: 700; letter-spacing: .12em; font-size: 15px; min-height: 52px; padding: 0 22px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #1b2a66, #121c48); border: 1px solid #3a52b0; color: var(--text); box-shadow: inset 0 1px 0 #ffffff1a, 0 4px 0 #0a1030, 0 8px 18px #0007; transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #ffffff1a, 0 1px 0 #0a1030; }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: linear-gradient(180deg, #2de2ff, #1aa6d6); color: #041024; border-color: #9ff0ff; box-shadow: inset 0 1px 0 #ffffff88, 0 4px 0 #0d5f80, 0 0 26px #3dd8ff66; }
.btn.hot { background: linear-gradient(180deg, #ff6ae6, #d53bbd); color: #20031b; border-color: #ffb5f3; box-shadow: inset 0 1px 0 #ffffff88, 0 4px 0 #7d1a6c, 0 0 26px #ff5ce166; }
.btn.good { background: linear-gradient(180deg, #5dffa0, #23c46a); color: #03200f; border-color: #b5ffd3; box-shadow: inset 0 1px 0 #ffffff88, 0 4px 0 #0f6b37, 0 0 22px #3dff8b55; }
.btn.small { min-height: 40px; font-size: 12px; padding: 0 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; filter: grayscale(.6); pointer-events: none; }
.iconbtn { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); border: 1px solid var(--line); color: var(--text); flex: none; }
.iconbtn:active { transform: scale(.94); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.chip.credits { color: var(--accent); }
.chip.stars { color: var(--warn); }

/* ---------------- title */
.title-screen { justify-content: center; gap: 28px; text-align: center; }
.title-screen .tag { font-family: var(--display); letter-spacing: .4em; font-size: 12px; color: var(--dim); }
.tap { font-family: var(--display); letter-spacing: .3em; font-size: 14px; color: var(--accent); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.logo { animation: glitch 4s infinite steps(1); }
@keyframes glitch { 0%, 92%, 100% { transform: none; } 93% { transform: translate(-3px, 1px) skewX(-6deg); } 95% { transform: translate(3px, -1px); filter: hue-rotate(40deg); } 97% { transform: translate(-1px, 0); } }

/* ---------------- slots */
.slot { display: flex; align-items: center; gap: 14px; min-height: 92px; cursor: pointer; transition: border-color .15s, transform .1s; }
.slot:active { transform: scale(.985); }
.slot:hover { border-color: #3dd8ff88; }
.slot .num { font-family: var(--display); font-weight: 900; font-size: 30px; color: #2b3f8f; width: 34px; text-align: center; }
.slot .info { flex: 1; min-width: 0; }
.slot .name { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .06em; }
.slot .meta { color: var(--dim); font-size: 15px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.slot .acts { display: flex; gap: 6px; }
.slot.empty .name { color: var(--accent); }

/* ---------------- hub */
.hub-top { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 900px; }
.hub-top .name { font-family: var(--display); font-size: 12px; letter-spacing: .14em; color: var(--dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 900px; }
.tile { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); padding: 16px; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-align: left; transition: transform .1s, border-color .2s; }
.tile:active { transform: scale(.97); }
.tile:hover { border-color: var(--c, var(--accent)); }
.tile .big { position: absolute; right: -8px; top: -8px; opacity: .16; color: var(--c, var(--accent)); }
.tile .t { font-family: var(--display); font-weight: 900; font-size: 18px; letter-spacing: .08em; color: var(--c, var(--accent)); text-shadow: 0 0 14px color-mix(in srgb, var(--c, var(--accent)) 50%, transparent); }
.tile .s { color: var(--dim); font-size: 15px; font-weight: 600; }
.tile.hero { grid-column: 1 / -1; min-height: 170px; background: linear-gradient(135deg, #10204f 0%, #1a0f3f 100%); border-color: #3dd8ff66; box-shadow: 0 0 30px #3dd8ff22; }
.tile.hero .t { font-size: 26px; }
.tile .badge { position: absolute; top: 12px; left: 12px; font-family: var(--display); font-size: 10px; letter-spacing: .16em; padding: 4px 8px; border-radius: 6px; background: var(--c, var(--accent)); color: #050a18; font-weight: 700; }
@media (min-width: 760px) { .hub-grid { grid-template-columns: repeat(4, 1fr); } .tile.hero { grid-column: span 2; grid-row: span 2; min-height: 268px; } }

/* ---------------- campaign */
.sector-tabs { display: flex; gap: 8px; overflow-x: auto; width: 100%; padding: 2px 2px 8px; scrollbar-width: none; touch-action: pan-x; }
.sector-tabs::-webkit-scrollbar { display: none; }
.stab { flex: none; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-family: var(--display); font-size: 11px; letter-spacing: .12em; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 120px; }
.stab.on { border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 40%, transparent); color: var(--c); }
.stab.locked { opacity: .5; }
.stab small { font-family: var(--body); font-size: 13px; color: var(--dim); letter-spacing: 0; }
.sector-head { text-align: center; }
.sector-head .sn { font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: .1em; color: var(--c); text-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); }
.nodes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; padding: 10px 4px 20px; }
.node { aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; background: radial-gradient(circle at 50% 35%, #1d2a63, #0d1435); border: 2px solid var(--line); font-family: var(--display); font-weight: 900; font-size: 20px; transition: transform .1s; max-width: 92px; width: 100%; justify-self: center; }
.node:active { transform: scale(.94); }
.node.done { border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent); }
.node.next { border-color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 40%, transparent), 0 0 28px var(--c); animation: breathe 1.6s infinite; }
.node.locked { opacity: .35; pointer-events: none; }
.node.ice::after { content: 'ICE'; position: absolute; top: -8px; font-size: 9px; letter-spacing: .14em; background: #9b7bff; color: #0a0620; padding: 2px 6px; border-radius: 6px; }
.node .st { display: flex; gap: 1px; color: #3a4680; }
.node .st .on { color: var(--warn); filter: drop-shadow(0 0 4px #ffc23d); }
@keyframes breathe { 50% { transform: scale(1.06); } }
.lock-msg { text-align: center; padding: 40px 10px; color: var(--dim); font-size: 18px; }

/* ---------------- briefing / modal */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 6, 16, .72); backdrop-filter: blur(4px); animation: fadeIn .2s; z-index: 20; }
.modal .panel { width: 100%; max-width: 440px; max-height: calc(100% - 20px); overflow-y: auto; animation: pop .32s ease-out; touch-action: pan-y; }
.modal h2 { text-align: center; margin-bottom: 4px; }
.objs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.obj-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 14px; min-width: 88px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-size: 18px; }
.obj-card small { font-size: 12px; color: var(--dim); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.loadout-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mini { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.cond { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid; font-weight: 700; margin-top: 6px; }
.cond.good { border-color: #3dff8b66; color: var(--good); background: #3dff8b11; }
.cond.bad { border-color: #ff3d5a66; color: #ff8a9c; background: #ff3d5a11; }
.cond small { color: var(--dim); font-weight: 600; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* ---------------- HUD */
#ui > .hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + var(--safe-t)) 10px 0; display: flex; gap: 8px; align-items: stretch; justify-content: center; }
.hud-top .inner { display: flex; gap: 8px; width: 100%; max-width: 620px; align-items: stretch; }
.moves-box { width: 76px; flex: none; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.moves-box b { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; color: var(--accent); text-shadow: 0 0 12px #3dd8ff88; transition: color .2s; }
.moves-box small { font-family: var(--display); font-size: 9px; letter-spacing: .2em; color: var(--dim); margin-top: 3px; }
.moves-box.low b { color: var(--bad); text-shadow: 0 0 12px #ff3d5a; animation: blink .8s infinite; }
.moves-box.bump { animation: pop .3s; }
.obj-box { flex: 1; min-width: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); padding: 8px 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.obj-list { display: flex; gap: 6px; justify-content: space-around; }
.obj { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; position: relative; }
.obj.done { color: var(--good); }
.obj.done .ico-check { filter: drop-shadow(0 0 6px #3dff8b); }
.obj.bump { animation: pop .3s; }
.score-row { display: flex; align-items: center; gap: 8px; }
.score-val { font-family: var(--display); font-weight: 700; font-size: 13px; min-width: 74px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 8px; border-radius: 8px; background: #0a1030; position: relative; overflow: visible; border: 1px solid #1f2b5c; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 10px var(--accent); width: 0; transition: width .35s; }
.bar .mk { position: absolute; top: 50%; transform: translate(-50%, -50%); color: #3a4680; line-height: 0; }
.bar .mk.on { color: var(--warn); filter: drop-shadow(0 0 5px #ffc23d); }
.hud-btn { width: 46px; flex: none; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--dim); }

.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 10px calc(10px + var(--safe-b)); display: flex; justify-content: center; }
.hud-bottom .inner { display: flex; gap: 10px; width: 100%; max-width: 520px; justify-content: center; }
.ex-btn { flex: 1; max-width: 160px; height: 84px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; color: var(--c); transition: transform .1s, box-shadow .2s, border-color .2s; }
.ex-btn .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--c) 45%, transparent), color-mix(in srgb, var(--c) 12%, transparent)); transition: height .3s; }
.ex-btn .nm { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .14em; position: relative; color: var(--text); }
.ex-btn .ic { position: relative; display: flex; align-items: center; gap: 4px; }
.ex-btn .pct { position: absolute; top: 6px; right: 8px; font-size: 12px; font-weight: 700; color: var(--dim); }
.ex-btn.ready { border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); animation: readyPulse 1.2s infinite; }
.ex-btn.ready .pct { color: var(--c); }
.ex-btn.arming { background: color-mix(in srgb, var(--c) 30%, #0b1030); border-color: #fff; animation: none; }
.ex-btn:active { transform: scale(.95); }
@keyframes readyPulse { 50% { box-shadow: 0 0 34px color-mix(in srgb, var(--c) 80%, transparent), inset 0 0 26px color-mix(in srgb, var(--c) 45%, transparent); } }
.ex-btn .shard-dot { position: absolute; top: 6px; left: 6px; }
.target-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(104px + var(--safe-b)); font-family: var(--display); font-size: 12px; letter-spacing: .2em; padding: 8px 14px; border-radius: 10px; background: #000a; border: 1px solid var(--accent); color: var(--accent); pointer-events: none; animation: blink 1s infinite; white-space: nowrap; }

/* ---------------- popups */
.popup { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 900; font-size: 18px; color: #fff; text-shadow: 0 0 8px currentColor, 0 2px 0 #000; animation: floatUp 1s ease-out forwards; white-space: nowrap; }
.popup.big { font-size: 26px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
#cascade { display: flex; align-items: center; justify-content: center; }
#cascade > * { display: none; }
#cascade.show > * { display: block; }
#cascade b { font-family: var(--display); font-weight: 900; font-size: clamp(44px, 12vw, 84px); color: #fff; text-shadow: 0 0 18px var(--accent2), 0 0 44px var(--accent2); }
#cascade span { font-family: var(--display); font-weight: 700; letter-spacing: .3em; font-size: clamp(14px, 3.5vw, 22px); color: var(--accent); text-shadow: 0 0 12px var(--accent); text-align: center; }
#cascade.show { flex-direction: column; animation: cascadeIn .9s ease-out forwards; }
@keyframes cascadeIn { 0% { opacity: 0; transform: scale(1.6); } 15% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(.92) translateY(-20px); } }
#toast { position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translate(-50%, -150%); z-index: 60; padding: 12px 18px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--accent); font-weight: 700; font-size: 16px; transition: transform .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
#toast.show { transform: translate(-50%, 0); }

/* ---------------- results */
.result h1 { font-size: clamp(28px, 8vw, 40px); text-align: center; letter-spacing: .1em; }
.result.win h1 { color: var(--good); text-shadow: 0 0 20px #3dff8b99; }
.result.lose h1 { color: var(--bad); text-shadow: 0 0 20px #ff3d5a99; }
.stars-big { display: flex; justify-content: center; gap: 10px; margin: 14px 0 6px; }
.stars-big .s { color: #26346e; transform: scale(.4); opacity: .3; transition: none; }
.stars-big .s.on { color: var(--warn); filter: drop-shadow(0 0 12px #ffc23d); animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.stars-big .s:nth-child(2) { transform: translateY(-14px) scale(.4); }
@keyframes starIn { 0% { transform: scale(2.4) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.stars-big .s:nth-child(2).on { animation-name: starIn2; }
@keyframes starIn2 { 0% { transform: translateY(-14px) scale(2.4) rotate(-40deg); opacity: 0; } 100% { transform: translateY(-14px) scale(1); opacity: 1; } }
.res-score { text-align: center; font-family: var(--display); font-weight: 900; font-size: 34px; letter-spacing: .04em; }
.res-lines { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.res-lines .ln { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--panel2); font-weight: 700; font-size: 16px; }
.res-lines .ln b { color: var(--accent); }

/* ---------------- shop / rig */
.tabs { display: flex; gap: 6px; background: var(--panel); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { flex: 1; min-height: 42px; border-radius: 9px; font-family: var(--display); font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.tabs button.on { background: #1d2b66; color: var(--text); box-shadow: inset 0 0 0 1px #3a52b0; }
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); position: relative; }
.card .ic { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c, #3dd8ff) 14%, #0a1030); border: 1px solid color-mix(in srgb, var(--c, #3dd8ff) 50%, transparent); color: var(--c, var(--accent)); flex: none; }
.card .body { flex: 1; min-width: 0; }
.card .nm { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.card .ds { color: var(--dim); font-size: 15px; line-height: 1.2; margin-top: 2px; }
.card .lv { display: flex; gap: 3px; margin-top: 6px; }
.card .lv i { width: 16px; height: 5px; border-radius: 3px; background: #26346e; }
.card .lv i.on { background: var(--c, var(--accent)); box-shadow: 0 0 6px var(--c, var(--accent)); }
.card.equipped { border-color: var(--good); box-shadow: 0 0 14px #3dff8b33; }
.card .rar { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.card .act { flex: none; }
.slots-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.slotbox { width: 70px; height: 70px; border-radius: 14px; border: 1px dashed #3a52b0; display: flex; align-items: center; justify-content: center; color: var(--c, var(--dim)); background: var(--panel); position: relative; }
.slotbox.filled { border-style: solid; border-color: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); }
.slotbox small { position: absolute; bottom: -18px; font-size: 11px; font-weight: 700; color: var(--dim); white-space: nowrap; }

/* ---------------- dive */
.dive-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dchoice { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: left; display: flex; flex-direction: column; gap: 8px; transition: transform .1s, border-color .2s; }
.dchoice:hover { border-color: var(--accent); }
.dchoice.elite { border-color: #ffc23d77; background: linear-gradient(180deg, #2a1d0a, #140f05); }
.dchoice .t { font-family: var(--display); font-weight: 900; letter-spacing: .1em; font-size: 15px; }
.dchoice.elite .t { color: var(--warn); }
.integrity { display: flex; gap: 4px; color: var(--accent2); }
.integrity .off { color: #2b3466; }
.draft { display: grid; grid-template-columns: 1fr; gap: 10px; }
.draft .card { cursor: pointer; animation: pop .4s ease-out backwards; }
.draft .card:nth-child(2) { animation-delay: .08s; } .draft .card:nth-child(3) { animation-delay: .16s; }
.draft .card:hover { border-color: var(--c); }

/* ---------------- settings */
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #1a2450; font-weight: 700; font-size: 16px; }
.setting:last-child { border: 0; }
.setting label { flex: 1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 140px; height: 6px; border-radius: 6px; background: #1b2550; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 0; box-shadow: 0 0 10px var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--dim); }
.seg button.on { background: #1d2b66; color: var(--text); }

/* ---------------- tutorial */
.tut .panel { border-color: var(--accent); box-shadow: 0 0 30px #3dd8ff44; }
.tut ul { margin: 12px 0 4px; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 18px; font-weight: 600; }
.tut li { display: flex; gap: 10px; align-items: flex-start; }
.tut li::before { content: '›'; color: var(--accent); font-weight: 900; font-family: var(--display); }

@media (max-height: 640px) { .moves-box b { font-size: 24px; } .ex-btn { height: 70px; } }
@media (prefers-reduced-motion: reduce) { .logo, .tap, .node.next, .ex-btn.ready { animation: none !important; } }

.btn.good .ico-credits circle, .btn.good .ico-credits path { stroke: #03200f; }
.btn.good .ico-credits circle { fill: #03200f22; }
