@font-face {
  font-family: "Chakra Petch";
  src: url("../assets/fonts/ChakraPetch-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../assets/fonts/ChakraPetch-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../assets/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #070a09;
  --bg-deep: #040706;
  --panel: rgba(12, 19, 17, 0.88);
  --panel-strong: rgba(15, 23, 20, 0.96);
  --paper: #ede6d3;
  --paper-dim: #cbbfa7;
  --muted: #97a399;
  --muted-2: #78877b;
  --line: rgba(226, 223, 201, 0.13);
  --line-strong: rgba(226, 223, 201, 0.25);
  --amber: #ffb52d;
  --amber-hot: #ff6f1d;
  --cyan: #5ff0ce;
  --cyan-dim: #2c9f8b;
  --red: #ff4f58;
  --green: #a9e56e;
  --blue: #75b9ff;
  --violet: #b896ff;
  --font-ui: "Chakra Petch", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Silkscreen", "Chakra Petch", monospace;
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --cut: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  --cut-lg: polygon(0 20px, 20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-deep); color: var(--paper); }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}
::selection { background: var(--amber); color: #0a0b08; }

.hidden { display: none !important; }
.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.app {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  background:
    radial-gradient(circle at 76% 38%, rgba(32, 86, 70, 0.2), transparent 42%),
    radial-gradient(circle at 10% 85%, rgba(255, 111, 29, 0.09), transparent 35%),
    linear-gradient(135deg, #080c0b 0%, #050807 50%, #0a0f0d 100%);
}

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.ambient__glow--one { width: 48vw; height: 48vw; right: -15vw; top: -18vw; background: rgba(47, 128, 105, 0.18); }
.ambient__glow--two { width: 36vw; height: 36vw; left: -18vw; bottom: -15vw; background: rgba(255, 111, 29, 0.12); }
.ambient__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(213, 236, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(213, 236, 220, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 78%);
  opacity: 0.7;
}
.ambient__noise {
  position: absolute; inset: -20%;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(2) infinite;
}
.ambient__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,.62) 100%); }
@keyframes grain {
  0% { transform: translate(0,0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -2%); }
  100% { transform: translate(3%, 1%); }
}

/* ---------- shared bits ---------- */
.kbd, kbd {
  font-family: var(--font-ui);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 23px; height: 21px; padding: 0 5px;
  border: 1px solid var(--line-strong);
  background: rgba(237, 230, 211, 0.05);
  color: var(--paper);
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.35);
}
.pad-state { font-family: var(--font-display); font-size: 9px; letter-spacing: .12em; color: var(--muted-2); border-left: 1px solid var(--line); padding-left: 12px; }
.pad-state.is-on { color: var(--cyan); text-shadow: 0 0 10px rgba(95,240,206,.35); }
.status-led {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: .12em; color: var(--muted);
}
.status-led i, .live-dot i, .blink-dot {
  width: 6px; height: 6px; background: var(--cyan); display: inline-block;
  box-shadow: 0 0 10px var(--cyan); animation: ledPulse 2s infinite;
}
@keyframes ledPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- hangar top ---------- */
.menu-screen {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 22px clamp(24px, 3.2vw, 56px) 0;
  position: relative;
}
.hangar-top {
  display: flex; justify-content: space-between; align-items: center;
  height: 50px; flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.brand-lockup { display: flex; gap: 13px; align-items: center; }
.brand-mark {
  width: 34px; height: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 4px; border: 1px solid rgba(255,181,45,.55); transform: rotate(45deg);
  background: rgba(255,181,45,.06); box-shadow: 0 0 22px rgba(255,181,45,.12);
}
.brand-mark span { background: var(--amber); display: block; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: rgba(255,181,45,.24); }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .11em; line-height: 1; }
.brand-name span { color: var(--amber); margin-left: 3px; }
.brand-sub { font-size: 9px; letter-spacing: .24em; color: var(--muted); margin-top: 6px; }
.hangar-top__right { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 38px; height: 34px; border: 1px solid var(--line);
  background: rgba(237,230,211,.025); display: inline-grid; place-items: center;
  padding: 0; transition: border-color .2s, background .2s, color .2s;
}
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }
.icon-btn:hover { border-color: var(--amber); color: var(--amber); background: rgba(255,181,45,.08); }
.icon-btn--ghost { border-color: transparent; }
.icon-btn.is-muted { color: var(--muted-2); }

/* ---------- hero layout ---------- */
.hangar-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, .84fr);
  gap: clamp(28px, 4.5vw, 80px);
  align-items: center;
  padding: clamp(18px, 3.2vh, 44px) 0 clamp(18px, 2.6vh, 36px);
  max-width: 1540px; width: 100%; margin: 0 auto;
  min-height: 0;
}
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 9px; letter-spacing: .2em; color: var(--amber);
  margin-bottom: clamp(12px, 2vh, 22px);
}
.eyebrow__line { width: 34px; height: 1px; background: var(--amber); box-shadow: 0 0 12px rgba(255,181,45,.5); }
.game-title {
  position: relative;
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(64px, 8.5vw, 138px);
  line-height: .76; letter-spacing: -.09em;
  width: max-content; max-width: 100%;
  text-transform: uppercase;
}
.game-title__brick, .game-title__fire { display: block; position: relative; }
.game-title__brick {
  color: transparent;
  -webkit-text-stroke: clamp(1px, .16vw, 3px) var(--paper);
  text-shadow: 0 0 30px rgba(237,230,211,.07);
}
.game-title__brick::before, .game-title__brick::after {
  content: attr(data-glitch);
}
.game-title__fire {
  color: var(--amber);
  text-shadow: 5px 5px 0 rgba(255,111,29,.12), 0 0 40px rgba(255,111,29,.22);
  margin-left: clamp(24px, 4vw, 72px);
}
.game-title__fire::after {
  content: ""; position: absolute; left: 2%; right: -1%; bottom: 2%; height: 3px;
  background: repeating-linear-gradient(90deg, var(--amber-hot) 0 18px, transparent 18px 26px);
  opacity: .5;
}
.game-title__tag {
  position: absolute; right: -6px; bottom: -32px;
  font-size: clamp(11px, 1.1vw, 17px); letter-spacing: .17em;
  color: #0b0e0b; background: var(--paper);
  padding: .45em .8em .35em; line-height: 1;
  transform: skewX(-8deg);
  box-shadow: 5px 5px 0 rgba(255,181,45,.68);
}
.cn-title {
  display: flex; gap: .28em; margin-top: clamp(34px, 4.4vh, 50px);
  font-family: var(--font-cn); font-weight: 900; font-size: clamp(16px, 1.55vw, 23px);
  letter-spacing: .5em; color: var(--paper-dim);
}
.cn-title span { border-bottom: 1px solid rgba(255,181,45,.45); padding-bottom: 7px; }
.hero-pitch {
  color: var(--muted); font-family: var(--font-cn); font-size: clamp(12px, .98vw, 15px);
  line-height: 1.9; max-width: 570px; margin: clamp(15px, 2.2vh, 25px) 0 clamp(18px, 2.8vh, 32px);
}
.hero-pitch strong { color: var(--cyan); font-weight: 600; }
.section-label {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  font-family: var(--font-display); font-size: 8px; letter-spacing: .14em; color: var(--muted);
}
.section-label span { color: var(--amber); }
.arena-options { display: flex; gap: 7px; }
.arena-card {
  flex: 1; min-width: 0; text-align: left; position: relative;
  border: 1px solid var(--line); background: rgba(8, 13, 11, .58);
  padding: 12px 12px 11px; min-height: 83px;
  clip-path: var(--cut);
  transition: border-color .22s, background .22s, transform .22s;
}
.arena-card:hover { border-color: rgba(255,181,45,.45); transform: translateY(-2px); background: rgba(255,181,45,.035); }
.arena-card.is-active {
  border-color: var(--amber); background: linear-gradient(145deg, rgba(255,181,45,.15), rgba(255,181,45,.025) 58%);
  box-shadow: inset 0 0 0 1px rgba(255,181,45,.13);
}
.arena-card.is-active::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
.arena-card__index { display: block; font-family: var(--font-display); font-size: 8px; color: var(--amber); margin-bottom: 9px; }
.arena-card__name { display: block; font-family: var(--font-cn); font-weight: 700; font-size: 13px; letter-spacing: .08em; white-space: nowrap; }
.arena-card__en { display: block; font-family: var(--font-display); font-size: 7px; letter-spacing: .08em; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.arena-card__trait { display: block; font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arena-card__diff { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 6px; letter-spacing: .06em; color: var(--cyan); white-space: nowrap; }
.arena-card__diff--hard { color: var(--amber); }
.arena-card__diff--nightmare { color: #ff8a8d; }
.arena-card.is-active .arena-card__trait { color: var(--paper-dim); }
.mode-picker { margin-top: 17px; }
.mode-options { display: flex; gap: 6px; }
.mode-card { display: flex; flex-direction: column; gap: 2px; min-width: 132px; padding: 9px 13px; border: 1px solid var(--line); background: rgba(8,13,11,.58); clip-path: var(--cut); text-align: left; transition: border-color .2s, background .2s; }
.mode-card strong { font-family: var(--font-cn); font-size: 12px; letter-spacing: .08em; font-weight: 700; }
.mode-card small { font-family: var(--font-display); font-size: 6px; letter-spacing: .12em; color: var(--muted-2); }
.mode-card:hover { border-color: rgba(95,240,206,.45); }
.mode-card.is-active { border-color: var(--cyan); background: rgba(95,240,206,.09); box-shadow: inset 0 0 0 1px rgba(95,240,206,.1); }
.mode-card.is-active small { color: var(--cyan); }
.mode-hint { display: block; margin-top: 7px; font-family: var(--font-cn); font-size: 8px; letter-spacing: .05em; color: var(--muted-2); }
.touch-hint { display: none; margin-top: 5px; font-family: var(--font-cn); font-size: 8px; line-height: 1.55; letter-spacing: .03em; color: var(--cyan); }
.menu-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: clamp(20px, 3vh, 32px); }
.menu-actions .text-btn { padding: 12px 16px; border: 1px solid var(--line-strong); background: rgba(10, 16, 13, .45); clip-path: var(--cut); }
.cta {
  position: relative; display: inline-flex; align-items: center; gap: 15px;
  min-width: 252px; border: 1px solid var(--amber); background: var(--amber); color: #0b0b07;
  padding: 13px 18px; text-align: left; clip-path: var(--cut);
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 0 0 rgba(255,181,45,0);
}
.cta:hover { background: var(--paper); border-color: var(--paper); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,181,45,.16); }
.cta:active { transform: translateY(0); }
.cta__corners { position: absolute; inset: 4px; border: 1px solid rgba(10,10,6,.18); pointer-events: none; clip-path: var(--cut); }
.cta__icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(0,0,0,.25); }
.cta__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cta__copy { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.cta__copy strong { font-family: var(--font-cn); font-size: 15px; letter-spacing: .12em; }
.cta__copy small { font-family: var(--font-display); font-size: 7px; letter-spacing: .14em; opacity: .62; }
.cta__arrow { font-size: 23px; font-weight: 300; line-height: 1; }
.cta--small { min-width: 218px; padding: 10px 16px; }
.text-btn {
  border: 0; background: none; color: var(--paper-dim);
  font-family: var(--font-cn); font-size: 12px; letter-spacing: .09em;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 0;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.text-btn span {
  width: 18px; height: 18px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-family: var(--font-display); font-size: 8px;
}
.text-btn:hover { color: var(--amber); border-color: var(--amber); }
.text-btn--muted { color: #96a599; }
.record-strip {
  display: flex; gap: clamp(22px, 3vw, 48px); margin-top: clamp(21px, 3.4vh, 38px);
  border-top: 1px solid var(--line); padding-top: 13px; width: min(100%, 470px);
}
.record-strip div { display: flex; flex-direction: column; gap: 3px; }
.record-strip span { font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); letter-spacing: .08em; }
.record-strip strong { font-family: var(--font-display); font-size: 12px; color: var(--paper-dim); letter-spacing: .05em; }

/* ---------- hero visual ---------- */
.hero-visual { position: relative; max-width: 590px; justify-self: end; width: 100%; }
.visual-frame {
  position: relative; aspect-ratio: 720 / 760; max-height: min(67vh, 700px);
  width: 100%; margin-left: auto;
  border: 1px solid rgba(95, 240, 206, .21);
  background: #06100d;
  clip-path: var(--cut-lg);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 70px rgba(20, 100, 80, .12);
  overflow: hidden;
}
.visual-frame::before {
  content: ""; position: absolute; inset: 9px; z-index: 3; pointer-events: none;
  border: 1px solid rgba(95,240,206,.1); clip-path: var(--cut-lg);
}
.visual-frame::after {
  content: ""; position: absolute; left: 0; top: 0; width: 34%; height: 1px; z-index: 4;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 10px var(--cyan);
}
.visual-frame__top {
  position: absolute; z-index: 4; top: 20px; left: 23px; right: 23px;
  display: flex; justify-content: space-between;
  font-family: var(--font-display); font-size: 8px; letter-spacing: .13em; color: rgba(215,242,230,.62);
}
.live-dot { display: flex; align-items: center; gap: 6px; color: var(--cyan); }
.live-dot i { width: 5px; height: 5px; }
#menuCanvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.visual-frame__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(106,255,221,.018) 3px 4px);
  mix-blend-mode: screen;
}
.visual-frame__scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 16%;
  background: linear-gradient(180deg, transparent, rgba(95,240,206,.04), transparent);
  animation: scanSweep 6s linear infinite;
}
@keyframes scanSweep { 0% { top: -20%; } 100% { top: 110%; } }
.visual-frame__hud {
  position: absolute; z-index: 4; display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-display); font-size: 7px; letter-spacing: .1em;
  border-left: 1px solid var(--cyan); padding-left: 8px;
}
.visual-frame__hud span { color: var(--muted-2); }
.visual-frame__hud b { color: var(--cyan); font-weight: 400; }
.visual-frame__hud--tl { top: 62px; left: 23px; }
.visual-frame__hud--br { bottom: 106px; right: 23px; border-left-color: var(--amber); text-align: right; }
.visual-frame__hud--br b { color: var(--amber); }
.visual-frame__coords {
  position: absolute; z-index: 4; top: 67px; right: 24px; text-align: right;
  font-family: var(--font-display); font-size: 6px; line-height: 1.9; letter-spacing: .1em; color: rgba(205,230,216,.32);
}
.visual-frame__cross { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.visual-frame__cross i { position: absolute; background: rgba(95,240,206,.18); }
.visual-frame__cross i:first-child { width: 1px; height: 14px; left: 8%; top: 46%; }
.visual-frame__cross i:last-child { height: 1px; width: 14px; left: calc(8% - 6px); top: calc(46% + 6px); }
.visual-frame__caption {
  position: absolute; z-index: 4; left: 23px; right: 23px; bottom: 21px;
  padding-top: 13px; border-top: 1px solid rgba(95,240,206,.18);
  display: flex; flex-direction: column;
}
.visual-frame__caption .caption-index { font-family: var(--font-display); font-size: 8px; color: var(--amber); letter-spacing: .15em; margin-bottom: 3px; }
.visual-frame__caption strong { font-family: var(--font-cn); font-weight: 700; font-size: 13px; letter-spacing: .12em; }
.visual-frame__caption small { font-family: var(--font-display); font-size: 7px; letter-spacing: .11em; color: var(--muted-2); margin-top: 5px; }
.visual-note {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  font-family: var(--font-display); font-size: 7px; letter-spacing: .09em; color: var(--muted-2); margin-top: 11px;
}
.visual-note span { width: 24px; height: 1px; background: var(--cyan-dim); }

/* ---------- footer / ticker ---------- */
.hangar-footer { flex: 0 0 auto; border-top: 1px solid var(--line); }
.ticker { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); overflow: hidden; border-bottom: 1px solid var(--line); }
.ticker__track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  padding: 10px 0; animation: ticker 34s linear infinite;
  font-family: var(--font-display); font-size: 8px; letter-spacing: .12em; color: var(--muted-2);
}
.ticker__track i { width: 4px; height: 4px; background: var(--amber); transform: rotate(45deg); }
.ticker__track span:nth-child(3n+1) { color: var(--paper-dim); }
@keyframes ticker { to { transform: translateX(-50%); } }
.footer-meta {
  display: flex; justify-content: space-between; gap: 18px; padding: 10px 0 14px;
  font-family: var(--font-display); font-size: 7px; letter-spacing: .12em; color: var(--muted-2);
}
.footer-meta span:nth-child(2) { color: rgba(137,149,139,.55); }

/* reveal animation */
.reveal { opacity: 0; animation: revealUp .7s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal-1 { animation-delay: .08s; } .reveal-2 { animation-delay: .16s; } .reveal-3 { animation-delay: .28s; }
.reveal-4 { animation-delay: .38s; } .reveal-5 { animation-delay: .48s; } .reveal-6 { animation-delay: .58s; }
@keyframes revealUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ================= GAME ================= */
.game-layout.is-hidden { display: none; }
.game-layout {
  height: 100svh; min-height: 620px;
  display: flex; flex-direction: column;
  padding: 14px clamp(16px, 2vw, 30px) 12px;
  opacity: 1; transition: opacity .35s ease;
}
.topbar {
  height: 57px; flex: 0 0 auto; display: grid;
  grid-template-columns: 1fr minmax(320px, 440px) 1fr;
  align-items: center; gap: 20px;
  border-bottom: 1px solid var(--line); padding-bottom: 11px;
}
.topbar__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mini-mark { width: 25px; height: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border: 1px solid rgba(255,181,45,.45); transform: rotate(45deg); }
.mini-mark i { background: var(--amber); }
.mini-mark i:nth-child(2), .mini-mark i:nth-child(3) { background: rgba(255,181,45,.22); }
.topbar__brand strong { font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; display: block; line-height: 1; }
.topbar__brand span { display: block; font-family: var(--font-display); font-size: 7px; letter-spacing: .1em; color: var(--muted-2); margin-top: 5px; white-space: nowrap; }
.run-clock { min-width: 0; }
.run-clock__meta { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 6px; }
.run-clock__meta span:first-child { font-family: var(--font-cn); font-size: 11px; letter-spacing: .1em; color: var(--amber); }
.run-clock__meta span:last-child { font-family: var(--font-display); font-size: 13px; letter-spacing: .08em; color: var(--paper); }
.run-clock__bar { height: 3px; background: rgba(237,230,211,.1); position: relative; }
.run-clock__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 12px rgba(95,240,206,.35); transition: width .2s linear; }
.run-clock__bar em { position: absolute; top: -2px; width: 1px; height: 7px; background: var(--red); left: 75%; box-shadow: 0 0 6px var(--red); }
.topbar__controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tiny-stat { display: flex; align-items: baseline; gap: 7px; margin-right: 10px; }
.tiny-stat span { font-family: var(--font-display); font-size: 8px; color: var(--muted-2); letter-spacing: .1em; }
.tiny-stat b { font-family: var(--font-display); font-size: 12px; color: var(--paper-dim); font-weight: 400; }
.topbar .icon-btn { width: 31px; height: 29px; border-color: transparent; }
.topbar .icon-btn:hover { border-color: var(--line-strong); }

.battle-layout {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 15px; padding-top: 13px;
}
.battle-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.battle-frame {
  position: relative; width: 100%; aspect-ratio: 5 / 3;
  max-height: calc(100svh - 186px);
  margin: 0 auto;
  border: 1px solid rgba(95,240,206,.24);
  background: #07100d;
  box-shadow: 0 16px 50px rgba(0,0,0,.42), 0 0 50px rgba(30,110,90,.07);
  overflow: hidden;
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.battle-frame canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
#gameCanvas { touch-action: none; }
.frame-corner { position: absolute; z-index: 10; width: 18px; height: 18px; pointer-events: none; }
.frame-corner--tl { left: 4px; top: 4px; border-left: 1px solid var(--cyan); border-top: 1px solid var(--cyan); }
.frame-corner--tr { right: 4px; top: 4px; border-right: 1px solid var(--cyan); border-top: 1px solid var(--cyan); }
.frame-corner--bl { left: 4px; bottom: 4px; border-left: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); }
.frame-corner--br { right: 4px; bottom: 4px; border-right: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); }
.screen-vignette, .screen-scanlines, .danger-tint { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.screen-vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.23) 100%); }
.screen-scanlines { z-index: 4; opacity: .1; background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.2) 2px 3px); mix-blend-mode: multiply; }
.danger-tint {
  background: radial-gradient(ellipse at center, transparent 36%, rgba(255,50,62,.32) 100%);
  opacity: 0; transition: opacity .16s;
}
.danger-tint.is-active { opacity: 1; animation: dangerPulse .9s infinite; }
@keyframes dangerPulse { 50% { opacity: .55; } }
.canvas-id { position: absolute; z-index: 5; right: 12px; bottom: 9px; font-family: var(--font-display); font-size: 7px; color: rgba(203,230,214,.35); letter-spacing: .12em; }

/* combat deck */
.combat-deck {
  flex: 0 0 auto; min-height: 62px; display: grid;
  grid-template-columns: 1.05fr .8fr 1.1fr 1.9fr;
  align-items: center; gap: 0; margin-top: 9px;
  border: 1px solid var(--line); background: rgba(8,13,11,.6);
  clip-path: var(--cut);
}
.deck-slot { height: 100%; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-right: 1px solid var(--line); position: relative; }
.deck-slot__key { position: absolute; top: 4px; left: 6px; font-family: var(--font-display); font-size: 6px; color: var(--muted-2); letter-spacing: .1em; }
.deck-slot__icon { width: 32px; height: 32px; margin-top: 4px; flex: 0 0 32px; }
.deck-slot__icon canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.deck-slot__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deck-slot__copy small { font-family: var(--font-cn); font-size: 10px; color: var(--muted-2); letter-spacing: .1em; }
.deck-slot__copy strong { font-family: var(--font-cn); font-weight: 600; font-size: 13px; color: var(--paper-dim); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(95,240,206,.25); margin-top: 4px; color: var(--cyan); flex: 0 0 30px; }
.dash-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.dash-meter { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: rgba(237,230,211,.1); }
.dash-meter i { display: block; height: 100%; width: 100%; background: var(--cyan); }
.deck-slot--objective { border-right: 0; }
.objective-glyph { width: 30px; height: 30px; border: 1px solid rgba(255,181,45,.35); transform: rotate(45deg) scale(.7); margin: 4px 0 0 2px; flex: 0 0 30px; position: relative; }
.objective-glyph::before, .objective-glyph::after { content: ""; position: absolute; background: var(--amber); }
.objective-glyph::before { width: 10px; height: 1px; top: 14px; left: 9px; }
.objective-glyph::after { width: 1px; height: 10px; top: 9px; left: 14px; }
.deck-hint { align-self: stretch; display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; padding: 8px 12px; font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); border-left: 1px solid var(--line); }
.deck-hint span { font-family: var(--font-display); color: var(--paper-dim); font-size: 7px; border: 1px solid var(--line); padding: 3px 5px; }
.deck-hint b { color: var(--muted-2); font-weight: 400; }

/* sidebar */
.sidebar { min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; padding-right: 1px; }
.sidebar::-webkit-scrollbar { display: none; }
.side-panel { border: 1px solid var(--line); background: var(--panel); padding: 11px 13px 12px; flex: 0 0 auto; position: relative; }
.side-panel::before { content: ""; position: absolute; left: -1px; top: 10px; width: 2px; height: 14px; background: var(--amber); opacity: .8; }
.panel-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.panel-head span { font-family: var(--font-display); font-size: 9px; letter-spacing: .13em; color: var(--muted); }
.panel-head b { font-family: var(--font-display); font-weight: 400; font-size: 9px; letter-spacing: .08em; color: var(--cyan); }
.panel-head b.is-danger { color: var(--red); }
.panel-head__line { flex: 1; height: 1px; background: var(--line); }
.level-row { display: flex; gap: 11px; align-items: center; }
.level-badge { width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid rgba(255,181,45,.45); display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,181,45,.07); clip-path: var(--cut); }
.level-badge small { font-family: var(--font-display); font-size: 7px; color: var(--amber); letter-spacing: .1em; }
.level-badge strong { font-family: var(--font-display); font-size: 18px; line-height: 1; margin-top: 2px; color: var(--paper); }
.level-info { flex: 1; min-width: 0; }
.level-info__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.level-info__row span { font-family: var(--font-cn); font-size: 10px; color: var(--muted-2); }
.level-info__row b { font-family: var(--font-display); font-size: 10px; font-weight: 400; color: var(--paper-dim); }
.level-info__row + .meter { margin-bottom: 6px; }
.meter { height: 3px; background: rgba(237,230,211,.1); overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; transition: width .18s ease; }
.meter--hp i { background: linear-gradient(90deg, var(--green), #d3f08e); }
.meter--xp i { background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 8px rgba(95,240,206,.35); }
.pilot-tags { display: flex; gap: 13px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.pilot-tags span { font-family: var(--font-display); font-size: 7px; color: var(--muted-2); letter-spacing: .08em; }
.pilot-tags b { color: var(--paper-dim); font-weight: 400; margin-left: 3px; }
.coop-panel.is-hidden { display: none; }
.coop-list { display: flex; flex-direction: column; gap: 7px; }
.coop-unit__row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.coop-unit__row b { margin-left: auto; font-family: var(--font-display); font-size: 9px; font-weight: 400; color: var(--paper-dim); }
.coop-unit__row em { font-family: var(--font-display); font-style: normal; font-size: 7px; letter-spacing: .06em; color: var(--cyan); min-width: 36px; text-align: right; }
.coop-unit__row em.is-down { color: var(--red); }
.coop-tag { display: inline-grid; place-items: center; width: 20px; height: 15px; font-family: var(--font-display); font-size: 7px; color: #0b0b07; background: var(--amber); }
.coop-tag--p2 { background: var(--cyan); }
.meter--p2 i { background: linear-gradient(90deg, #3d8f9d, var(--cyan)); }
.coop-unit__row em.is-alive { color: var(--green); }
.core-gauge { display: flex; gap: 13px; align-items: center; }
.core-gauge__ring {
  width: 60px; height: 60px; flex: 0 0 60px; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--cyan) calc(var(--p) * 1%), rgba(95,240,206,.1) 0);
  border-radius: 50%;
}
.core-gauge__ring::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(95,240,206,.35); border-radius: 50%; background: var(--panel-strong); z-index: 0; }
.core-gauge__ring span { position: relative; z-index: 2; font-family: var(--font-display); font-size: 15px; color: var(--cyan); }
.core-gauge__ring i { position: absolute; width: 4px; height: 4px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 8px var(--cyan); }
.core-gauge__copy { display: flex; flex-direction: column; gap: 3px; }
.core-gauge__copy strong { font-family: var(--font-display); font-size: 11px; font-weight: 400; color: var(--paper-dim); }
.core-gauge__copy small { font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.core-pips { display: flex; gap: 3px; margin-top: 5px; }
.core-pips i { width: 15px; height: 3px; background: var(--cyan); box-shadow: 0 0 5px rgba(95,240,206,.25); }
.core-pips i.is-off { background: rgba(95,240,206,.12); box-shadow: none; }
.how__pad { margin-top: 10px; font-family: var(--font-display); font-size: 8px; letter-spacing: .08em; color: var(--cyan); opacity: .72; }
.base-meter { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.base-meter__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.base-meter__row b { font-family: var(--font-display); font-size: 8px; font-weight: 400; color: var(--cyan); }
.meter--base i { background: linear-gradient(90deg, #317e73, var(--cyan)); }
.base-meter.is-low .base-meter__row b { color: var(--red); }
.base-meter.is-low .meter--base i { background: linear-gradient(90deg, #7a2424, var(--red)); }
.core-note { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); margin-top: 9px; padding-top: 8px; font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.core-note .blink-dot { width: 4px; height: 4px; background: var(--red); box-shadow: 0 0 7px var(--red); }
.loadout-list { display: flex; flex-direction: column; gap: 4px; min-height: 38px; max-height: 168px; overflow-y: auto; scrollbar-width: none; }
.loadout-list::-webkit-scrollbar { display: none; }
.loadout-item { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 5px; margin: 0 -5px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.loadout-item:hover { background: rgba(237,230,211,.025); border-color: var(--line); }
.loadout-item canvas { width: 22px; height: 22px; flex: 0 0 22px; image-rendering: pixelated; }
.loadout-item__copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.loadout-item__copy strong { font-family: var(--font-cn); font-weight: 500; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loadout-item__copy small { font-family: var(--font-display); font-size: 8px; letter-spacing: .08em; color: var(--muted-2); }
.loadout-pips { display: flex; gap: 2px; flex: 0 0 auto; }
.loadout-pips i { width: 3px; height: 9px; background: rgba(237,230,211,.14); }
.loadout-pips i.is-on { background: var(--amber); box-shadow: 0 0 4px rgba(255,181,45,.5); }
.loadout-item.is-passive .loadout-pips i.is-on { background: var(--cyan); box-shadow: 0 0 4px rgba(95,240,206,.45); }
.loadout-item.is-passive .loadout-item__copy small { color: var(--cyan-dim); }
.loadout-item.is-fused { border-color: rgba(255,181,45,.32); background: rgba(255,181,45,.045); }
.loadout-item.is-fused .loadout-item__copy strong { color: var(--amber); }
.loadout-item.is-fused .loadout-item__copy small { color: var(--amber); opacity: .7; }
.empty-slot { font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); padding: 10px 0; text-align: center; border: 1px dashed var(--line); }
.intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.intel-grid div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(237,230,211,.05); padding-bottom: 3px; }
.intel-grid span { font-family: var(--font-cn); font-size: 10px; color: var(--muted-2); }
.intel-grid strong { font-family: var(--font-display); font-size: 10px; font-weight: 400; color: var(--paper-dim); }
.intel-grid strong.is-hot { color: var(--amber); }
.threat-bars { display: flex; gap: 3px; margin-top: 9px; }
.threat-bars i { height: 3px; flex: 1; background: rgba(237,230,211,.09); }
.threat-bars i.is-on { background: var(--amber); box-shadow: 0 0 6px rgba(255,181,45,.25); }
.threat-bars.is-critical i.is-on { background: var(--red); box-shadow: 0 0 8px rgba(255,79,88,.4); }
.side-tip { border-left: 1px solid rgba(255,181,45,.4); padding: 2px 0 2px 9px; font-family: var(--font-cn); font-size: 10px; color: var(--muted-2); line-height: 1.7; margin-top: auto; }

/* toasts */
.toast-stack { position: absolute; z-index: 8; left: 18px; top: 14px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.toast { font-family: var(--font-cn); font-size: 11px; color: var(--paper); background: rgba(5,10,8,.84); border-left: 2px solid var(--amber); padding: 7px 11px; letter-spacing: .06em; animation: toastIn .25s ease both, toastOut .3s ease 2.6s forwards; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.toast.is-cyan { border-left-color: var(--cyan); }
.toast.is-red { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-5px); } }

/* boss hud */
.boss-hud { position: absolute; z-index: 7; left: 50%; bottom: 15px; transform: translateX(-50%); width: min(66%, 620px); padding: 8px 12px; background: rgba(5,9,8,.78); border: 1px solid rgba(255,79,88,.35); }
.boss-hud__meta { display: flex; justify-content: space-between; margin-bottom: 5px; font-family: var(--font-display); font-size: 9px; letter-spacing: .1em; color: var(--red); }
.boss-hud__meta span { color: var(--paper-dim); }
.boss-hud__bar { height: 6px; background: rgba(255,79,88,.13); }
.boss-hud__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--amber-hot)); box-shadow: 0 0 10px rgba(255,79,88,.5); transition: width .15s; }

/* mobile */
.mobile-stick, .mobile-dash { display: none; z-index: 9; }
.mobile-stick { position: absolute; width: 76px; height: 76px; border: 1px solid rgba(95,240,206,.35); border-radius: 50%; left: 22px; bottom: 22px; touch-action: none; }
.mobile-stick::before, .mobile-stick::after { content: ""; position: absolute; background: rgba(95,240,206,.16); }
.mobile-stick::before { width: 1px; height: 100%; left: 50%; top: 0; }
.mobile-stick::after { width: 100%; height: 1px; left: 0; top: 50%; }
.mobile-stick i { position: absolute; width: 28px; height: 28px; left: 24px; top: 24px; background: rgba(95,240,206,.2); border: 1px solid var(--cyan); border-radius: 50%; transform: translate(0,0); }
.mobile-dash { position: absolute; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: rgba(255,181,45,.12); border: 1px solid var(--amber); font-family: var(--font-display); font-size: 8px; color: var(--amber); letter-spacing: .08em; }

/* ================= OVERLAYS ================= */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.overlay__backdrop { position: absolute; inset: 0; background: rgba(3,6,5,.76); backdrop-filter: blur(9px); }
.levelup__content { position: relative; width: min(1150px, 100%); }
.levelup__head { text-align: center; margin-bottom: 25px; animation: revealUp .5s ease both; }
.levelup__eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-size: 8px; letter-spacing: .19em; color: var(--cyan); }
.spark { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); transform: rotate(45deg); animation: ledPulse 1s infinite; }
.levelup__head h2 { margin: 12px 0 5px; font-family: var(--font-display); font-size: clamp(23px, 2.7vw, 38px); font-weight: 400; letter-spacing: .03em; line-height: 1; }
.levelup__head h2 span { color: var(--muted); }
.levelup__head h2 strong { color: var(--amber); font-weight: 700; }
.levelup__head h2 em { font-family: var(--font-cn); font-style: normal; font-size: .62em; font-weight: 800; color: var(--paper); letter-spacing: .14em; margin-left: 10px; }
.levelup__head p { font-family: var(--font-cn); color: var(--muted); font-size: 12px; margin: 0; }
.upgrade-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.upgrade-card {
  position: relative; min-height: 380px; text-align: left;
  border: 1px solid var(--line); background: linear-gradient(158deg, rgba(22,31,27,.95), rgba(8,13,11,.97));
  padding: 0; clip-path: var(--cut-lg); overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .2s;
  animation: cardIn .45s cubic-bezier(.2,.8,.2,1) both;
}
.upgrade-card:nth-child(2) { animation-delay: .08s; }
.upgrade-card:nth-child(3) { animation-delay: .16s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.upgrade-card:hover, .upgrade-card:focus-visible { transform: translateY(-7px); border-color: var(--accent); box-shadow: 0 18px 40px rgba(0,0,0,.36), 0 0 34px color-mix(in srgb, var(--accent) 14%, transparent); }
.upgrade-card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--accent); }
.upgrade-card::after { content: ""; position: absolute; right: -30%; top: -25%; width: 240px; height: 240px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 17%, transparent), transparent 68%); pointer-events: none; }
.upgrade-card__top { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0 26px; position: relative; z-index: 1; }
.upgrade-card__icon { position: relative; z-index: 1; width: 118px; height: 118px; margin: 16px 26px 16px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: color-mix(in srgb, var(--accent) 5%, transparent); clip-path: var(--cut); }
.upgrade-card__icon canvas { width: 82px; height: 82px; image-rendering: pixelated; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 40%, transparent)); }
.upgrade-card__body { position: relative; z-index: 1; padding: 0 26px; }
.upgrade-card__name { font-family: var(--font-cn); font-size: 22px; font-weight: 800; letter-spacing: .06em; margin: 0 0 4px; color: var(--paper); }
.upgrade-card__en { font-family: var(--font-display); font-size: 8px; color: var(--muted-2); letter-spacing: .11em; text-transform: uppercase; }
.upgrade-card__role { margin-top: 8px; font-family: var(--font-cn); font-size: 9px; letter-spacing: .08em; color: var(--accent); border-left: 1px solid var(--accent); padding-left: 7px; opacity: .9; }
.upgrade-card__desc { margin: 15px 0 16px; min-height: 52px; font-family: var(--font-cn); color: #a8b6ab; font-size: 12px; line-height: 1.8; }
.upgrade-card__desc b { color: var(--accent); font-weight: 700; }
.upgrade-card__pips { display: flex; gap: 4px; padding: 0 26px 22px; position: relative; z-index: 1; }
.upgrade-card__pips i { width: 20px; height: 3px; background: rgba(237,230,211,.12); }
.upgrade-card__pips i.is-on { background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent); }
.upgrade-card__key { position: absolute; bottom: 16px; right: 20px; z-index: 2; font-family: var(--font-display); font-size: 11px; color: var(--muted-2); border: 1px solid var(--line); width: 25px; height: 25px; display: grid; place-items: center; }
.upgrade-card__corner { position: absolute; top: 0; right: 0; width: 48px; height: 48px; border-left: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); clip-path: polygon(100% 0, 100% 100%, 0 0); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.levelup__foot { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 24px; font-family: var(--font-cn); font-size: 11px; color: #8b9b8e; }
.levelup__foot > span:first-child { display: flex; align-items: center; gap: 5px; }
.reroll-btn { border: 1px solid var(--line-strong); background: rgba(237,230,211,.025); padding: 8px 13px; color: var(--paper-dim); font-family: var(--font-cn); font-size: 11px; letter-spacing: .05em; transition: border-color .2s, color .2s; }
.reroll-btn span { color: var(--cyan); margin-right: 5px; }
.reroll-btn b { color: var(--cyan); font-family: var(--font-display); font-size: 8px; margin-left: 3px; }
.reroll-btn:hover { border-color: var(--cyan); color: var(--paper); }
.reroll-btn:disabled { opacity: .3; cursor: not-allowed; }
.levelup__hint { color: var(--muted-2); }

/* pause */
.pause__card { position: relative; width: min(500px, 100%); text-align: center; background: var(--panel-strong); border: 1px solid var(--line-strong); padding: 42px 42px 27px; clip-path: var(--cut-lg); animation: pauseIn .3s ease both; }
@keyframes pauseIn { from { opacity: 0; transform: scale(.97); } }
.pause__stripe { position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: repeating-linear-gradient(90deg, var(--amber) 0 24px, transparent 24px 31px); opacity: .8; }
.pause__eyebrow { font-family: var(--font-display); font-size: 8px; letter-spacing: .15em; color: var(--amber); }
.pause__card h2 { font-family: var(--font-cn); font-size: 31px; letter-spacing: .12em; margin: 12px 0 7px; }
.pause__card > p { font-family: var(--font-cn); font-size: 11px; color: var(--muted); margin: 0 0 28px; }
.pause__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pause__actions .cta { min-width: 260px; }
.pause__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-top: 27px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.pause__controls span { display: flex; align-items: center; gap: 5px; }

/* result */
.result__content { position: relative; width: min(800px, 100%); text-align: center; background: linear-gradient(160deg, rgba(19,25,21,.98), rgba(6,10,8,.99)); border: 1px solid var(--line-strong); padding: 36px 52px 36px; clip-path: var(--cut-lg); animation: pauseIn .4s ease both; }
.result__tag { font-family: var(--font-display); font-size: 9px; letter-spacing: .18em; color: var(--red); }
.result__tag.is-win { color: var(--cyan); }
.result__content h2 { font-family: var(--font-cn); font-size: 38px; letter-spacing: .15em; margin: 13px 0 8px; }
.result__seal { width: 76px; height: 76px; margin: 7px auto 16px; border: 1px solid rgba(255,79,88,.5); border-radius: 50%; position: relative; display: grid; place-items: center; color: var(--red); font-family: var(--font-display); font-size: 18px; }
.result__seal span, .result__seal i { content: ""; position: absolute; border: 1px solid rgba(255,79,88,.19); border-radius: 50%; }
.result__seal span { inset: 7px; } .result__seal i { inset: 16px; }
.result__seal b { font-weight: 400; }
.result__seal.is-win { color: var(--cyan); border-color: rgba(95,240,206,.55); }
.result__seal.is-win span, .result__seal.is-win i { border-color: rgba(95,240,206,.2); }
.result__content > p { font-family: var(--font-cn); font-size: 12px; color: var(--paper-dim); margin: 0 auto 22px; max-width: 370px; line-height: 1.9; }
.result__stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result__stats div { padding: 15px 6px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.result__stats div:last-child { border-right: 0; }
.result__stats span { font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.result__stats strong { font-family: var(--font-display); font-size: 16px; font-weight: 400; color: var(--paper-dim); }
.result__build { display: flex; justify-content: center; gap: 7px; margin: 19px 0 22px; flex-wrap: wrap; }
.result__build span { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-cn); font-size: 10px; color: var(--paper-dim); border: 1px solid var(--line); padding: 4px 8px; }
.result__build i { width: 4px; height: 4px; background: var(--amber); }
.result__actions { display: flex; justify-content: center; align-items: center; gap: 20px; }

/* how to */
.how__panel { position: relative; width: min(900px, 100%); background: var(--panel-strong); border: 1px solid var(--line-strong); padding: 38px 42px 32px; clip-path: var(--cut-lg); animation: pauseIn .35s ease both; }
.close-btn { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 1px solid var(--line-strong); background: rgba(237,230,211,.025); color: var(--paper-dim); font-size: 22px; line-height: 1; }
.close-btn:hover { border-color: var(--red); color: var(--red); }
.how__eyebrow { font-family: var(--font-display); font-size: 8px; letter-spacing: .16em; color: var(--amber); }
.how__panel h2 { font-family: var(--font-cn); font-size: clamp(24px, 3vw, 36px); letter-spacing: .11em; margin: 10px 0 22px; }
.how__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }
.how__grid article { position: relative; padding: 0 0 22px 35px; border-top: 1px solid var(--line); padding-top: 17px; }
.how__num { position: absolute; left: 0; top: 17px; font-family: var(--font-display); font-size: 8px; color: var(--amber); }
.how__grid h3 { font-family: var(--font-cn); font-size: 15px; margin: 0 0 7px; letter-spacing: .1em; }
.how__grid p { font-family: var(--font-cn); font-size: 11px; line-height: 1.85; color: #a8b6ab; margin: 0; }
.how__grid kbd { margin: 0 2px; }
.how__legend { display: flex; flex-wrap: wrap; gap: 10px 18px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; font-family: var(--font-cn); font-size: 10px; color: var(--paper-dim); }
.how__legend span { display: inline-flex; align-items: center; gap: 6px; }
.chip { width: 11px; height: 11px; display: inline-block; }
.chip--star { background: var(--amber); clip-path: polygon(50% 0, 62% 34%, 100% 38%, 70% 62%, 80% 100%, 50% 76%, 20% 100%, 30% 62%, 0 38%, 38% 34%); }
.chip--bomb { background: var(--red); border-radius: 50%; }
.chip--shield { background: var(--cyan); clip-path: polygon(50% 0, 95% 20%, 86% 70%, 50% 100%, 14% 70%, 5% 20%); }
.chip--time { background: var(--blue); border-radius: 50%; }
.chip--shovel { background: var(--paper-dim); clip-path: polygon(35% 0, 65% 0, 65% 58%, 100% 58%, 50% 100%, 0 58%, 35% 58%); }
.how__panel > .cta { margin-top: 23px; }
.rotate-hint { display: none; }


/* ---------- campaign, chassis archive, fusion codex ---------- */
.arena-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.arena-card { min-height: 64px; padding: 8px 9px 7px; }
.arena-card__index { margin-bottom: 4px; }
.arena-card__name { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.arena-card__en { font-size: 6px; overflow: hidden; text-overflow: ellipsis; }
.arena-card__trait { margin-top: 4px; font-size: 8px; }
.arena-card.is-locked { opacity: .42; cursor: not-allowed; border-style: dashed; }
.arena-card.is-locked:hover { transform: none; border-color: var(--line); background: rgba(8,13,11,.58); }
.arena-card.is-cleared .arena-card__index { color: var(--cyan); }
.arena-card__lock { position: absolute; right: 8px; top: 7px; font-size: 10px; color: var(--muted-2); }
.section-label b#stageProgress { float: right; font-family: var(--font-display); font-size: 9px; color: var(--cyan); letter-spacing: .1em; }
.stage-hint { margin-top: 6px; font-family: var(--font-cn); font-size: 8px; color: var(--muted-2); letter-spacing: .04em; }
.pilot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pilot-pair:has(#tankPickerBtn2.is-hidden) { grid-template-columns: 1fr; }
#tankPickerBtn2.is-hidden { display: none; }

.pilot-pair .pilot-card { min-width: 0; }
.pilot-pair .pilot-card__preview { flex-basis: 62px; width: 62px; height: 43px; }
.pilot-pair .pilot-card__preview canvas { width: 62px; height: 43px; }
.pilot-pair .pilot-card__copy strong { font-size: 11px; }
.pilot-pair .pilot-card__copy em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilot-card__slot { flex: 0 0 auto; font-family: var(--font-display); font-size: 8px; color: var(--amber); border: 1px solid rgba(255,181,45,.45); padding: 2px 4px; }
.pilot-card--p2 { border-color: rgba(95,240,206,.32); background: linear-gradient(100deg, rgba(95,240,206,.07), rgba(8,13,11,.5)); }
.pilot-card--p2 .pilot-card__slot { color: var(--cyan); border-color: rgba(95,240,206,.45); }
.pilot-card--p2 .pilot-card__cta { color: var(--cyan); }
.pilot-picker { margin-top: 14px; }
.pilot-card { width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; padding: 7px 10px; border: 1px solid rgba(255,181,45,.32); background: linear-gradient(100deg, rgba(255,181,45,.08), rgba(8,13,11,.5)); clip-path: var(--cut); transition: border-color .2s, background .2s; }
.pilot-card:hover { border-color: var(--amber); background: rgba(255,181,45,.1); }
.pilot-card__preview { flex: 0 0 74px; width: 74px; height: 54px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(2,7,5,.7); }
.pilot-card__preview canvas { width: 74px; height: 54px; image-rendering: pixelated; }
.pilot-card__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pilot-card__copy strong { font-family: var(--font-cn); font-size: 13px; color: var(--paper); letter-spacing: .07em; }
.pilot-card__copy small { font-family: var(--font-display); font-size: 6px; letter-spacing: .11em; color: var(--amber); }
.pilot-card__copy em { font-family: var(--font-cn); font-style: normal; font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilot-card__cta { flex: 0 0 auto; font-family: var(--font-cn); font-size: 9px; color: var(--amber); letter-spacing: .06em; }
.pilot-card__cta b { font-family: var(--font-display); font-weight: 400; margin-left: 4px; }

.tank-select .overlay__backdrop { background: rgba(2,5,4,.88); }
.tank-select__panel { position: relative; width: min(1180px, 100%); max-height: 92svh; overflow: hidden; display: flex; flex-direction: column; background: var(--panel-strong); border: 1px solid var(--line-strong); padding: 30px 32px 22px; clip-path: var(--cut-lg); animation: pauseIn .35s ease both; }
.tank-select__head h2, .fusion-panel h2 { font-family: var(--font-cn); font-size: clamp(24px, 3vw, 38px); letter-spacing: .1em; margin: 8px 0 8px; }
.tank-select__head p, .fusion-lead { font-family: var(--font-cn); color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0 0 16px; }
.tank-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; overflow-y: auto; padding: 2px 3px 8px; min-height: 0; }
.tank-card { position: relative; text-align: left; padding: 8px 9px 9px; border: 1px solid var(--line); background: rgba(7,12,10,.7); clip-path: var(--cut); transition: border-color .18s, background .18s, transform .18s; }
.tank-card:hover { border-color: rgba(255,181,45,.5); transform: translateY(-2px); }
.tank-card.is-active { border-color: var(--amber); background: linear-gradient(145deg, rgba(255,181,45,.14), rgba(7,12,10,.72)); box-shadow: inset 0 0 0 1px rgba(255,181,45,.12); }
.tank-card__top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.tank-card__id { font-family: var(--font-display); font-size: 6px; color: var(--muted-2); letter-spacing: .08em; }
.tank-card__role { font-family: var(--font-cn); font-size: 7px; color: var(--amber); border: 1px solid rgba(255,181,45,.3); padding: 1px 4px; }
.tank-card canvas { display: block; width: 72px; height: 48px; margin: 3px auto 4px; image-rendering: pixelated; }
.tank-card__name { display: block; font-family: var(--font-cn); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.tank-card__en { display: block; font-family: var(--font-display); font-size: 6px; color: var(--muted-2); letter-spacing: .07em; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tank-card__trait { display: block; font-family: var(--font-cn); font-size: 8px; line-height: 1.5; color: var(--muted); margin-top: 5px; min-height: 24px; }
.tank-card.is-locked .tank-card__trait { padding-bottom: 14px; }
.tank-card.is-locked { opacity: .52; border-style: dashed; }
.tank-card.is-locked:hover { border-color: var(--line-strong); }
.tank-card.is-locked .tank-card__role { color: var(--muted-2); border-color: var(--line); }
.tank-card__lock { position: absolute; right: 8px; bottom: 8px; font-family: var(--font-display); font-size: 6px; color: var(--muted-2); letter-spacing: .06em; }
.tank-card.is-owned .tank-card__id { color: var(--cyan); }
.tank-select__actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; flex: 0 0 auto; min-width: 190px; }
.tank-cores { font-family: var(--font-display); font-size: 8px; color: var(--amber); letter-spacing: .08em; text-align: right; }
.tank-select__actions .cta { min-width: 190px; }
.tank-select__actions .is-hidden { display: none; }


.tank-detail__affinity { color: var(--cyan); font-family: var(--font-cn); font-size: 9px; letter-spacing: .04em; }
.tank-select__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.tank-detail { flex: 1; min-width: 0; font-family: var(--font-cn); color: var(--muted); font-size: 10px; line-height: 1.7; max-width: 760px; }
.tank-detail strong { color: var(--paper); font-size: 12px; }
.tank-detail b { color: var(--amber); font-weight: 600; }
.tank-detail__ok { color: var(--cyan); font-family: var(--font-display); font-size: 8px; letter-spacing: .06em; }
.tank-detail__lock { color: var(--muted-2); font-family: var(--font-display); font-size: 8px; letter-spacing: .06em; }

.fusion-screen .how__panel { width: min(1000px, 100%); max-height: 92svh; overflow-y: auto; }
.fusion-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.fusion-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(7,12,10,.62); padding: 10px 12px; clip-path: var(--cut); }
.fusion-card__part { min-width: 0; }
.fusion-card__part small { display: block; font-family: var(--font-display); font-size: 6px; letter-spacing: .08em; color: var(--muted-2); }
.fusion-card__part strong { display: block; font-family: var(--font-cn); font-size: 10px; color: var(--paper); margin-top: 2px; }
.fusion-card__plus { font-family: var(--font-display); font-size: 11px; color: var(--amber); }
.fusion-card__result { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 7px; display: flex; align-items: baseline; gap: 8px; }
.fusion-card__result strong { font-family: var(--font-cn); color: var(--amber); font-size: 11px; }
.fusion-card__result span { font-family: var(--font-cn); color: var(--muted); font-size: 8px; line-height: 1.6; }
.result__actions .is-hidden { display: none; }


.stage-picker-card { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 10px; border: 1px solid rgba(95,240,206,.3); background: linear-gradient(100deg, rgba(95,240,206,.07), rgba(8,13,11,.5)); clip-path: var(--cut); transition: border-color .2s, background .2s; }
.stage-picker-card:hover { border-color: var(--cyan); background: rgba(95,240,206,.09); }
.stage-picker-card__index { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--font-display); font-size: 11px; color: var(--cyan); }
.stage-picker-card__copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.stage-picker-card__copy strong { font-family: var(--font-cn); font-size: 13px; color: var(--paper); letter-spacing: .06em; }
.stage-picker-card__copy small { font-family: var(--font-display); font-size: 6px; color: var(--cyan); letter-spacing: .1em; }
.stage-picker-card__copy em { font-family: var(--font-cn); font-style: normal; font-size: 8px; color: var(--muted); }
.stage-picker-card__cta { flex: 0 0 auto; font-family: var(--font-cn); font-size: 9px; color: var(--cyan); }
.stage-picker-card__cta b { font-family: var(--font-display); font-weight: 400; margin-left: 3px; }
.stage-picker-card__difficulty { align-self: flex-start; margin-top: 4px; padding: 2px 6px; border: 1px solid rgba(95,240,206,.32); font-family: var(--font-display); font-size: 6px; line-height: 1.2; letter-spacing: .08em; color: var(--cyan); }
.difficulty-picker { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(6,12,9,.48); }
.difficulty-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.difficulty-card { min-width: 0; padding: 8px 9px; border: 1px solid var(--line-strong); background: rgba(8,14,11,.58); color: var(--paper-dim); text-align: left; clip-path: var(--cut); transition: border-color .2s, background .2s, transform .2s; }
.difficulty-card:hover { border-color: rgba(255,181,45,.5); transform: translateY(-1px); }
.difficulty-card strong { display: block; font-family: var(--font-cn); font-size: 12px; letter-spacing: .08em; color: var(--paper); }
.difficulty-card small { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 6px; letter-spacing: .08em; color: var(--muted); }
.difficulty-card em { display: block; margin-top: 5px; font-family: var(--font-cn); font-style: normal; font-size: 8px; line-height: 1.35; color: var(--muted-2); }
.difficulty-card[data-difficulty="hard"] { border-color: rgba(255,181,45,.24); }
.difficulty-card[data-difficulty="hard"].is-active { border-color: var(--amber); background: rgba(255,181,45,.1); }
.difficulty-card[data-difficulty="nightmare"] { border-color: rgba(255,79,88,.25); }
.difficulty-card[data-difficulty="nightmare"].is-active { border-color: var(--red); background: rgba(255,79,88,.1); }
.difficulty-card.is-active strong { color: var(--cyan); }
.difficulty-card[data-difficulty="hard"].is-active strong { color: var(--amber); }
.difficulty-card[data-difficulty="nightmare"].is-active strong { color: #ff8a8d; }
.difficulty-hint { display: block; margin-top: 7px; font-family: var(--font-cn); font-size: 8px; color: var(--muted-2); }

.stage-select__panel { max-width: 1080px; }
.codex-panel { max-width: 1120px; }
.codex-grid { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; padding: 2px 4px 10px; min-height: 0; }
.codex-section__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 8px; letter-spacing: .12em; color: var(--cyan); }
.codex-section__head b { font-family: var(--font-cn); font-size: 8px; font-weight: 400; color: var(--muted-2); letter-spacing: .04em; }
.codex-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.codex-card { min-width: 0; display: flex; flex-direction: column; padding: 8px; border: 1px solid var(--line); background: rgba(7,13,10,.62); clip-path: var(--cut); }
.codex-card.is-locked { opacity: .42; filter: saturate(.25); }
.codex-card.is-elite { border-color: rgba(255,181,45,.3); }
.codex-card.is-boss { border-color: rgba(255,79,88,.42); background: rgba(255,79,88,.045); }
.codex-card canvas { width: 100%; height: auto; aspect-ratio: 200 / 116; image-rendering: pixelated; background: radial-gradient(ellipse at center, rgba(95,240,206,.045), transparent 65%); }
.codex-card__name { margin-top: 4px; font-family: var(--font-cn); font-size: 10px; color: var(--paper); letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex-card__en { margin-top: 1px; font-family: var(--font-display); font-size: 6px; color: var(--cyan); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex-card__desc { margin-top: 5px; font-family: var(--font-cn); font-size: 8px; line-height: 1.45; color: var(--muted-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.codex-legend { display: flex; gap: 12px; font-family: var(--font-cn); font-size: 8px; color: var(--muted-2); }
.codex-legend span::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: var(--cyan); }
.codex-legend .is-elite::before { background: var(--amber); }
.codex-legend .is-boss::before { background: var(--red); }
.save-panel { max-width: 820px; }
.save-text { width: 100%; min-height: 220px; resize: vertical; padding: 12px; border: 1px solid var(--line-strong); background: rgba(3,8,6,.8); color: var(--paper-dim); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.55; outline: none; }
.save-text:focus { border-color: var(--cyan); }
.save-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.save-status { font-family: var(--font-cn); font-size: 9px; color: var(--muted-2); }
.save-status.is-ok { color: var(--cyan); }
.save-status.is-bad { color: var(--red); }
.save-foot-note { font-family: var(--font-cn); font-size: 8px; color: var(--muted-2); }
.text-btn--danger { color: #ff8a8d; border-color: rgba(255,79,88,.35); }
.text-btn--danger:hover { color: #fff; border-color: var(--red); background: rgba(255,79,88,.1); }

.stage-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stage-grid .arena-card { min-height: 86px; }
.stage-grid .arena-card__name { font-size: 12px; }
.stage-grid .arena-card__trait { display: block; }
.stage-select__foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 1180px) {
  .hangar-main { grid-template-columns: minmax(0, 1.08fr) minmax(320px, .78fr); gap: 28px; }
  .game-title { font-size: clamp(57px, 8.5vw, 98px); }
  .arena-card__trait { display: none; }
  .arena-card { min-height: 69px; }
  .battle-layout { grid-template-columns: minmax(0, 1fr) 268px; }
  .deck-hint { display: none; }
  .combat-deck { grid-template-columns: 1.05fr .8fr 1.1fr; }
  .deck-slot--objective { border-right: 0; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .menu-screen { min-height: 100svh; padding: 16px 20px 0; }
  .hangar-main { grid-template-columns: 1fr; align-items: start; gap: 30px; padding-top: 32px; }
  .hero-visual { justify-self: stretch; max-width: none; }
  .visual-frame { max-height: 480px; aspect-ratio: 1.25; }
  .hero-copy { max-width: none; }
  .game-title { font-size: clamp(66px, 15vw, 121px); }
  .footer-meta { display: none; }
  .game-layout { min-height: 100svh; height: auto; padding: 10px 12px 14px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px; height: auto; padding: 5px 0 10px; }
  .run-clock { grid-column: 1 / -1; grid-row: 2; }
  .topbar__brand span { display: none; }
  .tiny-stat { display: none; }
  .battle-layout { grid-template-columns: 1fr; }
  .battle-frame { max-height: none; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .side-tip { display: none; }
  .loadout-panel, .intel-panel { grid-column: auto; }
  .combat-deck { grid-template-columns: 1fr 1fr; }
  .deck-slot--objective { border-top: 1px solid var(--line); }
  .deck-slot:nth-child(2) { border-right: 0; }
  .deck-hint { display: none; }
  .upgrade-cards { grid-template-columns: 1fr; gap: 10px; max-height: 65vh; overflow-y: auto; padding: 2px 5px 8px; }
  .upgrade-card { min-height: 0; display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto 1fr auto; padding: 10px; }
  .upgrade-card__top { grid-column: 1 / -1; padding: 0 0 5px; }
  .upgrade-card__icon { grid-column: 1; grid-row: 2; width: 76px; height: 76px; margin: 0; }
  .upgrade-card__icon canvas { width: 56px; height: 56px; }
  .upgrade-card__body { grid-column: 2; grid-row: 2; padding: 0 0 0 16px; }
  .upgrade-card__name { font-size: 17px; }
  .upgrade-card__desc { margin: 5px 0; min-height: 0; font-size: 11px; line-height: 1.65; }
  .upgrade-card__pips { grid-column: 1 / -1; padding: 5px 0 0; }
  .upgrade-card__key { display: none; }
  .levelup__content { max-height: 92svh; }
  .levelup__head { margin-bottom: 15px; }
  .levelup__head p { display: none; }
  .levelup__foot { margin-top: 15px; }
  .result__content { padding: 25px 22px 24px; }
  .how__panel { padding: 28px 22px 24px; max-height: 92svh; overflow-y: auto; }
}
@media (max-width: 620px) {
  .hangar-top { align-items: flex-start; }
  .hangar-top__right .status-led, .hangar-top__right .pad-state { display: none; }
  .game-title { font-size: clamp(56px, 16.5vw, 95px); }
  .game-title__tag { right: 0; bottom: -14px; }
  .cn-title { margin-top: 23px; }
  .arena-options { flex-direction: column; }
  .arena-card { min-height: 61px; padding: 9px 11px; }
  .arena-card__index { position: absolute; right: 11px; top: 10px; margin: 0; }
  .arena-card__name { font-size: 12px; }
  .mode-options { flex-direction: column; }
  .mode-card { min-width: 0; width: 100%; flex-direction: row; align-items: baseline; gap: 8px; }
  .menu-actions { gap: 16px; }
  .cta { min-width: 0; flex: 1; }
  .record-strip { gap: 18px; }
  .sidebar { grid-template-columns: 1fr; }
  .combat-deck { grid-template-columns: 1fr; }
  .deck-slot { border-right: 0; border-bottom: 1px solid var(--line); }
  .deck-slot--objective { border-bottom: 0; }
  .levelup__head h2 em { display: block; margin: 8px 0 0; }
  .levelup__foot { gap: 12px; flex-wrap: wrap; }
  .levelup__hint { display: none; }
  .result__stats { grid-template-columns: 1fr 1fr; }
  .result__stats div:nth-child(2) { border-right: 0; }
  .result__stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .result__actions { flex-direction: column; gap: 8px; }
  .result__actions .cta { width: 100%; }
  .how__grid { grid-template-columns: 1fr; }
  .how__legend { gap: 8px 12px; }
  .overlay { padding: 12px; }
}
@media (hover: none) and (pointer: coarse) and (max-width: 900px) {
  .mobile-stick, .mobile-dash { display: block; }
  .touch-hint { display: block; }
  .deck-hint { display: none; }
  .canvas-id { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.loadout-hint { padding: 6px 5px 2px; font-family: var(--font-cn); font-size: 8px; color: rgba(139,155,142,.55); letter-spacing: .04em; }
/* compact in-frame vitals for touch layouts */
.mobile-hud { display: none; position: absolute; z-index: 8; top: 7px; left: 7px; right: 7px; gap: 5px; pointer-events: none; }
.mobile-hud__cell { flex: 1; display: flex; align-items: center; gap: 6px; height: 19px; padding: 0 6px; border: 1px solid rgba(95,240,206,.22); background: rgba(4,10,8,.68); font-family: var(--font-display); font-size: 7px; color: var(--muted); letter-spacing: .06em; }
.mobile-hud__cell i { flex: 1; height: 3px; background: rgba(95,240,206,.13); overflow: hidden; }
.mobile-hud__cell i b { display: block; height: 100%; width: 100%; background: var(--cyan); box-shadow: 0 0 6px rgba(95,240,206,.4); transition: width .15s; }
.mobile-hud__cell.is-low { border-color: rgba(255,79,88,.45); }
.mobile-hud__cell.is-low i b { background: var(--red); box-shadow: 0 0 6px rgba(255,79,88,.5); }
.mobile-hud__level { display: flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; border: 1px solid var(--line-strong); background: rgba(4,10,8,.68); font-family: var(--font-display); font-size: 7px; color: var(--muted); }
.mobile-hud__level strong { font-size: 9px; font-weight: 400; color: var(--amber); }
@media (max-width: 900px) and (orientation: portrait) {
  .game-layout { height: 100svh; min-height: 0; overflow: hidden; }
  .battle-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .battle-column { flex: 0 0 auto; min-height: 0; justify-content: flex-start; }
  .battle-frame { width: 100%; height: auto; max-height: calc(100svh - 170px); margin: 0 auto; }
  .sidebar { display: none; }
  .combat-deck { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; flex: 0 0 auto; }
  .combat-deck .deck-slot { height: 43px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .combat-deck .deck-slot:nth-child(2) { border-right: 0; }
  .combat-deck .deck-slot--objective { border-bottom: 0; }
  .combat-deck .deck-slot__icon { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 2px; }
  .combat-deck .deck-slot__copy small { font-size: 7px; }
  .combat-deck .deck-slot__copy strong { font-size: 9px; }
  .combat-deck .deck-hint { display: none; }
  .mobile-hud { display: flex; }
  .mobile-stick, .mobile-dash { position: fixed; }
  .mobile-stick { left: 28px; bottom: 37px; width: 86px; height: 86px; }
  .mobile-stick i { left: 28px; top: 28px; width: 28px; height: 28px; }
  .mobile-dash { right: 30px; bottom: 50px; width: 62px; height: 62px; font-size: 8px; }
}
@media (max-width: 900px) and (max-height: 500px) {
  body { overflow: hidden; }
  .game-layout { height: 100svh; min-height: 0; display: flex; flex-direction: column; padding: 4px 8px 6px; }
  .topbar { flex: 0 0 auto; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 1px 0 3px; align-items: center; }
  .topbar__brand span, .topbar__brand .brand-sub { display: none; }
  .topbar__brand strong { font-size: 10px; letter-spacing: .06em; }
  .topbar .mini-mark { width: 20px; height: 20px; }
  .topbar .icon-btn { width: 26px; height: 24px; }
  .topbar .icon-btn svg { width: 13px; height: 13px; }
  .run-clock { grid-column: 2; grid-row: 1; }
  .run-clock__meta { margin-bottom: 3px; }
  .topbar__controls { gap: 4px; }
  .run-clock__meta span:first-child { font-size: 8px; }
  .run-clock__bar { height: 2px; }
  .battle-layout { flex: 1; min-height: 0; display: flex; padding-top: 5px; }
  .battle-column { flex: 1; min-height: 0; justify-content: center; }
  .battle-frame { width: auto; height: 100%; max-height: 100%; aspect-ratio: 5 / 3; margin: 0 auto; }
  .sidebar, .combat-deck { display: none; }
  .mobile-hud { display: flex; }
  .touch-hint { display: block; }
  .mobile-stick, .mobile-dash { display: block; position: fixed; }
  .mobile-stick { left: 28px; bottom: 33px; width: 72px; height: 72px; }
  .mobile-stick i { left: 22px; top: 22px; width: 26px; height: 26px; }
  .mobile-dash { right: 28px; bottom: 44px; width: 52px; height: 52px; font-size: 7px; }
  .boss-hud { bottom: 6px; width: min(58%, 430px); padding: 5px 8px; }
  .boss-hud__meta { font-size: 6px; margin-bottom: 3px; }
  .boss-hud__bar { height: 4px; }
  .toast-stack { top: 6px; right: 6px; }
}
@media (max-width: 620px) and (orientation: portrait) {
  .rotate-hint { display: flex; position: fixed; z-index: 30; left: 50%; bottom: 12px; transform: translateX(-50%); align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid rgba(255,181,45,.35); background: rgba(7,12,10,.86); color: var(--paper-dim); font-family: var(--font-cn); font-size: 10px; letter-spacing: .06em; pointer-events: none; }
  #gameLayout:not(.is-hidden) ~ .rotate-hint { display: flex; bottom: 164px; top: auto; }
}
@media (max-height: 500px) {
  .menu-screen { height: 100svh; min-height: 0; overflow: hidden; padding: 8px 16px 6px; }
  .hangar-top { height: 34px; padding-bottom: 5px; }
  .brand-mark { width: 25px; height: 25px; padding: 3px; gap: 2px; }
  .brand-name { font-size: 11px; }
  .brand-sub { display: none; }
  .hangar-top__right { gap: 8px; }
  .icon-btn { width: 30px; height: 27px; }
  .icon-btn svg { width: 14px; height: 14px; }
  .hangar-main { display: block; max-width: none; padding: 7px 0 0; min-height: 0; }
  .hero-copy { max-width: none; }
  .eyebrow { margin-bottom: 7px; font-size: 7px; }
  .game-title { display: flex; align-items: baseline; gap: .06em; width: max-content; max-width: 100%; font-size: clamp(52px, 8.2vh, 72px); line-height: .82; letter-spacing: -.08em; }
  .game-title__fire { margin-left: 0; }
  .game-title__tag { right: -8px; bottom: -21px; font-size: 9px; padding: .35em .6em .3em; box-shadow: 4px 4px 0 rgba(255,181,45,.58); }
  .cn-title { margin-top: 28px; font-size: 13px; gap: .22em; }
  .cn-title span { padding-bottom: 4px; }
  .hero-pitch, .record-strip, .hero-visual, .hangar-footer { display: none; }
  .section-label { margin-bottom: 5px; font-size: 7px; }
  .arena-options { gap: 6px; }
  .arena-card { min-height: 52px; padding: 6px 9px; }
  .arena-card__index { margin-bottom: 4px; font-size: 7px; }
  .arena-card__name { font-size: 11px; }
  .arena-card__en { font-size: 6px; margin-top: 1px; }
  .arena-card__trait { display: none; }
  .menu-actions { margin-top: 8px; gap: 16px; }
  .cta { min-height: 48px; padding: 8px 13px; }
  .cta__copy strong { font-size: 14px; }
  .cta__copy small { font-size: 7px; }
  .text-btn { padding: 7px 9px; font-size: 7px; }
  .reveal { animation: none; opacity: 1; }
}

.upgrade-card.is-pad { outline: 2px solid var(--accent); outline-offset: 2px; transform: translateY(-2px); }

/* co-op deployment accent */
.mode-card[data-coop="1"].is-active {
  border-color: var(--cyan);
  background: linear-gradient(145deg, rgba(95,240,206,.12), rgba(95,240,206,.02) 60%);
  box-shadow: inset 0 0 0 1px rgba(95,240,206,.10);
}
.coop-panel .panel-head b { color: var(--cyan); }

@media (max-width: 900px) {
  .arena-options { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .tank-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tank-select__panel { padding: 24px 18px 16px; max-height: 94svh; }
  .tank-select__foot { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tank-select__foot .cta { width: 100%; }
  .fusion-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .arena-options { grid-template-columns: 1fr 1fr; }
  .arena-card { min-height: 57px; padding: 7px 8px 6px; }
  .arena-card__name { font-size: 10px; }
  .arena-card__en, .arena-card__trait { display: none; }
  .pilot-card__preview { flex-basis: 58px; width: 58px; height: 46px; }
  .pilot-card__preview canvas { width: 58px; height: 46px; }
  .pilot-card__cta { font-size: 8px; }
  .tank-grid { grid-template-columns: 1fr 1fr; }
  .tank-card canvas { width: 64px; height: 44px; }
  .tank-select__head h2 { font-size: 24px; }
  .fusion-card { grid-template-columns: 1fr auto 1fr; padding: 8px; }
  .fusion-card__result { display: block; }
}

@media (max-width: 900px) {
  .stage-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stage-select__panel { max-height: 94svh; }
  .stage-select__foot { align-items: flex-start; flex-direction: column; }
  .stage-select__foot .cta { width: 100%; }
}
@media (max-width: 620px) {
  .stage-picker-card__copy em, .stage-picker-card__cta { display: none; }
  .stage-grid { grid-template-columns: 1fr 1fr; }
  .stage-grid .arena-card { min-height: 68px; }
  .stage-grid .arena-card__trait { display: none; }
}
@media (max-height: 780px) and (min-width: 901px) {
  .hangar-main { padding-top: 10px; padding-bottom: 10px; gap: 28px; }
  .game-title { font-size: clamp(54px, 7vw, 104px); }
  .cn-title { margin-top: 22px; }
  .hero-pitch { margin-top: 10px; margin-bottom: 13px; line-height: 1.65; }
  .arena-picker { margin-top: 8px; }
  .pilot-picker, .mode-picker { margin-top: 9px; }
  .menu-actions { margin-top: 14px; }
  .record-strip { margin-top: 14px; padding-top: 9px; }
  .pilot-card { padding: 4px 8px; }
  .pilot-card__preview { height: 43px; flex-basis: 62px; width: 62px; }
  .pilot-card__preview canvas { width: 62px; height: 43px; }
  .mode-card { padding: 7px 11px; }
}

@media (max-width: 620px) {
  .pilot-pair { grid-template-columns: 1fr; }
  .tank-select__actions { min-width: 100%; width: 100%; }
  .tank-select__actions .cta { min-width: 100%; }
  .tank-cores { text-align: left; }
}

@media (max-width: 620px) {
  .mobile-stick, .mobile-dash { display: block; }
  .touch-hint { display: block; }
  .difficulty-picker { padding: 8px; }
  .difficulty-options { gap: 5px; }
  .difficulty-card { padding: 7px 6px; }
  .difficulty-card em { display: none; }
  .difficulty-card strong { font-size: 11px; }
  .codex-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .codex-card canvas { height: auto; }
  .codex-card__desc { display: none; }
  .save-text { min-height: 160px; font-size: 9px; }
}
@media (max-width: 900px) {
  .stage-picker-card__difficulty { font-size: 5px; }
  .difficulty-card em { font-size: 7px; }
}

/* ================= FIXED VIEWPORT / NO PAGE SCROLL ================= */
html, body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body { position: fixed; inset: 0; }
#app, .app {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.menu-screen {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.hangar-main { min-height: 0; overflow: hidden; }
.game-layout {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

@media (max-height: 1200px) {
  .hero-pitch, .record-strip { display: none; }
}
@media (max-height: 820px) {
  .game-title { font-size: clamp(52px, min(8.5vw, 9vh), 100px); }
  .cn-title { margin-top: 18px; }
  .hangar-main { padding: 8px 0; }
}
@media (max-height: 760px) {
  .cn-title { display: none; }
  .eyebrow { margin-bottom: 6px; }
}
@media (max-width: 900px) {
  .hero-visual { display: none; }
  .hangar-main { display: block; max-width: none; }
  .menu-screen { padding: 10px 20px 0; }
  .game-layout { height: 100dvh; min-height: 0; overflow: hidden; }
}
@media (max-height: 500px) {
  .menu-screen { padding: 4px 14px 4px; }
  .hangar-top { height: 30px; padding-bottom: 4px; }
  .hangar-main { display: block; padding: 4px 0 0; }
  .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    grid-template-rows: auto auto auto;
    column-gap: 16px;
    row-gap: 5px;
    max-width: none;
    align-content: start;
  }
  .eyebrow, .cn-title, .hero-pitch, .record-strip, .hero-visual, .hangar-footer { display: none; }
  .game-title { grid-column: 1; grid-row: 1; margin: 0; font-size: clamp(42px, 11vh, 62px); line-height: .8; }
  .arena-picker { grid-column: 1; grid-row: 2; align-self: start; }
  .pilot-picker { grid-column: 2; grid-row: 1; margin-top: 0; align-self: start; }
  .mode-picker { grid-column: 2; grid-row: 2; margin-top: 0; align-self: start; }
  .menu-actions { grid-column: 1 / -1; grid-row: 3; margin-top: 2px; gap: 8px 12px; }
  .section-label { margin-bottom: 4px; font-size: 7px; }
  .stage-hint { display: none; }
  .arena-card { min-height: 48px; padding: 5px 7px; }
  .stage-picker-card { min-height: 48px; padding: 5px 8px; }
  .pilot-pair { gap: 5px; }
  .pilot-card { padding: 5px 7px; }
  .pilot-card__preview { flex-basis: 48px; width: 48px; height: 34px; }
  .pilot-card__preview canvas { width: 48px; height: 34px; }
  .pilot-card__copy strong { font-size: 10px; }
  .pilot-card__copy small, .pilot-card__copy em { font-size: 6px; }
  .mode-options { gap: 4px; }
  .mode-card { min-width: 0; padding: 5px 8px; }
  .mode-card strong { font-size: 10px; }
  .mode-card small { font-size: 5px; }
  .menu-actions .text-btn { padding: 5px 7px; font-size: 8px; }
  .menu-actions .cta { min-height: 40px; padding: 6px 10px; }
  .cta__copy strong { font-size: 12px; }
  .cta__copy small { font-size: 6px; }
  .icon-btn { width: 28px; height: 25px; }
  .icon-btn svg { width: 13px; height: 13px; }
  .brand-name { font-size: 11px; }
  .brand-sub { display: none; }
}

/* Gamepad / keyboard focus ring for the whole UI */
button.is-pad-focus, [tabindex].is-pad-focus, .upgrade-card.is-pad-focus {
  outline: 2px solid var(--cyan) !important;
  outline-offset: 3px !important;
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 4px rgba(95,240,206,.12), 0 0 24px rgba(95,240,206,.2) !important;
}

/* topbar objective + single thruster deck */
.run-clock__meta { gap: 10px; }
.run-clock__meta #objectiveLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-cn);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--paper-dim);
}
.combat-deck--thruster {
  display: flex;
  grid-template-columns: none;
  min-height: 64px;
}
.combat-deck--thruster .deck-slot--thruster {
  flex: 1;
  gap: 13px;
  padding: 10px 16px;
  border-right: 0;
}
.combat-deck--thruster .dash-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  margin-top: 3px;
}
.combat-deck--thruster .dash-icon svg { width: 22px; height: 22px; }
.combat-deck--thruster .deck-slot__copy { flex: 1; }
.combat-deck--thruster .deck-slot__copy small { font-size: 11px; color: var(--cyan); }
.combat-deck--thruster .deck-slot__copy strong { font-size: 15px; }
.combat-deck--thruster .dash-meter { left: 16px; right: 16px; bottom: 7px; height: 3px; }
@media (max-width: 900px) and (orientation: portrait) {
  .combat-deck--thruster { display: flex; grid-template-columns: none; min-height: 0; }
  .combat-deck--thruster .deck-slot--thruster { height: 43px; padding: 6px 10px; border-right: 0; border-bottom: 0; }
  .combat-deck--thruster .dash-icon { width: 26px; height: 26px; flex-basis: 26px; margin-top: 1px; }
  .combat-deck--thruster .dash-icon svg { width: 17px; height: 17px; }
  .combat-deck--thruster .deck-slot__copy small { font-size: 8px; }
  .combat-deck--thruster .deck-slot__copy strong { font-size: 10px; }
  .combat-deck--thruster .dash-meter { left: 10px; right: 10px; bottom: 5px; height: 2px; }
  .run-clock__meta #objectiveLabel { font-size: 8px; }
}
@media (max-width: 620px) {
  .run-clock__meta { gap: 5px; }
  .run-clock__meta #objectiveLabel { font-size: 8px; }
}

/* base turret status */
.base-turret-note {
  margin-top: 5px;
  font-family: var(--font-cn);
  font-size: 8px;
  letter-spacing: .06em;
  color: var(--muted-2);
}
.base-turret-note.is-active { color: var(--cyan); }

/* two-action combat deck: thruster + team recall */
.combat-deck--actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 64px;
}
.combat-deck--actions .deck-slot {
  height: 100%;
  padding: 10px 14px;
}
.combat-deck--actions .deck-slot--thruster { border-right: 1px solid var(--line); }
.combat-deck--actions .dash-icon,
.combat-deck--actions .recall-icon { width: 34px; height: 34px; flex-basis: 34px; margin-top: 2px; }
.combat-deck--actions .dash-icon svg,
.combat-deck--actions .recall-icon svg { width: 20px; height: 20px; }
.combat-deck--actions .deck-slot__copy small { font-size: 10px; }
.combat-deck--actions .deck-slot__copy strong { font-size: 14px; }
.combat-deck--actions .dash-meter { left: 14px; right: 14px; bottom: 6px; }
.deck-slot--recall {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s, color .18s, opacity .18s;
}
.deck-slot--recall:hover:not(:disabled) { background: rgba(95,240,206,.06); }
.deck-slot--recall:disabled { cursor: default; opacity: .66; }
.recall-icon { display: grid; place-items: center; border: 1px solid rgba(95,240,206,.25); color: var(--cyan); }
.recall-icon svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.recall-meter { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: rgba(237,230,211,.1); }
.recall-meter i { display: block; height: 100%; width: 100%; background: var(--cyan); transition: width .12s linear; }
.deck-slot--recall.is-cooling .recall-icon { color: var(--muted-2); border-color: var(--line-strong); }
.deck-slot--recall.is-cooling .recall-meter i { background: var(--amber); }

/* item field manual */
.item-guide-panel { max-width: 980px; }
.item-guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; overflow-y: auto; padding: 2px 4px 10px; min-height: 0; }
.item-guide-card {
  position: relative; min-width: 0; min-height: 138px; padding: 11px 11px 10px;
  border: 1px solid var(--line); background: linear-gradient(155deg, rgba(15,23,18,.92), rgba(5,10,8,.88));
  clip-path: var(--cut);
}
.item-guide-card__head { display: flex; align-items: center; gap: 9px; }
.item-guide-card__glyph {
  display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px;
  border: 1px solid currentColor; color: var(--item-color); background: rgba(255,255,255,.025);
  font-family: var(--font-display); font-size: 19px; line-height: 1; box-shadow: inset 0 0 18px rgba(255,255,255,.035);
}
.item-guide-card__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-guide-card__title strong { font-family: var(--font-cn); font-size: 12px; font-weight: 600; color: var(--paper); letter-spacing: .05em; }
.item-guide-card__title small { font-family: var(--font-display); font-size: 6px; letter-spacing: .1em; color: var(--item-color); }
.item-guide-card__desc { margin-top: 9px; font-family: var(--font-cn); font-size: 10px; line-height: 1.5; color: var(--paper-dim); }
.item-guide-card__detail { margin-top: 5px; font-family: var(--font-cn); font-size: 8px; line-height: 1.55; color: var(--muted-2); }
.item-guide-card__tag { position: absolute; right: 9px; top: 9px; font-family: var(--font-display); font-size: 6px; color: var(--muted-2); letter-spacing: .08em; }

/* mobile recall */
.mobile-recall { display: none; z-index: 9; position: absolute; right: 88px; bottom: 25px; width: 46px; height: 46px; border-radius: 50%; background: rgba(95,240,206,.1); border: 1px solid rgba(95,240,206,.6); font-family: var(--font-display); font-size: 6px; color: var(--cyan); letter-spacing: .06em; }
.mobile-recall:disabled { opacity: .45; }
.mobile-recall.is-cooling { color: var(--amber); border-color: rgba(255,181,45,.5); }
@media (hover: none) and (pointer: coarse) and (max-width: 900px) {
  .mobile-recall { display: block; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .combat-deck--actions { display: flex; min-height: 0; }
  .combat-deck--actions .deck-slot { height: 43px; padding: 6px 10px; }
  .combat-deck--actions .dash-icon, .combat-deck--actions .recall-icon { width: 26px; height: 26px; flex-basis: 26px; margin-top: 1px; }
  .combat-deck--actions .dash-icon svg, .combat-deck--actions .recall-icon svg { width: 17px; height: 17px; }
  .combat-deck--actions .deck-slot__copy small { font-size: 8px; }
  .combat-deck--actions .deck-slot__copy strong { font-size: 10px; }
  .combat-deck--actions .dash-meter, .combat-deck--actions .recall-meter { left: 10px; right: 10px; bottom: 5px; height: 2px; }
  .mobile-recall { position: fixed; right: 102px; bottom: 58px; width: 44px; height: 44px; }
  .item-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) and (max-height: 500px) {
  .combat-deck--actions { display: none; }
  .mobile-recall { display: block; position: fixed; right: 88px; bottom: 47px; width: 40px; height: 40px; }
  .item-guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .item-guide-grid { grid-template-columns: 1fr; }
  .item-guide-card { min-height: 0; }
}

/* Keep the hangar fully usable on shorter desktop viewports: no clipped start row. */
@media (max-height: 1000px) and (min-width: 901px) {
  .hangar-main { padding-top: 12px; padding-bottom: 12px; }
  .game-title { font-size: clamp(55px, 7.4vw, 106px); }
  .cn-title { margin-top: 18px; font-size: clamp(15px, 1.3vw, 19px); }
  .eyebrow { margin-bottom: 10px; }
  .stage-hint { display: none; }
  .stage-picker-card { padding: 6px 9px; }
  .pilot-picker { margin-top: 9px; }
  .pilot-card { padding: 6px 9px; }
  .mode-picker { margin-top: 7px; }
  .menu-actions { flex-wrap: nowrap; gap: 7px; margin-top: 10px; }
  .menu-actions .cta { min-width: 210px; padding: 9px 12px; gap: 10px; }
  .menu-actions .text-btn { padding: 8px 8px; font-size: 9px; gap: 5px; white-space: nowrap; }
  .menu-actions .text-btn span { width: 15px; height: 15px; font-size: 7px; }
}

@media (max-width: 620px) {
  .hangar-main { padding-bottom: 4px; }
  .stage-hint { display: none; }
  .pilot-picker { margin-top: 6px; }
  .mode-picker { margin-top: 5px; }
  .mode-card { padding: 6px 9px; }
  .menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
  .menu-actions .cta { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 50px; padding: 8px 12px; }
  .menu-actions .text-btn { width: 100%; min-height: 32px; padding: 6px 7px; font-size: 8px; justify-content: center; }
  .menu-actions .text-btn span { width: 14px; height: 14px; font-size: 7px; }
}
