/* NIGHTSHIFT — original neon interface. No external images or fonts. */

:root {
  --bg: #04090b;
  --bg-2: #071216;
  --panel: rgba(7, 17, 20, 0.88);
  --panel-solid: #081216;
  --panel-2: #0b191d;
  --line: rgba(157, 206, 196, 0.18);
  --line-strong: rgba(201, 245, 234, 0.38);
  --paper: #e9f0e5;
  --muted: #8ca3a0;
  --dim: #5d7472;
  --acid: #d8ff3e;
  --acid-soft: rgba(216, 255, 62, 0.12);
  --cyan: #58f4ff;
  --orange: #ff8a4c;
  --pink: #ff5fa2;
  --violet: #c18cff;
  --danger: #ff5f5f;
  --green: #a8ff8a;
  --display: "Bahnschrift Condensed", "Bahnschrift SemiCondensed", "Arial Narrow", Impact, sans-serif;
  --body: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#city {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #04090b;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 7, 9, 0.48), transparent 38%, transparent 68%, rgba(3, 7, 9, 0.38)),
    linear-gradient(180deg, rgba(3, 7, 9, 0.44), transparent 26%, transparent 70%, rgba(3, 7, 9, 0.6));
}

.atmosphere-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 73% 20%, rgba(216, 255, 62, 0.08), transparent 25%),
    radial-gradient(circle at 12% 47%, rgba(255, 138, 76, 0.08), transparent 30%);
  mix-blend-mode: screen;
}

.scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background: repeating-linear-gradient(
    0deg,
    rgba(232, 255, 240, 0.13) 0,
    rgba(232, 255, 240, 0.13) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 47%, rgba(0, 0, 0, 0.58) 100%);
}

#app {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1240px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
}

.screen {
  width: 100%;
  height: 100dvh;
  position: relative;
}

/* ============ TYPE + SHARED CONTROLS ============ */

.kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
}

.kicker b {
  color: var(--acid);
  font-weight: 600;
}

.live-dot,
.signal-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.signal-dot {
  margin-right: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(4, 11, 13, 0.42);
  color: var(--paper);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--paper);
  background: rgba(20, 36, 38, 0.76);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn.primary {
  border-color: var(--acid);
  background: var(--acid);
  color: #071006;
  box-shadow: 0 0 30px rgba(216, 255, 62, 0.08);
}

.btn.primary:hover:not(:disabled) {
  background: #e6ff78;
  border-color: #e6ff78;
}

.btn.ghost {
  color: var(--muted);
}

.btn.ghost:hover:not(:disabled) {
  color: var(--paper);
}

.btn.small {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 10px;
}

.btn.danger {
  border-color: rgba(255, 95, 95, 0.45);
  color: #ff9a9a;
}

.btn:disabled {
  opacity: 0.34;
}

.icon-btn {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(4, 11, 13, 0.46);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

section-head {
  display: block;
}

/* ============ TITLE ============ */

.title-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(18px + var(--safe-top)) 20px calc(18px + var(--safe-bottom));
  overflow: hidden;
}

.title-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 8, 10, 0.88) 0%, rgba(3, 8, 10, 0.48) 45%, rgba(3, 8, 10, 0.12) 70%),
    linear-gradient(0deg, rgba(3, 8, 10, 0.78), transparent 38%);
}

.title-top,
.title-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
  animation: fade-up 700ms 80ms both;
}

.title-top {
  border-bottom: 1px solid rgba(200, 238, 227, 0.11);
  padding-bottom: 12px;
}

.title-main {
  align-self: center;
  width: min(100%, 780px);
  padding: 12px 0 20px;
  animation: fade-up 850ms 120ms both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 500px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(216, 255, 62, 0.6);
}

.wordmark {
  margin: 18px 0 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(78px, 16vw, 190px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.72;
  text-transform: uppercase;
}

.wordmark span {
  display: block;
}

.wordmark-outline {
  color: transparent;
  -webkit-text-stroke: 1.3px rgba(226, 245, 232, 0.58);
  text-shadow: 0 0 24px rgba(180, 255, 230, 0.08);
}

.wordmark-solid {
  margin-left: 0.14em;
  color: var(--acid);
  text-shadow: 0 0 44px rgba(216, 255, 62, 0.15);
}

.title-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 430px);
  margin-top: 24px;
}

.title-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.title-rule b {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.title-lede {
  max-width: 460px;
  margin: 20px 0 0;
  color: #becdc7;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.015em;
  line-height: 1.65;
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.title-actions .btn.primary {
  min-width: 190px;
}

.title-actions .btn.primary span {
  font-size: 17px;
  line-height: 0.8;
}

.title-foot {
  align-items: flex-end;
}

.title-disclaimer {
  max-width: 580px;
  margin: 0;
  color: var(--dim);
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-transform: none;
}

.title-disclaimer em {
  color: var(--muted);
  font-style: normal;
}

.build-tag {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: #536762;
  font-size: 8px;
  text-align: right;
}

.title-side {
  position: absolute;
  top: 50%;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.2em;
  transform: translateY(-50%) rotate(90deg) translateX(50%);
  transform-origin: right center;
}

.title-side-line {
  width: 42px;
  height: 1px;
  background: var(--line);
}

/* ============ HUB / TOPBAR ============ */

.hub {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(4, 10, 12, 0.72), rgba(4, 10, 12, 0.18) 28%, rgba(4, 10, 12, 0.72));
}

.topbar {
  position: relative;
  z-index: 4;
  padding: calc(12px + var(--safe-top)) 16px 0;
  background: linear-gradient(180deg, rgba(3, 8, 10, 0.95), rgba(3, 8, 10, 0.74) 72%, transparent);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--acid);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 1;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--acid);
  border-right: 1px solid var(--acid);
}

.brand-mark span {
  color: var(--muted);
  font-size: 11px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy b {
  color: var(--paper);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
}

.brand-copy small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shift-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.shift-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.wallet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 11px;
}

.res {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.74);
  backdrop-filter: blur(8px);
}

.res-icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.res-icon.scrip {
  color: var(--acid);
  transform: none;
}

.res-icon.signal {
  color: var(--cyan);
  border-radius: 50%;
}

.res-icon.charge {
  color: #071006;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 0;
  background: var(--orange);
}

.res-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.res-copy small {
  overflow: hidden;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-copy b {
  overflow: hidden;
  color: var(--paper);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-copy em {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.05em;
  line-height: 1;
}

.view {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 9px 14px calc(24px + var(--safe-bottom));
  scrollbar-color: rgba(157, 206, 196, 0.3) transparent;
  scrollbar-width: thin;
}

.view::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.battle-arena::-webkit-scrollbar {
  width: 4px;
}

.view::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.battle-arena::-webkit-scrollbar-thumb {
  background: rgba(157, 206, 196, 0.3);
}

.view-pane {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  animation: pane-in 280ms ease both;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(4, 11, 13, 0.92);
  backdrop-filter: blur(14px);
  padding-bottom: var(--safe-bottom);
}

.nav-btn {
  position: relative;
  display: flex;
  min-height: 55px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-right: 1px solid rgba(157, 206, 196, 0.08);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: color 150ms ease, background 150ms ease;
}

.nav-btn:last-child {
  border-right: 0;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.nav-btn.is-active {
  color: var(--acid);
  background: linear-gradient(0deg, rgba(216, 255, 62, 0.06), transparent);
}

.nav-btn.is-active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24%;
  width: 52%;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(216, 255, 62, 0.7);
}

.nav-btn:hover {
  color: var(--paper);
}

/* ============ CAMPAIGN ============ */

.sector-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(100deg, rgba(7, 17, 19, 0.96), rgba(7, 17, 19, 0.6) 56%, rgba(7, 17, 19, 0.22)),
    radial-gradient(circle at 82% 30%, rgba(216, 255, 62, 0.13), transparent 28%);
  padding: 18px;
  isolation: isolate;
}

.sector-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: linear-gradient(rgba(120, 209, 193, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 209, 193, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(135deg, black, transparent 72%);
}

.sector-hero::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(216, 255, 62, 0.17);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(216, 255, 62, 0.025), 0 0 80px rgba(216, 255, 62, 0.055);
}

.sector-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.sector-copy h2,
.page-head h2,
.recruit-copy h2 {
  margin: 13px 0 10px;
  font-family: var(--display);
  font-size: clamp(34px, 8vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.88;
  text-transform: uppercase;
}

.sector-copy h2 em,
.page-head h2 em,
.recruit-copy h2 em {
  color: var(--acid);
  font-style: normal;
}

.sector-copy > p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.sector-meta {
  display: flex;
  gap: 24px;
  margin-top: 22px;
}

.sector-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sector-meta small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.sector-meta b {
  color: var(--paper);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.sector-mark {
  position: absolute;
  right: 10px;
  bottom: -25px;
  z-index: 0;
  color: rgba(216, 255, 62, 0.1);
  font-family: var(--display);
  font-size: clamp(120px, 28vw, 250px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.7;
  pointer-events: none;
}

.idle-strip {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 20, 0.82);
}

.idle-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.idle-copy .kicker {
  font-size: 7px;
}

.idle-value {
  color: var(--acid);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.idle-copy > span:last-child {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.idle-meter {
  width: 58px;
  height: 4px;
  overflow: hidden;
  background: rgba(149, 196, 187, 0.13);
}

.idle-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--acid);
  box-shadow: 0 0 8px rgba(216, 255, 62, 0.5);
  transition: width 300ms ease;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 9px;
}

.section-head h3 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.section-tag {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.stage-list {
  display: grid;
  gap: 7px;
}

.stage-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  background: rgba(7, 17, 20, 0.84);
  color: var(--paper);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.stage-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.stage-card:hover:not(:disabled) {
  border-color: rgba(216, 255, 62, 0.38);
  border-left-color: var(--acid);
  background: rgba(14, 30, 31, 0.93);
  transform: translateX(2px);
}

.stage-card.is-current {
  border-left-color: var(--acid);
  background: linear-gradient(90deg, rgba(216, 255, 62, 0.075), rgba(7, 17, 20, 0.86) 48%);
}

.stage-card.is-current .stage-code {
  color: var(--acid);
}

.stage-card.is-cleared {
  opacity: 0.72;
}

.stage-card.is-cleared .stage-status {
  color: var(--green);
}

.stage-card.is-locked {
  opacity: 0.4;
}

.stage-code {
  align-self: flex-start;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.stage-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.stage-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.stage-boss {
  color: var(--orange);
  border: 1px solid rgba(255, 138, 76, 0.42);
  padding: 1px 3px;
  font-size: 6px;
}

.stage-main strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-brief {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 300;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  padding: 2px 4px;
  border: 1px solid rgba(157, 206, 196, 0.15);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.badge.signal {
  border-color: rgba(88, 244, 255, 0.25);
  color: var(--cyan);
}

.stage-side {
  display: flex;
  min-width: 43px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.stage-side small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.06em;
}

.stage-side b {
  color: var(--paper);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.stage-status {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
  text-align: right;
}

.campaign-note {
  margin: 13px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(157, 206, 196, 0.1);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.campaign-note b {
  color: var(--muted);
  font-weight: 400;
}

/* ============ SQUAD ============ */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0 3px;
}

.page-head h2 {
  font-size: clamp(34px, 8vw, 54px);
}

.power-readout {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding-bottom: 8px;
}

.power-readout small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.power-readout b {
  color: var(--acid);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.formation-panel {
  margin-top: 13px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 20, 0.84);
}

.formation-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.formation-head span:first-child {
  color: var(--muted);
}

.formation-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.formation-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
}

.row-label {
  display: flex;
  align-items: center;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.crew-slot {
  position: relative;
  display: flex;
  min-height: 79px;
  align-items: center;
  gap: 7px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.72);
  color: var(--paper);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.crew-slot:hover {
  border-color: rgba(216, 255, 62, 0.45);
  background: rgba(15, 31, 32, 0.9);
}

.crew-slot.empty {
  border-style: dashed;
  color: var(--dim);
}

.crew-slot.empty:hover {
  color: var(--acid);
}

.slot-portrait {
  width: 48px;
  height: 64px;
  flex: 0 0 48px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 45%, transparent);
  background: #061012;
}

.slot-portrait svg {
  display: block;
  width: 100%;
  height: 100%;
}

.slot-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.slot-copy b {
  overflow: hidden;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-copy small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

.slot-copy em {
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.05em;
}

.slot-index {
  position: absolute;
  top: 4px;
  right: 5px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
}

.slot-empty {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.slot-empty small {
  color: var(--dim);
  font-size: 6px;
}

.link-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 0 8px 8px;
}

.link-chip {
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--camp) 40%, transparent);
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.link-empty {
  padding: 3px 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.roster-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 2px solid color-mix(in srgb, var(--camp) 54%, transparent);
  background: rgba(7, 17, 20, 0.86);
  transition: border-color 150ms ease, background 150ms ease;
}

.roster-card:hover {
  border-color: color-mix(in srgb, var(--camp) 54%, transparent);
  background: rgba(11, 26, 28, 0.94);
}

.roster-hit {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  gap: 7px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.roster-portrait {
  width: 53px;
  height: 68px;
  flex: 0 0 53px;
  overflow: hidden;
  background: #061012;
}

.roster-portrait svg {
  display: block;
  width: 100%;
  height: 100%;
}

.roster-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.roster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.roster-top b {
  overflow: hidden;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stars {
  flex: 0 0 auto;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.roster-sub {
  overflow: hidden;
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-level {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.roster-level em {
  color: var(--dim);
  font-style: normal;
  font-size: 6px;
}

.roster-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.roster-actions button {
  min-width: 0;
  padding: 6px 3px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(9, 22, 24, 0.72);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease;
}

.roster-actions button:last-child {
  border-right: 0;
}

.roster-actions button:hover {
  background: rgba(216, 255, 62, 0.09);
  color: var(--acid);
}

.roster-actions small {
  color: var(--dim);
  font-size: 6px;
}

.squad-note {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(157, 206, 196, 0.1);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.6;
}

.squad-note b {
  color: var(--muted);
  font-weight: 400;
}

/* ============ RECRUIT ============ */

.recruit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  min-height: 230px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(7, 17, 20, 0.95), rgba(7, 17, 20, 0.58) 65%, rgba(7, 17, 20, 0.2)),
    radial-gradient(circle at 82% 33%, rgba(255, 95, 162, 0.16), transparent 38%);
}

.recruit-copy h2 {
  font-size: clamp(33px, 7.4vw, 54px);
}

.recruit-copy > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.58;
}

.recruit-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  margin-top: 18px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.recruit-rule span {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--camp, var(--pink)) 44%, transparent);
  background: #070d10;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(4, 10, 12, 0.92), transparent 58%);
  pointer-events: none;
}

.featured-art {
  position: absolute;
  inset: 0;
}

.featured-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.featured-meta {
  position: relative;
  z-index: 2;
  padding: 7px;
}

.featured-tag {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: 7px;
  padding: 3px 5px;
  border: 1px solid var(--camp, var(--pink));
  color: var(--camp, var(--pink));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.featured-meta b {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.featured-meta span {
  display: block;
  margin-top: 2px;
  color: var(--camp, var(--pink));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.pull-panel {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 20, 0.87);
}

.pull-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pull-panel h3 {
  margin: 5px 0 7px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.pull-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.pity {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pity > span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
}

.pity-pips {
  display: flex;
  gap: 3px;
}

.pity-pips i {
  display: block;
  width: 11px;
  height: 3px;
  background: rgba(157, 206, 196, 0.18);
}

.pity-pips i.is-on {
  background: var(--pink);
  box-shadow: 0 0 6px rgba(255, 95, 162, 0.5);
}

.pull-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.pull-actions .btn {
  flex: 1 1 145px;
  min-width: 0;
}

.pull-actions .btn small {
  color: currentColor;
  opacity: 0.62;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.rates {
  margin-top: 10px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.pool-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 8px;
}

.pool-head h3 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.pool-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 20, 0.72);
}

.pool-art {
  width: 35px;
  height: 46px;
  flex: 0 0 35px;
  overflow: hidden;
  background: #061012;
}

.pool-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pool-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.pool-copy b {
  overflow: hidden;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-copy span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.02em;
}

.pool-card.is-locked .pool-art {
  filter: grayscale(1) brightness(0.58);
  opacity: 0.7;
}

.pool-card.is-locked .pool-copy b {
  color: var(--muted);
}

.pool-card.is-locked .pool-copy b::after {
  content: "  LOCKED";
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  font-weight: 400;
}

.no-store {
  margin-top: 12px;
  padding: 8px;
  border: 1px solid rgba(157, 206, 196, 0.1);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: center;
}

/* ============ MODALS ============ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 12px;
  background: rgba(2, 6, 8, 0.79);
  backdrop-filter: blur(9px);
  animation: fade-in 180ms ease both;
}

.modal-card {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  background: #071115;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  padding: 17px;
  animation: modal-in 220ms ease both;
}

.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 1px;
  background: var(--acid);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}

.modal-kicker {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.modal-title {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.92;
  text-transform: uppercase;
}

.modal-title em {
  color: var(--acid);
  font-style: normal;
}

.modal-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.modal-actions .btn {
  flex: 1 1 140px;
}

/* Stage briefing */

.stage-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stage-modal-head h2 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: clamp(34px, 8vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.88;
  text-transform: uppercase;
}

.stage-modal-head h2 em {
  color: var(--acid);
  font-style: normal;
}

.stage-boss-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.stage-brief {
  max-width: 600px;
  margin: 12px 0 0;
  color: #b7c7c1;
  font-size: 12px;
  line-height: 1.65;
}

.stage-lineups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 15px;
}

.lineup-panel {
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(9, 22, 24, 0.6);
}

.lineup-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.lineup-panel-head b {
  color: var(--muted);
  font-weight: 400;
}

.lineup-team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.lineup-unit {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(157, 206, 196, 0.1);
  background: rgba(4, 11, 13, 0.55);
}

.lineup-art {
  width: 25px;
  height: 32px;
  flex: 0 0 25px;
  overflow: hidden;
}

.lineup-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lineup-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.lineup-info b {
  overflow: hidden;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-info span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stage-intel {
  margin-top: 8px;
  padding: 8px 9px;
  border-left: 2px solid var(--cyan);
  background: rgba(88, 244, 255, 0.035);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.stage-intel b {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.stage-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}

.compare-box {
  padding: 7px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.56);
}

.compare-box small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.05em;
}

.compare-box b {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.compare-box.threat b {
  color: var(--orange);
}

.compare-box.crew b {
  color: var(--acid);
}

.compare-vs {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
}

.stage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.stage-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reward-chip {
  padding: 4px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.reward-chip b {
  color: var(--paper);
  font-weight: 500;
}

.reward-chip.signal {
  border-color: rgba(88, 244, 255, 0.26);
  color: var(--cyan);
}

.deploy-note {
  flex: 1 0 100%;
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
}

.deploy-note.warn {
  color: var(--orange);
}

/* Hero file */

.hero-detail {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.hero-detail-art {
  height: 148px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 45%, transparent);
  background: #061012;
}

.hero-detail-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-detail-body {
  min-width: 0;
}

.hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.hero-title-row h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.9;
}

.hero-stars {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hero-role {
  margin: 5px 0 0;
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.hero-bio {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.stat-cell {
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.46);
}

.stat-cell small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.04em;
}

.stat-cell b {
  display: block;
  margin-top: 1px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.skill-panel {
  margin-top: 9px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 32%, transparent);
  background: color-mix(in srgb, var(--camp, var(--cyan)) 5%, transparent);
}

.skill-panel .kicker {
  color: var(--camp, var(--cyan));
  font-size: 6px;
}

.skill-panel h3 {
  margin: 4px 0 3px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.skill-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.hero-echo-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
}

.hero-echo-line b {
  color: var(--cyan);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.hero-actions .btn {
  flex: 1 1 100px;
  min-height: 34px;
  padding: 8px;
  font-size: 9px;
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.deploy-grid button {
  min-height: 28px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.56);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.deploy-grid button:hover {
  border-color: var(--acid);
  color: var(--acid);
}

.deploy-grid button.is-current {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(216, 255, 62, 0.08);
}

/* Operative picker */

.picker-intro {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picker-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.62);
  color: inherit;
  text-align: left;
}

.picker-card:hover {
  border-color: rgba(216, 255, 62, 0.45);
  background: rgba(15, 31, 32, 0.8);
}

.picker-card.is-current {
  border-color: var(--acid);
}

.picker-art {
  width: 39px;
  height: 50px;
  flex: 0 0 39px;
  overflow: hidden;
}

.picker-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.picker-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.picker-copy b {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.picker-copy span {
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
}

.picker-copy em {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
}

.picker-power {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--display);
  font-size: 14px;
  text-align: right;
}

.picker-power small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
}

/* Pull results */

.pull-modal .modal-title {
  margin-bottom: 0;
}

.pull-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
}

.pull-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.8);
  animation: pull-in 430ms calc(var(--i, 0) * 55ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pull-card.rarity-4 {
  border-color: color-mix(in srgb, var(--camp, var(--pink)) 58%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--camp, var(--pink)) 8%, transparent);
}

.pull-art {
  width: 100%;
  height: 116px;
  overflow: hidden;
  background: #061012;
}

.pull-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pull-info {
  padding: 6px;
}

.pull-info b {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pull-info span {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.02em;
}

.pull-new {
  color: var(--acid) !important;
}

.pull-echo {
  color: var(--cyan) !important;
}

.pull-modal .modal-actions {
  margin-top: 12px;
}

/* Help */

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 13px;
}

.help-item {
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.56);
}

.help-item b {
  display: block;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.help-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.help-note {
  margin: 12px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  line-height: 1.6;
}

/* ============ BATTLE ============ */

.battle-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(2, 7, 9, 0.9);
  animation: fade-in 220ms ease both;
}

.battle-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 35%, rgba(216, 255, 62, 0.065), transparent 38%),
    linear-gradient(180deg, rgba(3, 8, 10, 0.88), rgba(3, 8, 10, 0.72) 52%, rgba(3, 8, 10, 0.94));
}

.battle-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.27;
  background-image: linear-gradient(rgba(88, 244, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 244, 255, 0.06) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, transparent, black 22%, black 82%, transparent);
}

.battle-sky::after {
  content: "";
  position: absolute;
  inset: 22% 8%;
  border: 1px solid rgba(216, 255, 62, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(216, 255, 62, 0.018), 0 0 0 80px rgba(216, 255, 62, 0.012);
}

.battle-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: calc(11px + var(--safe-top)) 14px 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 10, 12, 0.99), rgba(4, 10, 12, 0.76));
}

.battle-stage-title h2 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}

.battle-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.battle-round {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-right: 2px;
}

.battle-round span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.06em;
}

.battle-round b {
  color: var(--paper);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.battle-tool {
  min-width: 33px;
  color: var(--muted);
}

.battle-arena {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  overflow-y: auto;
  padding: 8px 10px;
  scrollbar-width: thin;
}

.battle-side {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.battle-side-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.battle-side-head b {
  color: var(--muted);
  font-weight: 400;
}

.battle-side-head span:last-child {
  color: #536965;
}

/* ===== live 3D crew line ===== */

.battle-holo {
  position: relative;
  width: 100%;
  height: clamp(126px, 30vw, 166px);
  margin: 2px 0 6px;
  overflow: hidden;
  border: 1px solid rgba(88, 244, 255, 0.14);
  background:
    radial-gradient(ellipse at 50% 92%, rgba(88, 244, 255, 0.14), transparent 64%),
    linear-gradient(180deg, rgba(4, 14, 17, 0.5), rgba(3, 9, 11, 0.92));
  box-shadow: inset 0 0 24px rgba(88, 244, 255, 0.04);
}

.battle-holo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 244, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 244, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, black 55%, transparent);
  pointer-events: none;
}

.battle-holo::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 12px;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 244, 255, 0.55), transparent);
}

.battle-holo canvas {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: block;
  width: 100%;
  height: calc(100% - 13px);
}

/* Immediate SVG stand-ins while the compressed rigs decode. Each portrait
   fades as its unit attaches, and stays put if that unit's GLB fails. */
.battle-holo-fallback {
  position: absolute;
  inset: 0 0 13px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 8px 0;
  pointer-events: none;
}

.battle-holo-fallback-side {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 47%;
  align-items: end;
  gap: 2px;
}

.battle-holo-fallback-unit {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  opacity: 0.8;
  filter: drop-shadow(0 0 4px rgba(88, 244, 255, 0.12));
  transition: opacity 260ms ease, transform 260ms ease;
}

.battle-holo-fallback-unit.is-enemy {
  filter: drop-shadow(0 0 4px rgba(255, 90, 60, 0.18)) saturate(0.82);
}

.battle-holo-fallback-unit svg {
  display: block;
  width: 100%;
  max-height: 100%;
  height: auto;
}

.battle-holo-fallback-unit.is-loaded,
.battle-holo-fallback-unit.is-down,
.battle-holo-fallback-unit.is-lost {
  opacity: 0;
  transform: translateY(4px) scale(0.97);
}

.battle-holo-fallback-unit.is-failed {
  opacity: 0.7;
  filter: drop-shadow(0 0 5px rgba(255, 90, 60, 0.35)) saturate(1.2);
}

.battle-holo-tags {
  z-index: 2;
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 2px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.05em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.battle-holo-tags span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-holo-tags span.is-enemy {
  color: #ff9b86;
}

.battle-holo-tags i {
  display: block;
  width: 14px;
  height: 1px;
  margin: 2px auto 0;
  background: var(--camp, var(--cyan));
  opacity: 0.8;
}

.battle-holo-status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  color: #5f7a75;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.battle-holo.is-ready .battle-holo-status {
  opacity: 0;
}

.battle-holo.is-failed .battle-holo-status {
  opacity: 1;
  color: var(--orange);
}

.battle-holo.is-failed canvas {
  opacity: 0.12;
}

.battle-holo.is-lost .battle-holo-tags span.is-ally {
  opacity: 0.45;
}

.battle-holo.is-won::after {
  background: linear-gradient(90deg, transparent, rgba(216, 255, 62, 0.7), transparent);
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.unit {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 65px;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(157, 206, 196, 0.16);
  background: rgba(6, 15, 18, 0.87);
  transition: border-color 160ms ease, background 160ms ease, opacity 250ms ease, transform 160ms ease;
}

.unit::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 6px;
  width: 16px;
  height: 1px;
  background: var(--camp, var(--cyan));
  opacity: 0.6;
}

.unit.enemy {
  border-color: rgba(255, 95, 162, 0.15);
}

.unit.is-acting {
  border-color: var(--acid);
  background: rgba(21, 37, 27, 0.95);
  box-shadow: 0 0 18px rgba(216, 255, 62, 0.08);
  z-index: 1;
}

.unit.is-acting::after {
  content: "ACTING";
  position: absolute;
  top: -5px;
  right: 5px;
  padding: 1px 3px;
  background: var(--acid);
  color: #071006;
  font-family: var(--mono);
  font-size: 4.5px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.unit.is-hit {
  animation: unit-hit 300ms ease both;
}

.unit.is-heal {
  animation: unit-heal 380ms ease both;
}

.unit.is-skilling {
  box-shadow: 0 0 26px color-mix(in srgb, var(--camp, var(--cyan)) 18%, transparent);
}

.unit.is-down {
  opacity: 0.28;
  filter: grayscale(1);
}

.unit-face {
  position: relative;
  width: 39px;
  height: 53px;
  flex: 0 0 39px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 35%, transparent);
  background: #061012;
}

.unit-face svg {
  display: block;
  width: 100%;
  height: 100%;
}

.unit-data {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.unit-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
}

.unit-name b {
  overflow: hidden;
  color: var(--paper);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-name span {
  flex: 0 0 auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.03em;
}

.unit-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bar {
  position: relative;
  height: 4px;
  overflow: hidden;
  background: rgba(150, 195, 185, 0.15);
}

.bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--acid), #a8ff8a);
  transition: width 240ms ease;
}

.enemy .bar i {
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.bar.shield {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1.5px;
  background: var(--cyan);
  opacity: 0.8;
}

.unit-gauge {
  height: 2px;
  margin-top: 1px;
  overflow: hidden;
  background: rgba(88, 244, 255, 0.1);
}

.unit-gauge i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  transition: width 220ms ease, background 150ms ease;
}

.unit.is-ready .unit-gauge i {
  background: var(--acid);
  box-shadow: 0 0 7px var(--acid);
}

.unit.is-ready .unit-name b {
  color: var(--acid);
}

.unit-tags {
  display: flex;
  min-height: 7px;
  flex-wrap: wrap;
  gap: 3px;
  overflow: hidden;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.unit-tags span {
  color: var(--dim);
}

.unit-tags .status {
  color: var(--orange);
}

.unit-tags .shield-value {
  color: var(--cyan);
}

.battle-seam {
  display: flex;
  max-width: 680px;
  align-items: center;
  gap: 8px;
  margin: 6px auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
}

.battle-seam span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.battle-seam b {
  color: var(--acid);
  font-weight: 400;
  letter-spacing: 0.15em;
}

.battle-footer {
  padding: 7px 14px calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(3, 9, 11, 0.92);
}

.battle-feed {
  min-height: 26px;
  max-height: 34px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.battle-feed p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-feed p:last-child {
  color: var(--paper);
}

.battle-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.battle-note .live-dot {
  width: 3px;
  height: 3px;
}

.battle-callout {
  position: absolute;
  top: 36%;
  left: 50%;
  z-index: 3;
  max-width: 82%;
  padding: 4px 10px;
  border: 1px solid var(--acid);
  background: rgba(4, 10, 12, 0.9);
  color: var(--acid);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, 5px) skewX(-6deg);
  transition: opacity 180ms ease, transform 180ms ease;
}

.battle-callout.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) skewX(-6deg);
}

.battle-callout.is-enemy {
  border-color: var(--pink);
  color: var(--pink);
}

.float-text {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  color: var(--paper);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 4px #020708;
  animation: float-away 800ms ease-out forwards;
}

.float-text.crit {
  color: var(--acid);
  font-size: 20px;
}

.float-text.heal {
  color: var(--green);
}

.float-text.shield {
  color: var(--cyan);
  font-size: 13px;
}

.battle-result {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 14px;
  background: rgba(2, 7, 9, 0.84);
  backdrop-filter: blur(10px);
  animation: fade-in 220ms ease both;
}

.result-panel {
  position: relative;
  width: min(100%, 470px);
  border: 1px solid var(--line-strong);
  background: #071115;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
}

.result-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 62px;
  height: 2px;
  background: var(--acid);
}

.result-panel.lost::before {
  background: var(--danger);
}

.result-kicker {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.result-title {
  margin: 8px 0 0;
  color: var(--acid);
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 62px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.84;
  text-transform: uppercase;
}

.result-panel.lost .result-title {
  color: var(--danger);
}

.result-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 14px;
}

.result-stat {
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.5);
}

.result-stat small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
}

.result-stat b {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.result-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.result-reward {
  padding: 5px 7px;
  border: 1px solid rgba(216, 255, 62, 0.24);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 7px;
}

.result-reward.signal {
  border-color: rgba(88, 244, 255, 0.24);
  color: var(--cyan);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.result-actions .btn {
  flex: 1 1 140px;
}

/* ============ TOAST ============ */

.toast {
  position: fixed;
  right: 14px;
  bottom: calc(72px + var(--safe-bottom));
  z-index: 70;
  max-width: min(330px, calc(100vw - 28px));
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 16, 19, 0.96);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOTION ============ */

@keyframes pulse-dot {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pane-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pull-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes unit-hit {
  0% { transform: translateX(0); filter: brightness(1); }
  20% { transform: translateX(-3px); filter: brightness(1.8); }
  45% { transform: translateX(3px); }
  70% { transform: translateX(-1px); }
  100% { transform: translateX(0); filter: brightness(1); }
}

@keyframes unit-heal {
  0% { box-shadow: 0 0 0 rgba(168, 255, 138, 0); }
  35% { box-shadow: 0 0 22px rgba(168, 255, 138, 0.28); }
  100% { box-shadow: 0 0 0 rgba(168, 255, 138, 0); }
}

@keyframes float-away {
  0% { opacity: 0; transform: translate(-50%, 5px) scale(0.9); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(1.02); }
}

/* ============ RESPONSIVE ============ */

@media (min-width: 650px) {
  .view {
    padding-right: 20px;
    padding-left: 20px;
  }

  .topbar {
    padding-right: 22px;
    padding-left: 22px;
  }

  .wallet {
    max-width: 420px;
  }

  .sector-hero {
    min-height: 300px;
    padding: 25px;
  }

  .sector-copy > p {
    font-size: 12px;
  }

  .stage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-card {
    grid-template-columns: 36px minmax(0, 1fr) 48px;
    min-height: 92px;
  }

  .stage-brief {
    display: block;
  }

  .roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pull-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pull-art {
    height: 140px;
  }

  .battle-header {
    padding: 13px 22px 9px;
  }

  .battle-stage-title h2 {
    font-size: 29px;
  }

  .battle-arena {
    padding: 14px 20px;
  }

  .unit {
    min-height: 76px;
    gap: 7px;
    padding: 5px;
  }

  .unit-face {
    width: 47px;
    height: 63px;
    flex-basis: 47px;
  }

  .unit-name b {
    font-size: 14px;
  }

  .unit-tags {
    font-size: 6px;
  }

  .battle-callout {
    font-size: 30px;
  }

  .battle-footer {
    padding-right: 22px;
    padding-left: 22px;
  }

  .battle-feed {
    font-size: 9px;
  }
}

@media (min-width: 960px) {
  .title-screen {
    padding-right: 54px;
    padding-left: 54px;
  }

  .title-main {
    padding-left: 3vw;
  }

  .title-foot {
    padding-right: 5vw;
  }

  .title-foot .title-disclaimer {
    max-width: 620px;
  }

  .hub {
    background: linear-gradient(180deg, rgba(4, 10, 12, 0.55), rgba(4, 10, 12, 0.1) 30%, rgba(4, 10, 12, 0.55));
  }

  .topbar {
    padding-right: 36px;
    padding-left: 36px;
  }

  .wallet {
    position: absolute;
    top: calc(16px + var(--safe-top));
    right: 36px;
    width: 400px;
    margin: 0;
  }

  .topline {
    padding-right: 420px;
  }

  .top-tools {
    margin-top: -2px;
  }

  .view {
    padding: 10px 36px 30px;
  }

  .sector-hero {
    min-height: 320px;
    padding: 30px;
  }

  .sector-copy h2 {
    font-size: 66px;
  }

  .sector-copy > p {
    font-size: 13px;
  }

  .sector-meta {
    gap: 42px;
    margin-top: 34px;
  }

  .sector-meta b {
    font-size: 22px;
  }

  .sector-mark {
    right: 35px;
    bottom: -40px;
    font-size: 260px;
  }

  .idle-strip {
    margin-top: 9px;
    padding: 11px 14px;
  }

  .idle-meter {
    width: 140px;
  }

  .section-head {
    margin-top: 28px;
  }

  .section-head h3 {
    font-size: 24px;
  }

  .stage-card {
    min-height: 102px;
    padding: 14px;
    grid-template-columns: 45px minmax(0, 1fr) 62px;
    gap: 14px;
  }

  .stage-code {
    font-size: 16px;
  }

  .stage-main strong {
    font-size: 22px;
  }

  .stage-brief {
    font-size: 10px;
  }

  .stage-side b {
    font-size: 17px;
  }

  .page-head {
    padding-top: 22px;
  }

  .page-head h2 {
    font-size: 62px;
  }

  .formation-panel {
    max-width: 760px;
  }

  .roster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .recruit-hero {
    grid-template-columns: minmax(0, 1fr) 215px;
    min-height: 285px;
    padding: 26px;
  }

  .recruit-copy h2 {
    font-size: 64px;
  }

  .featured-meta {
    padding: 11px;
  }

  .featured-meta b {
    font-size: 23px;
  }

  .pull-panel {
    padding: 18px;
  }

  .pull-actions .btn {
    flex: 0 1 210px;
  }

  .pool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .modal-card {
    padding: 24px;
  }

  .hero-detail {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
  }

  .hero-detail-art {
    height: 188px;
  }

  .hero-bio {
    font-size: 11px;
  }

  .pull-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pull-art {
    height: 170px;
  }

  .battle-arena {
    justify-content: center;
    padding: 14px 24px;
  }

  .battle-side {
    max-width: 760px;
  }

  .battle-seam {
    max-width: 760px;
  }

  .team-grid {
    gap: 6px;
  }

  .team-row {
    gap: 6px;
  }

  .unit {
    min-height: 84px;
    padding: 7px;
  }

  .unit-face {
    width: 56px;
    height: 74px;
    flex-basis: 56px;
  }

  .unit-name b {
    font-size: 16px;
  }

  .unit-tags {
    font-size: 6px;
  }

  .bar {
    height: 5px;
  }

  .battle-callout {
    font-size: 38px;
  }

  .battle-footer {
    padding: 9px 40px calc(10px + var(--safe-bottom));
  }

  .battle-feed {
    max-height: 42px;
    font-size: 10px;
  }

  .toast {
    right: 36px;
    bottom: 40px;
  }
}

@media (max-width: 390px) {
  .title-screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .wordmark {
    font-size: 72px;
  }

  .title-actions .btn {
    flex: 1 1 100%;
  }

  .brand-copy small {
    display: none;
  }

  .res {
    padding: 5px 6px;
    gap: 5px;
  }

  .res-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    font-size: 8px;
  }

  .res-copy b {
    font-size: 13px;
  }

  .sector-copy h2 {
    font-size: 32px;
  }

  .sector-meta {
    gap: 15px;
  }

  .badge {
    font-size: 5px;
  }

  .stage-side b {
    font-size: 12px;
  }

  .stage-brief {
    display: none;
  }

  .stage-card {
    grid-template-columns: 25px minmax(0, 1fr) 38px;
    gap: 7px;
  }

  .stage-main strong {
    font-size: 15px;
  }

  .stage-badges .badge:nth-child(3) {
    display: none;
  }

  .formation-row {
    grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr);
  }

  .slot-portrait {
    width: 38px;
    height: 53px;
    flex-basis: 38px;
  }

  .slot-copy b {
    font-size: 11px;
  }

  .slot-copy small {
    font-size: 5px;
  }

  .roster-portrait {
    width: 45px;
    height: 60px;
    flex-basis: 45px;
  }

  .roster-top b {
    font-size: 12px;
  }

  .roster-sub {
    font-size: 5px;
  }

  .recruit-hero {
    grid-template-columns: minmax(0, 1fr) 104px;
    padding: 12px;
  }

  .recruit-copy h2 {
    font-size: 32px;
  }

  .featured-meta b {
    font-size: 15px;
  }

  .pull-panel {
    padding: 10px;
  }

  .pull-panel h3 {
    font-size: 18px;
  }

  .stage-lineups {
    gap: 4px;
  }

  .lineup-panel {
    padding: 5px;
  }

  .lineup-team {
    gap: 2px;
  }

  .lineup-unit {
    gap: 3px;
    padding: 2px;
  }

  .lineup-art {
    width: 20px;
    height: 27px;
    flex-basis: 20px;
  }

  .lineup-info b {
    font-size: 7px;
  }

  .hero-detail {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }

  .hero-detail-art {
    height: 108px;
  }

  .hero-title-row h2 {
    font-size: 28px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-cell:nth-child(5) {
    display: none;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .unit {
    min-height: 60px;
    gap: 4px;
    padding: 3px;
  }

  .unit-face {
    width: 33px;
    height: 46px;
    flex-basis: 33px;
  }

  .unit-name b {
    font-size: 10px;
  }

  .unit-name span {
    font-size: 4.5px;
  }

  .unit-tags {
    font-size: 4.5px;
  }

  .battle-header {
    padding-right: 9px;
    padding-left: 9px;
  }

  .battle-stage-title h2 {
    font-size: 20px;
  }

  .battle-tool {
    min-width: 29px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .battle-arena {
    padding-right: 7px;
    padding-left: 7px;
  }

  .battle-side-head {
    font-size: 6px;
  }

  .battle-callout {
    font-size: 20px;
  }

  .result-panel {
    padding: 15px;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-grid .result-stat:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 3D operative holograms ============ */

.hero-detail-art {
  position: relative;
  isolation: isolate;
}

.hero-3d-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  padding: 2px 4px;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 70%, transparent);
  background: rgba(3, 12, 14, 0.8);
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.hero-holo-btn {
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  text-align: left;
}

.hero-holo-btn b {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.modal-card.model-modal {
  width: min(100%, 980px);
}

.holo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 16px;
  align-items: stretch;
}

.holo-stage {
  position: relative;
  min-height: 340px;
  height: min(58vh, 460px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 52%, transparent);
  background:
    radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--camp, var(--cyan)) 17%, transparent), transparent 42%),
    radial-gradient(circle at 50% 36%, rgba(88, 244, 255, 0.07), transparent 55%),
    linear-gradient(180deg, #061013 0%, #03090b 100%);
  isolation: isolate;
}

.holo-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(88, 244, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 244, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to top, #000 10%, rgba(0, 0, 0, 0.4) 58%, transparent 90%);
  pointer-events: none;
}

.holo-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(88, 244, 255, 0.025) 3px 4px);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.holo-stage-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  opacity: 0.22;
  filter: saturate(0.7) contrast(1.08);
  transition: opacity 300ms ease;
}

.holo-stage-fallback svg {
  display: block;
  width: 100%;
  height: 100%;
}

.holo-stage.is-ready .holo-stage-fallback {
  opacity: 0;
}

.holo-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  cursor: grab;
  touch-action: none;
  transition: opacity 320ms ease;
}

.holo-stage.is-ready .holo-canvas {
  opacity: 1;
}

.holo-canvas.is-dragging {
  cursor: grabbing;
}

.holo-stage-hud {
  position: absolute;
  top: 10px;
  left: 11px;
  right: 11px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.holo-stage-hud b {
  color: var(--acid);
  font-weight: 500;
}

.holo-stage-hud b[data-state="error"] {
  color: var(--orange);
}

.holo-stage-hint {
  position: absolute;
  right: 11px;
  bottom: 10px;
  left: 11px;
  z-index: 5;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.holo-stage-hint span {
  color: var(--camp, var(--cyan));
}

.holo-stage.is-error .holo-stage-hint {
  color: var(--orange);
}

.holo-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--camp, var(--cyan)) 28%, transparent);
  background: rgba(5, 14, 17, 0.72);
}

.holo-index {
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.1em;
}

.holo-side h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.88;
}

.holo-bio {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.holo-readout {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 4px;
  margin-top: 3px;
}

.holo-readout div {
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 23, 0.52);
}

.holo-readout small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.07em;
}

.holo-readout b {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--camp, var(--cyan));
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holo-readout b[data-state="error"] {
  color: var(--orange);
}

.holo-power {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.holo-power span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.holo-power b {
  color: var(--acid);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 0.8;
}

.holo-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}

.holo-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.holo-actions .btn {
  justify-content: center;
  min-height: 30px;
  padding: 7px;
  font-size: 6px;
  text-align: center;
}

.holo-note {
  margin: 1px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .holo-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .holo-stage {
    min-height: 260px;
    height: min(43vh, 330px);
  }

  .holo-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .holo-side h2,
  .holo-bio,
  .holo-readout,
  .holo-power {
    grid-column: 1 / -1;
  }

  .holo-side h2 {
    font-size: 30px;
  }

  .holo-actions {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .holo-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .holo-stage {
    min-height: 230px;
    height: 230px;
  }

  .holo-side {
    padding: 10px;
  }

  .holo-readout {
    grid-template-columns: 1fr 1fr;
  }

  .holo-readout div:last-child {
    display: none;
  }
}

/* ============ ACT BOARD / RADIO / CUTSCENES ============ */

.radio-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--acid);
  background: rgba(7, 17, 20, 0.74);
}

.radio-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.radio-tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: radio-pulse 1.9s ease-in-out infinite;
}

.radio-line {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 200ms ease, transform 200ms ease;
}

.radio-line.is-swapping {
  opacity: 0;
  transform: translateY(4px);
}

.act-list {
  display: grid;
  gap: 15px;
}

.act-block {
  display: grid;
  gap: 7px;
}

.act-block.is-locked {
  opacity: 0.52;
}

.act-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  background: rgba(10, 22, 25, 0.62);
}

.act-block.is-current .act-head {
  border-left: 2px solid var(--acid);
  background: linear-gradient(90deg, rgba(216, 255, 62, 0.07), rgba(10, 22, 25, 0.62) 55%);
}

.act-code {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.act-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.act-copy b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.act-copy small {
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-progress {
  text-align: right;
}

.act-progress b {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.1;
}

.act-progress small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

/* ---- cinematic scene ---- */

.cutscene {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(14px, var(--safe-top)) 16px calc(14px + var(--safe-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 16%, var(--cs-a, rgba(11, 42, 48, 0.85)), transparent 58%),
    radial-gradient(circle at 84% 82%, var(--cs-b, rgba(216, 255, 62, 0.25)), transparent 54%),
    linear-gradient(160deg, #04090b, #06161a 55%, #030708);
  animation: fade-in 260ms ease both;
}

.cutscene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0, 0, 0, 0.2) 2px 3px);
  opacity: 0.5;
}

.cutscene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 170px 54px rgba(2, 6, 8, 0.9);
}

.cutscene-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cutscene-kicker {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cutscene-skip {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.cutscene-skip:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}

.cutscene-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(14px, 4vw, 44px);
  min-height: 0;
  padding: 78px 0 10px;
}

.cutscene-title {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 3;
  max-width: 100%;
  pointer-events: none;
  transition: opacity 700ms ease, transform 700ms ease;
}

.cutscene-title span {
  display: block;
  margin-bottom: 4px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.4em;
}

.cutscene-title b {
  display: block;
  font-family: var(--display);
  font-size: clamp(30px, 6.4vw, 60px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.9);
}

.cutscene-title.is-out {
  opacity: 0;
  transform: translateY(-10px);
}

.cutscene-portrait {
  position: relative;
  width: 100%;
  max-height: 48vh;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--camp, var(--cyan));
  background: linear-gradient(180deg, rgba(9, 24, 28, 0.9), rgba(4, 10, 12, 0.96));
}

.cutscene-portrait svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cutscene-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 56%, rgba(4, 10, 12, 0.9));
}

.cutscene-portrait.is-in {
  animation: cs-rise 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cutscene-copy {
  min-width: 0;
  padding-bottom: 4px;
}

.cutscene-who {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.cutscene-who b {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
}

.cutscene-who span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.cutscene-line {
  margin: 0;
  min-height: 4.2em;
  color: var(--paper);
  font-size: clamp(15px, 2.1vw, 21px);
  line-height: 1.5;
  text-wrap: pretty;
}

.cutscene-line.is-typing::after {
  content: "▌";
  color: var(--acid);
  animation: cs-caret 900ms steps(1) infinite;
}

.cutscene-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cutscene-dots {
  display: flex;
  gap: 5px;
}

.cutscene-dots i {
  width: 14px;
  height: 2px;
  background: var(--line-strong);
}

.cutscene-dots i.is-done {
  background: var(--acid);
}

.cutscene-next {
  padding: 10px 16px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: #07110c;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.cutscene-next:hover {
  filter: brightness(1.08);
}

/* ---- boss title card ---- */

.boss-intro {
  position: absolute;
  top: 34%;
  left: 50%;
  z-index: 6;
  width: min(90%, 620px);
  padding: 14px 20px;
  border-top: 1px solid var(--danger);
  border-bottom: 1px solid var(--danger);
  background: linear-gradient(180deg, rgba(4, 10, 12, 0.24), rgba(4, 10, 12, 0.88));
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  animation: boss-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.boss-intro.is-out {
  animation: boss-out 380ms ease both;
}

.boss-intro-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.34em;
}

.boss-intro b {
  display: block;
  font-family: var(--display);
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.boss-intro p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

@keyframes radio-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes cs-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cs-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes boss-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes boss-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 720px) {
  .cutscene {
    padding: max(12px, var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  }

  .cutscene-stage {
    grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding-top: 64px;
  }

  .cutscene-portrait {
    max-height: none;
  }

  .cutscene-line {
    min-height: 5.6em;
    font-size: 14px;
  }

  .cutscene-who b {
    font-size: 20px;
  }

  .act-head {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px 9px;
  }

  .act-copy b {
    font-size: 13px;
  }

  .act-copy small {
    font-size: 9px;
  }

  .act-progress b {
    font-size: 13px;
  }
}

.act-block.is-folded > summary::-webkit-details-marker { display: none; }
.act-block.is-folded { opacity: .78; }
.hidden[data-perk-badge] { display: none; }
