.lab-shell {
  width: min(1560px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px 26px;
}

.topbar {
  display: grid;
  min-height: 82px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
}

.brand-mark span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--surface-raised);
}

.brand-mark span:nth-child(1) { transform: translate(-8px, 4px); }
.brand-mark span:nth-child(2) { transform: translate(7px, -6px); }
.brand-mark span:nth-child(3) { transform: translate(8px, 9px); }

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: -0.035em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar-copy {
  text-align: center;
}

.topbar-copy p {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.culture-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fc58a;
  box-shadow: 0 0 0 4px rgb(79 197 138 / 14%);
  animation: status-pulse 2s ease-in-out infinite;
}

.status-light.is-paused {
  background: var(--food);
  box-shadow: 0 0 0 4px rgb(255 213 106 / 14%);
  animation: none;
}

@keyframes status-pulse {
  50% { box-shadow: 0 0 0 7px rgb(79 197 138 / 3%); }
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  align-items: start;
  gap: 16px;
}

.culture-column {
  min-width: 0;
}

.dish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dish-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.dish-header h1 span {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.tool-switcher {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.tool-button {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-button.is-active {
  color: var(--surface-raised);
  background: var(--ink);
  box-shadow: 0 3px 10px rgb(23 32 29 / 18%);
}

.tool-icon {
  display: block;
  width: 9px;
  height: 9px;
}

.tool-icon--inspect {
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.tool-icon--food {
  border-radius: 50%;
  background: currentColor;
  box-shadow: 4px -3px 0 -1px currentColor;
}

.tool-icon--cell {
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px transparent;
}

.dish-stage {
  position: relative;
  height: clamp(480px, 63vh, 680px);
  overflow: hidden;
  background:
    linear-gradient(rgb(255 255 255 / 8%), transparent),
    #aebdb6;
  isolation: isolate;
}

.dish-stage::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 9%) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px) 0 0 / 32px 32px;
  content: "";
}

.dish-stage::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 28%, rgb(255 255 255 / 8%) 46%, transparent 62%) -120% 0 / 45% 100% no-repeat,
    radial-gradient(circle at 50% 50%, transparent 48%, rgb(255 43 214 / 7%) 76%, rgb(0 246 255 / 9%));
  content: "";
  mix-blend-mode: screen;
  pointer-events: none;
  animation: casino-sweep 5.5s linear infinite;
}

@keyframes casino-sweep {
  to { background-position: 240% 0, 0 0; }
}

.dish-stage[data-tool="food"] canvas { cursor: crosshair; }
.dish-stage[data-tool="cell"] canvas { cursor: cell; }
.dish-stage[data-tool="inspect"] canvas { cursor: default; }

#life-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.simulation-message {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: 250px;
  gap: 7px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  color: var(--acid);
  text-align: center;
  background: rgb(2 7 4 / 94%);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 65%);
  transform: translate(-50%, -50%);
  transition: opacity 120ms linear, visibility 120ms linear;
}

.simulation-message strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulation-message small {
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.simulation-ready .simulation-message {
  visibility: hidden;
  opacity: 0;
}

.simulation-failed .simulation-message {
  visibility: visible;
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

.dish-readout {
  position: absolute;
  z-index: 2;
  display: flex;
  color: rgb(233 255 247 / 68%);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  pointer-events: none;
  text-transform: uppercase;
}

.dish-readout--top {
  top: 18px;
  right: 20px;
  gap: 12px;
}

.dish-readout--top span:first-child {
  color: #8ff0bb;
}

.player-identity {
  position: absolute;
  z-index: 7;
  right: 14px;
  bottom: 16px;
  display: flex;
  max-width: min(280px, calc(100% - 28px));
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgb(0 246 255 / 58%);
  color: #00f6ff;
  background: rgb(0 8 11 / 86%);
  box-shadow: 3px 3px 0 rgb(0 0 0 / 66%), inset 0 0 14px rgb(0 246 255 / 8%);
  font-family: var(--font-mono);
  pointer-events: none;
  transition: opacity 140ms linear;
}

.player-identity[data-skin="chrome"] { color: #d7f7ff; border-color: #d7f7ff; }
.player-identity[data-skin="gold"] { color: #ffd42a; border-color: #ffd42a; }
.player-identity[data-skin="rainbow"] { color: #fff; border-color: #ff83ec; box-shadow: 3px 3px 0 #00a8b0, inset 0 0 14px rgb(255 43 214 / 14%); }
.player-identity > i { color: currentColor; font-size: 12px; font-style: normal; filter: drop-shadow(0 0 6px currentColor); }
.player-identity > span { display: grid; min-width: 0; gap: 2px; }
.player-identity small { color: currentColor; font-size: 6px; font-weight: 950; letter-spacing: .18em; }
.player-identity strong { overflow: hidden; color: white; font-size: 9px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.player-identity em { display: none; color: rgb(255 255 255 / 64%); font-size: 6px; font-style: normal; font-weight: 750; letter-spacing: .06em; }

.player-identity.is-intro {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  min-width: min(390px, calc(100% - 28px));
  justify-content: center;
  gap: 13px;
  padding: 14px 18px;
  border-width: 2px;
  text-align: left;
  background: rgb(0 5 8 / 94%);
  box-shadow: 6px 6px 0 rgb(0 0 0 / 72%), 0 0 28px rgb(0 246 255 / 18%);
  transform: translate(-50%, -50%);
  animation: player-identity-arrival .5s steps(5, end) both;
}

.player-identity.is-intro > i { font-size: 26px; }
.player-identity.is-intro small { font-size: 8px; }
.player-identity.is-intro strong { font-size: clamp(17px, 3vw, 25px); }
.player-identity.is-intro em { display: block; }

@keyframes player-identity-arrival {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(.9); }
  65% { opacity: 1; transform: translate(-50%, -52%) scale(1.025); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.arena-event {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 50%;
  display: grid;
  min-width: 220px;
  justify-items: center;
  gap: 2px;
  padding: 7px 18px 8px;
  border: 1px solid rgb(255 230 0 / 55%);
  color: #fff45c;
  text-align: center;
  background: linear-gradient(90deg, transparent, rgb(18 4 22 / 94%) 16% 84%, transparent);
  filter: drop-shadow(0 0 9px rgb(255 43 214 / 28%));
  pointer-events: none;
  transform: translateX(-50%);
}

.arena-event span,
.arena-event small {
  color: #ff8bea;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.arena-event strong {
  font-size: 13px;
  font-style: italic;
  letter-spacing: .09em;
  text-shadow: 0 0 12px currentColor;
}

.arena-event[data-phase="countdown"] {
  border-color: rgb(255 255 255 / 18%);
  opacity: .72;
}

.arena-event:not([data-phase="countdown"]) {
  color: white;
  border-color: #fff45c;
  background: linear-gradient(90deg, transparent, rgb(255 43 214 / 88%) 18% 82%, transparent);
  animation: arena-event-punch .52s steps(2, end) infinite;
}

.arena-event[data-phase="blood-moon"],
.arena-event[data-phase="collision-course"] {
  background: linear-gradient(90deg, transparent, rgb(180 0 37 / 94%) 18% 82%, transparent);
}

.rare-drop-radar {
  --rare-color: #fff45c;
  position: absolute;
  z-index: 6;
  bottom: 48px;
  left: 14px;
  display: grid;
  width: min(244px, calc(100% - 28px));
  grid-template-columns: 29px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--rare-color);
  color: white;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--rare-color) 18%, transparent), transparent 65%),
    rgb(4 1 10 / 94%);
  box-shadow: 3px 3px 0 rgb(0 0 0 / 72%), 0 0 13px color-mix(in srgb, var(--rare-color) 30%, transparent);
  pointer-events: none;
  animation: rare-drop-jackpot .66s steps(5, end) both;
}

.rare-drop-radar > i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 2px solid var(--rare-color);
  color: var(--rare-color);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  background: #07020d;
  box-shadow: inset 0 0 9px color-mix(in srgb, var(--rare-color) 25%, transparent), 0 0 10px var(--rare-color);
  transform: rotate(-5deg);
}

.rare-drop-radar span,
.rare-drop-radar small,
.rare-drop-radar strong,
.rare-drop-radar em { display: block; min-width: 0; }
.rare-drop-radar small {
  color: var(--rare-color);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .13em;
}
.rare-drop-radar strong {
  overflow: hidden;
  margin-top: 1px;
  font-size: 9px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rare-drop-radar em {
  display: none;
}
.rare-drop-radar > b {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--rare-color);
  border-radius: 50%;
  color: white;
  font: 1000 8px/1 var(--font-mono);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rare-color) 55%, transparent);
}

@keyframes rare-drop-jackpot {
  0% { opacity: 0; transform: translateX(-115%); }
  55% { opacity: 1; transform: translateX(6px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes arena-event-punch {
  50% { filter: drop-shadow(0 0 18px #ff2bd6); transform: translateX(-50%) scale(1.035); }
}

.arcade-scoreboard {
  position: absolute;
  z-index: 5;
  top: 13px;
  left: 14px;
  display: flex;
  gap: 17px;
  color: #ff5a32;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  pointer-events: none;
  text-align: center;
}

.arcade-scoreboard span,
.arcade-scoreboard strong {
  display: block;
}

.arcade-scoreboard strong {
  margin-top: 4px;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  text-shadow: 2px 0 #00f6ff, -2px 0 #ff2bd6, 0 0 9px currentColor;
}

.arcade-scoreboard span:nth-child(2) { color: #fff45c; }
.arcade-scoreboard span:nth-child(3) { color: #00f6ff; }
.arcade-scoreboard span:nth-child(4) { color: #ff83ec; }
.arcade-scoreboard span:nth-child(5) { color: #ff83ec; }
.arcade-scoreboard span:nth-child(6) { color: #74ff8b; }
.arcade-scoreboard span:nth-child(7) { color: #fff45c; }
.arcade-scoreboard span.is-urgent strong { color: #ff3158; animation: combo-score .28s steps(2, end) infinite; }
.arcade-scoreboard span:nth-child(5).is-hot strong {
  color: #fff45c;
  animation: combo-score .28s steps(2, end) infinite;
}

@keyframes combo-score { 50% { transform: scale(1.12) rotate(-2deg); } }

.arcade-callout {
  position: absolute;
  z-index: 8;
  right: 16px;
  bottom: 62px;
  display: grid;
  width: min(360px, 43%);
  justify-items: end;
  padding: 8px 11px 9px;
  border-right: 3px solid #ff2bd6;
  color: white;
  text-align: right;
  background: linear-gradient(90deg, transparent, rgb(7 1 14 / 88%) 28%);
  filter: drop-shadow(3px 4px 0 rgb(0 0 0 / 78%));
  pointer-events: none;
}

.arcade-callout small {
  padding: 2px 8px;
  color: #020204;
  background: #fff45c;
  font-size: clamp(7px, .9vw, 9px);
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.arcade-callout strong {
  color: white;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 4vw, 38px);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -.05em;
  line-height: .9;
  -webkit-text-stroke: 1px #ff2bd6;
  text-shadow: 3px 3px 0 #571069, 5px 5px 0 #00a8b0, 0 0 18px #ff2bd6;
  text-transform: uppercase;
}

.arcade-callout[data-tone="ko"] strong {
  color: #fff45c;
  -webkit-text-stroke-color: #ff3158;
  text-shadow: 3px 3px 0 #8d001d, 5px 5px 0 #ff2bd6, 0 0 22px #ff3158;
}

.arcade-callout[data-tone="event"] strong {
  color: #fff45c;
  -webkit-text-stroke-color: #ff8a00;
}

.arcade-callout[data-tone="rare"] small {
  color: #041006;
  background: #74ff8b;
}

.arcade-callout[data-tone="rare"] strong {
  color: #fff45c;
  -webkit-text-stroke-color: #00a8b0;
  text-shadow: 3px 3px 0 #006a72, 5px 5px 0 #ff2bd6, 0 0 22px #fff45c;
}

.arcade-callout.is-visible {
  animation: arcade-callout-slam .85s steps(7, end) both;
}

.player-life-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background:
    repeating-linear-gradient(0deg, rgb(255 49 88 / 5%) 0 2px, transparent 2px 5px),
    rgb(1 2 4 / 84%);
  backdrop-filter: blur(3px) grayscale(.65);
}

.player-life-overlay > div {
  position: relative;
  display: grid;
  width: min(440px, 100%);
  justify-items: center;
  padding: 24px;
  border: 2px solid #ff3158;
  color: white;
  text-align: center;
  background: linear-gradient(145deg, rgb(29 1 10 / 97%), rgb(3 4 10 / 98%));
  box-shadow: 7px 7px 0 rgb(0 0 0 / 72%), 0 0 32px rgb(255 49 88 / 30%);
}

.player-life-overlay small { color: #ff8b9e; font: 950 8px/1 var(--font-mono); letter-spacing: .18em; }
.player-life-overlay > div > strong {
  margin-top: 8px;
  color: #fff45c;
  font-size: clamp(25px, 5vw, 46px);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -.045em;
  line-height: .9;
  text-shadow: 3px 3px 0 #8d001d, 5px 5px 0 #ff2bd6;
}
.player-life-overlay p { max-width: 330px; margin: 13px 0 0; color: rgb(255 255 255 / 68%); font: 750 9px/1.45 var(--font-mono); }
.player-life-overlay dl { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); margin: 18px 0; border: 1px solid rgb(255 255 255 / 14%); }
.player-life-overlay dl div { padding: 9px 5px; border-right: 1px solid rgb(255 255 255 / 12%); }
.player-life-overlay dl div:last-child { border-right: 0; }
.player-life-overlay dt { color: rgb(255 255 255 / 44%); font: 800 6px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.player-life-overlay dd { margin: 5px 0 0; color: white; font: 950 13px/1 var(--font-mono); }
.player-life-overlay button { min-width: 190px; min-height: 42px; padding: 0 20px; border: 2px solid #fff45c; color: #080702; background: #fff45c; box-shadow: 4px 4px 0 #ff3158; font: 1000 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.player-life-overlay button:hover { color: white; background: #ff3158; box-shadow: 4px 4px 0 #00f6ff, 0 0 18px #ff3158; }
.player-life-overlay kbd { position: absolute; right: 10px; bottom: 10px; color: rgb(255 255 255 / 42%); font: 800 8px/1 var(--font-mono); }
.dish-stage.is-player-eliminated .player-identity { opacity: 0; }

@keyframes arcade-callout-slam {
  0% { opacity: 0; transform: translateX(125%) scale(.82) skewX(-12deg); }
  18% { opacity: 1; transform: translateX(-8px) scale(1.06) skewX(-5deg); }
  34% { transform: translateX(3px) scale(.98) skewX(-5deg); }
  48%, 78% { opacity: 1; transform: translateX(0) scale(1) skewX(-5deg); }
  100% { opacity: 0; transform: translateX(16px) scale(1.02) skewX(-7deg); }
}

.dish-readout--bottom {
  bottom: 18px;
  left: 50%;
  padding: 8px 12px;
  border: 1px solid rgb(220 255 241 / 16%);
  border-radius: 999px;
  background: rgb(4 15 12 / 48%);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  white-space: nowrap;
}

.pilot-controls {
  position: absolute;
  z-index: 9;
  bottom: 48px;
  left: 14px;
  display: grid;
  grid-template-columns: auto 132px;
  align-items: end;
  gap: 8px;
  color: #fff;
  font-family: var(--font-mono);
  user-select: none;
}

.pilot-pad {
  display: grid;
  grid-template-columns: repeat(3, 27px);
  grid-template-rows: repeat(3, 27px);
  gap: 3px;
}

.pilot-pad button,
.pilot-pad i {
  display: grid;
  min-width: 0;
  place-items: center;
  border: 1px solid rgb(0 246 255 / 55%);
  color: #baffff;
  background: rgb(2 10 14 / 82%);
  box-shadow: inset 0 0 8px rgb(0 246 255 / 10%);
  font: 900 10px/1 var(--font-mono);
  touch-action: none;
}

.pilot-pad button:first-child { grid-column: 2; }
.pilot-pad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.pilot-pad i { grid-column: 2; grid-row: 2; color: rgb(255 255 255 / 38%); font-size: 6px; font-style: normal; }
.pilot-pad button:nth-child(4) { grid-column: 3; grid-row: 2; }
.pilot-pad button:last-child { grid-column: 2; grid-row: 3; }
.pilot-pad button:hover,
.pilot-pad button.is-active { color: #02100d; background: #00f6ff; box-shadow: 0 0 14px #00f6ff; }

.surge-button {
  position: relative;
  display: grid;
  min-height: 57px;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 3px 8px;
  padding: 8px 9px;
  border: 1px solid #ff2bd6;
  color: #fff;
  text-align: left;
  background: rgb(15 2 18 / 88%);
  box-shadow: inset 0 0 14px rgb(255 43 214 / 12%);
}

.fire-button {
  display: grid;
  min-height: 42px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #fff45c;
  color: #fff;
  text-align: left;
  background: rgb(20 16 1 / 92%);
  box-shadow: inset 0 0 14px rgb(255 244 92 / 14%), 0 0 8px rgb(255 244 92 / 12%);
}
.fire-button span { display: grid; gap: 2px; }
.fire-button small { color: #fff45c; font-size: 6px; letter-spacing: .16em; }
.fire-button strong { font: 950 9px/1 var(--font-mono); }
.fire-button kbd { color: #00f6ff; font: 900 12px/1 var(--font-mono); }
.fire-button > i { grid-column: 1 / -1; height: 3px; background: rgb(255 255 255 / 12%); }
.fire-button > i b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #00f6ff, #fff45c, #ff2bd6); box-shadow: 0 0 8px #fff45c; transition: width 80ms linear; }
.fire-button:not(:disabled):hover { color: #161100; background: #fff45c; box-shadow: 0 0 18px #fff45c; }
.fire-button:disabled { cursor: not-allowed; opacity: .48; }

.surge-button span { display: grid; gap: 2px; }
.surge-button small { color: #ff83ec; font-size: 6px; letter-spacing: .16em; }
.surge-button strong { font: 950 9px/1 var(--font-mono); letter-spacing: .04em; }
.surge-button kbd { color: #fff45c; font: 900 12px/1 var(--font-mono); }
.surge-button > i { grid-column: 1 / -1; height: 3px; background: rgb(255 255 255 / 14%); }
.surge-button > i b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #ff2bd6, #fff45c); box-shadow: 0 0 8px #ff2bd6; transition: width 100ms linear; }
.surge-button:not(:disabled):hover { color: #140017; background: #ff83ec; }
.surge-button:disabled { cursor: not-allowed; opacity: .62; }
.pilot-controls.is-surging .surge-button { animation: pilot-surge .25s steps(2, end) infinite; }
.pilot-controls.is-extinct { filter: grayscale(1); opacity: .45; }
.pilot-hint { grid-column: 1 / -1; color: rgb(233 255 247 / 58%); font-size: 7px; font-weight: 800; letter-spacing: .07em; }
.pilot-touch-hint { display: none; }

@keyframes pilot-surge {
  50% { border-color: #fff45c; box-shadow: 0 0 18px #ff2bd6; transform: translateY(-1px); }
}

.dish-footer {
  display: grid;
  min-height: 76px;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.speed-control {
  display: grid;
  max-width: 360px;
  grid-template-columns: auto minmax(90px, 1fr) 28px;
  align-items: center;
  justify-self: center;
  gap: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cycle-readout {
  min-width: 68px;
  text-align: right;
}

.cycle-readout span,
.cycle-readout strong {
  display: block;
}

.cycle-readout span {
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cycle-readout strong {
  font-family: var(--font-mono);
  font-size: 14px;
}

.stats-strip {
  display: grid;
  min-height: 94px;
  grid-template-columns: repeat(5, minmax(88px, 0.65fr)) minmax(180px, 1.3fr);
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgb(247 245 238 / 82%);
}

.stat-block,
.population-chart {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.stat-block > div > span,
.stat-block > div > strong {
  display: block;
}

.stat-block > div > span,
.population-chart > div > span {
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-block strong {
  font-size: 21px;
  letter-spacing: -0.04em;
}

.stat-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.stat-icon::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--culture);
  content: "";
}

.stat-icon--cells::after { inset: 8px; }
.stat-icon--food::after { inset: 4px auto auto 5px; background: var(--food); box-shadow: 8px 7px 0 -1px var(--food); }
.stat-icon--colonies::after { inset: 5px auto auto 5px; box-shadow: 7px 1px 0 -1px #ef7777, 3px 8px 0 -1px #8d7bea; }
.stat-icon--generation::after { inset: 8px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--culture); }
.stat-icon--predation::after { inset: 5px auto auto 4px; background: #ff2bd6; box-shadow: 8px 8px 0 -1px #00f6ff; }

.population-chart {
  min-width: 0;
  justify-content: space-between;
  border-right: 0;
}

.population-chart > div {
  flex: 0 0 auto;
}

.population-chart small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8px;
}

.population-chart small i {
  width: 7px;
  height: 2px;
  background: var(--accent);
}

.population-chart canvas {
  width: min(170px, 50%);
  height: 44px;
}

.control-rail {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.control-section {
  padding: 21px 20px 23px;
  border-bottom: 1px solid var(--line);
}

.control-section:last-child {
  border-bottom: 0;
}

.farm-planner {
  padding: 18px 16px;
  border-bottom: 1px solid rgb(116 255 139 / 28%);
  color: white;
  background:
    linear-gradient(135deg, rgb(116 255 139 / 9%), transparent 48%),
    #0a100d;
}

.farm-planner__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.farm-planner__heading h2 {
  margin: 3px 0 0;
  color: white;
  font-size: 17px;
}

.farm-planner .eyebrow { color: #74ff8b; }

.farm-calendar {
  min-width: 64px;
  padding: 6px 8px;
  border: 1px solid rgb(116 255 139 / 38%);
  text-align: center;
  background: rgb(116 255 139 / 7%);
}

.farm-calendar small,
.farm-calendar strong { display: block; font-family: var(--font-mono); }
.farm-calendar small { color: #74ff8b; font-size: 6px; letter-spacing: .12em; }
.farm-calendar strong { margin-top: 4px; color: white; font-size: 8px; }
.farm-calendar b { color: #fff45c; font-size: 11px; }

.farm-planner__intro {
  margin: 10px 0 12px;
  color: rgb(255 255 255 / 55%);
  font-size: 8px;
  line-height: 1.5;
}

.farm-schedule {
  display: grid;
  gap: 6px;
}

.farm-schedule label {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgb(255 255 255 / 11%);
  background: rgb(255 255 255 / 3%);
}

.farm-schedule label > span {
  padding-left: 7px;
  color: rgb(255 255 255 / 60%);
  font: 800 7px/1 var(--font-mono);
  text-transform: uppercase;
}

.farm-schedule label > span b { margin-right: 3px; color: #74ff8b; }

.farm-schedule select {
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid rgb(116 255 139 / 22%);
  border-radius: 0;
  color: white;
  background: #101813;
  font: 750 8px/1 var(--font-mono);
}

.farm-commit {
  width: 100%;
  min-height: 35px;
  margin-top: 8px;
  border: 1px solid #74ff8b;
  color: #071009;
  background: #74ff8b;
  box-shadow: 3px 3px 0 #236c31;
  font: 900 8px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.farm-commit:hover { background: #a3ffb2; }

.farm-progress {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid rgb(116 255 139 / 16%);
}

.farm-progress > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
}

.farm-progress > span b { color: #fff45c; font-size: 7px; text-transform: uppercase; }
.farm-progress > span em { color: rgb(255 255 255 / 42%); font-size: 6px; font-style: normal; }
.farm-progress > i { display: block; height: 3px; margin-top: 7px; background: rgb(255 255 255 / 9%); }
.farm-progress > i b { display: block; width: 0; height: 100%; background: #74ff8b; box-shadow: 0 0 7px #74ff8b; transition: width .2s linear; }
.farm-progress > small { display: block; margin-top: 7px; color: rgb(255 255 255 / 46%); font-size: 7px; line-height: 1.4; }

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.section-index {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.player-hub {
  padding: 16px 14px 14px;
  color: white;
  background:
    radial-gradient(circle at 100% 0, rgb(0 246 255 / 14%), transparent 36%),
    linear-gradient(145deg, rgb(255 49 88 / 9%), transparent 55%),
    #080811;
}

.player-hub__heading { align-items: center; }
.player-hub__heading h2 { color: white; }
.player-level {
  padding: 5px 7px;
  border: 1px solid #fff45c;
  color: #ff8bea;
  background: rgb(255 244 92 / 8%);
  font: 850 7px/1 var(--font-mono);
  letter-spacing: .08em;
}
.player-level b { color: #fff45c; font-size: 12px; }

.account-access { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px; border: 1px solid rgb(255 255 255 / 12%); background: rgb(255 255 255 / 3%); }
.account-access > span { display: grid; min-width: 0; flex: 1; grid-template-columns: 7px minmax(0, 1fr); align-items: center; column-gap: 5px; }
.account-access i { width: 6px; height: 6px; grid-row: 1 / 3; border-radius: 50%; background: #fff45c; box-shadow: 0 0 7px #fff45c; }
.account-access.is-user i { background: #74ff8b; box-shadow: 0 0 7px #74ff8b; }
.account-access b { color: white; font: 850 7px/1 var(--font-mono); letter-spacing: .08em; }
.account-access small { overflow: hidden; margin-top: 3px; color: rgb(255 255 255 / 38%); font: 650 6px/1 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.account-access button { min-height: 27px; padding: 0 8px; border: 1px solid #00f6ff; color: #00f6ff; background: rgb(0 246 255 / 7%); font: 850 7px/1 var(--font-mono); text-transform: uppercase; }
.account-access [data-account-action="logout"] { border-color: rgb(255 255 255 / 22%); color: rgb(255 255 255 / 55%); background: transparent; }

.account-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 30px;
  border: 1px solid #00f6ff;
  color: white;
  background: radial-gradient(circle at 100% 0, rgb(255 43 214 / 19%), transparent 40%), #070811;
  box-shadow: 0 0 0 7px #070811, 0 0 0 8px #ff2bd6, 0 18px 80px rgb(0 0 0 / 75%);
}
.account-dialog::backdrop { background: rgb(1 2 5 / 82%); backdrop-filter: blur(4px); }
.account-dialog h2 { margin: 7px 0 8px; color: white; font-size: 22px; }
.account-dialog > p { color: rgb(255 255 255 / 58%); font-size: 10px; line-height: 1.5; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-bottom: 1px solid rgb(0 246 255 / 25%); }
.account-tabs button { padding: 10px; border: 0; color: rgb(255 255 255 / 42%); background: transparent; font: 850 8px/1 var(--font-mono); text-transform: uppercase; }
.account-tabs button.is-active { color: #00f6ff; background: rgb(0 246 255 / 8%); box-shadow: inset 0 -2px #00f6ff; }
.account-form { display: grid; gap: 10px; margin-top: 14px; }
.account-form label span { display: block; margin-bottom: 5px; color: #ff8bea; font: 800 7px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.account-form input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 0; color: white; background: #0d1015; font: 750 10px/1 var(--font-mono); }
.account-form input:focus { border-color: #00f6ff; outline: 1px solid #00f6ff; }
.account-form > button { min-height: 40px; border: 1px solid #ff3158; color: white; background: linear-gradient(#ff3158, #a90025); box-shadow: 3px 3px 0 #5a0015; font: 950 8px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.account-error { margin: 12px 0 0 !important; padding: 8px; border: 1px solid #ff3158; color: #ff8b9e !important; background: rgb(255 49 88 / 8%); font: 750 8px/1.4 var(--font-mono); }
.account-guest { display: block; margin: 14px auto 0; border: 0; color: rgb(255 255 255 / 42%); background: transparent; font: 750 7px/1 var(--font-mono); text-decoration: underline; text-transform: uppercase; }

.player-handle { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 11px; }
.player-handle span { color: rgb(255 255 255 / 46%); font: 750 6px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.player-handle input {
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgb(0 246 255 / 35%);
  border-radius: 0;
  color: #00f6ff;
  background: rgb(0 246 255 / 5%);
  font: 850 9px/1 var(--font-mono);
  text-transform: uppercase;
}

.player-resources { display: grid; grid-template-columns: 1.2fr 1fr .8fr .8fr; margin-top: 8px; border: 1px solid rgb(255 255 255 / 10%); }
.player-resources > span { min-width: 0; padding: 7px 6px; border-right: 1px solid rgb(255 255 255 / 10%); }
.player-resources > span:last-child { border-right: 0; }
.player-resources small,
.player-resources strong { display: block; }
.player-resources small { overflow: hidden; color: rgb(255 255 255 / 40%); font: 700 6px/1 var(--font-mono); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.player-resources strong { margin-top: 4px; overflow: hidden; color: #fff45c; font: 900 11px/1 var(--font-mono); text-overflow: ellipsis; }

.player-xp { margin-top: 8px; }
.player-xp > span { display: flex; justify-content: space-between; color: rgb(255 255 255 / 42%); font: 700 6px/1 var(--font-mono); text-transform: uppercase; }
.player-xp > span b { color: #00f6ff; }
.player-xp > i { display: block; height: 4px; margin-top: 4px; background: rgb(255 255 255 / 10%); }
.player-xp > i b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #00f6ff, #ff2bd6); box-shadow: 0 0 7px #00f6ff; }

.player-unlock { display: flex; align-items: center; gap: 7px; margin-top: 7px; padding: 6px 7px; border-left: 2px solid #ff2bd6; background: rgb(255 43 214 / 7%); }
.player-unlock small { flex: 0 0 auto; color: #ff8bea; font: 800 6px/1 var(--font-mono); text-transform: uppercase; }
.player-unlock strong { overflow: hidden; color: rgb(255 255 255 / 72%); font: 700 7px/1.25 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }

.membrane-picker { margin-top: 9px; }
.membrane-picker > span { display: flex; align-items: baseline; justify-content: space-between; color: rgb(255 255 255 / 42%); font: 750 6px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.membrane-picker > span strong { color: #fff; font-size: 7px; }
.membrane-picker > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 6px; }
.membrane-picker button { position: relative; min-height: 42px; padding: 7px; overflow: hidden; border: 1px solid rgb(255 255 255 / 14%); color: rgb(255 255 255 / 52%); text-align: left; background: #0c0e0d; }
.membrane-picker button b,
.membrane-picker button small { position: relative; z-index: 1; display: block; }
.membrane-picker button b { color: inherit; font: 950 8px/1 var(--font-mono); letter-spacing: .08em; }
.membrane-picker button small { margin-top: 4px; overflow: hidden; font: 650 6px/1.2 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.membrane-picker button[data-player-skin="chrome"] { background: linear-gradient(135deg, #15212a, #c9f4ff 48%, #243f50 52%, #080d12); }
.membrane-picker button[data-player-skin="gold"] { background: linear-gradient(135deg, #281800, #ffca22 48%, #6d3e00 52%, #120900); }
.membrane-picker button[data-player-skin="rainbow"] { background: linear-gradient(115deg, #ff3158, #fff45c, #74ff8b, #00f6ff, #b96cff, #ff2bd6); }
.membrane-picker button[data-player-skin]:not([data-player-skin="bio"]) { color: #050706; text-shadow: 0 1px rgb(255 255 255 / 42%); }
.membrane-picker button.is-active { border-color: #fff; color: #fff; box-shadow: inset 0 0 0 1px #00f6ff, 0 0 12px rgb(0 246 255 / 35%); }
.membrane-picker button:disabled { filter: grayscale(1) brightness(.42); cursor: not-allowed; color: rgb(255 255 255 / 45%); text-shadow: none; }

.matchmaking { margin-top: 10px; border: 1px solid rgb(255 43 214 / 32%); background: rgb(0 0 0 / 30%); }
.matchmaking__head { display: flex; min-height: 27px; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 7px; border-bottom: 1px solid rgb(255 43 214 / 20%); color: #ff8bea; font: 900 7px/1 var(--font-mono); letter-spacing: .08em; }
.matchmaking__head span { display: flex; align-items: center; gap: 5px; }
.matchmaking__head i { width: 6px; height: 6px; border-radius: 50%; background: #fff45c; box-shadow: 0 0 7px #fff45c; }
.matchmaking__head small { color: rgb(255 255 255 / 38%); font-size: 6px; text-transform: uppercase; }
.matchmaking.is-live { border-color: #74ff8b; box-shadow: inset 0 0 16px rgb(116 255 139 / 6%); }
.matchmaking.is-live .matchmaking__head { border-bottom-color: rgb(116 255 139 / 24%); color: #74ff8b; }
.matchmaking.is-live .matchmaking__head i { background: #74ff8b; box-shadow: 0 0 8px #74ff8b; animation: status-pulse 1s steps(2, end) infinite; }
.matchmaking__notice { margin: 0; padding: 7px; border-bottom: 1px solid rgb(255 244 92 / 16%); color: rgb(255 244 92 / 68%); background: rgb(255 244 92 / 4%); font: 700 6px/1.4 var(--font-mono); }
.matchmaking__idle { padding: 7px; }
.matchmaking__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.matchmaking__actions button { min-height: 39px; padding: 6px; border: 1px solid rgb(0 246 255 / 35%); color: #00f6ff; background: rgb(0 246 255 / 6%); font: 900 7px/1 var(--font-mono); text-transform: uppercase; }
.matchmaking__actions button:last-child { border-color: rgb(255 43 214 / 42%); color: #ff8bea; background: rgb(255 43 214 / 7%); }
.matchmaking__actions small { display: block; margin-top: 4px; color: rgb(255 255 255 / 38%); font-size: 5px; letter-spacing: .06em; }
.matchmaking__join { display: grid; grid-template-columns: minmax(0, 1fr) 44px; margin-top: 6px; border: 1px solid rgb(255 255 255 / 13%); }
.matchmaking__join input { min-width: 0; height: 29px; padding: 0 7px; border: 0; border-radius: 0; color: #fff45c; background: #090911; font: 850 8px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.matchmaking__join button { border: 0; border-left: 1px solid rgb(255 255 255 / 13%); color: #08060b; background: #fff45c; font: 900 7px/1 var(--font-mono); text-transform: uppercase; }
.matchmaking__lobby { padding: 7px; }
.matchmaking__code { display: flex; align-items: center; justify-content: space-between; padding: 7px; border: 1px solid #fff45c; color: rgb(255 255 255 / 48%); background: rgb(255 244 92 / 7%); font: 800 6px/1 var(--font-mono); letter-spacing: .08em; }
.matchmaking__code b { margin-left: 5px; color: #fff45c; font-size: 12px; letter-spacing: .14em; user-select: all; }
.matchmaking__code em { color: #ff8bea; font-size: 6px; font-style: normal; text-transform: uppercase; }
.matchmaking__members { margin-top: 6px; border: 1px solid rgb(255 255 255 / 10%); }
.matchmaking__members > div { display: flex; min-height: 31px; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 7px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.matchmaking__members > div:last-child { border-bottom: 0; }
.matchmaking__members span { display: grid; min-width: 0; gap: 3px; }
.matchmaking__members strong { overflow: hidden; color: white; font: 850 8px/1 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.matchmaking__members small { color: rgb(255 255 255 / 35%); font: 650 5px/1 var(--font-mono); }
.matchmaking__members > div > b { flex: 0 0 auto; color: #00f6ff; font: 800 6px/1 var(--font-mono); }
.matchmaking__lobby-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 6px; }
.matchmaking__lobby-actions button { min-height: 29px; padding: 0 9px; border: 1px solid #74ff8b; color: #061009; background: #74ff8b; font: 900 7px/1 var(--font-mono); text-transform: uppercase; }
.matchmaking__lobby-actions button:last-child { border-color: rgb(255 255 255 / 20%); color: rgb(255 255 255 / 52%); background: transparent; }
.matchmaking__lobby-actions button:disabled { filter: grayscale(1); opacity: .42; }
.matchmaking__leaders { margin: 0; padding: 0 7px 5px; list-style: none; }
.matchmaking__leaders:not(:empty) { padding-top: 5px; border-top: 1px solid rgb(255 255 255 / 7%); }
.matchmaking__leaders li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 5px; padding: 3px 0; color: rgb(255 255 255 / 56%); font: 700 6px/1 var(--font-mono); }
.matchmaking__leaders b { color: #fff45c; }
.matchmaking__leaders span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matchmaking__leaders strong { color: #ff8bea; font-size: 6px; }
.matchmaking__error { margin: 0 7px 7px; padding: 6px; border: 1px solid #ff3158; color: #ff8b9e; background: rgb(255 49 88 / 8%); font: 700 6px/1.35 var(--font-mono); }

.arena-chat { margin-top: 10px; border: 1px solid rgb(0 246 255 / 25%); background: rgb(0 0 0 / 28%); }
.arena-chat__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 7px; border-bottom: 1px solid rgb(0 246 255 / 18%); color: #00f6ff; font: 900 7px/1 var(--font-mono); letter-spacing: .08em; }
.arena-chat__head span { display: flex; align-items: center; gap: 5px; }
.arena-chat__head i { width: 5px; height: 5px; border-radius: 50%; background: #74ff8b; box-shadow: 0 0 7px #74ff8b; }
.arena-chat__head small { color: rgb(255 255 255 / 30%); font-size: 6px; text-transform: uppercase; }
.arena-chat__messages { height: 92px; overflow: auto; padding: 3px 7px; scrollbar-color: #00f6ff transparent; scrollbar-width: thin; }
.arena-chat__messages p { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px; margin: 0; padding: 4px 0; border-bottom: 1px solid rgb(255 255 255 / 6%); font: 650 7px/1.3 var(--font-mono); }
.arena-chat__messages strong { overflow: hidden; color: #ff8bea; text-overflow: ellipsis; white-space: nowrap; }
.arena-chat__messages span { overflow-wrap: anywhere; color: rgb(255 255 255 / 66%); }
.arena-chat__messages .is-system strong { color: #fff45c; }
.arena-chat__messages .is-system span { color: rgb(255 244 92 / 70%); }
.arena-chat__form { display: grid; grid-template-columns: minmax(0, 1fr) 46px; border-top: 1px solid rgb(0 246 255 / 18%); }
.arena-chat__form input { min-width: 0; height: 30px; padding: 0 7px; border: 0; border-radius: 0; color: white; background: #080a0d; font: 700 8px/1 var(--font-mono); }
.arena-chat__form button { border: 0; border-left: 1px solid rgb(0 246 255 / 25%); color: #061013; background: #00f6ff; font: 900 7px/1 var(--font-mono); text-transform: uppercase; }
.player-notice { margin-top: 8px; padding: 7px; border: 1px solid #fff45c; color: #fff45c; background: rgb(255 244 92 / 8%); font: 850 7px/1.3 var(--font-mono); text-align: center; }

.rules-note { margin: 10px 0 0; color: var(--ink-faint); font-size: 8px; line-height: 1.45; }

.betting-section {
  padding: 16px 14px 18px;
  background:
    linear-gradient(145deg, rgb(255 43 214 / 8%), transparent 38%),
    #070a08;
}

.betting-heading { align-items: center; }
.betting-heading h2 { color: white; }
.betting-live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #74ff8b;
  font: 900 7px/1 var(--font-mono);
  letter-spacing: .12em;
}
.betting-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #74ff8b;
  box-shadow: 0 0 8px #74ff8b;
}

.bet-bankroll {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #fff45c;
  background: linear-gradient(90deg, rgb(255 244 92 / 12%), transparent);
  box-shadow: inset 3px 0 #fff45c;
}
.bet-bankroll > span:last-child { text-align: right; }
.bet-bankroll small,
.bet-bankroll strong { display: block; }
.bet-bankroll small { color: #ff8bea; font-size: 6px; letter-spacing: .12em; text-transform: uppercase; }
.bet-bankroll strong { margin-top: 3px; color: white; font: 900 9px/1 var(--font-mono); }
.bet-bankroll strong b { color: #fff45c; font-size: 15px; }
.bet-disclaimer { margin: 5px 0 10px; color: rgb(255 255 255 / 40%); font-size: 6px; text-align: center; text-transform: uppercase; }

.odds-table {
  overflow: hidden;
  border: 1px solid rgb(0 246 255 / 34%);
  background: rgb(0 0 0 / 28%);
}
.odds-table__head,
.odds-row {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) 42px 24px 38px 38px;
  align-items: center;
  gap: 3px;
}
.odds-table__head {
  padding: 5px 6px;
  color: #00f6ff;
  background: rgb(0 246 255 / 8%);
  font: 800 6px/1 var(--font-mono);
  letter-spacing: .06em;
  text-align: right;
  text-transform: uppercase;
}
.odds-table__head span:first-child { text-align: left; }
.odds-table__body { max-height: 216px; overflow: auto; scrollbar-color: #ff2bd6 transparent; scrollbar-width: thin; }
.odds-empty { margin: 0; padding: 14px; color: rgb(255 255 255 / 45%); font-size: 8px; text-align: center; }
.odds-row {
  width: 100%;
  min-height: 38px;
  padding: 5px 6px;
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 8%);
  color: rgb(255 255 255 / 72%);
  text-align: right;
  background: transparent;
  font: 750 7px/1 var(--font-mono);
}
.odds-row:hover { background: rgb(255 43 214 / 9%); }
.odds-row.is-selected { color: white; background: linear-gradient(90deg, rgb(0 246 255 / 15%), transparent); box-shadow: inset 3px 0 #00f6ff; }
.odds-row.is-wagered { background: linear-gradient(90deg, rgb(255 244 92 / 18%), transparent); box-shadow: inset 3px 0 #fff45c; }
.odds-row.is-owned .odds-fighter strong { color: #00f6ff; }
.odds-row:disabled { cursor: default; opacity: 1; }
.odds-row > strong { color: #fff45c; font-size: 9px; }
.odds-fighter { display: flex; min-width: 0; align-items: center; gap: 6px; text-align: left; }
.odds-fighter > i {
  width: 8px;
  height: 22px;
  flex: 0 0 auto;
  background: hsl(var(--fighter-hue) 100% 58%);
  box-shadow: 0 0 7px hsl(var(--fighter-hue) 100% 58%);
}
.odds-fighter > span { min-width: 0; }
.odds-fighter strong,
.odds-fighter small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds-fighter strong { color: white; font: 850 7px/1.1 var(--font-mono); }
.odds-fighter small { margin-top: 3px; color: #ff8bea; font-size: 6px; }

.bet-slip { margin-top: 9px; border: 1px solid rgb(255 43 214 / 38%); background: rgb(255 43 214 / 5%); }
.bet-slip__selection { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid rgb(255 255 255 / 9%); }
.bet-slip__selection > span:last-child { text-align: right; }
.bet-slip__selection small,
.bet-slip__selection strong { display: block; }
.bet-slip__selection small { color: #ff8bea; font-size: 6px; letter-spacing: .1em; text-transform: uppercase; }
.bet-slip__selection strong { margin-top: 3px; color: white; font: 850 9px/1 var(--font-mono); }
.bet-slip__selection > span:last-child strong { color: #fff45c; font-size: 13px; }
.bet-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px 7px 4px; }
.bet-stakes button {
  min-height: 27px;
  border: 1px solid rgb(255 255 255 / 16%);
  color: rgb(255 255 255 / 62%);
  background: #111;
  font: 900 8px/1 var(--font-mono);
}
.bet-stakes button.is-active { border-color: #fff45c; color: #130900; background: #fff45c; box-shadow: 2px 2px 0 #ff3158; }
.bet-stakes button:disabled:not(.is-active) { opacity: .35; }
.bet-return { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px 7px; color: rgb(255 255 255 / 48%); font: 750 7px/1 var(--font-mono); text-transform: uppercase; }
.bet-return strong { color: white; }
.bet-return b { color: #74ff8b; font-size: 11px; }
.bet-place,
.bet-refill {
  width: calc(100% - 14px);
  min-height: 34px;
  margin: 0 7px 7px;
  border: 1px solid #ff3158;
  color: white;
  background: linear-gradient(#ff3158, #a90025);
  box-shadow: 3px 3px 0 #5a0015;
  font: 950 8px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bet-place:disabled { border-color: rgb(255 255 255 / 12%); color: rgb(255 255 255 / 32%); background: #151515; box-shadow: none; }
.bet-refill { border-color: #00f6ff; background: #073c45; box-shadow: 3px 3px 0 #001f25; }

.active-wager {
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid #fff45c;
  background: linear-gradient(90deg, hsl(var(--fighter-hue) 100% 30% / 35%), transparent);
  box-shadow: inset 3px 0 #fff45c;
}
.active-wager span,
.active-wager strong,
.active-wager small { display: block; }
.active-wager span { color: #fff45c; font: 900 6px/1 var(--font-mono); letter-spacing: .13em; }
.active-wager strong { margin-top: 4px; color: white; font-size: 9px; }
.active-wager small { margin-top: 3px; color: rgb(255 255 255 / 55%); font-size: 7px; }
.bet-result { margin-top: 8px; padding: 8px; border: 1px solid rgb(255 255 255 / 15%); color: white; font: 850 7px/1.35 var(--font-mono); text-align: center; }
.bet-result[data-tone="win"] { border-color: #74ff8b; color: #74ff8b; background: rgb(116 255 139 / 8%); }
.bet-result[data-tone="loss"] { border-color: #ff3158; color: #ff7b91; background: rgb(255 49 88 / 8%); }
.bet-result[data-tone="locked"] { border-color: #fff45c; color: #fff45c; }
.bet-ledger { margin-top: 8px; border-top: 1px solid rgb(255 255 255 / 10%); }
.bet-ledger summary { display: flex; cursor: pointer; justify-content: space-between; padding: 8px 2px 2px; color: rgb(255 255 255 / 45%); font: 800 7px/1 var(--font-mono); letter-spacing: .08em; list-style: none; text-transform: uppercase; }
.bet-ledger summary::-webkit-details-marker { display: none; }
.bet-ledger[open] summary span { transform: rotate(45deg); }
.bet-ledger [data-bet-history] { margin-top: 6px; }
.bet-ledger [data-bet-history] > p { margin: 0; padding: 8px; color: rgb(255 255 255 / 35%); font-size: 7px; text-align: center; }
.bet-ledger [data-bet-history] > div { display: flex; justify-content: space-between; padding: 5px 4px; border-top: 1px solid rgb(255 255 255 / 7%); color: rgb(255 255 255 / 55%); font: 700 7px/1 var(--font-mono); }
.bet-ledger [data-result="win"] strong { color: #74ff8b; }
.bet-ledger [data-result="loss"] strong { color: #ff7b91; }
.bet-ledger [data-result="void"] strong { color: #00f6ff; }

.preset-grid {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.preset-button {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
  background: var(--surface-raised);
  transition: border-color 140ms ease, background 140ms ease;
}

.preset-button:hover {
  border-color: var(--line-strong);
}

.preset-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
}

.preset-button strong {
  font-size: 11px;
}

.preset-button small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.35;
}

.preset-button.is-active strong { color: white; }
.preset-button.is-active small { color: rgb(255 255 255 / 58%); }

.specimen-empty {
  display: grid;
  min-height: 120px;
  margin-top: 16px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.specimen-empty p {
  margin: 10px 0 3px;
  font-size: 11px;
  font-weight: 750;
}

.specimen-empty small {
  max-width: 210px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.4;
}

.specimen-reticle {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.specimen-reticle::before,
.specimen-reticle::after {
  position: absolute;
  inset: 50% auto auto 50%;
  background: var(--line-strong);
  content: "";
  transform: translate(-50%, -50%);
}

.specimen-reticle::before { width: 38px; height: 1px; }
.specimen-reticle::after { width: 1px; height: 38px; }

.specimen-data {
  margin-top: 16px;
}

.specimen-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.specimen-identity strong,
.specimen-identity small {
  display: block;
}

.specimen-identity strong { font-size: 12px; }
.specimen-identity small { margin-top: 3px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }

.specimen-swatch {
  display: block;
  width: 30px;
  height: 30px;
  border: 4px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  background: var(--culture);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.fighter-card {
  margin-top: 10px;
  border: 1px solid #ff2bd6;
  background: linear-gradient(145deg, rgb(255 43 214 / 15%), rgb(8 3 18 / 95%) 45%, rgb(255 230 0 / 8%));
  box-shadow: inset 0 0 24px rgb(255 43 214 / 7%), 0 0 14px rgb(255 43 214 / 10%);
}

.fighter-card__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-bottom: 1px solid rgb(255 43 214 / 38%);
  color: #ff7be5;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.fighter-card__headline strong {
  color: #fff45c;
  font-size: 11px;
  text-shadow: 0 0 9px rgb(255 230 0 / 45%);
}

.fighter-move {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.fighter-move__input {
  flex: 0 0 auto;
  padding: 6px;
  border: 1px solid #fff45c;
  color: #fff45c;
  background: #231303;
  font-size: 12px;
  box-shadow: 2px 2px 0 #ff3158;
}

.fighter-move strong,
.fighter-move small { display: block; }
.fighter-move strong { color: white; font-size: 10px; letter-spacing: .04em; }
.fighter-move small { margin-top: 4px; color: var(--ink-faint); font-size: 7px; line-height: 1.35; }

.fighter-ratings { padding: 8px 9px; }
.fighter-ratings > div {
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  gap: 6px;
  min-height: 15px;
  color: #ff9aea;
  font-family: var(--font-mono);
  font-size: 7px;
  text-transform: uppercase;
}
.fighter-ratings i { height: 4px; background: rgb(255 255 255 / 10%); }
.fighter-ratings b { display: block; height: 100%; background: linear-gradient(90deg, #ff3158, #fff45c); box-shadow: 0 0 6px #ff3158; transition: width .2s ease; }
.fighter-ratings em { color: white; font-style: normal; text-align: right; }

.fighter-passive {
  padding: 9px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  background: rgb(0 246 255 / 5%);
}
.fighter-passive small,
.fighter-passive strong,
.fighter-passive span { display: block; }
.fighter-passive small { color: #00f6ff; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.fighter-passive strong { margin-top: 4px; color: white; font-size: 10px; }
.fighter-passive span { margin-top: 3px; color: var(--ink-faint); font-size: 7px; line-height: 1.35; }

.fighter-relic {
  --rare-color: #fff45c;
  padding: 9px;
  border-top: 1px solid var(--rare-color);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rare-color) 18%, transparent), transparent);
  box-shadow: inset 3px 0 0 var(--rare-color);
}
.fighter-relic small,
.fighter-relic strong,
.fighter-relic span { display: block; }
.fighter-relic small { color: var(--rare-color); font-size: 7px; letter-spacing: .13em; text-transform: uppercase; }
.fighter-relic strong { margin-top: 4px; color: white; font-size: 10px; text-shadow: 0 0 8px var(--rare-color); }
.fighter-relic span { margin-top: 3px; color: var(--ink-soft); font-size: 7px; line-height: 1.35; }

.fighter-dna { margin-top: 9px; border: 1px solid var(--line); }
.fighter-dna > summary {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  padding: 9px;
  color: var(--ink-faint);
  font-size: 8px;
  letter-spacing: .09em;
  list-style: none;
  text-transform: uppercase;
}
.fighter-dna > summary::-webkit-details-marker { display: none; }
.fighter-dna[open] > summary span { transform: rotate(45deg); }
.fighter-dna .specimen-data dl,
.fighter-dna dl { margin-top: 0; border-left: 0; }

.lab-settings {
  border-top: 1px solid var(--line-strong);
}
.lab-settings > summary {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: var(--ink);
  background: linear-gradient(90deg, rgb(0 246 255 / 8%), transparent);
  list-style: none;
}
.lab-settings > summary::-webkit-details-marker { display: none; }
.lab-settings > summary small,
.lab-settings > summary strong { display: block; text-transform: uppercase; }
.lab-settings > summary small { color: #00f6ff; font-size: 7px; letter-spacing: .13em; }
.lab-settings > summary strong { margin-top: 3px; font-size: 10px; }
.lab-settings > summary > span:last-child { color: #fff45c; font-size: 16px; transition: transform .18s ease; }
.lab-settings[open] > summary > span:last-child { transform: rotate(45deg); }
.lab-settings__body > .control-section { border-top: 1px solid var(--line); }

.arena-fighter-hud {
  position: absolute;
  z-index: 4;
  top: 66px;
  left: 14px;
  width: min(255px, calc(50% - 42px));
  border: 1px solid #ff2bd6;
  color: white;
  background: linear-gradient(105deg, rgb(10 2 20 / 94%), rgb(20 4 24 / 82%));
  box-shadow: 4px 4px 0 rgb(0 0 0 / 65%), 0 0 18px rgb(255 43 214 / 20%);
  pointer-events: none;
}
.arena-fighter-hud--player {
  border-color: #00f6ff;
  box-shadow: 4px 4px 0 rgb(0 0 0 / 65%), 0 0 18px rgb(0 246 255 / 24%);
}
.arena-fighter-hud--player .arena-fighter-hud__title { border-bottom-color: rgb(0 246 255 / 50%); }
.arena-fighter-hud--rival {
  right: 14px;
  left: auto;
  border-color: #ff3158;
  background: linear-gradient(255deg, rgb(10 2 20 / 94%), rgb(35 3 13 / 84%));
  box-shadow: -4px 4px 0 rgb(0 0 0 / 65%), 0 0 18px rgb(255 49 88 / 24%);
}
.arena-fighter-hud--rival .arena-fighter-hud__title {
  border-bottom-color: rgb(255 49 88 / 50%);
  color: #ff7b91;
}
.arena-fighter-hud--rival .arena-health { grid-template-columns: 30px 1fr 42px; }
.arena-fighter-hud--rival .arena-health b { margin-left: auto; }
.arena-fighter-hud--rival .arena-health span { text-align: right; }

.versus-badge {
  position: absolute;
  z-index: 6;
  top: 90px;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 2px solid #fff45c;
  color: white;
  font-size: 20px;
  font-style: italic;
  font-weight: 1000;
  line-height: 38px;
  text-align: center;
  background: #ff3158;
  box-shadow: 3px 3px 0 #00a8b0, -3px -3px 0 #ff2bd6, 0 0 16px #fff45c;
  pointer-events: none;
  transform: translateX(-50%) rotate(-7deg);
}
.arena-fighter-hud__title {
  display: flex;
  justify-content: space-between;
  padding: 7px 9px;
  border-bottom: 1px solid rgb(255 43 214 / 45%);
  color: #fff45c;
  font-size: 9px;
  letter-spacing: .05em;
}
.arena-fighter-hud__title strong { color: #ff7be5; }
.arena-health {
  display: grid;
  grid-template-columns: 42px 1fr 30px;
  align-items: center;
  gap: 6px;
  padding: 7px 9px 4px;
  color: #fff;
  font-size: 7px;
  text-transform: uppercase;
}
.arena-health i { height: 8px; border: 1px solid rgb(255 255 255 / 35%); background: #20050b; }
.arena-health b { display: block; height: 100%; background: linear-gradient(90deg, #ff3158, #fff45c, #65ff80); box-shadow: 0 0 9px rgb(101 255 128 / 50%); transition: width .2s ease; }
.arena-health em { font-style: normal; text-align: right; }
.arena-combat-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 9px 7px; gap: 4px; }
.arena-combat-stats span { padding: 4px; color: #00f6ff; background: rgb(0 246 255 / 8%); font-size: 7px; text-align: center; }
.arena-combat-stats b { color: white; }
.arena-special { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; border-top: 1px solid rgb(255 255 255 / 12%); }
.arena-special small { color: #ff7be5; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.arena-special strong { color: #fff45c; font-size: 8px; }
.arena-bonus {
  --rare-color: #fff45c;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-top: 1px solid var(--rare-color);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rare-color) 17%, transparent), transparent);
  box-shadow: inset 3px 0 0 var(--rare-color);
}
.arena-bonus small { color: var(--rare-color); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.arena-bonus strong { overflow: hidden; color: white; font-size: 8px; text-overflow: ellipsis; text-shadow: 0 0 7px var(--rare-color); white-space: nowrap; }
.arena-bonus b { color: var(--rare-color); font: 900 8px/1 var(--font-mono); }
.arena-fighter-hud.is-critical { animation: critical-hud .5s steps(2, end) infinite; border-color: #ff3158; }
@keyframes critical-hud { 50% { box-shadow: 0 0 24px rgb(255 49 88 / 75%); } }

.specimen-data dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.specimen-data dl div {
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.specimen-data dt {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.specimen-data dd {
  margin: 0;
  font-size: 10px;
  font-weight: 750;
}

.specimen-data .combat-stat {
  background: linear-gradient(90deg, rgb(255 43 214 / 12%), transparent);
}

.specimen-data .combat-stat dt {
  color: #ff7be5;
}

.specimen-data .combat-stat dd {
  color: #fff4a0;
  text-shadow: 0 0 8px rgb(255 230 0 / 22%);
}

.organism-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}

.organism-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-align: left;
  background: #080d09;
}

.organism-button:first-child {
  grid-column: 1 / -1;
}

.organism-button > span:first-child {
  color: var(--accent);
  font-size: 16px;
}

.organism-button strong,
.organism-button small {
  display: block;
}

.organism-button strong {
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.organism-button small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7px;
  line-height: 1.25;
}

.organism-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #171603;
}

.vault-section {
  background: linear-gradient(155deg, rgb(255 43 214 / 6%), transparent 45%);
}

.vault-count {
  padding: 6px 7px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  box-shadow: 2px 2px 0 rgb(255 138 0 / 35%);
}

.vault-intro {
  margin: 10px 0 14px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.45;
}

.vault-list {
  display: grid;
  gap: 8px;
}

.vault-empty {
  display: grid;
  min-height: 80px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line-strong);
  color: var(--ink-faint);
  text-align: center;
}

.vault-empty span {
  color: var(--accent);
  font-size: 22px;
}

.vault-empty p {
  margin: 5px 0 0;
  font-size: 8px;
  text-transform: uppercase;
}

.vault-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: #050906;
  box-shadow: inset 3px 0 0 hsl(var(--organism-hue, 150) 100% 55%);
}

.vault-card.is-incubating {
  border-color: #8e5d20;
  background: linear-gradient(90deg, rgb(255 138 0 / 10%), #050906);
}

.vault-portrait {
  position: relative;
  width: 54px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgb(57 255 136 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(57 255 136 / 7%) 1px, transparent 1px),
    #010302;
  background-size: 8px 8px;
}

.vault-portrait i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: hsl(var(--organism-hue) 100% 60%);
  box-shadow: 0 0 6px hsl(var(--organism-hue) 100% 55%);
  transform: translate(-50%, -50%);
}

.vault-card-info,
.vault-card-info > * {
  display: block;
  min-width: 0;
}

.vault-card-info strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.vault-card-info small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 7px;
}

.vault-state {
  margin-top: 5px;
  color: var(--acid);
  font-size: 7px;
  letter-spacing: .06em;
}

.is-incubating .vault-state {
  color: var(--accent);
}

.vault-card-actions {
  display: grid;
  grid-template-columns: 1fr 22px;
  gap: 4px;
}

.vault-card-actions button {
  min-height: 21px;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: #0c140e;
  font-size: 7px;
  text-transform: uppercase;
}

.vault-card-actions button:first-child {
  grid-column: 1 / -1;
  border-color: var(--acid);
  color: var(--acid);
}

.vault-card-actions button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.vault-card-actions button:disabled {
  cursor: wait;
  opacity: .42;
}

.game-toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid var(--acid);
  color: var(--paper-deep);
  background: var(--acid);
  box-shadow: 5px 5px 0 rgb(0 0 0 / 70%), 0 0 28px rgb(57 255 136 / 24%);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateY(18px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.game-toast[data-tone="danger"] {
  border-color: #ff2bd6;
  color: white;
  background: #b00b91;
}

.game-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Story-first campaign shell */
.mission-console {
  position: relative;
  overflow: hidden;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgb(0 246 255 / 38%);
  color: white;
  background:
    linear-gradient(145deg, rgb(0 246 255 / 10%), transparent 42%),
    radial-gradient(circle at 100% 0, rgb(255 43 214 / 14%), transparent 38%),
    #050a0d;
}

.mission-console::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #00f6ff, #74ff8b 48%, #ff2bd6);
  box-shadow: 0 0 12px rgb(0 246 255 / 58%);
  content: "";
}

.mission-console__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-console__header > span,
.mission-console__transmission {
  display: grid;
}

.mission-console__header small {
  color: #00f6ff;
  font: 800 6px/1 var(--font-mono);
  letter-spacing: .16em;
}

.mission-console__header strong {
  margin-top: 5px;
  font-size: 17px;
  letter-spacing: -.03em;
}

.mission-console__header > b {
  padding: 5px 6px;
  border: 1px solid rgb(116 255 139 / 42%);
  color: #74ff8b;
  background: rgb(116 255 139 / 7%);
  font: 850 6px/1 var(--font-mono);
  letter-spacing: .1em;
  white-space: nowrap;
}

.mission-console__transmission {
  margin-top: 12px;
  padding: 10px 11px 11px;
  border: 1px solid rgb(0 246 255 / 22%);
  border-left: 2px solid #00f6ff;
  background: rgb(0 246 255 / 4%);
}

.mission-console__transmission > span {
  color: #ff8bea;
  font: 900 6px/1 var(--font-mono);
  letter-spacing: .15em;
}

.mission-console__transmission h2 {
  margin: 5px 0 0;
  color: white;
  font-size: 14px;
  line-height: 1.1;
}

.mission-console__transmission p {
  margin: 7px 0 0;
  color: rgb(233 255 247 / 64%);
  font-size: 8px;
  line-height: 1.5;
}

.mission-console__objective {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  margin-top: 11px;
}

.mission-console__objective > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mission-console__objective small {
  color: rgb(255 255 255 / 38%);
  font: 750 6px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mission-console__objective strong {
  color: white;
  font: 800 8px/1.35 var(--font-mono);
}

.mission-console__objective > b {
  align-self: end;
  color: #fff45c;
  font: 900 7px/1 var(--font-mono);
  white-space: nowrap;
}

.mission-console__objective progress {
  width: 100%;
  height: 6px;
  grid-column: 1 / -1;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgb(255 255 255 / 10%);
  appearance: none;
}

.mission-console__objective progress::-webkit-progress-bar {
  background: rgb(255 255 255 / 10%);
}

.mission-console__objective progress::-webkit-progress-value {
  background: linear-gradient(90deg, #00f6ff, #74ff8b);
  box-shadow: 0 0 8px #00f6ff;
}

.mission-console__objective progress::-moz-progress-bar {
  background: linear-gradient(90deg, #00f6ff, #74ff8b);
  box-shadow: 0 0 8px #00f6ff;
}

.mission-console__objective p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgb(233 255 247 / 46%);
  font: 650 7px/1.4 var(--font-mono);
}

.mission-console__sequence {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 10%);
  list-style: none;
}

.mission-console__sequence li {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 7px 5px;
  border-right: 1px solid rgb(255 255 255 / 9%);
  color: rgb(255 255 255 / 36%);
  background: rgb(255 255 255 / 2%);
}

.mission-console__sequence li:last-child { border-right: 0; }

.mission-console__sequence li.is-current {
  color: #00f6ff;
  background: rgb(0 246 255 / 7%);
  box-shadow: inset 0 -2px #00f6ff;
}

.mission-console__sequence li.is-complete {
  color: #74ff8b;
  background: rgb(116 255 139 / 7%);
  box-shadow: inset 0 -2px #74ff8b;
}

.mission-console[data-status="resolved"] .mission-console__header > b,
.mission-console[data-status="complete"] .mission-console__header > b {
  color: #07150d;
  background: #74ff8b;
  box-shadow: 0 0 14px rgb(116 255 139 / 38%);
}

.mission-console[data-status="complete"]::before {
  height: 3px;
  background: linear-gradient(90deg, #74ff8b, #fff45c, #74ff8b);
}

.mission-console__sequence li > b {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  font: 900 6px/1 var(--font-mono);
}

.mission-console__sequence li > span {
  display: grid;
  min-width: 0;
  gap: 3px;
  font: 850 7px/1 var(--font-mono);
  text-transform: uppercase;
}

.mission-console__sequence small {
  overflow: hidden;
  color: rgb(255 255 255 / 28%);
  font-size: 5px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.mission-console__legend {
  display: grid;
  grid-template-columns: 1.35fr 1fr .8fr;
  gap: 5px;
  margin-top: 9px;
}

.mission-console__legend > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 5px;
  color: rgb(255 255 255 / 52%);
  background: rgb(255 255 255 / 4%);
  font: 700 6px/1 var(--font-mono);
  text-transform: uppercase;
}

.mission-console__legend kbd {
  padding: 3px 4px;
  border: 1px solid rgb(255 244 92 / 50%);
  color: #fff45c;
  background: #10100a;
  font: 900 6px/1 var(--font-mono);
}

.mission-console__legend em {
  color: rgb(255 255 255 / 28%);
  font-size: 5px;
  font-style: normal;
  white-space: nowrap;
}

.mission-console__legend strong {
  overflow: hidden;
  font-size: 6px;
  text-overflow: ellipsis;
}

.mission-console__end-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mission-console__restart,
.mission-console__arena {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  border: 1px solid #ff3158;
  color: white;
  background: rgb(255 49 88 / 12%);
  font: 900 7px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mission-console__arena {
  border-color: #74ff8b;
  color: #07150d;
  background: #74ff8b;
}

.is-story-mode:not(.is-story-complete) .side-drawer--planner,
.is-story-mode:not(.is-story-complete) .side-drawer--signals,
.is-story-mode:not(.is-story-complete) .lab-settings {
  display: none;
}

.side-drawer {
  border-bottom: 1px solid var(--line);
  background: #080c0a;
}

.side-drawer > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(0 246 255 / 5%), transparent 62%),
    #0b110d;
  cursor: pointer;
  list-style: none;
}

.side-drawer > summary::-webkit-details-marker { display: none; }

.side-drawer > summary > span:first-child {
  display: grid;
  gap: 4px;
}

.side-drawer > summary small {
  color: #00f6ff;
  font: 750 6px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.side-drawer > summary strong {
  color: white;
  font-size: 10px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.side-drawer > summary > span:last-child {
  color: #fff45c;
  font-size: 16px;
  transition: transform .18s ease;
}

.side-drawer[open] > summary {
  border-bottom: 1px solid rgb(0 246 255 / 18%);
  background: #0d1510;
}

.side-drawer[open] > summary > span:last-child { transform: rotate(45deg); }
.side-drawer__body { overflow: hidden; }
.side-drawer__body > .control-section,
.side-drawer__body > .farm-planner {
  border-right: 0;
  border-bottom: 0;
}

.story-overlay {
  position: absolute;
  z-index: 7;
  top: 84px;
  left: 16px;
  display: grid;
  width: min(310px, calc(100% - 32px));
  gap: 5px;
  padding: 9px 11px 10px;
  border: 1px solid rgb(0 246 255 / 36%);
  border-left: 3px solid #00f6ff;
  color: white;
  background: linear-gradient(90deg, rgb(2 10 14 / 94%), rgb(2 10 14 / 70%));
  box-shadow: 4px 4px 0 rgb(0 0 0 / 34%);
  pointer-events: none;
}

.story-overlay small {
  color: #00f6ff;
  font: 900 6px/1 var(--font-mono);
  letter-spacing: .16em;
}

.story-overlay p {
  margin: 0;
  color: rgb(233 255 247 / 78%);
  font: 750 8px/1.45 var(--font-mono);
}

.pilot-controls {
  grid-template-columns: auto repeat(2, minmax(118px, 132px));
}

.pilot-pad { grid-row: 1 / span 2; }

.surge-button,
.split-button {
  position: relative;
  display: grid;
  min-height: 57px;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 3px 8px;
  padding: 8px 9px;
  border: 1px solid #ff2bd6;
  color: #fff;
  text-align: left;
  background: rgb(15 2 18 / 88%);
  box-shadow: inset 0 0 14px rgb(255 43 214 / 12%);
}

.split-button {
  border-color: #00f6ff;
  background: rgb(1 12 17 / 88%);
  box-shadow: inset 0 0 14px rgb(0 246 255 / 10%);
}

.surge-button span,
.split-button span { display: grid; gap: 2px; }
.surge-button small,
.split-button small { color: #ff83ec; font-size: 6px; letter-spacing: .16em; }
.split-button small { color: #78fbff; }
.surge-button strong,
.split-button strong { font: 950 9px/1 var(--font-mono); letter-spacing: .04em; }
.surge-button kbd,
.split-button kbd { color: #fff45c; font: 900 10px/1 var(--font-mono); }
.surge-button > i,
.split-button > i { grid-column: 1 / -1; height: 3px; background: rgb(255 255 255 / 14%); }
.surge-button > i b,
.split-button > i b { display: block; width: 100%; height: 100%; transition: width 100ms linear; }
.split-button > i b { background: linear-gradient(90deg, #00f6ff, #74ff8b); box-shadow: 0 0 8px #00f6ff; }
.split-button:not(:disabled):hover { color: #011316; background: #78fbff; }
.split-button:disabled { cursor: not-allowed; opacity: .62; }
.pilot-hint,
.pilot-touch-hint { grid-column: 2 / -1; }

.arena-fighter-hud,
.versus-badge {
  display: none !important;
}

.story-round-hook { display: none; }
