:root {
  /* Design tokens: single source of truth */
  --color-bg: #091013;
  --color-bg-soft: #121b1f;
  --color-surface: rgba(26, 34, 36, 0.82);
  --color-surface-strong: rgba(12, 18, 20, 0.94);
  --color-line: rgba(128, 214, 200, 0.18);
  --color-line-strong: rgba(149, 244, 229, 0.58);
  --color-text: #dce6e2;
  --color-text-muted: #90a39f;
  --color-accent: #84e1d5;
  --color-accent-bright: #b8fff2;
  --color-danger: #e07b67;
  --color-warning: #ffbc57;
  --color-success: #9ed9a1;
  --color-ally: #84e1d5;
  --color-enemy: #f08d6d;
  --color-violet: #b59dff;
  --color-steel: #536066;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.2);
  --shadow-panel: 0 28px 80px rgba(0, 0, 0, 0.34);
  --shadow-accent: 0 0 18px rgba(132, 225, 213, 0.14);

  --font-scale-xs: 0.72rem;
  --font-scale-sm: 0.82rem;
  --font-scale-md: 0.95rem;
  --font-scale-lg: 1.18rem;
  --font-scale-xl: 1.8rem;
  --font-scale-xxl: 2.35rem;

  --z-base: 1;
  --z-overlay: 20;
  --z-tooltip: 60;
  --z-floating: 90;
  --z-modal: 120;

  --time-fast: 140ms;
  --time-base: 220ms;
  --time-slow: 420ms;

  /* legacy aliases kept for runtime compatibility */
  --bg: var(--color-bg);
  --bg-soft: var(--color-bg-soft);
  --panel: var(--color-surface);
  --panel-strong: var(--color-surface-strong);
  --line: var(--color-line);
  --line-strong: var(--color-line-strong);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --accent: var(--color-accent);
  --accent-bright: var(--color-accent-bright);
  --danger: var(--color-danger);
  --ally: var(--color-ally);
  --enemy: var(--color-enemy);
  --success: var(--color-success);
  --amber: var(--color-warning);
  --violet: var(--color-violet);
  --steel: var(--color-steel);
  --shadow: var(--shadow-panel);
  --radius: var(--radius-lg);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(214, 174, 94, 0.12), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(104, 176, 165, 0.12), transparent 20%),
    linear-gradient(140deg, #0b1012, #10191c 55%, #070c0e);
  font-family: "Spectral", serif;
  overflow-x: hidden;
}

#battle-layer {
  position: relative;
  z-index: 40;
}

#element-source-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: min(26rem, calc(100vw - 2rem));
  padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(132, 225, 213, 0.28);
  border-radius: 18px;
  background: rgba(8, 13, 15, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  color: var(--text);
  z-index: 140;
}

.element-source-panel__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.35rem;
}

.element-source-panel__title {
  margin: 0;
  font-size: 1rem;
}

.element-source-panel__hint,
.element-source-panel__status {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.element-source-panel__meta {
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.element-source-panel__meta div {
  display: grid;
  gap: 0.12rem;
}

.element-source-panel__meta dt {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.element-source-panel__meta dd {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text);
  word-break: break-word;
}

.element-source-panel__stack {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(132, 225, 213, 0.14);
}

.element-source-panel__stack-title {
  font-size: 0.76rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.element-source-panel__stack ol {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

#element-source-panel kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  padding: 0.08rem 0.32rem;
  border-radius: 7px;
  border: 1px solid rgba(132, 225, 213, 0.2);
  background: rgba(132, 225, 213, 0.08);
  color: var(--text);
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(214, 174, 94, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 174, 94, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.12) 0, transparent 26%),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.08) 0, transparent 18%);
  mix-blend-mode: soft-light;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.eyebrow,
.panel-label,
.mini-status,
.room-status,
.battle-meta span,
.credential-block span {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.nav-rail button,
.main-button,
.ghost-button,
.danger-button,
.battle-action strong {
  font-family: "Staatliches", sans-serif;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.main-button,
.ghost-button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.2), rgba(214, 174, 94, 0.05));
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.main-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent-bright);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
}

.danger-button {
  border: 1px solid rgba(224, 123, 103, 0.52);
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  background:
    linear-gradient(180deg, rgba(224, 123, 103, 0.28), rgba(224, 123, 103, 0.12)),
    rgba(52, 16, 17, 0.84);
  color: #ffe5df;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 226, 218, 0.08);
}

.danger-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 164, 145, 0.8);
  background:
    linear-gradient(180deg, rgba(237, 108, 82, 0.34), rgba(224, 123, 103, 0.16)),
    rgba(64, 18, 20, 0.92);
}

.compact {
  padding: 0.65rem 1rem;
}

.compact.disabled,
.ghost-button.disabled,
.battle-action.disabled,
.danger-button.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.battle-action.disabled {
  pointer-events: auto;
  cursor: not-allowed;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
  gap: 1rem;
  padding: 2rem;
}

.hero-panel,
.auth-panel,
.console-card,
.finish-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 2.8rem 1.8rem 2.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 4rem);
  background:
    radial-gradient(circle at top left, rgba(150, 242, 224, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(214, 174, 94, 0.14), transparent 26%),
    linear-gradient(160deg, rgba(7, 14, 18, 0.94), rgba(12, 20, 28, 0.9) 52%, rgba(23, 31, 36, 0.88));
}

.hero-panel::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -16%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(214, 174, 94, 0.16);
  box-shadow: 0 0 0 36px rgba(214, 174, 94, 0.06), 0 0 0 96px rgba(214, 174, 94, 0.025);
}

.auth-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  width: 100%;
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.hero-copy {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.auth-brand-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  padding-right: 0.8rem;
}

.auth-key-art {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.auth-key-art-frame {
  position: relative;
  display: block;
}

.auth-key-art img {
  display: block;
  width: min(100%, 720px);
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.auth-key-art[data-missing="true"] .auth-key-art-frame {
  display: block;
  min-height: 320px;
  width: min(100%, 720px);
}

.auth-key-art[data-missing="true"] .auth-key-art-frame::after {
  content: "等待插画资源";
  position: absolute;
  left: 1.4rem;
  bottom: 1.2rem;
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  color: rgba(236, 228, 209, 0.72);
}

.auth-panel {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-columns {
  width: 100%;
  display: grid;
  gap: 1rem;
}

.auth-card,
.stack-form,
.unit-editor,
.create-room-card,
.room-console,
.room-card,
.compact-card {
  display: grid;
  gap: 0.9rem;
}

.auth-card {
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-card--primary {
  width: min(100%, 420px);
  margin: 0;
  min-height: 100%;
  align-self: stretch;
  align-content: center;
}

.auth-card--primary h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.auth-copy {
  max-width: none;
  margin: 0;
  font-size: 0.98rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: var(--text);
  border: 1px solid rgba(214, 174, 94, 0.16);
  background: rgba(6, 10, 12, 0.5);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-bright);
}

textarea {
  resize: vertical;
  min-height: 5.2rem;
  line-height: 1.5;
}

.shell {
  min-height: 100vh;
  padding: 1.6rem;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.6rem;
}

.brand-block h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(2.4rem, 4vw, 4rem);
}

.battle-history-dropdown {
  position: relative;
}

.history-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(42rem, calc(100vw - 2rem));
  min-width: min(32rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.history-list {
  padding: 4px;
}

.history-item {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
  line-height: 1.5;
}

.history-item > div:first-child {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.history-item > div:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item:hover {
  background: var(--panel);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
}

.nav-rail {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.nav-rail button {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
}

.nav-rail button.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.14), rgba(214, 174, 94, 0.02));
}

.dashboard-main,
.hangar-grid,
.rooms-grid {
  display: grid;
  gap: 1rem;
}

.hangar-grid,
.rooms-grid {
  grid-template-columns: 300px 1fr;
}

.console-card {
  padding: 1.4rem;
}

.console-card.big {
  padding: 1.8rem;
}

.panel-topline,
.room-card-head,
.board-head,
.battle-topline,
.masthead-side {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.masthead-side {
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.battle-meta {
  align-items: center;
}

.battle-close-top {
  margin-left: 0.3rem;
}

.panel-label,
.eyebrow {
  color: var(--accent-bright);
  font-size: 0.75rem;
}

.editor-meta,
.mini-metrics,
.room-card-meta,
.battle-meta,
.room-player-line,
.battle-actions,
.battle-grid,
.unit-grid,
.room-roster,
.room-list {
  display: grid;
  gap: 0.8rem;
}

.editor-meta > span,
.room-card-meta > span,
.mini-metrics > span {
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.preset-list {
  display: grid;
  gap: 0.7rem;
}

.preset-card,
.room-card,
.room-roster-card,
.battle-action,
.battle-cell,
.unit-editor {
  border-radius: 20px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.preset-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  text-align: left;
  color: var(--text);
}

.preset-card.active {
  border-color: var(--accent-bright);
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.15), rgba(214, 174, 94, 0.02));
}

.preset-name {
  font-size: 1.2rem;
}

.preset-meta,
.small-copy,
.hint-line,
.empty-chip,
.wreck-chip {
  color: var(--muted);
}

.editor-head,
.two-col,
.room-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.editor-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
}

.hangar-editor-stage {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.hangar-formation-card,
.preset-level-control,
.loadout-picker-card {
  border-radius: 22px;
  border: 1px solid rgba(214, 174, 94, 0.16);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.03);
}

.hangar-formation-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.hangar-formation-board {
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.hangar-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-bright);
  font-family: "IBM Plex Mono", monospace;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  padding: 0.9rem 0.45rem;
}

.hangar-formation-cell {
  min-height: 138px;
  border-radius: 22px;
  border: 1px dashed rgba(214, 174, 94, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(8, 12, 14, 0.56);
  padding: 0.55rem;
  display: flex;
  align-items: stretch;
  justify-content: center;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.hangar-formation-cell.occupied {
  border-style: solid;
}

.hangar-formation-cell.drag-over {
  border-color: rgba(132, 231, 222, 0.84);
  box-shadow: inset 0 0 0 1px rgba(132, 231, 222, 0.24), 0 0 24px rgba(49, 130, 121, 0.2);
  transform: translateY(-1px);
}

.hangar-formation-empty {
  align-self: center;
  color: rgba(240, 228, 202, 0.46);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.hangar-formation-unit {
  width: 100%;
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid rgba(121, 200, 188, 0.24);
  background:
    linear-gradient(180deg, rgba(121, 200, 188, 0.12), transparent 48%),
    rgba(5, 11, 13, 0.8);
  color: var(--text);
  text-align: left;
  cursor: grab;
}

.hangar-formation-unit.dragging {
  opacity: 0.48;
}

.hangar-formation-unit:active {
  cursor: grabbing;
}

.hangar-formation-unit strong {
  font-size: 0.92rem;
  line-height: 1;
}

.hangar-formation-unit span,
.hangar-formation-unit small {
  color: var(--muted);
}

.hangar-formation-unit-media {
  position: relative;
}

.hangar-formation-unit-avatar {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
}

.hangar-formation-legend {
  display: grid;
  gap: 0.55rem;
}

.hangar-formation-legend-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.72rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.hangar-formation-legend-item span {
  color: var(--muted);
}

.legend-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background: rgba(214, 174, 94, 0.1);
  color: var(--accent-bright);
  font-family: "IBM Plex Mono", monospace;
}

.preset-level-control {
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.7rem;
}

.preset-level-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.preset-level-control p,
.loadout-picker-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.86rem;
}

.loadout-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.loadout-picker-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem;
}

.loadout-picker-head {
  display: grid;
  gap: 0.16rem;
}

.loadout-picker-head strong {
  font-size: 1rem;
}

.position-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.position-summary-strip span {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.84rem;
}

.position-summary-strip strong {
  color: var(--text);
}

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

.warning-banner {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(208, 101, 86, 0.4);
  background: rgba(208, 101, 86, 0.12);
  color: #ffd8d1;
}

.rooms-column {
  display: grid;
  gap: 1rem;
}

.room-status {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.22);
}

.room-status.active {
  color: #ffcbbd;
  border-color: rgba(215, 134, 107, 0.48);
}

.room-status.waiting {
  color: #e6d8af;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(121, 200, 188, 0.36);
  background: rgba(121, 200, 188, 0.12);
  color: var(--ally);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.toggle-line input {
  width: auto;
  margin: 0;
}

.toggle-line span {
  color: var(--text);
}

.room-console.empty {
  place-items: center;
  text-align: center;
}

.room-roster-card {
  padding: 1rem;
  display: grid;
  gap: 0.3rem;
}

.room-roster-card.mine {
  border-color: rgba(121, 200, 188, 0.45);
}

.battle-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 1.6rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(214, 174, 94, 0.12), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(121, 200, 188, 0.12), transparent 26%),
    rgba(5, 8, 10, 0.92);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 1rem;
  overflow: auto;
}

.battle-command-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.battle-turn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(214, 174, 94, 0.08));
}

.battle-turn-banner strong {
  color: var(--text);
  font-size: 0.96rem;
}

.battle-turn-banner span {
  color: var(--muted);
  text-align: right;
}

.battle-turn-banner.player {
  border-color: rgba(121, 200, 188, 0.26);
  box-shadow: 0 0 0 1px rgba(121, 200, 188, 0.1) inset;
}

.battle-turn-banner.bot {
  border-color: rgba(214, 174, 94, 0.24);
}

.battle-fleet-card,
.battle-spotlight {
  position: relative;
  overflow: hidden;
}

.battle-fleet-card::after,
.battle-spotlight::after {
  content: "";
  position: absolute;
  inset: auto -18% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 174, 94, 0.12), transparent 66%);
  pointer-events: none;
}

.battle-fleet-head,
.battle-spotlight-head,
.battle-spotlight-stats,
.battle-fleet-metrics,
.battle-spotlight-footer {
  display: grid;
  gap: 0.7rem;
}

.battle-fleet-head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.battle-fleet-head h3,
.battle-spotlight-copy h3 {
  margin: 0.15rem 0 0;
}

.battle-fleet-head strong {
  font-family: "Staatliches", sans-serif;
  font-size: 2rem;
  color: var(--accent-bright);
}

.battle-fleet-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.battle-fleet-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(214, 174, 94, 0.96), rgba(121, 200, 188, 0.96));
}

.battle-fleet-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.battle-fleet-metrics span,
.battle-spotlight-stats span,
.spotlight-line {
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.battle-fleet-metrics strong,
.battle-spotlight-stats strong,
.spotlight-line strong {
  color: var(--text);
}

.battle-fleet-lineup {
  display: grid;
  gap: 0.55rem;
}

.battle-fleet-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.battle-fleet-pill.down {
  opacity: 0.5;
}

.battle-fleet-pill strong,
.battle-fleet-pill span {
  display: block;
}

.battle-fleet-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.battle-grid {
  grid-template-columns: 1fr 1fr 340px;
  align-items: start;
}

.board-panel,
.battle-sidebar {
  display: grid;
  gap: 0.8rem;
}

.battle-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--panel);
}

.battle-cell-shell {
  min-height: 168px;
  position: relative;
}

.battle-cell {
  width: 100%;
  min-height: 168px;
  min-height: 168px;
  padding: 0.6rem;
  display: grid;
  align-content: space-between;
  color: var(--text);
  border: 1px solid rgba(214, 174, 94, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 16, 0.92);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.battle-cell:hover,
.battle-cell-shell.menu-open .battle-cell {
  transform: translateY(-2px);
}

.battle-cell-shell.targetable .battle-cell {
  border-color: var(--accent-bright);
  box-shadow:
    0 0 0 1px rgba(214, 174, 94, 0.2) inset,
    0 0 30px rgba(214, 174, 94, 0.14);
}

.battle-cell-shell.preview-move .battle-cell {
  border-style: dashed;
  border-color: rgba(121, 200, 188, 0.72);
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.18) inset,
    0 0 26px rgba(121, 200, 188, 0.16);
}

.battle-cell-shell.preview-offense .battle-cell {
  border-color: rgba(214, 134, 107, 0.72);
  box-shadow:
    0 0 0 1px rgba(214, 134, 107, 0.18) inset,
    0 0 24px rgba(214, 134, 107, 0.16);
}

.battle-cell-shell.preview-support .battle-cell {
  border-color: rgba(121, 200, 188, 0.72);
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.18) inset,
    0 0 24px rgba(121, 200, 188, 0.16);
}

.battle-cell-shell.active .battle-cell {
  border-color: rgba(121, 200, 188, 0.7);
}

.battle-cell-shell.actionable .battle-cell {
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.14) inset,
    0 0 0 1px rgba(121, 200, 188, 0.1);
}

.battle-cell-shell.menu-open {
  z-index: 8;
}

.cell-label {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  color: rgba(255, 255, 255, 0.28);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.range-tag {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.32);
  background: rgba(5, 8, 10, 0.72);
  color: var(--accent-bright);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.unit-chip {
  display: grid;
  gap: 0.4rem;
}

.unit-chip.ready {
  position: relative;
}

.unit-chip.ally strong {
  color: var(--ally);
}

.unit-chip.enemy strong {
  color: var(--enemy);
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar.hp i {
  background: linear-gradient(90deg, #d96e5d, #efb36a);
}

.bar.sp i {
  background: linear-gradient(90deg, #5e9bd9, #74d0c1);
}

.mini-status-line {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.mini-status {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.64rem;
}

.mini-status.sky {
  color: #8fd2ff;
}

.mini-status.amber {
  color: #ffcc78;
}

.mini-status.emerald,
.mini-status.teal {
  color: #8fe0c0;
}

.battle-sidebar .console-card {
  background: rgba(10, 16, 19, 0.88);
}

.unit-ready-glow {
  position: absolute;
  inset: -0.35rem;
  border-radius: 18px;
  border: 1px solid rgba(121, 200, 188, 0.36);
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.12) inset,
    0 0 18px rgba(121, 200, 188, 0.18);
  animation: tactical-pulse 1.25s ease-in-out infinite;
  pointer-events: none;
}

.unit-command-cue {
  justify-self: start;
  padding: 0.26rem 0.52rem;
  border-radius: 999px;
  background: rgba(5, 8, 10, 0.78);
  border: 1px solid rgba(121, 200, 188, 0.22);
  color: var(--ally);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.battle-command-menu {
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.28);
  background:
    linear-gradient(160deg, rgba(29, 22, 9, 0.96), rgba(8, 12, 14, 0.96)),
    rgba(8, 12, 14, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}

.battle-floating-command-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: min(460px, calc(100vw - 3rem));
  z-index: 42;
  opacity: 0;
  pointer-events: none;
}

.battle-command-head {
  display: grid;
  gap: 0.1rem;
}

.battle-command-head strong {
  font-family: "Staatliches", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.battle-command-groups {
  display: grid;
  gap: 0.5rem;
}

.battle-command-group {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.6rem;
  align-items: stretch;
}

.battle-command-group-label {
  display: grid;
  align-content: center;
  gap: 0.12rem;
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.battle-command-group-label strong {
  font-family: "Staatliches", sans-serif;
  letter-spacing: 0.04em;
}

.battle-command-group-label span {
  color: var(--muted);
  font-size: 0.7rem;
}

.battle-command-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.battle-command-button {
  min-width: 132px;
  min-height: 86px;
  padding: 0.6rem 0.72rem;
  display: grid;
  gap: 0.16rem;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.battle-command-button[data-enabled="true"] {
  border-color: rgba(121, 200, 188, 0.32);
  background:
    linear-gradient(180deg, rgba(121, 200, 188, 0.14), rgba(121, 200, 188, 0.04)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.08) inset,
    0 0 18px rgba(121, 200, 188, 0.08);
}

.battle-command-button:hover {
  transform: translateX(2px);
  border-color: rgba(214, 174, 94, 0.36);
}

.battle-command-button strong {
  font-family: "Staatliches", sans-serif;
  letter-spacing: 0.04em;
}

.battle-command-button span {
  color: var(--muted);
  font-size: 0.76rem;
}

.battle-command-button.selected {
  border-color: var(--accent-bright);
  background: rgba(214, 174, 94, 0.14);
  box-shadow:
    0 0 0 1px rgba(214, 174, 94, 0.14) inset,
    0 0 22px rgba(214, 174, 94, 0.12);
}

.battle-command-button.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.battle-command-footer {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(214, 174, 94, 0.12);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.battle-action[data-enabled="true"] {
  border-color: rgba(121, 200, 188, 0.28);
  background:
    linear-gradient(180deg, rgba(121, 200, 188, 0.14), rgba(121, 200, 188, 0.03)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 0 1px rgba(121, 200, 188, 0.08) inset,
    0 0 18px rgba(121, 200, 188, 0.06);
}

.battle-spotlight-head {
  grid-template-columns: 102px 1fr;
  align-items: start;
}

.battle-spotlight-visual {
  position: relative;
}

.battle-spotlight-avatar {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
}

.battle-spotlight-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.battle-spotlight-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.battle-spotlight-footer {
  grid-template-columns: 1fr;
}

.tactical-step-list {
  display: grid;
  gap: 0.55rem;
}

.tactical-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.72rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.tactical-step span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  color: var(--accent-bright);
  font-family: "Staatliches", sans-serif;
  font-size: 1rem;
}

.tactical-step strong,
.tactical-step small {
  display: block;
}

.tactical-step strong {
  color: var(--text);
}

.tactical-step small {
  margin-top: 0.15rem;
  color: var(--muted);
  line-height: 1.45;
}

.tactical-step.active {
  border-color: rgba(121, 200, 188, 0.18);
  background: rgba(121, 200, 188, 0.06);
}

.spotlight-line {
  display: grid;
  gap: 0.2rem;
}

.spotlight-line span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

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

.battle-action {
  padding: 0.85rem;
  display: grid;
  gap: 0.3rem;
  text-align: left;
  color: var(--text);
}

.battle-action.selected {
  border-color: var(--accent-bright);
  background: rgba(214, 174, 94, 0.14);
}

.event-log {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.event-row {
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

@keyframes tactical-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.98);
  }

  50% {
    opacity: 0.78;
    transform: scale(1.02);
  }
}

.battle-finish {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.36);
}

.finish-card {
  width: min(420px, calc(100vw - 2rem));
  padding: 2rem;
  text-align: center;
}

.toast-layer {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: grid;
  gap: 0.6rem;
}

.toast {
  min-width: 220px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 15, 0.92);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.toast.success {
  border-color: rgba(129, 199, 139, 0.45);
}

.toast.error {
  border-color: rgba(208, 101, 86, 0.48);
}

.hero-showcase {
  display: grid;
  gap: 0.8rem;
}
.room-player-pill,
.room-roster-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.room-player-pill strong,
.room-roster-head strong {
  margin: 0;
}

.room-player-pill strong,
.room-roster-head strong {
  display: block;
}

.room-player-pill span,
.room-roster-head span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.pilot-avatar,
.mech-art {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pilot-avatar {
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.2), transparent 35%),
    linear-gradient(150deg, rgba(214, 174, 94, 0.24), rgba(11, 18, 20, 0.92));
  border: 1px solid rgba(214, 174, 94, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.pilot-avatar img,
.mech-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pilot-avatar.lg {
  width: 92px;
  height: 92px;
}

.pilot-avatar.md,
.pilot-avatar.sm {
  width: 56px;
  height: 56px;
}

.pilot-avatar.xs {
  width: 34px;
  height: 34px;
}

.mech-art {
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 60%),
    rgba(5, 10, 12, 0.7);
}

.mech-art.card {
  aspect-ratio: 4 / 5;
}

.mech-art.token {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.lineup-strip {
  display: grid;
  gap: 0.75rem;
}

.lineup-strip.hero,
.lineup-strip.featured,
.lineup-strip.preset,
.lineup-strip.room {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lineup-tile {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.03);
  text-align: left;
}

.lineup-tile strong {
  font-family: "Staatliches", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.lineup-tile span {
  line-height: 1.2;
}

.lineup-tile-media,
.feature-unit-media,
.unit-chip-visual {
  position: relative;
}

.lineup-tile-avatar,
.feature-unit-avatar,
.unit-chip-avatar {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
}

.lineup-tile-level {
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.3);
  background: rgba(9, 16, 18, 0.84);
  color: var(--accent-bright);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.feature-unit {
  display: grid;
  gap: 0.85rem;
}

.feature-unit-copy {
  display: grid;
  gap: 0.45rem;
}

.feature-unit-copy h3 {
  margin: 0;
  font-size: 1.6rem;
}

.feature-unit-copy p {
  margin: 0;
  color: var(--muted);
}

.feature-unit-topline,
.feature-unit-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feature-unit-loadout {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.feature-unit-topline span,
.feature-unit-tags span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
}

.feature-unit-topline strong {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(214, 174, 94, 0.14);
  color: var(--accent-bright);
}

.detail-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.detail-chip {
  border: 1px solid rgba(214, 174, 94, 0.18);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-chip:hover {
  border-color: var(--accent-bright);
  background: rgba(214, 174, 94, 0.08);
}

.preset-card .lineup-strip {
  margin-top: 0.4rem;
}

.room-lineup-stack {
  display: grid;
  gap: 0.75rem;
}

.room-lineup-block {
  display: grid;
  gap: 0.45rem;
}

.room-roster-head {
  align-items: flex-start;
}

.room-roster-head .pilot-avatar {
  margin-top: 0.1rem;
}

.unit-chip {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.55rem;
  align-items: start;
}

.unit-chip-copy {
  display: grid;
  gap: 0.35rem;
}

.unit-chip-copy strong {
  line-height: 1;
}

.unit-chip-copy > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.hover-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(214, 174, 94, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 48%),
    rgba(7, 12, 14, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 320;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.hover-tooltip.show {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.glossary-hover-tooltip {
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
  z-index: 321;
}

.tooltip-shell {
  display: grid;
  gap: 0.7rem;
}

.tooltip-shell.wide {
  gap: 0.85rem;
}

.tooltip-head {
  display: grid;
  gap: 0.15rem;
}

.tooltip-head strong {
  font-family: "Staatliches", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.tooltip-head span,
.tooltip-title,
.tooltip-skill-entry span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.tooltip-shell p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.tooltip-section {
  display: grid;
  gap: 0.45rem;
}

.tooltip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.tooltip-grid-item,
.tooltip-skill-entry {
  display: grid;
  gap: 0.16rem;
  padding: 0.52rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(214, 174, 94, 0.1);
}

.tooltip-grid-item span {
  font-size: 0.72rem;
  color: var(--muted);
}

.glossary-term {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  border-bottom: 1px dashed rgba(214, 174, 94, 0.9);
  color: var(--text);
  cursor: help;
  text-underline-offset: 0.16em;
}

.tooltip-grid-item strong,
.tooltip-skill-entry strong {
  font-size: 0.92rem;
  color: var(--text);
}

.tooltip-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.24rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.tooltip-skill-list {
  display: grid;
  gap: 0.45rem;
}

.tooltip-skill-entry small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .auth-shell,
  .dashboard-shell,
  .hangar-grid,
  .rooms-grid,
  .battle-command-rail,
  .battle-grid {
    grid-template-columns: 1fr;
  }

  .unit-grid,
  .room-roster {
    grid-template-columns: 1fr;
  }

  .detail-chip-grid,
  .tooltip-grid {
    grid-template-columns: 1fr;
  }

  .editor-head,
  .hangar-editor-stage,
  .loadout-picker-grid,
  .preset-level-control-row {
    grid-template-columns: 1fr;
  }

  .hangar-formation-card {
    position: static;
  }

  .hangar-formation-board {
    grid-template-columns: 56px repeat(3, minmax(0, 1fr));
  }

  .lineup-strip.hero,
  .lineup-strip.featured,
  .lineup-strip.preset,
  .lineup-strip.room {
    grid-template-columns: 1fr;
  }

  .battle-board {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
  }

  .battle-sidebar {
    order: -1;
  }

  .battle-command-group {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 540px;
  }

  .auth-hero-row {
    flex-direction: column;
    align-items: center;
  }

  .hero-panel h1 {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0.08em;
  }

  .auth-key-art {
    width: 100%;
    justify-content: center;
  }

  .auth-card--primary {
    width: min(100%, 520px);
    margin: 0 auto;
    min-height: auto;
    align-self: auto;
  }
}

@media (max-width: 700px) {
  .shell,
  .auth-shell,
  .battle-overlay {
    padding: 1rem;
  }

  .hero-panel,
  .auth-panel,
  .console-card {
    padding: 1rem;
  }

  .auth-panel {
    padding: 0;
  }

  .hero-panel {
    min-height: 420px;
  }

  .hero-panel h1 {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0.08em;
  }

  .auth-hero-row {
    gap: 1.2rem;
  }

  .auth-key-art {
    width: 100%;
    justify-content: center;
  }

  .auth-key-art img {
    max-height: 34vh;
  }

  .auth-card--primary {
    width: 100%;
    margin: 0;
    min-height: auto;
    align-self: auto;
  }

  .editor-head,
  .two-col,
  .room-actions,
  .battle-actions,
  .battle-fleet-metrics,
  .battle-spotlight-stats,
  .battle-turn-banner {
    grid-template-columns: 1fr;
  }

  .battle-turn-banner {
    display: grid;
  }

  .battle-turn-banner span {
    text-align: left;
  }
}

.admin-shell {
  min-height: 100vh;
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.screen-shell--admin-page {
  min-height: 100vh;
}

.screen-shell--admin {
  align-content: start;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.admin-head.top-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
}

.admin-head h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.version-grid {
  margin-top: var(--space-3);
}

.stat-card {
  display: grid;
  gap: 0.4rem;
}

.stat-card strong {
  font-family: "Staatliches", sans-serif;
  font-size: 2.4rem;
  color: var(--accent-bright);
}

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

.admin-shell .console-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(8, 12, 14, 0.28));
  border-color: rgba(109, 202, 214, 0.14);
  box-shadow: var(--shadow-panel);
}

.admin-shell .console-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(109, 202, 214, 0.05), transparent 32%),
    radial-gradient(circle at top right, rgba(248, 196, 97, 0.08), transparent 32%);
}

.admin-shell .console-card > * {
  position: relative;
  z-index: 1;
}

.admin-span-2 {
  grid-column: span 2;
}

.admin-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.12);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.admin-table th,
.admin-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(214, 174, 94, 0.1);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--accent-bright);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
}

.admin-table td code {
  color: #d6d1bf;
  white-space: pre-wrap;
  word-break: break-all;
}

.admin-link {
  text-decoration: none;
}

.admin-link,
.ghost-button,
.main-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.balance-hero-card,
.balance-list-card,
.balance-surrogate-card {
  overflow: hidden;
}

.meta-badge-group,
.balance-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.meta-badge-group .task-badge,
.balance-meta-badges span {
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.balance-cap-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.balance-cap-button {
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.balance-cap-button.active {
  color: var(--text);
  border-color: var(--accent-bright);
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.18), rgba(214, 174, 94, 0.06));
  box-shadow: 0 0 24px rgba(214, 174, 94, 0.1);
}

.balance-preset-grid,
.balance-surrogate-grid {
  display: grid;
  gap: 0.85rem;
}

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

.balance-preset-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.09), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.balance-preset-card.champion {
  border-color: rgba(214, 174, 94, 0.42);
  box-shadow: inset 0 0 0 1px rgba(214, 174, 94, 0.14), 0 0 28px rgba(214, 174, 94, 0.1);
}

.balance-preset-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.balance-preset-head h3,
.balance-list-card h2,
.balance-surrogate-card h2 {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
}

.balance-preset-head strong {
  font-family: "Staatliches", sans-serif;
  font-size: 2.2rem;
  color: var(--accent-bright);
}

.balance-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.balance-chip-grid span,
.balance-risk-metrics span {
  display: grid;
  gap: 0.12rem;
  padding: 0.62rem 0.68rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
}

.balance-chip-grid label {
  color: var(--muted);
  font-size: 0.72rem;
}

.balance-chip-grid strong,
.balance-risk-metrics strong {
  color: var(--text);
  font-size: 1rem;
}

.balance-risk-list {
  display: grid;
  gap: 0.6rem;
}

.insight-list {
  display: grid;
  gap: 0.6rem;
}

.balance-risk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.72rem 0.78rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.insight-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.insight-item-copy {
  min-width: 0;
}

.balance-risk-row strong {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 1rem;
}

.insight-item-copy strong {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 1rem;
}

.balance-risk-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.insight-item-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.balance-risk-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.insight-item-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.balance-list-card.positive {
  border-color: rgba(121, 200, 188, 0.22);
}

.balance-list-card.negative {
  border-color: rgba(208, 101, 86, 0.22);
}

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

.balance-surrogate-grid section {
  display: grid;
  gap: 0.6rem;
}

.balance-empty {
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(214, 174, 94, 0.16);
  color: var(--muted);
  text-align: center;
}

.balance-workbench-card,
.balance-preview-card {
  overflow: hidden;
}

.balance-workbench-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.1fr 0.95fr;
  gap: 1rem;
  margin-top: 1rem;
}

.balance-workbench-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.balance-workbench-panel h3,
.balance-control-job h3,
.balance-artifact-card h3 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.patch-bucket-list,
.action-group,
.balance-inline-actions,
.control-grid,
.balance-control-form,
.balance-suggestion-list,
.balance-artifact-list {
  display: grid;
  gap: 0.7rem;
}

.semantic-grid {
  display: grid;
  gap: 0.7rem;
}

.semantic-grid.is-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.patch-bucket-list span {
  padding: 0.68rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
}

.action-group,
.balance-inline-actions {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.balance-patch-editor {
  min-height: 420px;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background: rgba(6, 10, 12, 0.74);
  color: #f3ead4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.55;
}

.control-grid,
.balance-control-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-field,
.balance-control-form label {
  gap: 0.28rem;
}

.control-field {
  display: grid;
}

.control-field input,
.control-field select,
.control-field textarea,
.balance-control-form input,
.balance-control-form select {
  padding: 0.78rem 0.88rem;
}

.balance-control-job {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.task-item {
  display: grid;
  gap: 0.7rem;
}

.task-console {
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.balance-control-job.running {
  border-color: rgba(121, 200, 188, 0.28);
  box-shadow: inset 0 0 0 1px rgba(121, 200, 188, 0.08);
}

.balance-control-job.failed {
  border-color: rgba(208, 101, 86, 0.35);
  box-shadow: inset 0 0 0 1px rgba(208, 101, 86, 0.08);
}

.balance-job-log {
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
}

.task-log {
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
}

.balance-job-log code {
  display: block;
  padding: 0.58rem 0.65rem;
  border-radius: 14px;
  background: rgba(6, 10, 12, 0.65);
  border: 1px solid rgba(214, 174, 94, 0.1);
  color: #d8d1c2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  white-space: pre-wrap;
}

.task-log-entry {
  display: block;
  padding: 0.58rem 0.65rem;
  border-radius: 14px;
  background: rgba(6, 10, 12, 0.65);
  border: 1px solid rgba(214, 174, 94, 0.1);
  color: #d8d1c2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  white-space: pre-wrap;
}

.balance-error-banner {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(208, 101, 86, 0.4);
  background: rgba(208, 101, 86, 0.1);
  color: #ffd8d2;
}

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

.balance-artifact-card,
.balance-suggestion-card,
.semantic-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.suggestion-item,
.artifact-item {
  display: grid;
  gap: 0.75rem;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.95rem;
}

.balance-suggestion-card p,
.balance-artifact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.suggestion-item p,
.artifact-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .admin-card-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-span-2 {
    grid-column: span 1;
  }

  .balance-preset-grid,
  .balance-surrogate-grid,
  .balance-chip-grid,
  .balance-risk-metrics {
    grid-template-columns: 1fr;
  }

  .balance-workbench-grid,
  .patch-bucket-list,
  .control-grid,
  .balance-control-form,
  .action-group,
  .balance-artifact-list,
  .balance-suggestion-list {
    grid-template-columns: 1fr;
  }

  .balance-risk-row {
    grid-template-columns: 1fr;
  }
}

.battle-overlay {
  padding: 0.9rem;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 202, 120, 0.12), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(140, 212, 236, 0.12), transparent 22%),
    rgba(7, 10, 12, 0.94);
}

.battle-stage-shell {
  min-height: calc(100vh - 1.8rem);
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "hud sideheads"
    "hud arena"
    "bottom bottom";
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 34px;
  border: 1px solid rgba(232, 193, 117, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 16%),
    radial-gradient(circle at 50% 20%, rgba(255, 218, 150, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(45, 30, 20, 0.92), rgba(14, 18, 22, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 32px 90px rgba(0, 0, 0, 0.34);
}

.battle-stage-topbar {
  grid-area: topbar;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
}

.battle-stage-room h2 {
  margin: 0.15rem 0 0.18rem;
  font-size: clamp(1.6rem, 2vw, 2.15rem);
}

.battle-stage-room p {
  margin: 0;
  color: rgba(250, 239, 214, 0.68);
}

.battle-round-medal {
  min-width: 176px;
  padding: 0.6rem 1rem;
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  border-radius: 24px;
  border: 1px solid rgba(120, 214, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(76, 119, 155, 0.6), rgba(24, 39, 58, 0.82)),
    rgba(16, 26, 34, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 18px 36px rgba(0, 0, 0, 0.2);
}

.battle-round-medal span {
  color: rgba(220, 236, 250, 0.84);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.battle-round-medal strong {
  font-family: "Staatliches", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: #f6f1e6;
}

.battle-round-medal strong small {
  margin-left: 0.2rem;
  font-size: 1rem;
  color: rgba(246, 241, 230, 0.66);
}

.battle-stage-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-self: end;
  color: rgba(240, 228, 202, 0.78);
}

.battle-actor-hud {
  grid-area: hud;
  align-self: start;
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(232, 193, 117, 0.14);
  background:
    linear-gradient(180deg, rgba(250, 222, 169, 0.1), transparent 55%),
    rgba(13, 20, 23, 0.9);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.battle-actor-hud-head,
.battle-actor-hud-body {
  display: grid;
  gap: 0.8rem;
}

.battle-actor-hud-head {
  grid-template-columns: 104px 1fr;
  align-items: start;
}

.battle-deck-left .battle-actor-hud-head {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0.65rem;
}

.battle-deck-left .battle-actor-hud-copy h3 {
  font-size: 1.16rem;
  line-height: 1.08;
}

.battle-deck-left .battle-actor-hud-copy p {
  font-size: 0.8rem;
  line-height: 1.42;
}

.battle-deck-left .battle-actor-tags {
  margin-top: 0.45rem;
  gap: 0.3rem;
}

.battle-deck-left .battle-actor-tags span {
  font-size: 0.68rem;
  padding: 0.38rem 0.48rem;
}

.battle-deck-left .battle-actor-state-grid {
  gap: 0.5rem;
}

.battle-deck-left .battle-actor-state-card,
.battle-deck-left .battle-actor-state-line {
  padding: 0.52rem 0.62rem;
}

.battle-deck-left .battle-actor-state-card span,
.battle-deck-left .battle-actor-state-line span {
  font-size: 0.72rem;
}

.battle-deck-left .battle-actor-state-card strong,
.battle-deck-left .battle-actor-state-line strong {
  font-size: 0.84rem;
  line-height: 1.35;
}

.battle-deck-right .battle-side-summary-metrics span {
  padding: 0.52rem 0.56rem;
  border-radius: 14px;
}

.battle-deck-right .battle-side-summary-metrics strong {
  font-size: 0.96rem;
}

.battle-actor-hud-media {
  position: relative;
}

.battle-actor-hud-avatar {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
}

.battle-actor-hud-copy h3 {
  margin: 0.15rem 0 0.22rem;
  font-size: 1.5rem;
}

.battle-actor-hud-copy p {
  margin: 0;
  color: rgba(244, 235, 218, 0.68);
  line-height: 1.5;
}

.battle-actor-tags {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.battle-actor-tags span,
.battle-actor-state-card,
.battle-actor-state-line {
  padding: 0.62rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(232, 193, 117, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.battle-actor-tags span {
  color: rgba(242, 234, 214, 0.86);
  font-size: 0.78rem;
}

.battle-hud-meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
}

.battle-hud-meter-label {
  font-size: 0.78rem;
  color: rgba(244, 235, 218, 0.74);
  white-space: nowrap;
}

.battle-hud-meter-value {
  color: #f8f2e6;
  font-size: 0.84rem;
  white-space: nowrap;
}

.battle-hud-meter-bar {
  min-width: 0;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.battle-hud-meter-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.battle-hud-meter.hp .battle-hud-meter-bar i {
  background: linear-gradient(90deg, #6ed167, #b7f280);
}

.battle-hud-meter.sp .battle-hud-meter-bar i {
  background: linear-gradient(90deg, #64b4ff, #8ee8ef);
}

.battle-hud-meter.od .battle-hud-meter-bar i {
  background: linear-gradient(90deg, #ffad58, #ffd978);
}

.battle-actor-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.battle-actor-state-card span,
.battle-actor-state-line span {
  display: block;
  color: rgba(244, 235, 218, 0.56);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.battle-actor-state-card strong,
.battle-actor-state-line strong {
  display: block;
  margin-top: 0.18rem;
  color: #f8f2e6;
  line-height: 1.45;
}

.battle-actor-state-line.combo {
  border-color: rgba(130, 230, 214, 0.16);
}

.battle-actor-state-line.combo.active {
  border-color: rgba(255, 220, 151, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 220, 151, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.battle-stage-sideheads {
  grid-area: sideheads;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.45rem;
}

.battle-side-head {
  display: grid;
  gap: 0.12rem;
}

.battle-side-head strong {
  font-family: "Staatliches", sans-serif;
  font-size: 1.26rem;
  letter-spacing: 0.04em;
}

.battle-side-head span {
  color: rgba(247, 238, 219, 0.58);
  font-size: 0.8rem;
}

.battle-side-head.left strong {
  color: #8fd3ff;
}

.battle-side-head.right {
  justify-items: end;
}

.battle-side-head.right strong {
  color: #ffb27d;
}

.battle-arena-shell {
  grid-area: arena;
  position: relative;
  padding: 0.9rem;
  border-radius: 32px;
  border: 1px solid rgba(236, 195, 118, 0.14);
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 241, 205, 0.32), transparent 22%),
    linear-gradient(180deg, rgba(216, 171, 100, 0.24), rgba(87, 58, 31, 0.16) 32%, rgba(18, 24, 28, 0.82));
  overflow: visible;
}

.battle-arena-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 0.85rem;
  padding: 1.1rem clamp(4.8rem, 8vw, 7rem) 1.6rem;
  overflow: visible;
}

.battle-arena-board::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  bottom: 1.2rem;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 228, 175, 0), rgba(255, 228, 175, 0.56), rgba(255, 228, 175, 0));
  transform: translateX(-50%);
  pointer-events: none;
}

.battle-cell-shell {
  min-height: 188px;
  position: relative;
  overflow: visible;
}

.battle-float-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: visible;
}

.battle-floater {
  position: absolute;
  left: 50%;
  top: calc(0.8rem + var(--battle-float-index, 0) * 1.05rem);
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 12, 16, 0.84);
  color: #ffe6db;
  font-family: "Staatliches", "Noto Sans SC", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translate(-50%, 0.75rem) scale(0.92);
  opacity: 0;
  animation: battle-floater-rise var(--battle-float-duration, 1380ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.battle-floater.damage {
  color: #ffb18b;
  border-color: rgba(255, 141, 98, 0.28);
  background: linear-gradient(180deg, rgba(137, 34, 17, 0.74), rgba(18, 9, 9, 0.92));
}

.battle-floater.shield-loss {
  color: #9fd7ff;
  border-color: rgba(115, 186, 255, 0.28);
  background: linear-gradient(180deg, rgba(23, 74, 112, 0.72), rgba(9, 13, 18, 0.92));
}

.battle-floater.heal {
  color: #bff8da;
  border-color: rgba(105, 220, 176, 0.26);
  background: linear-gradient(180deg, rgba(22, 98, 68, 0.74), rgba(8, 19, 16, 0.92));
}

.battle-floater.shield-gain {
  color: #caf4ff;
  border-color: rgba(126, 228, 255, 0.28);
  background: linear-gradient(180deg, rgba(20, 90, 108, 0.72), rgba(10, 17, 21, 0.92));
}

.battle-floater.sp-loss,
.battle-floater.od-loss {
  color: #ffd995;
  border-color: rgba(255, 203, 111, 0.28);
  background: linear-gradient(180deg, rgba(118, 80, 16, 0.74), rgba(21, 15, 8, 0.92));
}

.battle-floater.sp-gain,
.battle-floater.od-gain {
  color: #fff2ba;
  border-color: rgba(255, 220, 134, 0.28);
  background: linear-gradient(180deg, rgba(121, 100, 23, 0.74), rgba(22, 18, 10, 0.92));
}

@keyframes battle-floater-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 0.9rem) scale(0.9);
  }

  12% {
    opacity: 1;
    transform: translate(-50%, 0.3rem) scale(1);
  }

  82% {
    opacity: 1;
    transform: translate(-50%, -1.15rem) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -1.8rem) scale(0.96);
  }
}

.battle-cell {
  min-height: 188px;
  padding: 0.72rem;
  border-radius: 26px;
  border: 1px solid rgba(129, 214, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(95, 130, 166, 0.22), rgba(58, 78, 102, 0.3)),
    rgba(56, 68, 85, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 30px rgba(0, 0, 0, 0.18);
}

.battle-cell:hover {
  transform: translateY(-1px);
}

.battle-cell-shell.active .battle-cell {
  border-color: rgba(132, 231, 222, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(132, 231, 222, 0.14),
    0 0 0 2px rgba(132, 231, 222, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.18);
}

.battle-cell-shell.actionable.command-visible {
  z-index: 12;
}

.battle-cell-shell.targetable .battle-cell {
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 173, 0.2),
    0 0 0 2px rgba(255, 236, 173, 0.16),
    0 0 28px rgba(255, 221, 140, 0.18);
}

.battle-cell-shell.combo-ready .battle-cell {
  box-shadow:
    inset 0 0 0 1px rgba(132, 231, 222, 0.14),
    0 0 0 2px rgba(132, 231, 222, 0.16),
    0 0 24px rgba(132, 231, 222, 0.16),
    0 0 36px rgba(255, 214, 133, 0.12);
}

.battle-cell-shell.preview-move .battle-cell {
  border-style: dashed;
  border-color: rgba(135, 236, 194, 0.72);
}

.battle-cell-shell.preview-offense .battle-cell {
  border-color: rgba(255, 142, 103, 0.72);
}

.battle-cell-shell.preview-support .battle-cell {
  border-color: rgba(140, 233, 221, 0.74);
}

.cell-label {
  display: none;
}

.range-tag {
  left: 0.6rem;
  top: 0.6rem;
  border-color: rgba(255, 226, 162, 0.36);
  background: rgba(15, 20, 24, 0.88);
}

.battle-combo-preview {
  position: absolute;
  left: 0.6rem;
  top: 2rem;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  max-width: calc(100% - 1.2rem);
}

.battle-combo-chip {
  padding: 0.2rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(130, 230, 214, 0.32);
  background:
    linear-gradient(180deg, rgba(130, 230, 214, 0.14), rgba(130, 230, 214, 0.04)),
    rgba(9, 17, 19, 0.92);
  color: #c9f5e7;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.unit-chip {
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
}

.unit-chip-visual-block {
  display: grid;
  gap: 0.28rem;
}

.unit-chip-copy {
  gap: 0.36rem;
}

.unit-chip-copy strong {
  font-size: 1.02rem;
}

.unit-status-rows--attached {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.1rem;
  min-height: 0;
}

.unit-chip.ally strong {
  color: #8fd8ff;
}

.unit-chip.enemy strong {
  color: #ffb07d;
}

.unit-chip-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.unit-chip-metrics span {
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 10, 12, 0.34);
  color: rgba(241, 238, 230, 0.74);
  font-size: 0.62rem;
}

.unit-status-rows {
  display: grid;
  gap: 0.16rem;
  min-height: 38px;
}

.unit-status-row {
  min-height: 20px;
  display: flex;
  gap: 0.22rem;
  align-items: center;
  flex-wrap: wrap;
}

.unit-status-lane-tag,
.unit-status-overflow {
  min-width: 20px;
  height: 18px;
  padding: 0 0.32rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.unit-status-lane-tag.buff,
.unit-status-overflow.buff {
  border: 1px solid rgba(141, 231, 204, 0.26);
  background: rgba(30, 71, 60, 0.68);
  color: #ccf8e6;
}

.unit-status-lane-tag.debuff,
.unit-status-overflow.debuff {
  border: 1px solid rgba(255, 150, 123, 0.26);
  background: rgba(86, 37, 31, 0.7);
  color: #ffd4c8;
}

.unit-status-dot,
.unit-status-placeholder {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
}

.unit-status-dot.buff {
  border: 1px solid rgba(141, 231, 204, 0.36);
  background: rgba(38, 85, 72, 0.5);
  color: #c7f3df;
}

.unit-status-dot.debuff {
  border: 1px solid rgba(255, 150, 123, 0.36);
  background: rgba(95, 45, 36, 0.52);
  color: #ffd0c4;
}

.unit-status-dot.sky {
  box-shadow: 0 0 0 1px rgba(143, 210, 255, 0.14) inset;
}

.unit-status-dot.amber {
  box-shadow: 0 0 0 1px rgba(255, 204, 120, 0.14) inset;
}

.unit-status-dot.emerald,
.unit-status-dot.teal {
  box-shadow: 0 0 0 1px rgba(143, 224, 192, 0.14) inset;
}

.unit-status-placeholder {
  visibility: hidden;
}

.unit-command-cue.selecting {
  position: absolute;
  left: 0.55rem;
  bottom: -1.1rem;
  z-index: 7;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 226, 162, 0.28);
  background: rgba(11, 18, 21, 0.9);
  color: #ffe0a3;
}

.battle-orbit-commands {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 8;
}

.battle-orbit-button {
  position: absolute;
  width: 98px;
  min-height: 54px;
  padding: 0.38rem 0.46rem;
  display: grid;
  align-content: center;
  gap: 0.1rem;
  border-radius: 14px;
  border: 1px solid rgba(120, 214, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(44, 72, 98, 0.9), rgba(19, 31, 43, 0.95)),
    rgba(13, 22, 31, 0.95);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  color: #f0efe9;
  text-align: left;
  pointer-events: auto;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.battle-orbit-button strong {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.battle-orbit-button span {
  color: rgba(240, 238, 231, 0.66);
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-orbit-button[data-enabled="true"] {
  border-color: rgba(132, 231, 222, 0.42);
  background:
    linear-gradient(180deg, rgba(63, 106, 126, 0.96), rgba(19, 41, 52, 0.98)),
    rgba(16, 28, 34, 0.96);
  box-shadow:
    0 0 0 1px rgba(132, 231, 222, 0.1) inset,
    0 14px 34px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(132, 231, 222, 0.12);
}

.battle-orbit-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 226, 162, 0.45);
}

.battle-orbit-button.left-top,
.battle-orbit-button.left-mid,
.battle-orbit-button.left-bottom {
  text-align: right;
}

.battle-orbit-button.left-top {
  left: -82px;
  top: 10px;
}

.battle-orbit-button.left-mid {
  left: -92px;
  top: calc(50% - 27px);
}

.battle-orbit-button.left-bottom {
  left: -82px;
  bottom: 10px;
}

.battle-orbit-button.right-top {
  right: -114px;
  top: -4px;
}

.battle-orbit-button.right-upper {
  right: -122px;
  top: 44px;
}

.battle-orbit-button.right-lower {
  right: -122px;
  bottom: 44px;
}

.battle-orbit-button.right-bottom {
  right: -114px;
  bottom: -4px;
}

.battle-bottom-bar {
  grid-area: bottom;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.1fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: start;
}

.battle-turn-banner {
  min-height: 100%;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(10, 18, 22, 0.88);
}

.battle-turn-banner span {
  text-align: left;
  line-height: 1.6;
}

.battle-log-dock {
  min-height: 100%;
  padding: 0.95rem;
  border-radius: 24px;
  background: rgba(10, 18, 22, 0.88);
}

.battle-log-dock .event-log {
  max-height: 190px;
}

.event-row {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.battle-side-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.battle-side-summary-row .battle-fleet-card {
  padding: 0.95rem;
  border-radius: 24px;
  border: 1px solid rgba(232, 193, 117, 0.12);
  background: rgba(10, 18, 22, 0.86);
}

.battle-side-summary-row .battle-fleet-card::after {
  width: 160px;
  height: 160px;
}

.battle-side-summary-row .battle-fleet-head strong {
  font-size: 1.5rem;
}

.battle-side-summary-row .battle-fleet-lineup {
  max-height: 160px;
  overflow: auto;
}

@media (max-width: 1380px) {
  .battle-stage-shell {
    grid-template-columns: minmax(280px, 312px) minmax(0, 1fr);
  }

  .battle-arena-board {
    grid-template-columns: repeat(6, minmax(102px, 1fr));
    padding-inline: 4.2rem;
  }

  .battle-orbit-button {
    width: 90px;
  }

  .battle-orbit-button.left-top,
  .battle-orbit-button.left-bottom {
    left: -74px;
  }

  .battle-orbit-button.left-mid {
    left: -84px;
  }

  .battle-orbit-button.right-top,
  .battle-orbit-button.right-bottom {
    right: -102px;
  }

  .battle-orbit-button.right-upper,
  .battle-orbit-button.right-lower {
    right: -110px;
  }
}

@media (max-width: 1180px) {
  .battle-stage-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "hud"
      "sideheads"
      "arena"
      "bottom";
  }

  .battle-stage-topbar,
  .battle-bottom-bar {
    grid-template-columns: 1fr;
  }

  .battle-stage-actions {
    justify-self: start;
  }

  .battle-stage-sideheads {
    padding: 0;
  }

  .battle-side-summary-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .battle-overlay {
    padding: 0.55rem;
  }

  .battle-stage-shell {
    min-height: auto;
    padding: 0.8rem;
    border-radius: 24px;
  }

  .battle-arena-shell {
    overflow-x: auto;
  }

  .battle-arena-board {
    min-width: 900px;
    padding-inline: 4.8rem;
  }

  .battle-actor-hud-head,
  .battle-actor-state-grid {
    grid-template-columns: 1fr;
  }
}

/* Command Deck redesign */

body {
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(132, 225, 213, 0.12), transparent 20%),
    radial-gradient(circle at 92% 12%, rgba(255, 188, 87, 0.12), transparent 24%),
    linear-gradient(180deg, #091013 0%, #10181b 55%, #070d10 100%);
  font-family: "Noto Sans SC", sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(132, 225, 213, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 225, 213, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.88;
}

h1,
h2,
h3,
.nav-rail button,
.main-button,
.ghost-button,
.battle-action strong,
.preset-name {
  font-family: "Oxanium", "Noto Sans SC", sans-serif;
  letter-spacing: 0.06em;
}

.main-button,
.ghost-button {
  border-radius: 8px 8px 18px 8px;
  padding: 0.88rem 1.2rem;
  text-transform: uppercase;
}

.main-button {
  color: #061013;
  border-color: rgba(184, 255, 242, 0.65);
  background: linear-gradient(135deg, #b8fff2 0%, #84e1d5 85%);
  box-shadow: 0 0 18px rgba(132, 225, 213, 0.14);
}

.ghost-button {
  color: var(--text);
  border-color: rgba(149, 244, 229, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.command-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.1rem 0 1.35rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(9, 16, 19, 0.96), rgba(9, 16, 19, 0.78) 72%, transparent);
  backdrop-filter: blur(18px);
}

.command-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.command-brand-mark {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
}

.command-brand-mark span {
  width: 0.42rem;
  height: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #b8fff2, #84e1d5);
  box-shadow: 0 0 16px rgba(132, 225, 213, 0.24);
}

.brand-block h1 {
  margin: 0.18rem 0 0;
  font-size: clamp(1.5rem, 2.2vw, 2.35rem);
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(184, 255, 242, 0.72);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.top-nav button {
  padding: 0.7rem 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(220, 230, 226, 0.76);
  font-size: 1rem;
  border-bottom: 2px solid transparent;
}

.top-nav button.active {
  color: var(--accent-bright);
  background: transparent;
  border-color: var(--accent);
}

.masthead-side {
  align-items: center;
}

.user-badge {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
  padding: 0.72rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-main {
  display: block;
}

.console-card,
.room-card,
.room-roster-card,
.battle-action,
.battle-cell,
.unit-editor,
.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 40%),
    rgba(31, 39, 42, 0.82);
  border: 1px solid rgba(149, 244, 229, 0.14);
  box-shadow: var(--shadow);
}

.command-deck-layout {
  grid-template-columns: 320px minmax(0, 1fr) 420px;
  gap: 1.45rem;
  align-items: start;
}

.hangar-side-panel,
.hangar-stage-panel,
.hangar-detail-panel {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 170px);
}

.hangar-side-panel::after,
.hangar-stage-panel::after,
.hangar-detail-panel::after {
  content: "";
  position: absolute;
  inset: auto -8% -16% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 225, 213, 0.11), transparent 68%);
  pointer-events: none;
}

.deck-code,
.deck-code-inline {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(144, 163, 159, 0.72);
}

.deck-code {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-size: 0.72rem;
}

.deck-code-inline {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
}

.hangar-side-copy {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.hangar-side-copy h2,
.hangar-stage-panel h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  text-transform: uppercase;
}

.hangar-side-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hangar-side-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(149, 244, 229, 0.12);
}

.hangar-side-button {
  width: 100%;
  justify-content: center;
}

.deck-preset-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1rem 0.92rem;
  border-radius: 10px 10px 22px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 44%),
    rgba(14, 21, 23, 0.62);
}

.deck-preset-card.active {
  border-color: rgba(184, 255, 242, 0.62);
  box-shadow: inset 0 0 0 1px rgba(184, 255, 242, 0.12), 0 0 24px rgba(132, 225, 213, 0.1);
}

.deck-preset-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: start;
}

.deck-preset-arrow {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--accent);
}

.preset-name {
  display: block;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.deck-preset-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.deck-preset-metrics > span,
.hangar-stage-footer > span,
.hangar-signal-row > span,
.deck-meta-grid > span {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.76rem;
  border-radius: 12px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.deck-preset-metrics strong,
.hangar-stage-footer strong,
.hangar-signal-row strong,
.deck-meta-grid strong {
  color: var(--text);
}

.hangar-stage-panel {
  display: grid;
  gap: 1.15rem;
}

.hangar-lane-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hangar-lane-tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 10px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.hangar-formation-card {
  border: 0;
  background: transparent;
  padding: 0;
  position: static;
}

.hangar-formation-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hangar-formation-cell {
  min-height: 268px;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 44%),
    rgba(8, 12, 14, 0.56);
  overflow: hidden;
}

.hangar-formation-cell.empty {
  border-style: dashed;
}

.hangar-formation-cell.focused {
  border-color: rgba(184, 255, 242, 0.6);
  box-shadow: inset 0 0 0 1px rgba(184, 255, 242, 0.14), 0 0 26px rgba(132, 225, 213, 0.12);
}

.hangar-formation-empty {
  display: grid;
  place-items: center;
  gap: 0.45rem;
  width: 100%;
  height: 100%;
  color: rgba(220, 230, 226, 0.42);
}

.hangar-formation-empty i {
  font-style: normal;
  font-size: 3rem;
  line-height: 1;
}

.hangar-formation-empty.blocked {
  background:
    linear-gradient(135deg, rgba(189, 44, 44, 0.14), rgba(255, 255, 255, 0) 42%),
    rgba(25, 8, 10, 0.72);
  color: rgba(255, 103, 103, 0.94);
}

.hangar-formation-empty.addable {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hangar-slot-denied {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-style: normal;
  font-size: clamp(4.8rem, 8vw, 6.8rem);
  line-height: 1;
  color: rgba(255, 79, 79, 0.94);
  text-shadow: 0 0 24px rgba(255, 57, 57, 0.22);
}

.hangar-formation-unit {
  height: 100%;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hangar-formation-unit-media.showcase {
  position: relative;
  height: 100%;
  min-height: 252px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(12, 17, 18, 0.88);
}

.hangar-formation-unit-media.showcase img,
.hangar-detail-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hangar-formation-unit-media.showcase::after,
.hangar-detail-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 14, 0.05), rgba(8, 12, 14, 0.82));
}

.hangar-slot-callout {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.22);
  background: rgba(8, 12, 14, 0.7);
  color: var(--accent-bright);
  font-size: 0.72rem;
}

.hangar-formation-unit-avatar {
  z-index: 2;
  left: 0.72rem;
  bottom: 0.72rem;
}

.hangar-formation-copy {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 1.15rem;
  z-index: 2;
  display: grid;
  gap: 0.18rem;
  text-align: left;
}

.hangar-formation-copy strong {
  font-size: 1.08rem;
  text-transform: uppercase;
}

.hangar-formation-copy span,
.hangar-formation-unit small {
  color: rgba(220, 230, 226, 0.84);
}

.hangar-formation-unit small {
  position: absolute;
  right: 0.88rem;
  bottom: 0.88rem;
  z-index: 2;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 87, 0.3);
  background: rgba(8, 12, 14, 0.74);
}

.hangar-formation-legend {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.hangar-formation-legend-item {
  text-align: left;
  grid-template-columns: 40px 1fr;
  padding: 0.78rem 0.82rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.hangar-formation-legend-item.focused {
  border-color: rgba(184, 255, 242, 0.52);
  background: rgba(132, 225, 213, 0.08);
}

.legend-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(149, 244, 229, 0.18);
  color: var(--accent-bright);
}

.hangar-stage-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hangar-detail-panel {
  position: sticky;
  top: 5.6rem;
}

.hangar-detail-shell {
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.hangar-detail-header {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1rem;
  align-items: end;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(149, 244, 229, 0.12);
}

.hangar-detail-portrait {
  position: relative;
  min-height: 150px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background: rgba(8, 12, 14, 0.72);
}

.hangar-detail-level {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  padding: 0.24rem 0.5rem;
  background: var(--accent);
  color: #041012;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  border-radius: 6px;
}

.hangar-detail-title h2 {
  margin: 0;
  font-size: 2rem;
  text-transform: uppercase;
}

.hangar-detail-title p {
  margin: 0.3rem 0 0.6rem;
  color: var(--accent);
}

.hangar-detail-bars,
.hangar-selector-stack {
  display: grid;
  gap: 0.85rem;
}

.hangar-stat-bar {
  display: grid;
  gap: 0.42rem;
}

.hangar-stat-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.hangar-stat-bar-head strong {
  color: var(--text);
}

.hangar-stat-track {
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hangar-stat-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.hangar-stat-bar.jade i {
  background: linear-gradient(90deg, rgba(132, 225, 213, 0.7), rgba(184, 255, 242, 1));
}

.hangar-stat-bar.azure i {
  background: linear-gradient(90deg, #4388d6, #85c9ff);
}

.hangar-stat-bar.amber i {
  background: linear-gradient(90deg, #d78728, #ffbc57);
}

.hangar-stat-bar.violet i {
  background: linear-gradient(90deg, #8f73ff, #d5c9ff);
}

.hangar-signal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hangar-detail-chip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hangar-selector-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem 0.9rem 1.15rem;
  border-radius: 10px 10px 18px 10px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(8, 12, 14, 0.46);
}

.hangar-selector-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.hangar-selector-card.jade .hangar-selector-accent {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}

.hangar-selector-card.azure .hangar-selector-accent {
  background: linear-gradient(180deg, #8ad0ff, #4388d6);
}

.hangar-selector-card.violet .hangar-selector-accent {
  background: linear-gradient(180deg, #d5c9ff, var(--violet));
}

.hangar-selector-card.amber .hangar-selector-accent {
  background: linear-gradient(180deg, #ffd68d, var(--amber));
}

.hangar-selector-copy {
  display: grid;
  gap: 0.15rem;
}

.hangar-selector-copy strong {
  font-size: 1rem;
}

.hangar-selector-card select,
.hangar-level-inline input {
  background: rgba(4, 8, 9, 0.62);
  border-radius: 12px;
}

.hangar-level-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.hangar-level-inline input {
  max-width: 120px;
  min-width: 92px;
}

.hangar-selector-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.hangar-commit-button {
  width: 100%;
  justify-content: center;
  margin-top: 0.2rem;
}

.detail-chip {
  border-radius: 10px;
  min-height: 2.8rem;
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1340px) {
  .command-deck-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .hangar-detail-panel {
    grid-column: 1 / -1;
    position: static;
    top: auto;
    min-height: auto;
  }

  .hangar-detail-shell {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .hangar-detail-header,
  .hangar-detail-bars,
  .hangar-signal-row,
  .hangar-detail-chip-grid,
  .hangar-selector-stack {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .command-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .masthead-side {
    width: 100%;
    justify-content: space-between;
  }

  .command-deck-layout {
    grid-template-columns: 1fr;
  }

  .hangar-side-panel,
  .hangar-stage-panel,
  .hangar-detail-panel {
    min-height: auto;
  }

  .hangar-detail-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: 1rem;
  }

  .deck-preset-metrics,
  .hangar-stage-footer,
  .hangar-signal-row,
  .hangar-detail-chip-grid,
  .deck-meta-grid,
  .hangar-formation-legend {
    grid-template-columns: 1fr;
  }

  .hangar-formation-board {
    gap: 0.75rem;
  }

  .hangar-formation-cell {
    min-height: 188px;
  }

  .hangar-detail-header {
    grid-template-columns: 1fr;
  }
}

/* Hangar compact rework */

.command-deck-layout {
  grid-template-columns: 264px minmax(360px, 440px) minmax(640px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.hangar-overview-panel,
.hangar-stage-panel,
.hangar-picker-panel {
  height: calc(100vh - 132px);
  min-height: calc(100vh - 132px);
  padding: 1rem;
}

.hangar-overview-panel,
.hangar-picker-panel {
  position: sticky;
  top: 4.95rem;
  overflow: hidden;
}

.hangar-overview-shell,
.hangar-picker-shell {
  display: grid;
  gap: 0.8rem;
  height: 100%;
  overflow: auto;
  padding-right: 0.15rem;
}

.hangar-stage-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 0.6rem;
  overflow: hidden;
}

.hangar-stage-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
}

.hangar-stage-toolbar.secondary {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: center;
}

.hangar-toolbar-block,
.hangar-toolbar-inline {
  display: grid;
  gap: 0.3rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.hangar-toolbar-block.wide {
  min-width: 0;
}

.hangar-toolbar-block input,
.hangar-toolbar-block select,
.hangar-toolbar-inline input,
.hangar-toolbar-block textarea {
  min-height: 2.5rem;
  padding: 0.58rem 0.72rem;
  border-radius: 10px;
}

.hangar-toolbar-block textarea {
  min-height: 4.4rem;
  resize: none;
}

.hangar-preset-block {
  gap: 0.5rem;
}

.hangar-preset-block-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.hangar-stage-side-actions {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.hangar-preset-note-display {
  display: grid;
  gap: 0.18rem;
  padding: 0.56rem 0.64rem;
  border-radius: 10px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.hangar-preset-note-display span {
  color: var(--muted);
  font-size: 0.72rem;
}

.hangar-preset-note-display strong {
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 500;
}

.hangar-toolbar-inline {
  grid-template-columns: auto 88px auto;
  align-items: center;
}

.compact-topline {
  align-items: center;
}

.deck-meta-grid.compact {
  grid-template-columns: minmax(180px, 240px);
  gap: 0.5rem;
  justify-content: start;
}

.deck-meta-grid.compact span {
  padding: 0.55rem 0.65rem;
}

.warning-banner {
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
}

.hangar-formation-card {
  display: grid;
  grid-template-rows: 1fr;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.hangar-formation-shell {
  --formation-stage-size: 402px;
  position: relative;
  display: grid;
  place-items: start center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.hangar-formation-stage {
  width: min(100%, var(--formation-stage-size));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.45rem;
}

.hangar-lane-tabs span {
  min-height: 2.2rem;
  font-size: 0.86rem;
}

.hangar-lane-tabs {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem;
}

.hangar-formation-board {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  aspect-ratio: 1 / 1;
  gap: 0.36rem;
  align-content: stretch;
}

.hangar-formation-cell {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0.24rem;
  border-radius: 7px;
}

.hangar-formation-unit {
  position: relative;
  height: 100%;
}

.hangar-card-surface {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.hangar-formation-unit-media.showcase {
  min-height: 0;
  height: 100%;
}

.hangar-slot-callout {
  top: 0.34rem;
  left: 0.34rem;
  padding: 0.16rem 0.34rem;
  font-size: 0.58rem;
}

.hangar-card-pilot-anchor {
  position: absolute;
  top: 0.34rem;
  left: 0.34rem;
  z-index: 3;
  display: grid;
  justify-items: start;
}

.hangar-pilot-avatar-button,
.hangar-card-info-button,
.hangar-pilot-remove-button {
  border: 1px solid rgba(149, 244, 229, 0.18);
  background: rgba(6, 12, 14, 0.84);
  color: var(--text);
}

.hangar-pilot-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.78rem;
  min-height: 1.78rem;
  padding: 0.06rem;
  border-radius: 999px;
}

.hangar-pilot-avatar-button.empty {
  min-width: auto;
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  font-size: 0.64rem;
}

.hangar-pilot-remove-button {
  position: absolute;
  top: 0.34rem;
  right: 0.34rem;
  z-index: 4;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 87, 87, 0.38);
  background: rgba(42, 8, 8, 0.94);
  color: #ff6464;
  box-shadow: 0 0 0 1px rgba(11, 19, 21, 0.92);
}

.hangar-pilot-remove-button svg {
  width: 0.7rem;
  height: 0.7rem;
  fill: currentColor;
  pointer-events: none;
}

.hangar-card-info-button {
  position: absolute;
  top: 0.34rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.18rem 0.38rem;
  border-radius: 999px;
  font-size: 0.6rem;
}

.hangar-formation-copy {
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0.36rem;
  gap: 0.08rem;
}

.hangar-formation-copy strong {
  font-size: 0.76rem;
}

.hangar-formation-copy span,
.hangar-formation-unit small {
  font-size: 0.58rem;
}

.hangar-formation-unit small {
  right: 0.36rem;
  bottom: 0.32rem;
  padding: 0.1rem 0.28rem;
}

.hangar-detail-header.compact {
  grid-template-columns: 104px 1fr;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.hangar-detail-title h2 {
  font-size: 1.45rem;
}

.hangar-detail-title p {
  margin: 0.18rem 0 0.4rem;
  font-size: 0.84rem;
}

.hangar-detail-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.hangar-detail-bars.compact,
.hangar-overview-chip-grid {
  gap: 0.55rem;
}

.hangar-signal-row {
  gap: 0.55rem;
}

.hangar-signal-row > span {
  padding: 0.55rem 0.65rem;
}

.hangar-overview-chip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-chip {
  min-height: 2.45rem;
  padding: 0.55rem 0.62rem;
  font-size: 0.76rem;
}

.hangar-picker-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: start;
  grid-column: 1 / -1;
}

.hangar-picker-head-side {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.hangar-guide-stack {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.hangar-picker-side-column {
  grid-area: choices;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  align-content: start;
}

.hangar-recommendation-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid rgba(149, 244, 229, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 18, 20, 0.92), rgba(6, 12, 14, 0.84));
}

.hangar-recommendation-list {
  display: grid;
  gap: 0.65rem;
}

.hangar-recommendation-card {
  display: grid;
  gap: 0.38rem;
  padding: 0.78rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(9, 15, 18, 0.88);
}

.hangar-recommendation-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hangar-recommendation-head span,
.hangar-recommendation-card small,
.dojo-bot-difficulty span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hangar-recommendation-card p,
.hangar-recommendation-card small {
  margin: 0;
}

.hangar-rule-row.inline {
  margin-bottom: 0;
  justify-content: flex-end;
}

.hangar-inline-guide {
  min-height: 34px;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.34);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.16), rgba(214, 174, 94, 0.05)),
    rgba(255, 255, 255, 0.025);
  color: #f6dec0;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.18em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(214, 174, 94, 0.06),
    0 0 18px rgba(214, 174, 94, 0.08);
}

.hangar-inline-guide:hover,
.hangar-inline-guide:focus-visible {
  color: #fff2e0;
  transform: translateY(-1px);
}

.guide-pulse-button {
  animation: guidePulse 2.4s ease-in-out infinite;
}

.hangar-lineup-guide-button {
  justify-self: stretch;
}

.hangar-inline-guide--micro {
  min-height: 24px;
  padding: 0.14rem 0.5rem;
  font-size: 0.66rem;
  line-height: 1.1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 0 1px rgba(214, 174, 94, 0.04),
    0 0 10px rgba(214, 174, 94, 0.08);
}

.hangar-picker-head h2 {
  margin: 0.12rem 0 0.3rem;
  font-size: 1.45rem;
}

.hangar-picker-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hangar-slot-grid {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.hangar-rule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.hangar-rule-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.16rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(245, 250, 248, 0.96);
  font-size: 0.72rem;
}

.hangar-rule-chip.ready {
  border-color: rgba(131, 224, 168, 0.45);
  background: linear-gradient(180deg, rgba(131, 224, 168, 0.22), rgba(131, 224, 168, 0.12));
}

.hangar-rule-chip.missing {
  border-color: rgba(224, 123, 103, 0.46);
  background: linear-gradient(180deg, rgba(224, 123, 103, 0.22), rgba(224, 123, 103, 0.12));
}

.hangar-slot-card,
.hangar-choice-card {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 62px 1fr;
  align-items: center;
  padding: 0.58rem;
  border-radius: 12px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
}

.hangar-slot-card.active,
.hangar-choice-card.active {
  border-color: rgba(184, 255, 242, 0.6);
  box-shadow: inset 0 0 0 1px rgba(184, 255, 242, 0.12);
}

.hangar-choice-card.is-disabled {
  opacity: 0.52;
  filter: saturate(0.72);
  cursor: not-allowed;
}

.hangar-slot-card.empty {
  border-style: dashed;
}

.hangar-slot-art,
.hangar-choice-art {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(7, 11, 13, 0.82);
  display: grid;
  place-items: center;
}

.hangar-slot-art img,
.hangar-choice-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hangar-slot-art span {
  font-size: 1.8rem;
  color: rgba(220, 230, 226, 0.48);
}

.hangar-slot-copy,
.hangar-choice-copy {
  display: grid;
  gap: 0.15rem;
}

.hangar-slot-copy span,
.hangar-choice-copy span {
  color: var(--muted);
  font-size: 0.74rem;
}

.hangar-slot-copy strong,
.hangar-choice-copy strong {
  font-size: 0.92rem;
}

.hangar-slot-copy small {
  color: rgba(184, 255, 242, 0.78);
}

.hangar-choice-copy small {
  color: rgba(184, 255, 242, 0.72);
  font-size: 0.72rem;
  line-height: 1.35;
}

.hangar-choice-note.invalid {
  color: rgba(255, 191, 164, 0.92);
}

.hangar-picker-empty {
  display: grid;
  gap: 0.35rem;
  place-items: center;
  min-height: 180px;
  padding: 1.2rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(149, 244, 229, 0.16);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.hangar-picker-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.hangar-picker-results {
  display: grid;
  gap: 0.5rem;
  min-height: 0;
}

.hangar-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.hangar-picker-shell {
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "slots choices";
  align-content: start;
}

.hangar-picker-shell > .hangar-picker-head {
  grid-area: head;
}

.hangar-picker-shell > .hangar-slot-grid {
  grid-area: slots;
}

.hangar-picker-shell > .hangar-picker-results,
.hangar-picker-shell > .hangar-picker-empty {
  grid-area: choices;
  min-width: 0;
}

.hangar-picker-shell > .hangar-picker-side-column {
  grid-area: choices;
}

.hangar-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(6, 10, 12, 0.66);
  backdrop-filter: blur(10px);
}

.hangar-modal-card {
  width: min(100%, 520px);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 44%),
    rgba(20, 28, 31, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.hangar-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.hangar-modal-head h3 {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
}

.hangar-modal-body,
.hangar-modal-actions {
  display: grid;
  gap: 0.7rem;
}

.hangar-modal-body label {
  gap: 0.3rem;
}

.hangar-modal-body textarea {
  min-height: 6rem;
  resize: vertical;
}

.hangar-modal-actions {
  grid-template-columns: 1fr 1fr;
}

.lineup-guide-backdrop {
  z-index: var(--z-modal);
  padding: 1rem;
  align-items: stretch;
}

.lineup-guide-page {
  width: min(100%, 1280px);
  max-height: min(92vh, 980px);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 28px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(132, 225, 213, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 36%),
    rgba(10, 15, 17, 0.96);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.lineup-guide-page__hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background:
    linear-gradient(135deg, rgba(214, 174, 94, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.lineup-guide-crest {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(214, 174, 94, 0.26);
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.2), rgba(214, 174, 94, 0.06));
  box-shadow: inset 0 0 18px rgba(214, 174, 94, 0.12);
}

.lineup-guide-crest span {
  font-size: 1.8rem;
  color: #f2d6ab;
}

.lineup-guide-hero-copy h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.lineup-guide-hero-copy p {
  margin: 0;
  max-width: 62ch;
  color: rgba(220, 230, 226, 0.82);
  line-height: 1.7;
}

.lineup-guide-hero-side {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.lineup-guide-stat-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.lineup-guide-stat-stack span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 225, 213, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(220, 230, 226, 0.88);
  font-size: 0.78rem;
}

.lineup-guide-stat-stack strong {
  color: var(--accent-bright);
  font-size: 1rem;
}

.lineup-guide-grid {
  display: grid;
  gap: 1rem;
}

.lineup-guide-panel {
  display: grid;
  gap: 0.95rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 44%),
    rgba(20, 28, 31, 0.82);
}

.lineup-guide-panel-head {
  display: grid;
  gap: 0.18rem;
}

.lineup-guide-panel-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.lineup-guide-focus-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lineup-guide-focus-pill {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background: linear-gradient(180deg, rgba(214, 174, 94, 0.12), rgba(214, 174, 94, 0.04));
}

.lineup-guide-focus-pill strong {
  font-size: 0.88rem;
  color: #f2dec1;
}

.lineup-guide-focus-pill small {
  color: var(--muted);
}

.lineup-guide-overview-list {
  display: grid;
  gap: 0.6rem;
}

.lineup-guide-overview-list p,
.lineup-guide-role-copy,
.lineup-guide-note-list p {
  margin: 0;
  color: rgba(220, 230, 226, 0.84);
  line-height: 1.7;
}

.lineup-guide-steps {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineup-guide-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(132, 225, 213, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.lineup-guide-steps li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(132, 225, 213, 0.22), rgba(132, 225, 213, 0.08));
  color: var(--accent-bright);
  font-size: 0.82rem;
}

.lineup-guide-steps p {
  margin: 0;
  line-height: 1.7;
}

.lineup-guide-unit-grid {
  display: grid;
  gap: 0.85rem;
}

.lineup-guide-unit-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1rem;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background:
    linear-gradient(135deg, rgba(132, 225, 213, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.02);
}

.lineup-guide-unit-card__media {
  min-height: 160px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(214, 174, 94, 0.14);
  background: rgba(10, 15, 17, 0.7);
}

.lineup-guide-unit-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lineup-guide-unit-card__body,
.lineup-guide-note-list {
  display: grid;
  gap: 0.7rem;
}

.lineup-guide-unit-card__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.lineup-guide-unit-card__head h4 {
  margin: 0.18rem 0 0;
  font-size: 1.1rem;
}

.lineup-guide-role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.12rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 94, 0.24);
  background: rgba(214, 174, 94, 0.08);
  color: #f2dec1;
  font-size: 0.75rem;
  white-space: nowrap;
}

.lineup-guide-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lineup-guide-metric-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.55rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
}

.lineup-guide-metric-row strong {
  color: var(--text);
}

.lineup-guide-loadout {
  margin: 0;
  padding: 0.55rem 0.68rem;
  border-radius: 14px;
  background: rgba(132, 225, 213, 0.06);
  color: rgba(220, 230, 226, 0.84);
}

@keyframes guidePulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      0 0 0 1px rgba(214, 174, 94, 0.08),
      0 0 10px rgba(214, 174, 94, 0.08);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.04),
      0 0 0 1px rgba(214, 174, 94, 0.18),
      0 0 24px rgba(214, 174, 94, 0.22);
  }
}

.compact-topline .hint-line {
  display: none;
}

.hangar-choice-card {
  align-items: start;
}

.master-topbar-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.master-topbar-pill,
.dojo-master-note,
.battle-master-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.master-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.2rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.master-topbar-pill strong {
  color: var(--text);
}

.hangar-master-panel {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    rgba(9, 15, 18, 0.88);
}

.hangar-master-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.hangar-master-head h3 {
  margin: 0.12rem 0 0.2rem;
  font-size: 1rem;
}

.hangar-master-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.hangar-master-badges {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.master-rarity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.12rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.18);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.master-rarity-badge.ssr,
.master-recruit-pill.ssr {
  border-color: rgba(237, 193, 90, 0.36);
  background: linear-gradient(180deg, rgba(237, 193, 90, 0.22), rgba(237, 193, 90, 0.1));
  color: #ffe8ae;
}

.master-rarity-badge.sr,
.master-recruit-pill.sr {
  border-color: rgba(149, 244, 229, 0.28);
  background: linear-gradient(180deg, rgba(149, 244, 229, 0.18), rgba(149, 244, 229, 0.08));
  color: #c8fff6;
}

.master-rarity-badge.r,
.master-recruit-pill.r {
  border-color: rgba(173, 189, 198, 0.2);
  background: linear-gradient(180deg, rgba(173, 189, 198, 0.14), rgba(173, 189, 198, 0.06));
  color: #dfe8ed;
}

.master-stars {
  font-size: 0.78rem;
  color: #f3ddb1;
}

.hangar-master-select,
.hangar-master-select select {
  display: grid;
  gap: 0.3rem;
}

.hangar-master-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.hangar-master-meta span {
  display: grid;
  gap: 0.14rem;
  padding: 0.52rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.74rem;
}

.hangar-master-meta strong {
  color: var(--text);
  font-size: 0.85rem;
}

.hangar-master-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.master-recruit-results {
  display: grid;
  gap: 0.45rem;
}

.master-recruit-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.master-recruit-results-head strong {
  display: block;
  color: #effbf7;
  font-size: 0.84rem;
}

.master-recruit-results-head span {
  color: rgba(224, 238, 239, 0.62);
  font-size: 0.72rem;
}

.master-recruit-pill {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  padding: 0.52rem 0.68rem;
  border-radius: 12px;
}

.master-recruit-pill strong,
.master-recruit-pill span {
  font-size: 0.76rem;
}

.battle-master-note,
.dojo-master-note {
  margin: 0.18rem 0 0;
  line-height: 1.45;
}

.master-recruit-modal-backdrop {
  z-index: var(--z-modal);
  align-items: stretch;
  padding: 1rem;
}

.master-recruit-modal {
  width: min(100%, 1120px);
  max-height: min(92vh, 980px);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.05rem;
  border-radius: 28px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background:
    radial-gradient(circle at top left, rgba(237, 193, 90, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(149, 244, 229, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    rgba(7, 12, 16, 0.96);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.34);
}

.master-recruit-modal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.master-recruit-modal-hero h2 {
  margin: 0.25rem 0 0.3rem;
  font-size: clamp(1.48rem, 2.5vw, 2.2rem);
  letter-spacing: 0.03em;
}

.master-recruit-modal-hero p {
  margin: 0;
  color: rgba(224, 238, 239, 0.72);
  line-height: 1.6;
}

.master-recruit-modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.master-recruit-modal-summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 34px;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(224, 238, 239, 0.66);
  font-size: 0.74rem;
}

.master-recruit-modal-summary strong {
  color: #f1fbf8;
}

.master-recruit-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.master-result-card {
  display: grid;
  gap: 0.72rem;
  padding: 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
    rgba(8, 14, 17, 0.88);
}

.master-result-card.ssr {
  border-color: rgba(237, 193, 90, 0.3);
  background:
    radial-gradient(circle at top left, rgba(237, 193, 90, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
    rgba(12, 12, 14, 0.94);
}

.master-result-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.master-result-card-copy {
  display: grid;
  gap: 0.2rem;
}

.master-result-card-copy h3 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: 0.02em;
}

.master-result-card-copy p {
  margin: 0;
  color: rgba(224, 238, 239, 0.68);
  line-height: 1.5;
  font-size: 0.8rem;
}

.master-result-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.master-result-card-meta span {
  display: grid;
  gap: 0.16rem;
  padding: 0.62rem 0.68rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(224, 238, 239, 0.56);
  font-size: 0.72rem;
}

.master-result-card-meta strong {
  color: #effbf7;
  font-size: 0.8rem;
  line-height: 1.42;
}

.master-result-card-notes {
  display: grid;
  gap: 0.42rem;
}

.master-result-card-notes p {
  margin: 0;
  color: rgba(224, 238, 239, 0.74);
  font-size: 0.78rem;
  line-height: 1.56;
}

.master-result-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
}

.master-recruit-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.master-detail-backdrop {
  z-index: calc(var(--z-modal) + 1);
}

.master-detail-modal {
  width: min(100%, 960px);
  max-height: min(92vh, 940px);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.08rem;
  border-radius: 28px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background:
    radial-gradient(circle at top left, rgba(149, 244, 229, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(237, 193, 90, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    rgba(7, 12, 16, 0.96);
  box-shadow: 0 44px 88px rgba(0, 0, 0, 0.34);
}

.master-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.master-detail-hero h2 {
  margin: 0.32rem 0 0.28rem;
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  letter-spacing: 0.02em;
}

.master-detail-hero p {
  margin: 0;
  color: rgba(224, 238, 239, 0.74);
  line-height: 1.64;
}

.master-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.master-detail-metrics span {
  display: grid;
  gap: 0.16rem;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(224, 238, 239, 0.6);
  font-size: 0.74rem;
}

.master-detail-metrics strong {
  color: #eef9f6;
  font-size: 0.88rem;
  line-height: 1.45;
}

.master-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.master-detail-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.96rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    rgba(9, 14, 18, 0.82);
}

.master-detail-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.master-detail-panel p {
  margin: 0;
  color: rgba(224, 238, 239, 0.72);
  line-height: 1.6;
}

.master-detail-effect-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.master-detail-effect-list li {
  display: grid;
  gap: 0.12rem;
  padding: 0.7rem 0.76rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(149, 244, 229, 0.08);
}

.master-detail-effect-list strong {
  color: #eef8f5;
  font-size: 0.82rem;
  line-height: 1.46;
}

.master-detail-effect-list span {
  color: rgba(224, 238, 239, 0.56);
  font-size: 0.72rem;
}

.master-detail-note-stack {
  display: grid;
  gap: 0.45rem;
}

.master-detail-note-stack span {
  padding: 0.68rem 0.76rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(224, 238, 239, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.master-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.master-store-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.master-store-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.master-store-head h2 {
  margin: 0.22rem 0 0.32rem;
  font-size: clamp(1.18rem, 1.9vw, 1.55rem);
  letter-spacing: 0.02em;
}

.master-store-head p {
  margin: 0;
  max-width: 68ch;
  color: rgba(224, 238, 239, 0.7);
  line-height: 1.62;
}

.master-store-head > span {
  display: inline-grid;
  gap: 0.14rem;
  padding: 0.82rem 0.9rem;
  min-width: 150px;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: linear-gradient(180deg, rgba(149, 244, 229, 0.08), rgba(255, 255, 255, 0.025));
  color: rgba(224, 238, 239, 0.64);
  font-size: 0.74rem;
}

.master-store-head strong {
  color: #f0fbf8;
  font-size: 1.2rem;
}

.master-store-lane {
  display: grid;
  gap: 1rem;
}

.master-store-section {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    rgba(8, 13, 16, 0.76);
}

.master-store-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.master-store-section-head h3 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.master-store-section-head p {
  margin: 0.28rem 0 0;
  color: rgba(224, 238, 239, 0.68);
  line-height: 1.55;
  font-size: 0.78rem;
}

.master-store-section-head > span {
  color: rgba(224, 238, 239, 0.58);
  font-size: 0.76rem;
  white-space: nowrap;
}

.master-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}

.master-store-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    rgba(10, 14, 18, 0.84);
}

.master-store-card.ssr {
  border-color: rgba(237, 193, 90, 0.26);
  background:
    radial-gradient(circle at top left, rgba(237, 193, 90, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    rgba(11, 12, 15, 0.9);
}

.master-store-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.master-store-card-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
}

.master-store-card-top strong {
  color: #eef8f5;
  font-size: 0.82rem;
}

.master-store-card-copy {
  display: grid;
  gap: 0.2rem;
}

.master-store-card-copy h3 {
  margin: 0;
  font-size: 1rem;
}

.master-store-card-copy p {
  margin: 0;
  color: rgba(224, 238, 239, 0.68);
  font-size: 0.79rem;
  line-height: 1.52;
}

.master-store-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.master-store-card-meta span {
  display: grid;
  gap: 0.16rem;
  padding: 0.6rem 0.68rem;
  border-radius: 15px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(224, 238, 239, 0.56);
  font-size: 0.72rem;
}

.master-store-card-meta strong {
  color: #ecf7f4;
  font-size: 0.8rem;
  line-height: 1.42;
}

.master-store-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.screen-shell--masters {
  align-content: start;
}

.master-hub-panel {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background:
    radial-gradient(circle at top right, rgba(149, 244, 229, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 32%),
    rgba(7, 12, 16, 0.92);
}

.master-hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.master-hub-hero h1 {
  margin: 0.28rem 0 0.38rem;
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  letter-spacing: 0.03em;
}

.master-hub-hero p {
  margin: 0;
  max-width: 62ch;
  color: rgba(224, 238, 239, 0.76);
  line-height: 1.68;
}

.master-hub-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.master-hub-metrics span {
  display: grid;
  gap: 0.24rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: linear-gradient(180deg, rgba(149, 244, 229, 0.08), rgba(255, 255, 255, 0.02));
  color: rgba(224, 238, 239, 0.7);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.master-hub-metrics strong {
  color: #effbf7;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.master-hub-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.master-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.master-hub-probability {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.master-hub-probability span {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 32px;
  padding: 0.26rem 0.76rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(224, 238, 239, 0.7);
  font-size: 0.74rem;
}

.master-hub-probability strong {
  color: #effbf7;
}

.master-filter-shell {
  display: grid;
  gap: 0.9rem;
  padding: 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    rgba(8, 13, 16, 0.72);
}

.master-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.master-filter-head h2 {
  margin: 0.22rem 0 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.master-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(180px, 0.5fr));
  gap: 0.75rem;
}

.master-filter-search,
.master-filter-select {
  display: grid;
  gap: 0.35rem;
}

.master-filter-search input,
.master-filter-select select {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #edf8f5;
  padding: 0.62rem 0.76rem;
}

.master-filter-cluster {
  display: grid;
  gap: 0.7rem;
}

.master-filter-group {
  display: grid;
  gap: 0.38rem;
}

.master-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.master-filter-chip {
  min-height: 32px;
  padding: 0.28rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(224, 238, 239, 0.72);
  font-size: 0.74rem;
  transition:
    transform var(--time-fast),
    border-color var(--time-fast),
    background var(--time-fast),
    color var(--time-fast);
}

.master-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(149, 244, 229, 0.24);
  color: #eefaf7;
}

.master-filter-chip.active {
  border-color: rgba(149, 244, 229, 0.34);
  background: linear-gradient(180deg, rgba(149, 244, 229, 0.18), rgba(149, 244, 229, 0.08));
  color: #effbf8;
  box-shadow: 0 0 0 1px rgba(149, 244, 229, 0.08) inset;
}

.master-roster-section {
  display: grid;
  gap: 0.8rem;
}

.master-roster-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0.15rem;
}

.master-roster-section-head h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.master-roster-section-head span {
  color: rgba(224, 238, 239, 0.62);
  font-size: 0.78rem;
}

.master-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.9rem;
}

.master-roster-card {
  display: grid;
  gap: 0.78rem;
  min-height: 100%;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 35%),
    rgba(8, 13, 17, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.master-roster-card.locked {
  opacity: 0.82;
  border-color: rgba(173, 189, 198, 0.14);
}

.master-roster-card.ssr {
  border-color: rgba(237, 193, 90, 0.28);
  background:
    linear-gradient(180deg, rgba(237, 193, 90, 0.09), transparent 38%),
    rgba(11, 12, 14, 0.92);
}

.master-roster-card.owned {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 34px rgba(0, 0, 0, 0.14);
}

.master-roster-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.master-roster-head h3 {
  margin: 0.3rem 0 0.28rem;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.master-roster-head p {
  margin: 0;
  color: rgba(224, 238, 239, 0.68);
  line-height: 1.55;
  font-size: 0.83rem;
}

.master-roster-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.master-roster-state {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  color: rgba(224, 238, 239, 0.62);
  font-size: 0.72rem;
}

.master-roster-state strong {
  color: #effbf7;
  font-size: 0.88rem;
}

.master-roster-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.master-roster-meta span {
  display: grid;
  gap: 0.16rem;
  padding: 0.65rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(224, 238, 239, 0.58);
  font-size: 0.72rem;
}

.master-roster-meta strong {
  color: #e9f5f2;
  font-size: 0.8rem;
  line-height: 1.45;
}

.master-roster-effects {
  display: grid;
  gap: 0.45rem;
}

.master-roster-effects p {
  margin: 0;
  padding-left: 0.78rem;
  position: relative;
  color: rgba(224, 238, 239, 0.78);
  font-size: 0.8rem;
  line-height: 1.55;
}

.master-roster-effects p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(149, 244, 229, 0.78);
  box-shadow: 0 0 10px rgba(149, 244, 229, 0.32);
}

.master-roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

@media (max-width: 980px) {
  .master-recruit-modal {
    padding: 0.92rem;
  }

  .master-detail-modal {
    padding: 0.94rem;
  }

  .master-recruit-modal-hero {
    grid-template-columns: 1fr;
  }

  .master-detail-hero,
  .master-detail-grid,
  .master-detail-metrics {
    grid-template-columns: 1fr;
  }

  .master-hub-hero,
  .master-hub-toolbar,
  .master-filter-grid {
    grid-template-columns: 1fr;
  }

  .master-store-head {
    grid-template-columns: 1fr;
  }

  .master-hub-probability {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .master-recruit-results-head {
    align-items: start;
    flex-direction: column;
  }

  .master-result-card-meta {
    grid-template-columns: 1fr;
  }

  .master-filter-head {
    flex-direction: column;
  }

  .master-store-section-head {
    flex-direction: column;
  }

  .master-store-card-meta {
    grid-template-columns: 1fr;
  }

  .master-hub-panel {
    padding: 0.95rem;
  }

  .master-hub-metrics,
  .master-roster-meta {
    grid-template-columns: 1fr;
  }

  .master-roster-head {
    grid-template-columns: 1fr;
  }

  .master-roster-state {
    justify-items: start;
  }
}

.hangar-overview-panel .hangar-overview-shell,
.hangar-picker-panel .hangar-picker-shell,
.hangar-choice-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(149, 244, 229, 0.38) rgba(255, 255, 255, 0.04);
}

@media (max-width: 1400px) {
  .command-deck-layout {
    grid-template-columns: 238px minmax(340px, 410px) minmax(520px, 1fr);
  }
}

@media (max-width: 1180px) {
  .command-deck-layout {
    grid-template-columns: 1fr;
  }

  .hangar-overview-panel,
  .hangar-stage-panel,
  .hangar-picker-panel {
    position: static;
    top: auto;
    height: auto;
    min-height: auto;
  }

  .hangar-stage-toolbar,
  .hangar-stage-toolbar.secondary {
    grid-template-columns: 1fr;
  }

  .hangar-picker-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "slots"
      "choices";
  }
}

@media (max-width: 760px) {
  .hangar-choice-grid,
  .hangar-overview-chip-grid,
  .deck-meta-grid.compact,
  .hangar-stage-footer,
  .hangar-signal-row,
  .hangar-master-meta {
    grid-template-columns: 1fr;
  }

  .hangar-picker-head {
    grid-template-columns: 1fr;
  }

  .hangar-picker-head-side {
    justify-items: start;
  }

  .hangar-guide-stack {
    justify-items: start;
  }

  .hangar-formation-board {
    width: 100%;
  }

  .lineup-guide-page {
    padding: 0.9rem;
  }

  .lineup-guide-page__hero,
  .lineup-guide-unit-card {
    grid-template-columns: 1fr;
  }

  .lineup-guide-hero-side {
    justify-items: start;
  }

  .lineup-guide-stat-stack {
    justify-content: flex-start;
  }
}

/* Dojo + battle deck refresh */

.dojo-grid.command-deck-layout {
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: stretch;
}

.dojo-overview-panel,
.dojo-stage-panel,
.dojo-control-panel {
  height: calc(100vh - 132px);
  min-height: calc(100vh - 132px);
  padding: 1rem;
}

.dojo-overview-panel,
.dojo-control-panel {
  position: sticky;
  top: 4.95rem;
  overflow: hidden;
}

.dojo-overview-shell,
.dojo-control-card {
  display: grid;
  gap: 0.8rem;
}

.dojo-bot-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.dojo-bot-difficulty {
  display: inline-grid;
  gap: 0.22rem;
}

.dojo-bot-difficulty select {
  min-width: 6.6rem;
}

.dojo-overview-shell,
.dojo-control-panel {
  height: 100%;
  overflow: auto;
  padding-right: 0.12rem;
}

.dojo-overview-head h2,
.dojo-control-card h2,
.dojo-room-stage-card h2,
.dojo-public-room-panel h2 {
  margin: 0.18rem 0 0.3rem;
  font-size: clamp(1.45rem, 1.85vw, 2rem);
}

.dojo-overview-head p,
.dojo-control-card p,
.dojo-seat-card p,
.dojo-public-hero-copy p,
.dojo-room-stage-card.empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dojo-overview-hero,
.dojo-overview-subcard,
.dojo-control-card,
.dojo-room-stage-card,
.dojo-public-room-panel,
.dojo-empty-card,
.dojo-seat-empty {
  padding: 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.dojo-empty-card,
.dojo-seat-empty,
.dojo-room-stage-card.empty {
  place-items: center;
  text-align: center;
}

.dojo-empty-card strong,
.dojo-seat-empty strong,
.dojo-room-stage-card.empty h3 {
  color: var(--text);
}

.dojo-overview-hero .feature-unit {
  gap: 0.7rem;
}

.dojo-ready-seat-panel {
  display: grid;
  gap: 0.75rem;
}

.dojo-ready-seat-head {
  display: grid;
  gap: 0.7rem;
}

.dojo-ready-preset-select {
  display: block;
  margin: 0.12rem 0 0.18rem;
}

.dojo-ready-preset-select select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.72rem 2.8rem 0.72rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.05), transparent 60%),
    rgba(8, 12, 14, 0.56);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(226, 240, 233, 0.82) 50%),
    linear-gradient(135deg, rgba(226, 240, 233, 0.82) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.dojo-ready-preset-select select:focus {
  outline: none;
  border-color: rgba(149, 244, 229, 0.36);
  box-shadow: 0 0 0 1px rgba(149, 244, 229, 0.12), 0 0 18px rgba(132, 225, 213, 0.08);
}

.dojo-ready-seat-head .dojo-metric-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.dojo-ready-seat-head .dojo-metric-strip span {
  min-height: 72px;
  align-content: center;
  padding: 0.7rem 0.78rem;
  word-break: keep-all;
}

.dojo-ready-seat-head .dojo-metric-strip strong {
  font-size: 1.16rem;
}

.dojo-ready-unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.dojo-ready-unit-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  padding: 0.38rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.08), transparent 54%),
    rgba(10, 15, 17, 0.72);
  overflow: hidden;
}

.dojo-ready-unit-info {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  min-height: 0;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 87, 0.26);
  background: rgba(8, 12, 14, 0.72);
  color: var(--text);
  font-size: 0.74rem;
}

.dojo-ready-unit-media {
  position: relative;
  min-height: 188px;
}

.dojo-ready-unit-media .mech-art.card {
  width: 100%;
  height: 100%;
  min-height: 188px;
  border-radius: 14px;
  overflow: hidden;
}

.dojo-ready-unit-media .mech-art.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dojo-ready-unit-avatar {
  position: absolute;
  left: 0.45rem;
  top: 0.45rem;
}

.dojo-ready-unit-copy {
  display: grid;
  gap: 0.14rem;
  padding: 0 0.15rem 0.1rem;
}

.dojo-ready-unit-copy strong {
  font-size: 1rem;
}

.dojo-ready-unit-copy span {
  color: rgba(226, 240, 233, 0.76);
  font-size: 0.82rem;
}

.dojo-ready-unit-copy .small-copy {
  color: rgba(226, 240, 233, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
}

.dojo-ready-unit-level {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 87, 0.28);
  background: rgba(8, 12, 14, 0.76);
  font-size: 0.78rem;
}

.dojo-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.dojo-metric-strip span {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.62rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(5, 10, 12, 0.44);
  color: rgba(226, 240, 233, 0.72);
  font-size: 0.78rem;
}

.dojo-metric-strip strong {
  color: var(--text);
  font-size: 1rem;
}

.dojo-stage-panel {
  display: grid;
  grid-template-rows: 1fr;
  min-height: 0;
  overflow: hidden;
}

.dojo-room-stage-card,
.dojo-public-room-panel {
  display: grid;
  gap: 0.85rem;
}

.dojo-public-room-panel {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.dojo-room-stage-card {
  min-height: 208px;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.dojo-public-room-grid {
  display: grid;
  gap: 0.8rem;
}

.dojo-public-room-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.35rem;
  align-content: start;
}

.dojo-public-actions {
  display: flex;
  justify-content: flex-end;
}

.dojo-public-watch-note {
  color: rgba(226, 240, 233, 0.68);
  font-size: 0.78rem;
}

.dojo-seat-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.06), transparent 58%),
    rgba(255, 255, 255, 0.028);
}

.dojo-seat-card.mine {
  border-color: rgba(149, 244, 229, 0.32);
  box-shadow: 0 0 0 1px rgba(149, 244, 229, 0.1) inset;
}

.dojo-seat-card-head {
  display: grid;
  gap: 0.55rem;
}

.dojo-seat-card-head h3,
.dojo-public-hero-copy strong,
.battle-side-summary-copy strong {
  margin: 0;
  font-size: 1.12rem;
}

.dojo-seat-card-head p,
.dojo-public-hero-copy p,
.battle-side-summary-copy span {
  font-size: 0.84rem;
}

.dojo-seat-card .dojo-metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dojo-seat-card .dojo-metric-strip span {
  padding: 0.48rem 0.56rem;
  font-size: 0.72rem;
}

.dojo-seat-card-hero .feature-unit {
  gap: 0.65rem;
}

.dojo-seat-card-hero .feature-unit-copy h3 {
  font-size: 1.22rem;
}

.dojo-seat-card-hero .feature-unit-copy p {
  font-size: 0.82rem;
}

.dojo-seat-card-hero .feature-unit-tags span,
.dojo-seat-card-hero .feature-unit-topline span,
.dojo-seat-card-hero .feature-unit-topline strong {
  font-size: 0.72rem;
}

.dojo-room-actions {
  grid-template-columns: 1fr;
  align-items: end;
}

.dojo-room-actions.solo {
  grid-template-columns: 1fr;
}

.dojo-room-buttonbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-start;
}

.dojo-current-head-main h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.dojo-current-head-main h2 small {
  color: rgba(226, 240, 233, 0.72);
  font-size: 0.9rem;
  font-weight: 500;
}

.dojo-current-head-side {
  display: grid;
  justify-items: end;
  gap: 0.4rem;
}

.dojo-current-player-pair {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: rgba(226, 240, 233, 0.78);
  font-size: 0.84rem;
}

.dojo-current-head-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dojo-current-lineup-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.dojo-current-lineup-row.with-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: stretch;
}

.dojo-current-lineup-side {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.dojo-current-lineup-side.right {
  text-align: right;
}

.dojo-current-lineup-dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.dojo-current-lineup-side.right .dojo-current-lineup-dots {
  justify-content: flex-end;
}

.dojo-current-lineup-empty {
  color: rgba(226, 240, 233, 0.72);
  font-size: 0.8rem;
}

.dojo-current-lineup-dot {
  display: inline-flex;
}

.dojo-current-lineup-dot .mech-art.token {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(149, 244, 229, 0.18);
}

.dojo-current-lineup-dot .mech-art.token img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dojo-current-inline-actions {
  display: grid;
  align-content: stretch;
}

.dojo-current-inline-actions .dojo-room-buttonbar {
  display: grid;
  grid-auto-flow: row;
  gap: 0.45rem;
  align-content: stretch;
}

.dojo-current-inline-actions .dojo-room-buttonbar.compact .ghost-button,
.dojo-current-inline-actions .dojo-room-buttonbar.compact .main-button {
  min-width: 148px;
  min-height: 42px;
  padding: 0.58rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.1;
  justify-content: center;
  white-space: nowrap;
}

.dojo-control-card {
  min-height: 100%;
  align-content: start;
}

.dojo-control-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-content: start;
}

.dojo-control-panel .dojo-room-stage-card {
  min-height: 0;
  align-content: start;
}

/* Current room card final layout */

.dojo-room-stage-card .dojo-current-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.9rem;
}

.dojo-room-stage-card .dojo-current-head-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.dojo-room-stage-card .dojo-current-cap-label {
  color: rgba(226, 240, 233, 0.92);
}

.dojo-room-stage-card .dojo-current-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.26rem;
}

.dojo-room-stage-card .dojo-current-head-main h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.1vw, 2.35rem);
  line-height: 1.04;
  max-width: 11ch;
  white-space: nowrap;
  overflow: hidden;
}

.dojo-room-stage-card .dojo-current-status {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  text-align: right;
}

.dojo-room-stage-card .dojo-current-status .main-button.compact {
  min-height: 42px;
  padding: 0.5rem 0.9rem;
}

.dojo-room-stage-card .dojo-current-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.dojo-room-stage-card .dojo-current-roster-card {
  display: grid;
  gap: 0.4rem;
}

.dojo-room-stage-card .dojo-current-player-name {
  display: inline-flex;
  align-self: start;
  justify-self: center;
  color: rgba(226, 240, 233, 0.92);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dojo-room-stage-card .dojo-current-lineup-side {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
  padding: 0.58rem 0.62rem;
  border-radius: 0;
  border: none;
  background: rgba(255, 255, 255, 0.025);
}

.dojo-room-stage-card .dojo-current-lineup-side.right {
  justify-items: end;
  text-align: right;
}

.dojo-room-stage-card .dojo-current-lineup-dots {
  gap: 0.55rem;
}

.dojo-room-stage-card .dojo-current-lineup-dot .mech-art.token {
  width: 40px;
  height: 40px;
}

.dojo-room-stage-card .dojo-current-footer-actions {
  display: grid;
  gap: 0.55rem;
  align-items: stretch;
}

.dojo-room-stage-card .dojo-current-footer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.dojo-room-stage-card .dojo-current-footer-actions .ghost-button,
.dojo-room-stage-card .dojo-current-footer-actions .danger-button,
.dojo-room-stage-card .dojo-current-ready-button,
.dojo-room-stage-card .dojo-current-footer-spacer {
  min-height: 50px;
  width: 100%;
}

.dojo-room-stage-card .dojo-current-footer-spacer {
  display: block;
}

.dojo-room-stage-card .dojo-current-danger-stack {
  display: grid;
  gap: 0.6rem;
  padding: 0.72rem 0.78rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(224, 123, 103, 0.22);
  background:
    linear-gradient(180deg, rgba(224, 123, 103, 0.08), rgba(224, 123, 103, 0.03)),
    rgba(255, 255, 255, 0.02);
}

.dojo-room-stage-card .dojo-current-danger-copy {
  margin: 0;
  color: rgba(255, 227, 221, 0.9);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dojo-room-stage-card .dojo-current-danger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.65rem;
}

.dojo-room-stage-card--active {
  gap: 0.7rem;
}

.dojo-room-stage-card .dojo-current-summary--active {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.dojo-room-stage-card .dojo-current-head-meta--active {
  justify-content: space-between;
}

.dojo-room-stage-card .dojo-current-title-row--active {
  align-items: center;
}

.dojo-room-stage-card .dojo-current-status--active {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 0.5rem;
}

.dojo-room-stage-card .dojo-current-roster-names {
  display: grid;
  gap: 0.25rem;
  text-align: right;
  color: rgba(226, 240, 233, 0.9);
  font-size: 0.92rem;
  font-weight: 700;
}

.dojo-room-stage-card .dojo-current-roster-grid--active {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.dojo-room-stage-card .dojo-current-roster-grid--active .dojo-current-lineup-side {
  min-height: 0;
  padding: 0.65rem 0.72rem;
}

.dojo-cap-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.dojo-cap-strip span {
  display: grid;
  gap: 0.08rem;
  padding: 0.6rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(226, 240, 233, 0.7);
  font-size: 0.76rem;
}

.dojo-cap-strip strong {
  color: var(--text);
  font-size: 1rem;
}

.dojo-public-card {
  display: grid;
  gap: 0.62rem;
  padding: 0.78rem;
}

.dojo-public-card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.dojo-public-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.dojo-public-meta span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.52rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(5, 10, 12, 0.4);
}

.dojo-public-seat-line {
  display: grid;
  gap: 0.55rem;
}

.dojo-public-seat-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 58px;
  padding: 0.58rem 0.62rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.dojo-public-seat-pill strong {
  margin: 0;
  font-size: 0.94rem;
}

.dojo-public-seat-pill span {
  color: rgba(226, 240, 233, 0.72);
  font-size: 0.8rem;
}

.dojo-public-seat-copy {
  display: grid;
  gap: 0.08rem;
}

.dojo-public-seat-copy .small-copy {
  color: rgba(226, 240, 233, 0.6);
  font-size: 0.72rem;
  line-height: 1.35;
}

.friend-menu {
  position: relative;
}

.friend-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.friend-menu-trigger strong {
  min-width: 1.4rem;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  background: rgba(149, 244, 229, 0.12);
  color: var(--accent-bright);
  font-size: 0.74rem;
  text-align: center;
}

.friend-menu-trigger.active {
  border-color: rgba(149, 244, 229, 0.32);
  background: rgba(149, 244, 229, 0.08);
}

.friend-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 40;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.9rem;
  border-radius: 22px;
  border: 1px solid rgba(149, 244, 229, 0.16);
  background:
    linear-gradient(180deg, #143033 0%, #0d1b1e 62%),
    #0b1416;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: none;
}

.friend-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.friend-add-form label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.friend-add-form span {
  color: rgba(226, 240, 233, 0.78);
  font-size: 0.76rem;
}

.friend-add-form input {
  background: #10191b;
}

.friend-menu-list {
  display: grid;
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.friend-menu-card,
.friend-menu-empty {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: #142023;
}

.friend-menu-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.friend-menu-card-head strong,
.friend-menu-empty strong {
  display: block;
  margin: 0;
  font-size: 0.98rem;
}

.friend-menu-card-head span {
  color: rgba(226, 240, 233, 0.7);
  font-size: 0.74rem;
}

.friend-menu-card p,
.friend-menu-empty p {
  margin: 0;
  color: rgba(226, 240, 233, 0.72);
  font-size: 0.8rem;
  line-height: 1.45;
}

.friend-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(149, 244, 229, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
}

.friend-status-pill.battle {
  border-color: rgba(240, 167, 97, 0.24);
  background: rgba(240, 167, 97, 0.12);
  color: #ffd2a8;
}

.friend-status-pill.room {
  border-color: rgba(149, 244, 229, 0.24);
}

.friend-status-pill.online {
  border-color: rgba(186, 233, 152, 0.24);
  background: rgba(186, 233, 152, 0.1);
  color: #d4f1bd;
}

.friend-status-pill.offline {
  border-color: rgba(226, 240, 233, 0.12);
  background: rgba(226, 240, 233, 0.05);
  color: rgba(226, 240, 233, 0.62);
}

.friend-watch-lock {
  color: rgba(226, 240, 233, 0.58);
  font-size: 0.74rem;
}

.battle-spectator-chip {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.18);
  background: rgba(149, 244, 229, 0.08);
}

.battle-action-dock--spectator {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  text-align: center;
}

.battle-action-dock--spectator p {
  margin: 0;
  color: rgba(226, 240, 233, 0.72);
}

.dojo-public-seat-pill.joinable {
  width: 100%;
  justify-content: center;
  border-style: dashed;
  background: rgba(149, 244, 229, 0.05);
  color: var(--accent-bright);
}

.dojo-public-seat-pill.joinable strong,
.dojo-public-seat-pill.vacant strong {
  font-size: 1.4rem;
  line-height: 1;
}

.dojo-public-seat-pill.vacant {
  justify-content: center;
  border-style: dashed;
  color: rgba(226, 240, 233, 0.46);
}

.battle-stage-shell.battle-command-deck {
  min-height: calc(100vh - 1.8rem);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  grid-template-areas:
    "topbar topbar topbar"
    "left stage right";
  gap: 1rem;
}

.battle-deck-topbar {
  grid-area: topbar;
}

.battle-deck-left,
.battle-deck-right {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
}

.battle-deck-left {
  grid-area: left;
}

.battle-deck-right {
  grid-area: right;
}

.battle-deck-stage {
  grid-area: stage;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.5rem;
  overflow: hidden;
}

.battle-stage-panorama {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.battle-stage-faction-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem;
  border-radius: 20px;
  border: 1px solid rgba(149, 244, 229, 0.12);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.battle-stage-faction-panel.right {
  text-align: right;
}

.battle-stage-faction-panel.right .battle-stage-faction-art {
  order: 2;
}

.battle-stage-faction-panel.right .battle-stage-faction-avatar {
  left: auto;
  right: 0.45rem;
}

.battle-stage-faction-art .mech-art.card {
  aspect-ratio: 1 / 1.05;
  border-radius: 18px;
}

.battle-stage-faction-copy strong {
  display: block;
  margin-bottom: 0.16rem;
  font-size: 1.18rem;
}

.battle-stage-faction-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.battle-stage-faction-economy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
  margin-top: 0.58rem;
}

.battle-stage-faction-economy span {
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.battle-deck-stage .battle-arena-shell {
  min-height: 0;
  height: 100%;
}

.battle-deck-stage .battle-stage-sideheads {
  padding: 0 0.25rem 0.4rem;
}

.battle-deck-left .battle-actor-hud {
  padding: 0.9rem;
  border-radius: 24px;
  border: 1px solid rgba(232, 193, 117, 0.12);
  background:
    linear-gradient(180deg, rgba(250, 222, 169, 0.08), transparent 55%),
    rgba(10, 18, 22, 0.82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.battle-deck-left .battle-turn-banner {
  min-height: auto;
  display: grid;
  justify-items: start;
  gap: 0.28rem;
}

.battle-side-summary-stack {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.battle-side-summary-card {
  padding: 0.85rem;
  gap: 0.75rem;
}

.battle-side-summary-head h3 {
  margin: 0.1rem 0 0;
  font-size: 1.18rem;
}

.battle-side-summary-card.compact {
  gap: 0.55rem;
}

.battle-side-summary-card.compact .battle-side-summary-head h3 {
  font-size: 1rem;
}

.battle-side-summary-card.compact .battle-side-summary-hero {
  display: none;
}

.battle-side-summary-hero {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.battle-side-summary-art .mech-art.card {
  aspect-ratio: 1 / 1.12;
  border-radius: 18px;
}

.battle-side-summary-copy {
  display: grid;
  gap: 0.18rem;
}

.battle-side-summary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.battle-side-summary-lineup {
  max-height: 190px;
  overflow: auto;
  padding-right: 0.1rem;
}

.battle-side-summary-card.compact .battle-side-summary-lineup {
  max-height: 310px;
  display: grid;
  gap: 0.45rem;
}

.battle-side-roster-pill {
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.battle-side-summary-card.compact .battle-side-roster-pill {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.battle-side-summary-card.compact .battle-side-roster-pill > div {
  display: grid;
  gap: 0.08rem;
}

.battle-side-summary-card.compact .battle-side-roster-pill strong {
  font-size: 0.86rem;
  line-height: 1.1;
}

.battle-side-summary-card.compact .battle-side-roster-pill span {
  font-size: 0.72rem;
  line-height: 1.26;
  color: rgba(244, 235, 218, 0.72);
}

.battle-log-panel {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 0.6rem;
  background:
    linear-gradient(180deg, rgba(18, 28, 33, 0.96), rgba(7, 12, 16, 0.98));
}

.battle-log-panel .event-log {
  max-height: none;
  min-height: 280px;
  height: 100%;
  padding-right: 0.12rem;
  display: grid;
  gap: 0.48rem;
}

.battle-deck-stage .battle-arena-board {
  grid-template-columns: repeat(6, minmax(118px, 1fr));
}

.battle-deck-stage .battle-cell-shell,
.battle-deck-stage .battle-cell {
  min-height: 196px;
}

.battle-deck-stage .battle-cell {
  background:
    linear-gradient(180deg, rgba(95, 130, 166, 0.18), rgba(44, 62, 80, 0.28)),
    rgba(31, 41, 52, 0.62);
}

.battle-deck-stage .unit-chip {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0.65rem;
}

.battle-deck-stage .unit-chip-visual .mech-art.token {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
}

.battle-deck-stage .unit-chip-copy strong {
  font-size: 0.96rem;
}

.battle-stage-shell.battle-command-deck {
  grid-template-columns: minmax(272px, 308px) minmax(760px, 1fr) minmax(308px, 344px);
  align-items: start;
}

.battle-deck-left,
.battle-deck-right,
.battle-deck-stage,
.battle-stage-topbar,
.battle-stage-panorama,
.battle-arena-shell,
.battle-arena-board,
.battle-cell-shell,
.battle-cell,
.unit-chip,
.unit-chip-copy,
.battle-side-head,
.battle-stage-faction-copy,
.battle-side-summary-copy,
.battle-turn-banner,
.battle-actor-hud-copy,
.battle-actor-state-line {
  min-width: 0;
}

.battle-stage-topbar {
  padding: 0.68rem 0.92rem;
}

.battle-stage-room h2,
.battle-stage-room p,
.battle-stage-actions span,
.battle-turn-banner strong,
.battle-turn-banner span,
.battle-actor-hud-copy h3,
.battle-actor-hud-copy p,
.battle-actor-state-card strong,
.battle-actor-state-line strong,
.battle-stage-faction-copy strong,
.battle-stage-faction-copy p,
.battle-side-head strong,
.battle-side-head span,
.battle-side-summary-copy strong,
.battle-side-summary-copy span,
.unit-chip-copy strong,
.unit-chip-copy span,
.unit-chip-metrics span {
  word-break: keep-all;
  overflow-wrap: normal;
}

.battle-deck-left,
.battle-deck-right {
  padding-right: 0.05rem;
}

.battle-deck-left {
  grid-template-rows: auto auto;
}

.battle-deck-left .battle-actor-hud {
  padding: 0.82rem;
  border-radius: 26px;
  border: 1px solid rgba(232, 193, 117, 0.12);
  background:
    linear-gradient(180deg, rgba(250, 222, 169, 0.08), transparent 55%),
    rgba(10, 18, 22, 0.82);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
}

.battle-actor-hud-head {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.battle-actor-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
}

.battle-actor-portrait .mech-art.card {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.battle-actor-hud-copy h3 {
  font-size: 1.14rem;
  line-height: 1.08;
}

.battle-actor-hud-copy p {
  line-height: 1.38;
  font-size: 0.8rem;
}

.battle-actor-tags {
  gap: 0.28rem;
  margin-top: 0.42rem;
}

.battle-actor-tags span {
  font-size: 0.68rem;
  padding: 0.38rem 0.48rem;
}

.battle-turn-banner {
  min-height: auto;
  padding: 0.68rem 0.8rem;
  gap: 0.2rem;
}

.battle-turn-banner strong {
  font-size: 1rem;
  line-height: 1.1;
}

.battle-turn-banner span {
  font-size: 0.82rem;
  line-height: 1.4;
}

.battle-deck-stage {
  gap: 0.7rem;
}

.battle-stage-panorama {
  gap: 0.7rem;
}

.battle-stage-faction-panel {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.65rem 0.72rem;
}

.battle-stage-faction-art .mech-art.card {
  aspect-ratio: 1 / 1;
}

.battle-stage-faction-copy strong {
  font-size: 1.04rem;
  line-height: 1.05;
}

.battle-stage-faction-copy p {
  font-size: 0.78rem;
  line-height: 1.3;
}

.battle-stage-faction-economy {
  gap: 0.36rem;
}

.battle-stage-faction-economy span {
  font-size: 0.68rem;
}

.battle-stage-sideheads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
}

.battle-side-head {
  padding: 0.62rem 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.1);
  background:
    linear-gradient(180deg, rgba(149, 244, 229, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.battle-side-head strong {
  font-size: 1rem;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-side-head span {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-arena-shell {
  padding: 0.75rem;
}

.battle-arena-board {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.8rem 1.15rem 1rem;
}

.battle-cell-shell,
.battle-cell {
  min-height: 172px;
}

.battle-cell {
  padding: 0.6rem;
  border-radius: 22px;
}

.unit-chip {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.58rem;
}

.unit-chip-copy strong {
  font-size: 0.92rem;
  line-height: 1.08;
}

.unit-chip-copy span {
  font-size: 0.72rem;
  line-height: 1.25;
}

.unit-chip-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.22rem 0.45rem;
}

.unit-chip-metrics span {
  font-size: 0.66rem;
  line-height: 1.2;
}

.battle-side-summary-stack {
  gap: 0.65rem;
}

.battle-side-summary-card {
  padding: 0.72rem;
  gap: 0.65rem;
}

.battle-side-summary-head h3 {
  font-size: 1rem;
  line-height: 1.08;
}

.battle-side-summary-hero {
  grid-template-columns: 76px minmax(0, 1fr);
}

.battle-side-summary-art .mech-art.card {
  border-radius: 16px;
}

.battle-side-summary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.battle-side-summary-card.compact .battle-side-summary-head h3 {
  font-size: 1rem;
}

.battle-side-summary-card.compact .battle-side-summary-hero {
  display: none;
}

.battle-side-summary-card.compact .battle-side-summary-lineup {
  max-height: 320px;
  display: grid;
  gap: 0.42rem;
}

.battle-side-summary-card.compact .battle-side-roster-pill {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.battle-side-summary-card.compact .battle-side-roster-pill > div {
  display: grid;
  gap: 0.08rem;
}

.battle-side-summary-card.compact .battle-side-roster-pill strong {
  font-size: 0.86rem;
  line-height: 1.1;
}

.battle-side-summary-card.compact .battle-side-roster-pill span {
  font-size: 0.72rem;
  line-height: 1.24;
  color: rgba(244, 235, 218, 0.72);
}

.battle-log-panel .event-log {
  min-height: 240px;
}

.event-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.68rem;
  align-items: start;
  padding: 0.62rem 0.68rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 68%),
    rgba(255, 255, 255, 0.024);
}

.event-stamp {
  color: rgba(120, 161, 168, 0.74);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.event-copy {
  color: rgba(228, 238, 233, 0.9);
  font-size: 0.9rem;
  line-height: 1.46;
}

.event-row.damage .event-copy {
  color: #8fe7e0;
  font-weight: 700;
}

.event-row.support .event-copy {
  color: #9dc9ff;
}

.event-row.combo .event-copy {
  color: #ffd07f;
  font-weight: 700;
}

.event-row.warning .event-copy {
  color: #ffb69d;
}

.event-row.finish .event-copy {
  color: #fff1b2;
  font-weight: 700;
}

/* Battle layout tune */

.battle-stage-topbar {
  padding: 0.68rem 0.92rem;
}

.battle-stage-room h2 {
  margin: 0.08rem 0 0.12rem;
  font-size: clamp(1.32rem, 1.8vw, 1.82rem);
}

.battle-stage-room p {
  font-size: 0.86rem;
}

.battle-round-medal {
  min-width: 142px;
  padding: 0.42rem 0.9rem;
  border-radius: 20px;
}

.battle-round-medal span {
  font-size: 0.68rem;
}

.battle-round-medal strong {
  font-size: 1.66rem;
}

.battle-round-medal strong small {
  font-size: 0.88rem;
}

.battle-stage-actions {
  gap: 0.62rem;
  font-size: 0.88rem;
}

.battle-deck-left {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.battle-deck-left .battle-turn-banner {
  order: 0;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 0.58rem 0.72rem;
}

.battle-deck-left .battle-actor-hud {
  order: 1;
  width: 100%;
  height: calc(100% - 2px);
  padding: 0.82rem;
}

.battle-actor-hud-head {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.battle-actor-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
}

.battle-actor-portrait .mech-art.card {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.battle-actor-hud-copy h3 {
  font-size: 1.14rem;
}

.battle-actor-hud-copy p {
  font-size: 0.8rem;
  line-height: 1.38;
}

.battle-actor-tags {
  margin-top: 0.42rem;
  gap: 0.28rem;
}

.battle-actor-tags span {
  font-size: 0.68rem;
  padding: 0.38rem 0.48rem;
}

.battle-actor-hud-body {
  gap: 0.6rem;
}

.battle-actor-state-grid {
  gap: 0.45rem;
}

.battle-actor-state-card,
.battle-actor-state-line {
  padding: 0.52rem 0.6rem;
}

.battle-stage-sideheads {
  padding-bottom: 0.2rem;
}

.battle-log-panel {
  background:
    linear-gradient(180deg, rgba(18, 28, 33, 0.96), rgba(7, 12, 16, 0.98));
}

.battle-log-panel .event-log {
  display: grid;
  gap: 0.48rem;
}

.event-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.68rem;
  align-items: start;
  padding: 0.62rem 0.68rem;
  border-radius: 14px;
  border: 1px solid rgba(149, 244, 229, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 68%),
    rgba(255, 255, 255, 0.024);
}

.event-stamp {
  color: rgba(120, 161, 168, 0.74);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.event-copy {
  color: rgba(228, 238, 233, 0.9);
  font-size: 0.9rem;
  line-height: 1.46;
}

.event-row.damage .event-copy {
  color: #8fe7e0;
  font-weight: 700;
}

.event-row.support .event-copy {
  color: #9dc9ff;
}

.event-row.combo .event-copy {
  color: #ffd07f;
  font-weight: 700;
}

.event-row.warning .event-copy {
  color: #ffb69d;
}

.event-row.finish .event-copy {
  color: #fff1b2;
  font-weight: 700;
}

.battle-side-summary-card.compact .battle-side-summary-head h3 {
  font-size: 1rem;
}

.battle-side-summary-card.compact .battle-side-summary-hero {
  display: none;
}

.battle-side-summary-card.compact .battle-side-summary-lineup {
  max-height: 320px;
  display: grid;
  gap: 0.42rem;
}

.battle-side-summary-card.compact .battle-side-roster-pill {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.battle-side-summary-card.compact .battle-side-roster-pill > div {
  display: grid;
  gap: 0.08rem;
}

.battle-side-summary-card.compact .battle-side-roster-pill strong {
  font-size: 0.86rem;
  line-height: 1.1;
}

.battle-side-summary-card.compact .battle-side-roster-pill span {
  font-size: 0.72rem;
  line-height: 1.24;
  color: rgba(244, 235, 218, 0.72);
}

.battle-deck-stage .unit-chip {
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

.battle-deck-stage .unit-chip-top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.52rem;
  align-items: start;
}

.battle-deck-stage .unit-chip-copy {
  gap: 0.18rem;
}

.battle-deck-stage .unit-chip-copy strong {
  font-size: 0.92rem;
  line-height: 1.06;
}

.battle-deck-stage .unit-chip-copy span {
  font-size: 0.7rem;
  line-height: 1.22;
}

.battle-deck-stage .unit-status-rows--attached {
  gap: 0.18rem;
  margin-top: 0.04rem;
  min-height: 0;
}

.battle-deck-stage .unit-status-row {
  gap: 0.18rem;
}

.battle-deck-stage .unit-chip-copy .unit-status-dot {
  font-size: 0.54rem;
  line-height: 1;
}

.battle-deck-stage .unit-chip-copy .unit-status-lane-tag,
.battle-deck-stage .unit-chip-copy .unit-status-overflow {
  min-width: 18px;
  height: 16px;
  padding: 0 0.28rem;
  font-size: 0.52rem;
  line-height: 1;
}

.battle-deck-stage .unit-chip-avatar-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.battle-deck-stage .unit-chip-bars-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
}

.battle-deck-stage .unit-chip-bars {
  display: grid;
  gap: 0.24rem;
}

.battle-deck-stage .unit-chip-status-stack {
  display: grid;
  gap: 0.28rem;
}

.battle-deck-stage .unit-chip-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.18rem 0.34rem;
}

.battle-deck-stage .unit-chip-metrics span {
  font-size: 0.62rem;
  padding: 0.16rem 0.34rem;
}

/* Battle command dock final overrides */

.battle-overlay--reborn .battle-action-dock {
  position: relative;
  overflow: hidden;
  border-color: rgba(214, 174, 94, 0.24);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 17, 20, 0.98), rgba(7, 12, 14, 0.94));
}

.battle-overlay--reborn .battle-action-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    repeating-linear-gradient(90deg, rgba(214, 174, 94, 0.06) 0, rgba(214, 174, 94, 0.06) 1px, transparent 1px, transparent 96px);
  opacity: 0.44;
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock > * {
  position: relative;
  z-index: 1;
}

.battle-overlay--reborn .battle-action-dock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.56rem;
}

.battle-overlay--reborn .battle-action-dock-headline {
  display: grid;
  gap: 0.18rem;
}

.battle-overlay--reborn .battle-action-dock-headline strong {
  font-family: "Spectral", serif;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
  color: rgba(244, 241, 230, 0.96);
}

.battle-overlay--reborn .battle-action-dock-headline span {
  font-size: 0.66rem;
  line-height: 1.28;
  color: rgba(214, 221, 218, 0.72);
}

.battle-overlay--reborn .battle-action-dock-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.36rem;
}

.battle-overlay--reborn .battle-action-dock-button {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
  align-content: start;
  padding: 0.46rem 0.56rem 0.5rem;
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.battle-overlay--reborn .battle-action-dock-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(214, 174, 94, 0.16), rgba(214, 174, 94, 0.02));
  opacity: 0.72;
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock-button:hover:not(.disabled),
.battle-overlay--reborn .battle-action-dock-button.dragging:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.battle-overlay--reborn .battle-action-dock-button.selected {
  border-color: rgba(122, 220, 214, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(122, 220, 214, 0.16),
    0 0 28px rgba(122, 220, 214, 0.14);
}

.battle-overlay--reborn .battle-action-dock-button.dragging {
  opacity: 0.68;
  transform: translateY(-6px) scale(0.985);
}

.battle-overlay--reborn .battle-action-card.group-weapon {
  border-color: rgba(212, 112, 78, 0.28);
}

.battle-overlay--reborn .battle-action-card.group-frame {
  border-color: rgba(214, 174, 94, 0.28);
}

.battle-overlay--reborn .battle-action-card.group-module {
  border-color: rgba(98, 170, 255, 0.26);
}

.battle-overlay--reborn .battle-action-card.group-tactic {
  border-color: rgba(118, 220, 184, 0.24);
}

.battle-overlay--reborn .battle-action-card.group-defense {
  border-color: rgba(162, 182, 194, 0.24);
}

.battle-overlay--reborn .battle-action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.battle-overlay--reborn .battle-action-dock-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.battle-overlay--reborn .battle-action-card-mode {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 242, 239, 0.74);
}

.battle-overlay--reborn .battle-action-card-kicker {
  color: rgba(214, 221, 218, 0.62);
}

.battle-overlay--reborn .battle-action-dock-copy {
  display: grid;
  gap: 0.08rem;
}

.battle-overlay--reborn .battle-action-dock-copy strong {
  font-size: 0.8rem;
  line-height: 1.16;
  color: rgba(248, 245, 236, 0.96);
}

.battle-overlay--reborn .battle-action-dock-copy small {
  font-size: 0.6rem;
  line-height: 1.2;
}

.battle-overlay--reborn .battle-action-dock-button.disabled {
  background:
    linear-gradient(180deg, rgba(54, 63, 68, 0.28), rgba(22, 28, 30, 0.16)),
    rgba(255, 255, 255, 0.02);
}

.battle-overlay--reborn .battle-action-dock-button.disabled .battle-action-card-mode {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1080px) {
  .battle-overlay--reborn .battle-action-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .battle-overlay--reborn .battle-action-dock-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-overlay--reborn .battle-action-dock-button {
    min-height: 60px;
    padding-inline: 0.5rem;
  }
}

/* Battle command card dock */

#battle-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

body.battle-command-dragging {
  user-select: none;
}

body.battle-command-aiming,
body.battle-command-aiming .battle-overlay,
body.battle-command-aiming .battle-arena-shell {
  cursor: crosshair;
}

.battle-action-dock {
  position: relative;
  overflow: hidden;
  border-color: rgba(214, 174, 94, 0.24);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 17, 20, 0.98), rgba(7, 12, 14, 0.94));
}

.battle-action-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    repeating-linear-gradient(90deg, rgba(214, 174, 94, 0.06) 0, rgba(214, 174, 94, 0.06) 1px, transparent 1px, transparent 96px);
  opacity: 0.44;
  pointer-events: none;
}

.battle-action-dock > * {
  position: relative;
  z-index: 1;
}

.battle-action-dock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.battle-action-dock-headline {
  display: grid;
  gap: 0.18rem;
}

.battle-action-dock-headline strong {
  font-size: 0.98rem;
  line-height: 1.35;
  color: rgba(244, 241, 230, 0.96);
}

.battle-action-dock-headline span {
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(214, 221, 218, 0.72);
}

.battle-action-dock-grid {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
}

.battle-action-dock-button {
  position: relative;
  min-height: 88px;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.44rem;
  align-content: start;
  padding: 0.62rem 0.72rem 0.68rem;
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.battle-action-dock-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(214, 174, 94, 0.16), rgba(214, 174, 94, 0.02));
  opacity: 0.72;
  pointer-events: none;
}

.battle-action-dock-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.battle-action-card.group-weapon {
  border-color: rgba(212, 112, 78, 0.28);
}

.battle-action-card.group-frame {
  border-color: rgba(214, 174, 94, 0.28);
}

.battle-action-card.group-module {
  border-color: rgba(98, 170, 255, 0.26);
}

.battle-action-card.group-tactic {
  border-color: rgba(118, 220, 184, 0.24);
}

.battle-action-card.group-defense {
  border-color: rgba(162, 182, 194, 0.24);
}

.battle-action-dock-button:hover:not(.disabled),
.battle-action-dock-button.dragging:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.battle-action-dock-button.selected {
  border-color: rgba(122, 220, 214, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(122, 220, 214, 0.16),
    0 0 28px rgba(122, 220, 214, 0.14);
}

.battle-action-dock-button.dragging {
  opacity: 0.68;
  transform: translateY(-6px) scale(0.985);
}

.battle-action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.battle-action-dock-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.battle-action-card-mode {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 242, 239, 0.74);
}

.battle-action-card-kicker {
  color: rgba(214, 221, 218, 0.62);
}

.battle-action-dock-copy {
  gap: 0.18rem;
}

.battle-action-dock-copy strong {
  font-size: 0.94rem;
  line-height: 1.2;
  color: rgba(248, 245, 236, 0.96);
}

.battle-action-dock-copy small {
  font-size: 0.7rem;
  line-height: 1.35;
}

.battle-action-dock-button.disabled {
  background:
    linear-gradient(180deg, rgba(54, 63, 68, 0.28), rgba(22, 28, 30, 0.16)),
    rgba(255, 255, 255, 0.02);
}

.battle-action-dock-button.disabled .battle-action-card-mode {
  background: rgba(255, 255, 255, 0.03);
}

.battle-command-drag-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.battle-command-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.battle-command-drag-card {
  min-width: 220px;
  max-width: 280px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.72rem 0.82rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.3);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.18), transparent 34%),
    rgba(8, 13, 15, 0.94);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.battle-command-drag-ghost.group-weapon .battle-command-drag-card {
  border-color: rgba(212, 112, 78, 0.36);
}

.battle-command-drag-ghost.group-module .battle-command-drag-card {
  border-color: rgba(98, 170, 255, 0.34);
}

.battle-command-drag-ghost.group-tactic .battle-command-drag-card {
  border-color: rgba(118, 220, 184, 0.34);
}

.battle-command-drag-ghost.is-aiming .battle-command-drag-card {
  transform: translate(18px, 18px) scale(0.92);
}

.battle-command-drag-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.battle-command-drag-copy {
  display: grid;
  gap: 0.14rem;
}

.battle-command-drag-copy small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 228, 0.6);
}

.battle-command-drag-copy strong {
  font-size: 1rem;
  color: rgba(249, 245, 235, 0.96);
}

.battle-command-drag-copy span {
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(229, 235, 232, 0.78);
}

.battle-command-drag-reticle {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}

.battle-command-drag-reticle span,
.battle-command-drag-reticle i {
  position: absolute;
  display: block;
}

.battle-command-drag-reticle span {
  inset: 6px;
  border: 1px solid rgba(242, 246, 244, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(122, 220, 214, 0.26);
}

.battle-command-drag-reticle::before,
.battle-command-drag-reticle::after,
.battle-command-drag-reticle i::before,
.battle-command-drag-reticle i::after {
  content: "";
  position: absolute;
  background: rgba(242, 246, 244, 0.94);
}

.battle-command-drag-reticle::before,
.battle-command-drag-reticle::after {
  left: 50%;
  width: 1px;
  height: 8px;
  transform: translateX(-50%);
}

.battle-command-drag-reticle::before {
  top: 0;
}

.battle-command-drag-reticle::after {
  bottom: 0;
}

.battle-command-drag-reticle i::before,
.battle-command-drag-reticle i::after {
  top: 50%;
  height: 1px;
  width: 8px;
  transform: translateY(-50%);
}

.battle-command-drag-reticle i::before {
  left: 0;
}

.battle-command-drag-reticle i::after {
  right: 0;
}

.battle-command-drag-ghost.is-aiming .battle-command-drag-reticle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.battle-command-drag-target {
  position: fixed;
  border-radius: 20px;
  border: 2px solid rgba(242, 246, 244, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px rgba(122, 220, 214, 0.18),
    inset 0 0 20px rgba(122, 220, 214, 0.12);
  background: rgba(122, 220, 214, 0.08);
  z-index: 1;
}

.battle-command-drag-target.invalid {
  border-color: rgba(255, 122, 122, 0.9);
  background: rgba(255, 122, 122, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(255, 122, 122, 0.18),
    inset 0 0 20px rgba(255, 122, 122, 0.1);
}

.battle-command-drag-target span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 0.22rem 0.56rem;
  border-radius: 999px;
  background: rgba(7, 12, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  white-space: nowrap;
  color: rgba(242, 246, 244, 0.92);
}

@media (max-width: 1080px) {
  .battle-action-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-command-drag-card {
    min-width: 196px;
  }
}

@media (max-width: 820px) {
  .battle-action-dock-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-action-dock-button {
    min-height: 80px;
    padding-inline: 0.64rem;
  }

  .battle-command-drag-card {
    min-width: 180px;
    max-width: 220px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.58rem;
    padding: 0.64rem 0.72rem;
  }

  .battle-command-drag-icon {
    width: 36px;
    height: 36px;
  }
}

.battle-command-drag-beam {
  position: fixed;
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(132, 231, 222, 0.04), rgba(132, 231, 222, 0.92), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 16px rgba(132, 231, 222, 0.28),
    0 0 28px rgba(132, 231, 222, 0.14);
  z-index: 0;
}

.battle-command-drag-beam.preview-offense {
  background: linear-gradient(90deg, rgba(255, 142, 103, 0.04), rgba(255, 142, 103, 0.94), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 16px rgba(255, 142, 103, 0.3),
    0 0 28px rgba(255, 142, 103, 0.16);
}

.battle-command-drag-beam.preview-support {
  background: linear-gradient(90deg, rgba(120, 211, 255, 0.04), rgba(120, 211, 255, 0.94), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 16px rgba(120, 211, 255, 0.28),
    0 0 28px rgba(120, 211, 255, 0.14);
}

.battle-command-drag-beam.preview-move {
  background: linear-gradient(90deg, rgba(118, 220, 184, 0.04), rgba(118, 220, 184, 0.94), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 16px rgba(118, 220, 184, 0.3),
    0 0 28px rgba(118, 220, 184, 0.16);
}

.battle-command-drag-beam.invalid {
  background: linear-gradient(90deg, rgba(255, 122, 122, 0.04), rgba(255, 122, 122, 0.9), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 16px rgba(255, 122, 122, 0.28),
    0 0 28px rgba(255, 122, 122, 0.14);
}

.battle-command-drag-mark {
  position: fixed;
  border-radius: 18px;
  border: 1px solid rgba(242, 246, 244, 0.22);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 0;
  animation: battle-command-preview-pulse 1s ease-in-out infinite;
}

.battle-command-drag-mark.preview-offense {
  background: rgba(255, 122, 98, 0.08);
  border-color: rgba(255, 142, 103, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 142, 103, 0.18),
    0 0 18px rgba(255, 142, 103, 0.14);
}

.battle-command-drag-mark.preview-support {
  background: rgba(120, 211, 255, 0.08);
  border-color: rgba(120, 211, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(120, 211, 255, 0.16),
    0 0 18px rgba(120, 211, 255, 0.14);
}

.battle-command-drag-mark.preview-move {
  background: rgba(118, 220, 184, 0.08);
  border-color: rgba(118, 220, 184, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(118, 220, 184, 0.16),
    0 0 18px rgba(118, 220, 184, 0.16);
}

.battle-command-drag-mark.primary {
  border-width: 2px;
  animation-duration: 0.7s;
}

.battle-command-drag-mark.secondary {
  opacity: 0.78;
  animation-duration: 1.15s;
}

.battle-command-drag-panel {
  position: fixed;
  width: min(288px, calc(100vw - 2rem));
  display: grid;
  gap: 0.5rem;
  padding: 0.72rem 0.82rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.24);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.14), transparent 34%),
    rgba(8, 13, 15, 0.92);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.battle-command-drag-panel.preview-offense {
  border-color: rgba(255, 142, 103, 0.28);
}

.battle-command-drag-panel.preview-support {
  border-color: rgba(120, 211, 255, 0.28);
}

.battle-command-drag-panel.preview-move {
  border-color: rgba(118, 220, 184, 0.3);
}

.battle-command-drag-panel.invalid {
  border-color: rgba(255, 122, 122, 0.3);
}

.battle-command-drag-panel-head {
  display: grid;
  gap: 0.14rem;
}

.battle-command-drag-panel-head small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 228, 0.58);
}

.battle-command-drag-panel-head strong {
  font-size: 0.96rem;
  color: rgba(248, 244, 236, 0.96);
}

.battle-command-drag-panel-body {
  display: grid;
  gap: 0.22rem;
}

.battle-command-drag-panel-body span {
  font-size: 0.75rem;
  line-height: 1.36;
  color: rgba(232, 237, 234, 0.82);
}

.battle-command-release-fx {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}

.battle-command-release-ring,
.battle-command-release-core {
  position: absolute;
  inset: 0;
  border-radius: 20px;
}

.battle-command-release-ring {
  border: 2px solid rgba(242, 246, 244, 0.92);
  box-shadow:
    0 0 24px rgba(122, 220, 214, 0.22),
    inset 0 0 20px rgba(122, 220, 214, 0.12);
  animation: battle-command-release-ring 520ms ease-out forwards;
}

.battle-command-release-ring.delay {
  animation-delay: 70ms;
}

.battle-command-release-core {
  inset: 18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  animation: battle-command-release-core 520ms ease-out forwards;
}

.battle-command-release-fx.preview-offense .battle-command-release-ring {
  border-color: rgba(255, 142, 103, 0.94);
  box-shadow:
    0 0 24px rgba(255, 142, 103, 0.24),
    inset 0 0 20px rgba(255, 142, 103, 0.12);
}

.battle-command-release-fx.preview-support .battle-command-release-ring {
  border-color: rgba(120, 211, 255, 0.94);
  box-shadow:
    0 0 24px rgba(120, 211, 255, 0.24),
    inset 0 0 20px rgba(120, 211, 255, 0.12);
}

.battle-command-release-fx.preview-move .battle-command-release-ring {
  border-color: rgba(118, 220, 184, 0.94);
  box-shadow:
    0 0 24px rgba(118, 220, 184, 0.24),
    inset 0 0 20px rgba(118, 220, 184, 0.12);
}

.battle-command-release-fx span {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: rgba(7, 12, 14, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  white-space: nowrap;
  color: rgba(244, 246, 244, 0.92);
  animation: battle-command-release-label 520ms ease-out forwards;
}

@keyframes battle-command-preview-pulse {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.72;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes battle-command-release-ring {
  0% {
    opacity: 0.92;
    transform: scale(0.76);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes battle-command-release-core {
  0% {
    opacity: 0.72;
    transform: scale(0.72);
  }

  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes battle-command-release-label {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }

  20%,
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
}

@media (max-width: 820px) {
  .battle-command-drag-panel {
    width: min(248px, calc(100vw - 1.4rem));
    padding: 0.62rem 0.7rem;
  }

  .battle-command-drag-panel-body span {
    font-size: 0.7rem;
  }
}

/* ─── 战报全屏 Modal ─────────────────────────────────────────── */

.battle-report-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 10, 0.86);
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.battle-report-overlay.hidden {
  display: none;
}

.battle-report-modal {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.9rem;
  overflow: hidden;
  border-radius: var(--radius-lg, 24px);
  border: 1px solid rgba(130, 216, 205, 0.14);
  background:
    linear-gradient(180deg, rgba(122, 220, 214, 0.042), transparent 60%),
    rgba(9, 16, 20, 0.96);
  box-shadow:
    0 0 0 1px rgba(130, 216, 205, 0.06) inset,
    0 32px 64px rgba(0, 0, 0, 0.56);
  padding: 1.4rem 1.5rem;
}

.report-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(130, 216, 205, 0.18);
  background: rgba(130, 216, 205, 0.08);
  color: rgba(228, 238, 233, 0.72);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.report-close-btn:hover {
  background: rgba(130, 216, 205, 0.16);
  border-color: rgba(130, 216, 205, 0.36);
  color: var(--color-accent, #84e1d5);
}

.report-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.9rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-result-badge.victory {
  background: rgba(132, 225, 213, 0.14);
  border: 1px solid rgba(132, 225, 213, 0.4);
  color: var(--color-accent, #84e1d5);
}

.report-result-badge.defeat {
  background: rgba(255, 100, 100, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8f8f;
}

.report-result-badge.draw {
  background: rgba(200, 200, 200, 0.1);
  border: 1px solid rgba(200, 200, 200, 0.24);
  color: rgba(228, 238, 233, 0.72);
}

.report-meta {
  color: rgba(172, 200, 194, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.report-share-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  padding: 0.36rem 0.88rem;
  border-radius: 999px;
  border: 1px solid rgba(130, 216, 205, 0.28);
  background: rgba(130, 216, 205, 0.08);
  color: var(--color-accent, #84e1d5);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.report-share-btn:hover {
  background: rgba(130, 216, 205, 0.15);
  border-color: rgba(130, 216, 205, 0.44);
}

.report-share-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.report-lineup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
}

.report-lineup-side {
  display: grid;
  gap: 0.46rem;
}

.report-lineup-side.side-b {
  text-align: right;
}

.report-lineup-label {
  font-size: 0.72rem;
  color: rgba(172, 200, 194, 0.56);
  letter-spacing: 0.05em;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  margin-bottom: 0.18rem;
}

.report-lineup-units {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.report-lineup-side.side-b .report-lineup-units {
  justify-content: flex-end;
}

.report-unit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.26rem 0.56rem;
  border-radius: 8px;
  border: 1px solid rgba(130, 216, 205, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.76rem;
  color: rgba(228, 238, 233, 0.82);
  white-space: nowrap;
}

.report-unit-chip.destroyed {
  border-color: rgba(255, 80, 80, 0.2);
  background: rgba(255, 80, 80, 0.06);
  color: rgba(255, 140, 140, 0.72);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 80, 80, 0.4);
}

.report-unit-chip-hp {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: rgba(172, 200, 194, 0.6);
}

.report-lineup-vs {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: rgba(172, 200, 194, 0.38);
  align-self: center;
  padding: 0 0.32rem;
}

.report-timeline {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.56rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 216, 205, 0.18) transparent;
}

.report-timeline::-webkit-scrollbar {
  width: 4px;
}

.report-timeline::-webkit-scrollbar-thumb {
  background: rgba(130, 216, 205, 0.2);
  border-radius: 4px;
}

.report-round-block {
  border: 1px solid rgba(130, 216, 205, 0.1);
  border-radius: 14px;
  overflow: hidden;
}

.report-round-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.84rem;
  background: rgba(130, 216, 205, 0.05);
  cursor: pointer;
  user-select: none;
  transition: background 0.14s;
}

.report-round-header:hover {
  background: rgba(130, 216, 205, 0.09);
}

.report-round-header-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: rgba(172, 200, 194, 0.82);
  letter-spacing: 0.05em;
}

.report-round-header-count {
  font-size: 0.7rem;
  color: rgba(130, 216, 205, 0.5);
  margin-left: auto;
}

.report-round-toggle {
  font-size: 0.68rem;
  color: rgba(130, 216, 205, 0.44);
  transition: transform 0.2s;
}

.report-round-block.collapsed .report-round-toggle {
  transform: rotate(-90deg);
}

.report-round-events {
  display: grid;
  gap: 0;
}

.report-round-block.collapsed .report-round-events {
  display: none;
}

.report-event-item {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.42rem 0.84rem;
  border-top: 1px solid rgba(130, 216, 205, 0.05);
  font-size: 0.82rem;
  color: rgba(228, 238, 233, 0.82);
  line-height: 1.46;
}

.report-event-stamp {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: rgba(130, 216, 205, 0.42);
  white-space: nowrap;
}

.report-event-item.report-combo-event {
  background: rgba(255, 208, 127, 0.05);
}

.report-event-item.report-combo-event .report-event-copy {
  color: #ffd07f;
  font-weight: 700;
}

.report-event-item.type-damage .report-event-copy {
  color: #8fe7e0;
  font-weight: 600;
}

.report-event-item.type-support .report-event-copy {
  color: #9dc9ff;
}

.report-event-item.type-warning .report-event-copy {
  color: #ffb69d;
}

.report-event-item.type-finish .report-event-copy {
  color: #fff1b2;
  font-weight: 700;
}

.report-mvp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.56rem;
}

.report-mvp-card {
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
  border: 1px solid rgba(130, 216, 205, 0.1);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 0.24rem;
}

.report-mvp-label {
  font-size: 0.68rem;
  color: rgba(172, 200, 194, 0.52);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
}

.report-mvp-name {
  font-size: 0.86rem;
  color: rgba(228, 238, 233, 0.9);
  font-weight: 600;
}

.report-mvp-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  color: var(--color-accent, #84e1d5);
}

.report-toast {
  position: fixed;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.6rem);
  z-index: 210;
  padding: 0.56rem 1.2rem;
  border-radius: 999px;
  background: rgba(9, 16, 20, 0.92);
  border: 1px solid rgba(130, 216, 205, 0.28);
  color: var(--color-accent, #84e1d5);
  font-size: 0.86rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.report-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .battle-report-modal {
    padding: 1rem;
    border-radius: 16px;
    max-height: calc(100dvh - 1.2rem);
  }

  .report-lineup {
    grid-template-columns: 1fr;
  }

  .report-lineup-vs {
    display: none;
  }

  .report-mvp {
    grid-template-columns: 1fr;
  }
}

.report-zone-section {
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  background: rgba(172, 200, 194, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(172, 200, 194, 0.12);
}

.report-zone-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(172, 200, 194, 0.45);
  margin-bottom: 0.55rem;
}

.report-zone-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.report-zone-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(172, 200, 194, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(172, 200, 194, 0.13);
  flex: 1;
  min-width: 100px;
}

.report-zone-slot {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(172, 200, 194, 0.45);
  text-transform: uppercase;
}

.report-zone-name {
  font-size: 0.83rem;
  font-weight: 500;
  color: rgba(172, 200, 194, 0.88);
}

.report-event-copy .glossary-term,
.report-zone-name .glossary-term {
  color: inherit;
  border-bottom-color: currentColor;
}
/* Architecture layer: tokens / layouts / domain components / state */

.screen-shell {
  position: relative;
  width: 100%;
}

.top-bar {
  border-radius: var(--radius-lg);
}

.layout-battle-shell,
.command-deck-layout {
  gap: var(--space-5);
}

.side-panel,
.board-panel,
.hangar-panel,
.bottom-dock,
.card-surface {
  min-width: 0;
}

.card-surface {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.screen-shell--battle .battle-stage-topbar,
.screen-shell--dojo .dojo-stage-panel,
.screen-shell--hangar .hangar-stage-panel {
  box-shadow: var(--shadow-panel);
}

.battle-stage-room h2,
.dojo-overview-head h2,
.hangar-detail-title h2,
.hangar-picker-head h2 {
  font-size: var(--font-scale-xl);
}

.battle-top-status {
  padding: var(--space-3) var(--space-4);
}

.battle-top-status strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-scale-lg);
}

.battle-top-status span {
  font-size: var(--font-scale-sm);
  color: var(--muted);
}

.battle-focus-card,
.battle-focus-card.unit-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
  text-align: center;
}

.battle-focus-portrait,
.battle-focus-copy {
  width: 100%;
}

.battle-focus-portrait {
  display: grid;
  justify-items: center;
}

.battle-focus-copy h3,
.battle-focus-copy p,
.battle-focus-tags {
  justify-self: center;
}

.battle-focus-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.battle-focus-meters,
.battle-focus-grid,
.battle-focus-line,
.battle-focus-combo-assist {
  width: 100%;
}

.battle-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.domain-battle-cell,
.battle-cell {
  transition:
    border-color var(--time-fast) ease,
    box-shadow var(--time-fast) ease,
    transform var(--time-fast) ease;
}

.unit-card {
  position: relative;
}

.status-dot,
.unit-status-dot {
  transition:
    transform var(--time-fast) ease,
    border-color var(--time-fast) ease,
    background var(--time-fast) ease;
}

.command-button,
.battle-command-button,
.battle-action {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--time-fast) ease,
    border-color var(--time-fast) ease,
    box-shadow var(--time-fast) ease,
    opacity var(--time-fast) ease;
}

.command-button::after,
.battle-command-button::after,
.battle-action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 255, 242, 0.12), transparent 52%);
  opacity: 0;
  transition: opacity var(--time-fast) ease;
  pointer-events: none;
}

.command-button:hover::after,
.battle-command-button:hover::after,
.battle-action:hover::after {
  opacity: 1;
}

.battle-log-item,
.event-row {
  border-radius: var(--radius-md);
}

.preset-tile,
.dojo-ready-unit-card,
.hangar-choice-card,
.dojo-public-card {
  transition:
    transform var(--time-fast) ease,
    border-color var(--time-fast) ease,
    box-shadow var(--time-fast) ease;
}

.preset-tile:hover,
.hangar-choice-card:hover,
.dojo-public-card:hover {
  transform: translateY(-1px);
}

.formation-slot,
.hangar-formation-cell,
.hangar-slot-card {
  transition:
    border-color var(--time-fast) ease,
    box-shadow var(--time-fast) ease,
    background var(--time-fast) ease;
}

.is-active {
  border-color: var(--line-strong) !important;
  box-shadow: 0 0 0 1px rgba(184, 255, 242, 0.12), 0 0 18px rgba(132, 225, 213, 0.14);
}

.is-targetable {
  box-shadow: 0 0 0 1px rgba(184, 255, 242, 0.14), inset 0 0 0 1px rgba(184, 255, 242, 0.1);
}

.is-selected {
  border-color: rgba(255, 188, 87, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(255, 188, 87, 0.18), 0 0 22px rgba(255, 188, 87, 0.16);
}

.is-disabled {
  opacity: 0.55;
}

.is-ally {
  --state-tint: rgba(132, 225, 213, 0.18);
}

.is-enemy {
  --state-tint: rgba(240, 141, 109, 0.18);
}

.is-warning {
  --state-tint: rgba(255, 188, 87, 0.18);
}

.is-ally,
.is-enemy,
.is-warning {
  background-image:
    linear-gradient(145deg, var(--state-tint, transparent), transparent 46%);
}

.battle-zone-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 0.8rem;
}

.battle-zone-strip--board {
  position: relative;
  z-index: 2;
  gap: 0.56rem;
  margin: 0;
  padding: 0.12rem 2.6rem 0.68rem;
}

.battle-zone-card {
  min-height: 4.25rem;
  padding: 0.58rem 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 244, 229, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(12, 19, 22, 0.94);
  display: grid;
  gap: 0.24rem;
  align-content: start;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 24px rgba(5, 8, 11, 0.24);
}

.battle-zone-card-head {
  display: grid;
  gap: 0.14rem;
}

.battle-zone-frontline {
  border-color: rgba(255, 165, 114, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 202, 150, 0.06), 0 0 0 1px rgba(255, 165, 114, 0.08), 0 16px 28px rgba(63, 27, 18, 0.24);
}

.battle-zone-relay {
  border-color: rgba(121, 219, 247, 0.22);
  box-shadow: inset 0 1px 0 rgba(199, 246, 255, 0.05), 0 0 0 1px rgba(121, 219, 247, 0.08), 0 16px 28px rgba(14, 40, 48, 0.24);
}

.battle-zone-backline {
  border-color: rgba(160, 255, 190, 0.22);
  box-shadow: inset 0 1px 0 rgba(222, 255, 228, 0.05), 0 0 0 1px rgba(160, 255, 190, 0.08), 0 16px 28px rgba(18, 44, 28, 0.24);
}

.battle-zone-slot {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 230, 226, 0.58);
}

.battle-zone-card strong {
  font-size: 0.92rem;
  line-height: 1.1;
  color: var(--text-strong);
}

.battle-zone-card p {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.36;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Final battle UX pass: range, orbit, combo guide, floaters, playback */

.hangar-combo-guide {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.78rem;
}

.hangar-combo-guide-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hangar-combo-guide-chip {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 231, 222, 0.18);
  background: rgba(10, 18, 22, 0.8);
  color: rgba(220, 230, 226, 0.86);
  font-size: 0.72rem;
  line-height: 1.4;
}

.hangar-combo-guide-chip.empty {
  border-style: dashed;
  color: rgba(220, 230, 226, 0.62);
}

.battle-deck-stage .battle-cell-shell.in-range .battle-cell {
  box-shadow:
    inset 0 0 0 1px rgba(132, 231, 222, 0.12),
    0 0 0 2px rgba(132, 231, 222, 0.08);
}

.battle-deck-stage .battle-cell-shell.enemy-in-range .battle-cell {
  border-color: rgba(255, 126, 111, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(255, 126, 111, 0.18),
    0 0 0 2px rgba(255, 126, 111, 0.12),
    0 0 18px rgba(255, 126, 111, 0.1);
}

.battle-deck-stage .battle-cell-shell.ally-in-range .battle-cell {
  border-color: rgba(117, 228, 214, 0.42);
}

.battle-deck-stage .battle-cell-shell.targetable.enemy-in-range .battle-cell {
  border-color: rgba(255, 165, 130, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 228, 173, 0.24),
    0 0 0 2px rgba(255, 160, 118, 0.26),
    0 0 26px rgba(255, 160, 118, 0.22);
}

.battle-cell-shell.cue-source .battle-cell {
  border-color: rgba(132, 231, 222, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(132, 231, 222, 0.2),
    0 0 0 2px rgba(132, 231, 222, 0.2),
    0 0 22px rgba(132, 231, 222, 0.2);
}

.battle-cell-shell.cue-target .battle-cell {
  border-color: rgba(255, 142, 103, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 142, 103, 0.18),
    0 0 0 2px rgba(255, 142, 103, 0.22),
    0 0 24px rgba(255, 142, 103, 0.24);
  animation: battle-target-pulse 0.95s ease-in-out infinite alternate;
}

@keyframes battle-target-pulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(255, 142, 103, 0.18),
      0 0 0 2px rgba(255, 142, 103, 0.18),
      0 0 18px rgba(255, 142, 103, 0.18);
  }
  to {
    box-shadow:
      inset 0 0 0 1px rgba(255, 188, 87, 0.26),
      0 0 0 2px rgba(255, 142, 103, 0.26),
      0 0 30px rgba(255, 142, 103, 0.3);
  }
}

.battle-action-beam-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}

.battle-action-beam {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(132, 231, 222, 0.18), rgba(132, 231, 222, 0.88), rgba(255, 255, 255, 0));
  box-shadow: 0 0 18px rgba(132, 231, 222, 0.24);
  opacity: 0;
}

.battle-action-beam.damage {
  background: linear-gradient(90deg, rgba(255, 142, 103, 0.15), rgba(255, 142, 103, 0.88), rgba(255, 255, 255, 0));
  box-shadow: 0 0 18px rgba(255, 142, 103, 0.26);
}

.battle-action-beam.support {
  background: linear-gradient(90deg, rgba(120, 211, 255, 0.15), rgba(120, 211, 255, 0.88), rgba(255, 255, 255, 0));
  box-shadow: 0 0 18px rgba(120, 211, 255, 0.24);
}

.battle-action-beam.warning {
  background: linear-gradient(90deg, rgba(255, 200, 112, 0.15), rgba(255, 200, 112, 0.88), rgba(255, 255, 255, 0));
  box-shadow: 0 0 16px rgba(255, 200, 112, 0.2);
}

.battle-action-beam span {
  position: absolute;
  right: 0;
  top: -1.45rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 20, 0.92);
  color: #f2eee7;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.battle-orbit-commands {
  --orbit-left-offset: -126px;
  --orbit-left-mid-offset: -142px;
  --orbit-right-offset: -152px;
  --orbit-right-deep-offset: -168px;
  --orbit-cap-offset: -12px;
  --orbit-vertical-step: 58px;
  --orbit-right-top-top: var(--orbit-cap-offset);
  --orbit-right-upper-top: var(--orbit-vertical-step);
  --orbit-right-lower-bottom: var(--orbit-vertical-step);
  --orbit-right-bottom-bottom: var(--orbit-cap-offset);
  z-index: 10;
}

.battle-orbit-commands.orbit-relay {
  --orbit-right-offset: -124px;
  --orbit-right-deep-offset: -138px;
  --orbit-right-top-top: -28px;
  --orbit-right-upper-top: 36px;
  --orbit-right-lower-bottom: 36px;
  --orbit-right-bottom-bottom: -28px;
}

.battle-orbit-commands.orbit-centerline {
  --orbit-right-offset: -92px;
  --orbit-right-deep-offset: -106px;
  --orbit-right-top-top: -44px;
  --orbit-right-upper-top: 20px;
  --orbit-right-lower-bottom: 20px;
  --orbit-right-bottom-bottom: -44px;
}

.battle-orbit-button {
  width: 122px;
  min-height: 64px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.58rem;
  padding: 0.52rem 0.62rem;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(116, 214, 244, 0.2);
  background:
    linear-gradient(180deg, rgba(61, 92, 113, 0.94), rgba(22, 38, 49, 0.98)),
    rgba(10, 18, 24, 0.96);
  box-shadow:
    0 16px 34px rgba(4, 8, 12, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.battle-orbit-button.orbit-utility {
  width: 112px;
  min-height: 60px;
  background:
    linear-gradient(180deg, rgba(54, 84, 104, 0.92), rgba(17, 31, 42, 0.97)),
    rgba(10, 18, 24, 0.96);
}

.battle-orbit-button.orbit-offense,
.battle-orbit-button.orbit-burst {
  width: 136px;
}

.battle-orbit-button.orbit-burst {
  border-color: rgba(255, 197, 108, 0.28);
  box-shadow:
    0 18px 36px rgba(4, 8, 12, 0.34),
    inset 0 1px 0 rgba(255, 232, 192, 0.08),
    0 0 0 1px rgba(255, 197, 108, 0.06);
}

.battle-orbit-button.left-top,
.battle-orbit-button.left-mid,
.battle-orbit-button.left-bottom {
  text-align: left;
}

.battle-orbit-button.left-top {
  left: var(--orbit-left-offset);
  top: var(--orbit-cap-offset);
}

.battle-orbit-button.left-mid {
  left: var(--orbit-left-mid-offset);
  top: calc(50% - 30px);
}

.battle-orbit-button.left-bottom {
  left: var(--orbit-left-offset);
  bottom: var(--orbit-cap-offset);
}

.battle-orbit-button.right-top {
  right: var(--orbit-right-offset);
  top: var(--orbit-right-top-top);
}

.battle-orbit-button.right-upper {
  right: var(--orbit-right-deep-offset);
  top: var(--orbit-right-upper-top);
}

.battle-orbit-button.right-lower {
  right: var(--orbit-right-deep-offset);
  bottom: var(--orbit-right-lower-bottom);
}

.battle-orbit-button.right-bottom {
  right: var(--orbit-right-offset);
  bottom: var(--orbit-right-bottom-bottom);
}

.battle-orbit-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.battle-orbit-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.battle-orbit-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #f1efe9;
  font-family: "Oxanium", "Noto Sans SC", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.battle-orbit-glyph.od {
  color: #ffcf84;
}

.battle-orbit-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.battle-orbit-copy strong,
.battle-orbit-copy span,
.battle-orbit-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-orbit-copy strong {
  font-size: 0.84rem;
  line-height: 1.08;
  color: #f4efe6;
}

.battle-orbit-copy span {
  display: -webkit-box;
  color: rgba(240, 238, 231, 0.78);
  font-size: 0.64rem;
  line-height: 1.22;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.battle-orbit-copy small {
  white-space: nowrap;
  color: rgba(132, 231, 222, 0.82);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.battle-orbit-button[data-enabled="true"] {
  border-color: rgba(132, 231, 222, 0.4);
  box-shadow:
    0 18px 38px rgba(4, 8, 12, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(132, 231, 222, 0.1);
}

.battle-orbit-button[data-enabled="true"]:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(255, 215, 148, 0.46);
  box-shadow:
    0 22px 44px rgba(4, 8, 12, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 215, 148, 0.12);
}

.battle-orbit-button.disabled {
  opacity: 1;
  border-color: rgba(90, 124, 142, 0.18);
  background:
    linear-gradient(180deg, rgba(34, 51, 63, 0.96), rgba(15, 25, 32, 0.98)),
    rgba(10, 18, 24, 0.98);
  box-shadow:
    0 14px 28px rgba(4, 8, 12, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.battle-orbit-button.disabled .battle-orbit-icon,
.battle-orbit-button.disabled .battle-orbit-copy {
  opacity: 0.4;
}

.battle-orbit-button.disabled .battle-orbit-icon img {
  filter: grayscale(0.25) saturate(0.72);
}

.battle-orbit-commands.edge-right .battle-orbit-button.right-top,
.battle-orbit-commands.edge-right .battle-orbit-button.right-upper,
.battle-orbit-commands.edge-right .battle-orbit-button.right-lower,
.battle-orbit-commands.edge-right .battle-orbit-button.right-bottom {
  right: -8px;
}

.battle-orbit-commands.edge-left .battle-orbit-button.left-top,
.battle-orbit-commands.edge-left .battle-orbit-button.left-mid,
.battle-orbit-commands.edge-left .battle-orbit-button.left-bottom {
  left: -8px;
}

.battle-orbit-commands.edge-top .battle-orbit-button.left-top,
.battle-orbit-commands.edge-top .battle-orbit-button.right-top {
  top: 10px;
}

.battle-orbit-commands.edge-top .battle-orbit-button.right-upper {
  top: 82px;
}

.battle-orbit-commands.edge-bottom .battle-orbit-button.left-bottom,
.battle-orbit-commands.edge-bottom .battle-orbit-button.right-bottom {
  bottom: 10px;
}

.battle-orbit-commands.edge-bottom .battle-orbit-button.right-lower {
  bottom: 82px;
}

.battle-orbit-commands.edge-top {
  --orbit-right-top-top: 10px;
  --orbit-right-upper-top: 82px;
}

.battle-orbit-commands.edge-bottom {
  --orbit-right-lower-bottom: 82px;
  --orbit-right-bottom-bottom: 10px;
}

.battle-orbit-commands.orbit-relay.edge-top {
  --orbit-right-top-top: -12px;
  --orbit-right-upper-top: 44px;
}

.battle-orbit-commands.orbit-relay.edge-bottom {
  --orbit-right-lower-bottom: 44px;
  --orbit-right-bottom-bottom: -12px;
}

.battle-orbit-commands.orbit-centerline.edge-top {
  --orbit-right-top-top: -24px;
  --orbit-right-upper-top: 28px;
}

.battle-orbit-commands.orbit-centerline.edge-bottom {
  --orbit-right-lower-bottom: 28px;
  --orbit-right-bottom-bottom: -24px;
}

.unit-chip-status-stack {
  display: grid;
  gap: 0.34rem;
}

.unit-chip-metrics,
.unit-chip-submetrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.unit-chip-submetrics span,
.unit-chip-metrics span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.24rem 0.36rem;
  border-radius: 999px;
  background: rgba(16, 24, 30, 0.78);
  color: rgba(232, 236, 240, 0.84);
}

.battle-focus-combo-assist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.battle-combo-assist-chip,
.battle-combo-assist-empty {
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 199, 114, 0.24);
  background: rgba(32, 22, 10, 0.42);
  color: #ffd38a;
  font-size: 0.72rem;
}

.battle-combo-assist-empty {
  border-style: dashed;
  color: rgba(255, 218, 156, 0.72);
}

.battle-floater {
  padding: 0.28rem 0.62rem;
  border-radius: 12px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  animation-duration: var(--battle-float-duration, 2080ms);
}

.battle-floater.damage::before,
.battle-floater.shield-loss::before,
.battle-floater.heal::before,
.battle-floater.shield-gain::before,
.battle-floater.sp-loss::before,
.battle-floater.sp-gain::before,
.battle-floater.od-loss::before,
.battle-floater.od-gain::before {
  margin-right: 0.32rem;
  font-weight: 700;
}

.battle-floater.damage::before { content: "伤"; }
.battle-floater.shield-loss::before { content: "盾"; }
.battle-floater.heal::before { content: "疗"; }
.battle-floater.shield-gain::before { content: "盾"; }
.battle-floater.sp-loss::before,
.battle-floater.sp-gain::before { content: "炁"; }
.battle-floater.od-loss::before,
.battle-floater.od-gain::before { content: "爆"; }

@keyframes battle-floater-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 1rem) scale(0.88);
  }

  14% {
    opacity: 1;
    transform: translate(-50%, 0.4rem) scale(1);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -1.45rem) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -2.35rem) scale(0.98);
  }
}

.event-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.event-row.damage .event-copy {
  color: #aef0e0;
  font-weight: 600;
}

.event-row.support .event-copy {
  color: #9ed8ff;
}

.event-row.combo .event-copy {
  color: #ffcf84;
  font-weight: 600;
}

.event-row.warning .event-copy {
  color: #ffb29b;
}

.event-row.finish .event-copy {
  color: #fff2c1;
  font-weight: 700;
}

.event-stamp {
  color: rgba(122, 145, 151, 0.86);
  font-family: "Oxanium", "Noto Sans SC", sans-serif;
}

.battle-speed-toggle {
  display: inline-flex;
  gap: 0.34rem;
  margin-right: 0.34rem;
}

.battle-speed-chip {
  min-width: 2.55rem;
  padding: 0.42rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 231, 222, 0.18);
  background: rgba(12, 20, 24, 0.72);
  color: rgba(220, 230, 226, 0.88);
}

.battle-speed-chip.active {
  border-color: rgba(132, 231, 222, 0.44);
  background: linear-gradient(180deg, rgba(49, 89, 110, 0.94), rgba(19, 35, 46, 0.96));
  color: #f4f9f7;
  box-shadow: 0 0 0 1px rgba(132, 231, 222, 0.1) inset;
}

/* Final left rail alignment */

.battle-left-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: stretch;
  align-content: start;
  width: 100%;
  max-width: 100%;
  padding: 0.72rem;
}

.battle-left-portrait {
  justify-self: center;
  width: 58%;
  max-width: 152px;
  margin-inline: auto;
}

.battle-left-copy {
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
}

.battle-left-tags {
  width: 100%;
  justify-content: center;
}

.battle-left-meters,
.battle-left-grid,
.battle-left-line {
  width: 100%;
  justify-self: stretch;
}

/* Independent current-actor panel */

.battle-focus-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: stretch;
  align-content: start;
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0.72rem;
  gap: 0.56rem;
  overflow: auto;
}

.battle-focus-portrait {
  position: relative;
  justify-self: center;
  width: 58%;
  max-width: 152px;
  min-width: 112px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}

.battle-focus-portrait .mech-art.card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.battle-focus-avatar {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
}

.battle-focus-copy {
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.18rem;
}

.battle-focus-copy h3 {
  margin: 0.08rem 0 0.12rem;
  font-size: 1.02rem;
  line-height: 1.08;
}

.battle-focus-copy p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.38;
  color: rgba(244, 235, 218, 0.72);
}

.battle-focus-tags {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.22rem;
  margin-top: 0.3rem;
}

.battle-focus-tags span,
.battle-focus-stat,
.battle-focus-line {
  border-radius: 14px;
  border: 1px solid rgba(232, 193, 117, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.battle-focus-tags span {
  padding: 0.28rem 0.42rem;
  font-size: 0.64rem;
}

.battle-focus-meters,
.battle-focus-grid,
.battle-focus-line {
  width: 100%;
  justify-self: stretch;
}

.battle-focus-meters {
  display: grid;
  gap: 0.4rem;
}

.battle-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
}

.battle-focus-stat {
  padding: 0.48rem 0.54rem;
  display: grid;
  gap: 0.18rem;
}

.battle-focus-stat span,
.battle-focus-line span {
  font-size: 0.64rem;
  color: rgba(240, 231, 210, 0.7);
}

.battle-focus-stat strong {
  font-size: 0.92rem;
  line-height: 1.3;
  color: #f6f1e6;
}

.battle-focus-line {
  padding: 0.5rem 0.56rem;
  display: grid;
  gap: 0.18rem;
}

.battle-focus-line strong {
  font-size: 0.78rem;
  line-height: 1.34;
  color: #f6f1e6;
}

.battle-focus-line.combo strong {
  color: #ffd07f;
}

/* Final left rail centering */

.battle-left-card {
  justify-items: center;
}

.battle-left-portrait {
  justify-self: center;
  margin-inline: auto;
}

.battle-left-copy {
  width: 100%;
  justify-items: center;
  text-align: center;
}

.battle-left-tags {
  width: 100%;
  justify-content: center;
}

.battle-left-meters,
.battle-left-grid,
.battle-left-line {
  width: 100%;
}

/* Final battle viewport fit */

.battle-overlay {
  padding: 0.72rem;
  overflow: hidden;
}

.battle-stage-shell.battle-command-deck {
  height: calc(100dvh - 1.44rem);
  min-height: calc(100dvh - 1.44rem);
  max-height: calc(100dvh - 1.44rem);
  grid-template-columns: 286px minmax(0, 1fr) 304px;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar topbar"
    "left stage right";
  gap: 0.78rem;
  padding: 0.78rem;
  align-items: stretch;
  overflow: hidden;
}

.battle-stage-topbar.battle-deck-topbar {
  min-height: 0;
  padding: 0.56rem 0.8rem;
  column-gap: 0.8rem;
}

.battle-stage-room h2 {
  margin: 0.04rem 0 0.08rem;
  font-size: clamp(1.14rem, 1.7vw, 1.62rem);
}

.battle-stage-room p {
  font-size: 0.78rem;
}

.battle-round-medal {
  min-width: 124px;
  padding: 0.3rem 0.72rem;
}

.battle-round-medal span {
  font-size: 0.62rem;
}

.battle-round-medal strong {
  font-size: 1.4rem;
}

.battle-stage-actions {
  gap: 0.48rem;
  font-size: 0.8rem;
}

.battle-deck-left,
.battle-deck-stage,
.battle-deck-right {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.battle-deck-left,
.battle-deck-right {
  padding-right: 0;
}

.battle-left-card {
  height: 100%;
  max-height: 100%;
  gap: 0.56rem;
  padding: 0.72rem;
}

.battle-left-portrait {
  width: 46%;
  max-width: 128px;
}

.battle-left-copy h3 {
  font-size: 1.02rem;
}

.battle-left-copy p {
  font-size: 0.75rem;
}

.battle-left-tags {
  margin-top: 0.3rem;
  gap: 0.22rem;
}

.battle-left-tags span {
  padding: 0.28rem 0.42rem;
  font-size: 0.64rem;
}

.battle-left-meters {
  gap: 0.4rem;
}

.battle-left-grid {
  gap: 0.36rem;
}

.battle-left-stat {
  padding: 0.48rem 0.54rem;
}

.battle-left-stat span {
  font-size: 0.64rem;
}

.battle-left-stat strong {
  font-size: 0.92rem;
}

.battle-left-line {
  padding: 0.5rem 0.56rem;
}

.battle-left-line span {
  font-size: 0.62rem;
}

.battle-left-line strong {
  font-size: 0.78rem;
  line-height: 1.34;
}

.battle-deck-stage {
  padding: 0.56rem;
  gap: 0.42rem;
}

.battle-deck-stage .battle-arena-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.battle-deck-stage .battle-stage-sideheads {
  padding: 0 0.12rem 0.24rem;
}

.battle-side-head strong {
  font-size: 0.98rem;
}

.battle-side-head span {
  font-size: 0.72rem;
}

.battle-deck-stage .battle-arena-board {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.56rem;
  height: 100%;
  min-height: 0;
  padding: 0.7rem 2.6rem 0.86rem;
  align-content: stretch;
  overflow: hidden;
}

.battle-deck-stage .battle-cell-shell,
.battle-deck-stage .battle-cell {
  min-height: 0;
  height: 100%;
}

.battle-deck-stage .battle-cell {
  padding: 0.46rem;
  border-radius: 22px;
}

.battle-deck-stage .unit-chip {
  gap: 0.34rem;
}

.battle-deck-stage .unit-chip-top {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.42rem;
}

.battle-deck-stage .unit-chip-visual .mech-art.token {
  border-radius: 14px;
}

.battle-deck-stage .unit-chip-copy strong {
  font-size: 0.82rem;
}

.battle-deck-stage .unit-chip-copy span {
  font-size: 0.64rem;
}

.battle-deck-stage .unit-chip-bars-row {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.32rem;
}

.battle-deck-stage .unit-chip-bars {
  gap: 0.16rem;
}

.battle-deck-stage .unit-chip-metrics {
  gap: 0.14rem 0.26rem;
}

.battle-deck-stage .unit-chip-metrics span {
  font-size: 0.56rem;
  padding: 0.12rem 0.26rem;
}

.battle-deck-stage .unit-status-row {
  gap: 0.18rem;
}

.battle-deck-stage .battle-combo-preview {
  top: 1.62rem;
}

.battle-deck-right {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.56rem;
}

.battle-side-summary-row.battle-side-summary-stack {
  min-height: 0;
}

.battle-side-summary-card.compact {
  padding: 0.72rem;
  gap: 0.46rem;
}

.battle-side-summary-card.compact .battle-side-summary-lineup {
  max-height: none;
  min-height: 0;
}

.battle-log-panel {
  min-height: 0;
  height: 100%;
  padding: 0.72rem;
  gap: 0.48rem;
}

.battle-log-panel .event-log {
  min-height: 0;
  height: 100%;
  overflow: auto;
  gap: 0.34rem;
}

.event-row {
  padding: 0.44rem 0.54rem;
}

.event-stamp {
  font-size: 0.68rem;
}

.event-copy {
  font-size: 0.8rem;
  line-height: 1.34;
}

/* Final enemy cell emphasis */

.battle-deck-stage .battle-cell-shell.enemy-occupied {
  z-index: 2;
}

.battle-deck-stage .battle-cell-shell.enemy-occupied .battle-cell {
  border-color: rgba(255, 116, 116, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 116, 116, 0.12),
    0 0 0 1px rgba(255, 116, 116, 0.16),
    0 0 18px rgba(255, 74, 74, 0.14);
  animation: battle-enemy-pulse 1.8s ease-in-out infinite;
}

.battle-deck-stage .battle-cell-shell.enemy-occupied .battle-cell:hover {
  border-color: rgba(255, 136, 136, 0.82);
}

@keyframes battle-enemy-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 116, 116, 0.1),
      0 0 0 1px rgba(255, 116, 116, 0.16),
      0 0 12px rgba(255, 64, 64, 0.12);
  }

  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 146, 146, 0.16),
      0 0 0 2px rgba(255, 94, 94, 0.28),
      0 0 24px rgba(255, 68, 68, 0.28);
  }
}

/* Final topbar status placement */

.battle-stage-topbar.battle-deck-topbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(420px, 0.96fr) minmax(260px, 1fr);
  align-items: center;
  column-gap: 1rem;
}

.battle-top-status {
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 0.18rem;
  width: min(100%, 840px);
  min-height: 3rem;
  padding: 0.42rem 0.68rem;
  border-radius: 18px;
  border: 1px solid rgba(122, 220, 214, 0.18);
  background:
    linear-gradient(180deg, rgba(122, 220, 214, 0.08), transparent 76%),
    rgba(10, 18, 22, 0.72);
  box-shadow: inset 0 0 0 1px rgba(122, 220, 214, 0.04);
}

.battle-stage-topbar.battle-deck-topbar .battle-stage-room {
  justify-self: start;
}

.battle-topbar-right {
  justify-self: end;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.72rem;
}

.battle-stage-topbar.battle-deck-topbar .battle-stage-actions {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.62rem;
}

.battle-top-status strong {
  font-size: 0.92rem;
  line-height: 1.08;
  color: #eff8f5;
}

.battle-top-status span {
  font-size: 0.74rem;
  line-height: 1.2;
  color: rgba(226, 236, 232, 0.82);
}

.battle-top-status.player {
  border-color: rgba(122, 220, 214, 0.26);
}

.battle-top-status.bot {
  border-color: rgba(255, 187, 128, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 187, 128, 0.08), transparent 76%),
    rgba(10, 18, 22, 0.72);
}

.battle-top-status.neutral {
  border-color: rgba(255, 214, 148, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 214, 148, 0.08), transparent 76%),
    rgba(10, 18, 22, 0.72);
}

@media (max-width: 1180px) {
  .battle-stage-topbar.battle-deck-topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "room round actions"
      "status status status";
    row-gap: 0.72rem;
  }

  .battle-stage-topbar.battle-deck-topbar .battle-stage-room {
    grid-area: room;
  }

  .battle-stage-topbar.battle-deck-topbar .battle-top-status {
    grid-area: status;
  }

  .battle-stage-topbar.battle-deck-topbar .battle-round-medal {
    grid-area: round;
  }

  .battle-stage-topbar.battle-deck-topbar .battle-stage-actions {
    grid-area: actions;
  }
}

/* Battle Reborn */

.battle-overlay--reborn {
  position: relative;
  padding: 0.9rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(116, 193, 181, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(214, 174, 94, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(8, 14, 18, 0.98), rgba(5, 9, 12, 0.98));
}

.battle-reborn-shell {
  height: calc(100dvh - 1.8rem);
  min-height: calc(100dvh - 1.8rem);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0.62rem;
  padding: 0.74rem;
  border-radius: 28px;
  border: 1px solid rgba(122, 220, 214, 0.14);
  background:
    linear-gradient(180deg, rgba(122, 220, 214, 0.04), transparent 22%),
    linear-gradient(135deg, rgba(214, 174, 94, 0.06), transparent 34%),
    rgba(8, 14, 18, 0.84);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 24px 64px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.battle-reborn-topbar,
.battle-reborn-center,
.battle-side-rail,
.battle-turn-order,
.battle-inspect-card,
.battle-action-dock,
.battle-log-drawer {
  border-radius: 24px;
  border: 1px solid rgba(130, 216, 205, 0.12);
  background:
    linear-gradient(180deg, rgba(122, 220, 214, 0.045), transparent 72%),
    rgba(9, 16, 20, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.battle-reborn-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.15fr) auto;
  gap: 0.62rem;
  align-items: center;
  padding: 0.5rem 0.68rem;
}

.battle-reborn-room h2 {
  margin: 0.04rem 0;
  font-size: clamp(1.02rem, 1.45vw, 1.42rem);
}

.battle-reborn-room-label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.battle-objective-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.18rem;
  height: 1.18rem;
  border-radius: 999px;
  border: 1px solid rgba(122, 220, 214, 0.34);
  background: rgba(122, 220, 214, 0.12);
  color: rgba(236, 244, 241, 0.94);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  line-height: 1;
  cursor: help;
  user-select: none;
  box-shadow: 0 0 0 1px rgba(122, 220, 214, 0.08);
}

.battle-objective-trigger:hover,
.battle-objective-trigger:focus-visible {
  border-color: rgba(122, 220, 214, 0.52);
  background: rgba(122, 220, 214, 0.18);
  outline: none;
}

.battle-reborn-room p {
  margin: 0;
  color: rgba(231, 238, 232, 0.82);
  font-size: 0.82rem;
  line-height: 1.4;
}

.battle-reborn-room-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.battle-reborn-room-code code {
  padding: 0.1rem 0.36rem;
  border-radius: 999px;
  background: rgba(122, 220, 214, 0.12);
  color: rgba(236, 244, 241, 0.96);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.battle-reborn-top-actions {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.42rem;
  align-items: center;
}

.battle-log-anchor {
  position: relative;
  display: inline-grid;
}

.battle-turn-order-head,
.battle-side-rail-head,
.battle-log-drawer-head,
.battle-action-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.battle-turn-order-head strong,
.battle-side-rail-head strong,
.battle-action-dock-head strong {
  font-family: "Staatliches", sans-serif;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  font-weight: 400;
}

.battle-turn-order--arena {
  position: relative;
  z-index: 3;
  padding: 0.52rem 0.94rem 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.battle-turn-order-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.66rem;
  min-height: 45px;
  padding: 0.27rem 0.63rem;
  overflow: visible;
  border-radius: 999px;
  border: 1px solid rgba(230, 236, 242, 0.14);
  background:
    linear-gradient(180deg, rgba(18, 30, 38, 0.86), rgba(13, 21, 29, 0.96)),
    linear-gradient(90deg, rgba(112, 172, 244, 0.08), transparent 26%, transparent 74%, rgba(255, 120, 108, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(3, 7, 10, 0.18);
}

.battle-turn-order-shell::before,
.battle-turn-order-shell::after {
  content: none;
}

.battle-turn-order-label {
  padding: 0 0.14rem 0 0.12rem;
  font-family: "Staatliches", sans-serif;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
  color: rgba(227, 235, 240, 0.72);
  white-space: nowrap;
}

.battle-turn-order-track {
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  overflow: visible;
}

.battle-turn-order-chip {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 16, 20, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.battle-turn-order-chip .pilot-avatar.xs {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border-width: 0;
  box-shadow: none;
}

.battle-turn-order-chip.ally {
  border: 1px solid rgba(108, 184, 255, 0.94);
}

.battle-turn-order-chip.enemy {
  border: 1px solid rgba(239, 110, 98, 0.94);
}

.battle-turn-order-chip.current {
  transform: translateY(-1px) scale(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 12px rgba(108, 184, 255, 0.14);
}

.battle-turn-order-chip.enemy.current {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 12px rgba(239, 110, 98, 0.14);
}

.battle-objective-tooltip {
  display: grid;
  gap: 0.42rem;
  max-width: 280px;
}

.battle-objective-tooltip p {
  margin: 0;
  color: rgba(228, 236, 232, 0.86);
  font-size: 0.8rem;
  line-height: 1.48;
}

.battle-reborn-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 0.9rem;
  align-items: stretch;
}

.battle-side-rail {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.75rem;
}

.battle-side-rail-list {
  min-height: 0;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  overflow: auto;
  padding-right: 0.08rem;
}

.battle-roster-card {
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 0.08rem;
  min-height: 132px;
  padding: 0.38rem 0.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  align-self: start;
  height: auto;
}

.battle-roster-card.active {
  border-color: rgba(122, 220, 214, 0.38);
  box-shadow: 0 0 0 1px rgba(122, 220, 214, 0.12);
}

.battle-roster-card.enemy.active {
  border-color: rgba(255, 126, 126, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 126, 126, 0.12);
}

.battle-roster-card.inspected {
  transform: translateY(-1px);
}

.battle-roster-card.down {
  opacity: 0.56;
}

.battle-roster-card-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.3rem;
  align-items: center;
  min-height: 0;
}

.battle-roster-card-head .pilot-avatar.sm {
  width: 48px;
  height: 48px;
}

.battle-roster-card-copy {
  display: grid;
  min-height: 0;
  align-content: center;
  gap: 0.04rem;
}

.battle-roster-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.12rem;
  min-width: 0;
  padding-block: 0.08rem;
}

.battle-roster-card-copy strong {
  font-size: 1rem;
  line-height: 1;
  min-width: 0;
}

.battle-roster-card-copy span,
.battle-roster-card-copy small {
  color: rgba(232, 239, 234, 0.76);
  font-size: 0.82rem;
  line-height: 1;
  padding-block: 0.08rem;
}

.battle-roster-meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.14rem;
  min-height: 0;
  align-content: center;
  line-height: 1;
}

.battle-roster-meter-label {
  font-size: 0.72rem;
  line-height: 1;
  color: rgba(228, 236, 232, 0.82);
  white-space: nowrap;
}

.battle-roster-meter-value {
  font-size: 0.72rem;
  line-height: 1;
  color: rgba(236, 242, 239, 0.9);
  white-space: nowrap;
}

.battle-roster-meter-bar {
  min-width: 0;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.battle-roster-meter-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.battle-roster-meter.hp .battle-roster-meter-bar i {
  background: linear-gradient(90deg, #86d96d, #54b95b);
}

.battle-roster-meter.sp .battle-roster-meter-bar i {
  background: linear-gradient(90deg, #69d9dc, #4ab8d3);
}

.battle-roster-meter.od .battle-roster-meter-bar i {
  background: linear-gradient(90deg, #ffd35f, #fff0a3);
}

.battle-roster-statusline {
  display: flex;
  align-items: center;
  gap: 0.06rem;
  min-height: 14px;
  flex-shrink: 0;
}

.battle-roster-status-empty {
  color: rgba(228, 236, 232, 0.48);
  font-size: 0.66rem;
}

.battle-roster-status-dot {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 999px;
  background: rgba(9, 16, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.battle-roster-status-dot.buff {
  border-color: rgba(98, 170, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(98, 170, 255, 0.14);
}

.battle-roster-status-dot.debuff {
  border-color: rgba(255, 112, 112, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 112, 112, 0.14);
}

.battle-roster-status-dot img {
  width: 10px;
  height: 10px;
  display: block;
  object-fit: contain;
}

.battle-roster-status-dot-fallback {
  font-size: 0.52rem;
  line-height: 1;
  color: rgba(242, 247, 245, 0.94);
}

.battle-reborn-center {
  min-height: 0;
  position: relative;
  padding: 0.42rem;
  overflow: visible;
  transform-style: preserve-3d;
  background:
    linear-gradient(180deg, rgba(22, 33, 42, 0.88), rgba(10, 17, 24, 0.96));
}

.battle-overlay--reborn .battle-arena-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.18rem;
  padding: 0.14rem 0.24rem 0.18rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    rgba(7, 13, 17, 0.22);
  overflow: hidden;
}

.battle-overlay--reborn .battle-arena-3d-stage {
  min-height: 0;
  height: 100%;
  perspective: 1440px;
  perspective-origin: 50% 18%;
  transform-style: preserve-3d;
}

.battle-overlay--reborn .battle-zone-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.28rem;
  padding: 0 1.4rem;
}

.battle-overlay--reborn .battle-zone-card {
  min-height: 0;
  padding: 0.2rem 0.42rem 0.22rem;
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 29, 0.82);
  text-align: center;
}

.battle-overlay--reborn .battle-zone-card strong {
  display: block;
  font-size: 0.74rem;
  line-height: 1.04;
  color: rgba(239, 245, 247, 0.9);
}

.battle-overlay--reborn .battle-zone-backline {
  background:
    linear-gradient(180deg, rgba(124, 201, 241, 0.18), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 29, 0.82);
}

.battle-overlay--reborn .battle-zone-relay {
  background:
    linear-gradient(180deg, rgba(246, 227, 126, 0.2), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 29, 0.82);
}

.battle-overlay--reborn .battle-zone-frontline {
  background:
    linear-gradient(180deg, rgba(241, 132, 144, 0.22), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 29, 0.82);
}

.battle-overlay--reborn .battle-arena-board {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(70.4px, 1fr));
  grid-template-rows: repeat(3, minmax(115.6px, 1fr));
  column-gap: 0.18rem;
  row-gap: 0.41rem;
  padding: 0.58rem 0.78rem 0.16rem;
  align-content: stretch;
  transform-style: preserve-3d;
}

.battle-overlay--reborn .battle-arena-board--isometric {
  position: relative;
  transform: rotateX(64deg) translate3d(0, 28px, 0);
  transform-origin: center 78%;
  transform-style: preserve-3d;
}

.battle-overlay--reborn .battle-cell-shell {
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center center;
}

.battle-overlay--reborn .battle-cell {
  position: relative;
  width: 90%;
  height: 100%;
  min-height: 115.6px;
  display: grid;
  align-items: end;
  justify-items: center;
  justify-self: center;
  padding: 0.4rem 0.24rem 0.18rem;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(56, 66, 76, 0.5), rgba(34, 42, 50, 0.56));
  border: 1px solid rgba(233, 239, 242, 0.16);
  transform-style: preserve-3d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 20px rgba(0, 0, 0, 0.1);
}

.battle-overlay--reborn .battle-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%);
  pointer-events: none;
}

.battle-overlay--reborn .battle-cell::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 44%);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.battle-overlay--reborn .battle-cell-shell.is-ally.occupied .battle-cell {
  background:
    linear-gradient(180deg, rgba(56, 66, 76, 0.5), rgba(34, 42, 50, 0.56));
  border-color: rgba(233, 239, 242, 0.16);
  animation: none;
}

.battle-overlay--reborn .battle-cell-shell.is-ally.occupied .battle-cell::after {
  opacity: 0;
  box-shadow: none;
}

.battle-overlay--reborn .battle-cell-shell.enemy-occupied .battle-cell {
  background:
    linear-gradient(180deg, rgba(56, 66, 76, 0.5), rgba(34, 42, 50, 0.56));
  border-color: rgba(233, 239, 242, 0.16);
  animation: none;
}

.battle-overlay--reborn .battle-cell-shell.enemy-occupied .battle-cell::after {
  opacity: 0;
  box-shadow: none;
}

.battle-overlay--reborn .battle-cell-shell.in-range .battle-cell {
  border-color: rgba(105, 184, 255, 0.74);
  background:
    linear-gradient(180deg, rgba(114, 192, 255, 0.52), rgba(75, 127, 196, 0.4)),
    rgba(47, 88, 136, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(105, 184, 255, 0.2),
    0 0 18px rgba(105, 184, 255, 0.14);
}

.battle-overlay--reborn .battle-cell-shell.enemy-in-range .battle-cell,
.battle-overlay--reborn .battle-cell-shell.targetable.preview-offense .battle-cell {
  border-color: rgba(255, 118, 96, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 170, 137, 0.52), rgba(230, 97, 82, 0.38)),
    rgba(123, 57, 50, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 128, 108, 0.18),
    0 0 18px rgba(255, 118, 96, 0.14);
}

.battle-overlay--reborn .battle-cell-shell.ally-in-range .battle-cell,
.battle-overlay--reborn .battle-cell-shell.targetable.preview-support .battle-cell {
  border-color: rgba(112, 214, 150, 0.8);
  background:
    linear-gradient(180deg, rgba(145, 237, 176, 0.5), rgba(80, 190, 125, 0.34)),
    rgba(46, 101, 67, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(112, 214, 150, 0.16),
    0 0 18px rgba(112, 214, 150, 0.14);
}

.battle-overlay--reborn .battle-cell-shell.active .battle-cell {
  border-color: rgba(255, 239, 188, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 234, 178, 0.2),
    0 0 18px rgba(255, 223, 150, 0.14);
}

.battle-overlay--reborn .unit-chip {
  --battle-card-align-x: 0px;
  --battle-card-align-y: 0px;
  --battle-card-base-transform: rotateX(-64deg) translateZ(132px) translate(-50%, -50%);
  position: relative;
  width: min(100%, 120px);
  height: 168px;
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(var(--battle-card-align-x), var(--battle-card-align-y)) var(--battle-card-base-transform);
  transform-style: preserve-3d;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(42, 42, 42, 0.96), rgba(30, 35, 40, 0.96));
  pointer-events: none;
  box-shadow:
    0 28px 34px rgba(0, 0, 0, 0.32),
    0 12px 18px rgba(0, 0, 0, 0.22);
}

.battle-overlay--reborn .unit-chip,
.battle-overlay--reborn .unit-chip * {
  pointer-events: none;
}

.battle-overlay--reborn .battle-cell-shell.targetable,
.battle-overlay--reborn .battle-cell-shell.is-targetable {
  cursor: pointer;
}

.battle-overlay--reborn .unit-chip-top {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  grid-template-columns: 1fr;
  gap: 0;
  justify-items: center;
  text-align: center;
  transform: translateY(0);
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
  will-change: transform;
  animation: battle-card-float 3s ease-in-out infinite;
}

.battle-overlay--reborn .unit-chip-top .battle-float-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.battle-overlay--reborn .unit-chip-top .battle-floater {
  left: 50%;
  top: 48%;
  transform: translate(-50%, 0.9rem) scale(0.92);
}

.battle-overlay--reborn .unit-chip-top .battle-floater.damage,
.battle-overlay--reborn .unit-chip-top .battle-floater.shield-loss,
.battle-overlay--reborn .unit-chip-top .battle-floater.heal,
.battle-overlay--reborn .unit-chip-top .battle-floater.shield-gain,
.battle-overlay--reborn .unit-chip-top .battle-floater.sp-loss,
.battle-overlay--reborn .unit-chip-top .battle-floater.sp-gain,
.battle-overlay--reborn .unit-chip-top .battle-floater.od-loss,
.battle-overlay--reborn .unit-chip-top .battle-floater.od-gain {
  animation-name: battle-card-floater-rise;
}

.battle-overlay--reborn .unit-chip-visual {
  position: relative;
  width: 100%;
  display: grid;
  justify-items: center;
  height: 100%;
  align-items: end;
}

.battle-overlay--reborn .unit-chip-visual .mech-art.token {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(12, 18, 22, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-overlay--reborn .unit-chip-rail {
  position: absolute;
  z-index: 2;
  top: -32.5px;
  left: 0;
  width: 100%;
  display: grid;
  align-items: center;
  gap: 0.08rem;
  min-height: 52px;
  padding: 0;
  background: none;
}

.battle-overlay--reborn .unit-chip-rail.ally {
  grid-template-columns: 27px minmax(0, 1fr);
  padding-right: 2px;
}

.battle-overlay--reborn .unit-chip-rail.enemy {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 4px;
}

.battle-overlay--reborn .unit-chip-rail.ally .unit-chip-avatar--rail {
  margin-left: -12px;
}

.battle-overlay--reborn .unit-chip-avatar--rail {
  position: relative;
  width: 39px;
  height: 39px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.battle-overlay--reborn .unit-chip-avatar--rail.ally {
  --battle-avatar-ring: rgba(96, 186, 255, 0.98);
  --battle-avatar-glow: rgba(96, 186, 255, 0.38);
}

.battle-overlay--reborn .unit-chip-avatar--rail.enemy {
  --battle-avatar-ring: rgba(255, 120, 110, 0.98);
  --battle-avatar-glow: rgba(255, 120, 110, 0.38);
}

.battle-overlay--reborn .unit-chip-avatar--rail::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2.6px solid var(--battle-avatar-ring);
  box-shadow:
    0 0 8px 0 var(--battle-avatar-glow),
    0 0 0 0 var(--battle-avatar-glow);
  animation: battle-unit-avatar-pulse 1.8s ease-in-out infinite;
}

.battle-overlay--reborn .unit-chip-avatar--rail .pilot-avatar.xs {
  width: 100%;
  height: 100%;
  border-width: 0;
  box-shadow: none;
}

.battle-overlay--reborn .unit-chip-active-marker {
  position: absolute;
  left: 50%;
  top: -56px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 20px solid rgba(138, 202, 255, 0.98);
  filter:
    drop-shadow(0 6px 12px rgba(22, 82, 138, 0.34))
    drop-shadow(0 0 12px rgba(108, 193, 255, 0.32));
  animation: battle-active-marker-bounce 0.82s cubic-bezier(0.22, 0.9, 0.3, 1) infinite;
}

.battle-overlay--reborn .unit-chip.enemy .unit-chip-active-marker {
  border-top-color: rgba(255, 151, 141, 0.96);
  filter:
    drop-shadow(0 6px 12px rgba(138, 44, 36, 0.34))
    drop-shadow(0 0 12px rgba(255, 151, 141, 0.3));
}

.battle-overlay--reborn .battle-cell-shell.targetable {
  cursor: pointer;
}

.battle-overlay--reborn .battle-cell-shell.targetable:hover,
.battle-overlay--reborn .battle-cell-shell.targetable:focus-within {
  z-index: 18;
}

.battle-overlay--reborn .battle-cell-shell.targetable:hover .unit-chip-top,
.battle-overlay--reborn .battle-cell-shell.targetable:focus-within .unit-chip-top {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.028);
  filter: drop-shadow(0 14px 24px rgba(6, 12, 18, 0.34));
}

.battle-overlay--reborn .battle-cell-shell.targetable.preview-offense:hover .unit-chip-visual .mech-art.token,
.battle-overlay--reborn .battle-cell-shell.targetable.preview-offense:focus-within .unit-chip-visual .mech-art.token {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 134, 114, 0.48),
    0 0 18px rgba(255, 118, 96, 0.22);
}

.battle-overlay--reborn .battle-cell-shell.targetable.preview-support:hover .unit-chip-visual .mech-art.token,
.battle-overlay--reborn .battle-cell-shell.targetable.preview-support:focus-within .unit-chip-visual .mech-art.token {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(128, 226, 165, 0.42),
    0 0 18px rgba(112, 214, 150, 0.18);
}

.battle-overlay--reborn .battle-cell-shell.targetable.preview-move:hover .unit-chip-top,
.battle-overlay--reborn .battle-cell-shell.targetable.preview-move:focus-within .unit-chip-top {
  filter: drop-shadow(0 14px 24px rgba(10, 60, 104, 0.3));
}

.battle-overlay--reborn .unit-chip-copy,
.battle-overlay--reborn .unit-chip-copy .unit-status-rows,
.battle-overlay--reborn .unit-chip-copy .unit-status-row,
.battle-overlay--reborn .unit-command-cue,
.battle-overlay--reborn .range-tag,
.battle-overlay--reborn .battle-combo-preview {
  display: none;
}

.battle-overlay--reborn .unit-chip-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  width: 100%;
}

.battle-overlay--reborn .unit-chip.ally {
  --battle-unit-hp-main: #6fd79a;
  --battle-unit-hp-soft: #bff8da;
}

.battle-overlay--reborn .unit-chip.enemy {
  --battle-unit-hp-main: var(--enemy);
  --battle-unit-hp-soft: #ffd0bc;
}

.battle-overlay--reborn .unit-chip-bars .bar {
  display: flex;
  height: 5.8px;
  padding: 1px;
  box-sizing: border-box;
  border-radius: 999px;
  background: rgba(4, 10, 14, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.battle-overlay--reborn .unit-chip-bars .bar.hp {
  height: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.battle-overlay--reborn .unit-chip-bars .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.battle-overlay--reborn .unit-chip-bars .bar.hp i {
  background: linear-gradient(90deg, var(--battle-unit-hp-main), var(--battle-unit-hp-soft));
}

.battle-overlay--reborn .unit-chip.enemy .unit-chip-bars .bar {
  justify-content: flex-end;
}

.battle-overlay--reborn .unit-chip .bar.sp i {
  background: linear-gradient(90deg, #57b8ff, #9ce5f2);
  opacity: 0.95;
}

.battle-overlay--reborn .unit-chip .bar.od i {
  background: linear-gradient(90deg, #ffd35f, #fff0a3);
  opacity: 0.98;
}

.battle-overlay--reborn .empty-chip {
  width: 100%;
  height: 100%;
}

.battle-overlay--reborn .wreck-chip {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 0.04rem;
  padding: 0.18rem 0.3rem;
  border-radius: 10px;
  background: rgba(24, 31, 37, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(232, 238, 241, 0.88);
}

.battle-overlay--reborn .wreck-chip strong {
  font-size: 0.64rem;
  line-height: 1;
}

.battle-overlay--reborn .wreck-chip span {
  font-size: 0.52rem;
  line-height: 1;
  color: rgba(232, 238, 241, 0.68);
}

@keyframes battle-unit-avatar-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(9, 15, 19, 0.82),
      0 0 0 0 var(--battle-avatar-glow);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(9, 15, 19, 0.82),
      0 0 0 4px rgba(255, 255, 255, 0),
      0 0 12px 0 var(--battle-avatar-glow);
  }
}

@keyframes battle-cell-ally-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -10px 18px rgba(40, 58, 76, 0.16),
      inset 0 0 0 1px rgba(148, 215, 255, 0.22),
      inset 0 0 18px rgba(98, 184, 255, 0.12),
      0 10px 20px rgba(0, 0, 0, 0.1);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -10px 18px rgba(40, 58, 76, 0.18),
      inset 0 0 0 1px rgba(148, 215, 255, 0.34),
      inset 0 0 28px rgba(98, 184, 255, 0.24),
      0 10px 20px rgba(0, 0, 0, 0.1);
  }
}

@keyframes battle-cell-enemy-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -10px 18px rgba(64, 44, 44, 0.16),
      inset 0 0 0 1px rgba(255, 198, 188, 0.2),
      inset 0 0 18px rgba(255, 118, 96, 0.12),
      0 10px 20px rgba(0, 0, 0, 0.1);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -10px 18px rgba(64, 44, 44, 0.18),
      inset 0 0 0 1px rgba(255, 198, 188, 0.32),
      inset 0 0 28px rgba(255, 118, 96, 0.24),
      0 10px 20px rgba(0, 0, 0, 0.1);
  }
}

@keyframes battle-cell-core-pulse {
  0%,
  100% {
    opacity: 0.42;
    background-size: 100% 100%;
    box-shadow:
      inset 0 0 0 1px var(--battle-cell-glow-ring),
      inset 0 0 14px var(--battle-cell-glow-soft);
  }

  50% {
    opacity: 0.96;
    background-size: 118% 118%;
    box-shadow:
      inset 0 0 0 1px var(--battle-cell-glow-ring),
      inset 0 0 30px var(--battle-cell-glow-main);
  }
}

@keyframes battle-card-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes battle-active-marker-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  35% {
    transform: translateX(-50%) translateY(-5px) scale(1.08);
  }

  65% {
    transform: translateX(-50%) translateY(1px) scale(0.97);
  }
}

@keyframes battle-card-floater-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 1rem) scale(0.88);
  }

  14% {
    opacity: 1;
    transform: translate(-50%, 0.25rem) scale(1);
  }

  82% {
    opacity: 1;
    transform: translate(-50%, -1.6rem) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -2.2rem) scale(0.94);
  }
}


.battle-reborn-bottom {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  overflow-y: auto;
  max-height: 100%;
}

.battle-inspect-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.72rem;
  padding: 0.86rem;
  align-self: start;
  width: 100%;
  max-width: none;
}

.battle-inspect-visual {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.battle-inspect-visual .mech-art.card {
  width: 84px;
  height: 105px;
  aspect-ratio: auto;
  border-radius: 22px;
}

.battle-inspect-copy {
  display: grid;
  gap: 0.68rem;
  min-width: 0;
}

.battle-inspect-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.battle-inspect-head h3 {
  margin: 0.08rem 0;
  font-size: 1.28rem;
}

.battle-inspect-head p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(229, 236, 232, 0.82);
}

.battle-inspect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  justify-content: flex-end;
}

.battle-inspect-status-rail {
  min-width: 0;
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
  padding-top: 0.04rem;
}

.battle-inspect-status-rail.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.battle-inspect-status-orb {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(9, 16, 20, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.battle-inspect-status-orb.buff {
  border: 1px solid rgba(98, 170, 255, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(98, 170, 255, 0.16),
    0 0 12px rgba(98, 170, 255, 0.18);
}

.battle-inspect-status-orb.debuff {
  border: 1px solid rgba(255, 112, 112, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 112, 112, 0.14),
    0 0 12px rgba(255, 112, 112, 0.16);
}

.battle-inspect-status-orb img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.battle-inspect-status-orb-fallback {
  font-size: 0.68rem;
  line-height: 1;
  color: rgba(242, 247, 245, 0.94);
}

.battle-inspect-tags span {
  padding: 0.32rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  color: rgba(236, 241, 239, 0.9);
}

.battle-inspect-meters {
  display: grid;
  gap: 0.34rem;
}

.battle-action-dock {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.86rem;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  max-height: 280px;
  overflow-y: auto;
}

.battle-action-dock--acted {
  border-color: rgba(122, 220, 214, 0.22);
}

.battle-action-dock-phase-badge {
  display: inline-flex;
  align-items: center;
  align-self: start;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(122, 220, 214, 0.14);
  color: rgba(160, 232, 220, 0.92);
  border: 1px solid rgba(122, 220, 214, 0.28);
  margin-bottom: -0.2rem;
}

.battle-action-dock-note {
  min-height: 3rem;
  display: grid;
  align-content: center;
  justify-items: end;
  text-align: right;
  font-size: 0.8rem;
  color: rgba(228, 236, 232, 0.78);
}

.battle-action-dock-note.active {
  color: rgba(238, 244, 241, 0.92);
}

.battle-action-dock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.battle-action-dock-button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
  padding: 0.34rem 0.42rem;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 94, 0.18);
  background:
    linear-gradient(180deg, rgba(214, 174, 94, 0.14), rgba(214, 174, 94, 0.04)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.battle-action-dock-button.selected {
  border-color: rgba(122, 220, 214, 0.34);
  box-shadow: inset 0 0 0 1px rgba(122, 220, 214, 0.12), 0 0 24px rgba(122, 220, 214, 0.1);
}

.battle-action-dock-button.disabled {
  opacity: 1;
  border-color: rgba(96, 110, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(54, 63, 68, 0.28), rgba(22, 28, 30, 0.16)),
    rgba(255, 255, 255, 0.02);
}

.battle-action-dock-button.disabled .battle-action-dock-copy,
.battle-action-dock-button.disabled .battle-action-dock-icon {
  opacity: 0.42;
}

.battle-action-dock-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.battle-action-dock-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-action-dock-copy {
  display: grid;
  gap: 0.12rem;
}

.battle-action-dock-copy strong {
  font-size: 0.82rem;
  line-height: 1.08;
}

.battle-action-dock-copy small {
  font-size: 0.6rem;
  color: rgba(228, 236, 232, 0.72);
  line-height: 1.18;
}

.battle-bottom-round-anchor {
  position: static;
  align-self: center;
  justify-self: center;
  z-index: 2;
  pointer-events: none;
}

.battle-bottom-round-medal {
  min-width: 118px;
  padding: 0.28rem 0.7rem;
  gap: 0.08rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 26px rgba(0, 0, 0, 0.22);
}

.battle-bottom-round-medal span {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.battle-bottom-round-medal strong {
  font-size: 1.28rem;
}

.battle-bottom-round-medal strong small {
  font-size: inherit;
  margin-left: 0.12rem;
}

.battle-log-drawer {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 340px;
  max-height: min(44vh, 420px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.72rem;
  z-index: 8;
}

.battle-log-drawer-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 0.34rem;
}

.battle-log-drawer:not(.open) {
  display: none;
}

.battle-log-drawer:not(.open) .battle-log-drawer-list {
  display: none;
}

.battle-log-drawer .event-row {
  padding: 0.42rem 0.5rem;
}

.battle-log-drawer .event-copy {
  font-size: 0.76rem;
}

@media (max-width: 1260px) {
  .battle-reborn-main {
    grid-template-columns: 236px minmax(0, 1fr) 236px;
  }

  .battle-reborn-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-bottom-round-anchor {
    justify-self: center;
    pointer-events: auto;
  }

  .battle-inspect-card,
  .battle-action-dock {
    width: 100%;
  }

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

@media (max-width: 1080px) {
  .battle-reborn-topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-reborn-top-info,
  .battle-reborn-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-side-rail {
    grid-template-rows: auto auto;
  }

  .battle-side-rail-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .battle-inspect-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .battle-inspect-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-inspect-tags {
    justify-content: flex-start;
  }

  .battle-action-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-log-drawer {
    width: min(360px, calc(100vw - 2.4rem));
  }
}

@media (max-width: 820px) {
  .battle-overlay--reborn {
    padding: 0.5rem;
  }

  .battle-reborn-shell {
    height: calc(100dvh - 1rem);
    min-height: calc(100dvh - 1rem);
    gap: 0.65rem;
    padding: 0.62rem;
  }

  .battle-turn-order-track,
  .battle-side-rail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-turn-order--arena {
    padding-inline: 0.42rem;
    padding-top: 0.42rem;
  }

  .battle-turn-order-label {
    font-size: 0.58rem;
  }

  .battle-turn-order-chip {
    width: 44px;
    height: 44px;
  }

  .battle-overlay--reborn .battle-arena-board {
    grid-template-columns: repeat(6, minmax(59.2px, 1fr));
    grid-template-rows: repeat(3, minmax(97.2px, 1fr));
    column-gap: 0.1rem;
    row-gap: 0.23rem;
    padding: 0.52rem 0.56rem 0.04rem;
  }

  .battle-overlay--reborn .battle-cell {
    min-height: 97.2px;
  }

  .battle-overlay--reborn .unit-chip {
    --battle-card-align-x: 0px;
    --battle-card-align-y: 0px;
    --battle-card-base-transform: rotateX(-64deg) translateZ(102px) translate(-50%, -50%);
    width: min(100%, 98.4px);
    height: 141.6px;
    top: 50%;
    bottom: auto;
  }

  .battle-overlay--reborn .unit-chip-visual .mech-art.token {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
  }

  .battle-overlay--reborn .battle-zone-strip {
    gap: 0.18rem;
    padding-inline: 0.9rem;
  }

  .battle-overlay--reborn .battle-zone-card strong {
    font-size: 0.66rem;
  }

  .battle-overlay--reborn .unit-chip-rail {
    top: -27.3px;
    min-height: 44.2px;
  }

  .battle-overlay--reborn .unit-chip-avatar--rail {
    width: 31.2px;
    height: 31.2px;
  }

  .battle-overlay--reborn .unit-chip-active-marker {
    top: -37px;
  }

  .battle-inspect-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-inspect-visual {
    max-width: 160px;
  }

  .battle-action-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final battle viewport compression */

.battle-overlay {
  padding: 0.72rem;
  overflow: hidden;
}

.battle-stage-shell.battle-command-deck {
  height: calc(100dvh - 1.44rem);
  min-height: calc(100dvh - 1.44rem);
  max-height: calc(100dvh - 1.44rem);
  grid-template-columns: 286px minmax(0, 1fr) 304px;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar topbar"
    "left stage right";
  gap: 0.78rem;
  padding: 0.78rem;
  align-items: stretch;
  overflow: hidden;
}

.battle-stage-topbar.battle-deck-topbar {
  min-height: 0;
  padding: 0.56rem 0.8rem;
  column-gap: 0.8rem;
}

.battle-stage-room h2 {
  margin: 0.04rem 0 0.08rem;
  font-size: clamp(1.14rem, 1.7vw, 1.62rem);
}

.battle-stage-room p {
  font-size: 0.78rem;
}

.battle-round-medal {
  min-width: 124px;
  padding: 0.3rem 0.72rem;
}

.battle-round-medal span {
  font-size: 0.62rem;
}

.battle-round-medal strong {
  font-size: 1.4rem;
}

.battle-stage-actions {
  gap: 0.48rem;
  font-size: 0.8rem;
}

.battle-deck-left,
.battle-deck-stage,
.battle-deck-right {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.battle-deck-left,
.battle-deck-right {
  padding-right: 0;
}

.battle-left-card {
  height: 100%;
  max-height: 100%;
  gap: 0.56rem;
  padding: 0.72rem;
}

.battle-left-portrait {
  width: 46%;
  max-width: 128px;
}

.battle-left-copy h3 {
  font-size: 1.02rem;
}

.battle-left-copy p {
  font-size: 0.75rem;
}

.battle-left-tags {
  margin-top: 0.3rem;
  gap: 0.22rem;
}

.battle-left-tags span {
  padding: 0.28rem 0.42rem;
  font-size: 0.64rem;
}

.battle-left-meters {
  gap: 0.4rem;
}

.battle-left-grid {
  gap: 0.36rem;
}

.battle-left-stat {
  padding: 0.48rem 0.54rem;
}

.battle-left-stat span {
  font-size: 0.64rem;
}

.battle-left-stat strong {
  font-size: 0.92rem;
}

.battle-left-line {
  padding: 0.5rem 0.56rem;
}

.battle-left-line span {
  font-size: 0.62rem;
}

.battle-left-line strong {
  font-size: 0.78rem;
  line-height: 1.34;
}

.battle-deck-stage {
  padding: 0.56rem;
  gap: 0.42rem;
}

.battle-deck-stage .battle-arena-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.battle-deck-stage .battle-stage-sideheads {
  padding: 0 0.12rem 0.24rem;
}

.battle-side-head strong {
  font-size: 0.98rem;
}

.battle-side-head span {
  font-size: 0.72rem;
}

.battle-deck-stage .battle-arena-board {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.56rem;
  height: 100%;
  min-height: 0;
  padding: 0.7rem 2.6rem 0.86rem;
  align-content: stretch;
  overflow: hidden;
}

.battle-deck-stage .battle-cell-shell,
.battle-deck-stage .battle-cell {
  min-height: 0;
  height: 100%;
}

.battle-deck-stage .battle-cell {
  padding: 0.46rem;
  border-radius: 22px;
}

.battle-deck-stage .unit-chip {
  gap: 0.34rem;
}

.battle-deck-stage .unit-chip-top {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.42rem;
}

.battle-deck-stage .unit-chip-visual .mech-art.token {
  border-radius: 14px;
}

.battle-deck-stage .unit-chip-copy strong {
  font-size: 0.82rem;
}

.battle-deck-stage .unit-chip-copy span {
  font-size: 0.64rem;
}

.battle-deck-stage .unit-chip-bars-row {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.32rem;
}

.battle-deck-stage .unit-chip-bars {
  gap: 0.16rem;
}

.battle-deck-stage .unit-chip-metrics {
  gap: 0.14rem 0.26rem;
}

.battle-deck-stage .unit-chip-metrics span {
  font-size: 0.56rem;
  padding: 0.12rem 0.26rem;
}

.battle-deck-stage .unit-status-row {
  gap: 0.18rem;
}

.battle-deck-stage .battle-combo-preview {
  top: 1.62rem;
}

.battle-deck-right {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.56rem;
}

.battle-side-summary-row.battle-side-summary-stack {
  min-height: 0;
}

.battle-side-summary-card.compact {
  padding: 0.72rem;
  gap: 0.46rem;
}

.battle-side-summary-card.compact .battle-side-summary-lineup {
  max-height: none;
  min-height: 0;
}

.battle-log-panel {
  min-height: 0;
  height: 100%;
  padding: 0.72rem;
  gap: 0.48rem;
}

.battle-log-panel .event-log {
  min-height: 0;
  height: 100%;
  overflow: auto;
  gap: 0.34rem;
}

.event-row {
  padding: 0.44rem 0.54rem;
}

.event-stamp {
  font-size: 0.68rem;
}

.event-copy {
  font-size: 0.8rem;
  line-height: 1.34;
}

/* Battle left rail rebuilt */

.battle-deck-left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.72rem;
  align-content: stretch;
  overflow-y: auto;
  overflow-x: hidden;
}

.battle-left-tip {
  justify-self: start;
  align-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  max-width: 15.2rem;
  padding: 0.58rem 0.74rem;
  border-radius: 18px;
  border: 1px solid rgba(122, 220, 214, 0.22);
  background:
    linear-gradient(180deg, rgba(122, 220, 214, 0.08), transparent 72%),
    rgba(8, 16, 20, 0.84);
  box-shadow: inset 0 0 0 1px rgba(122, 220, 214, 0.06);
}

.battle-left-tip strong {
  font-size: 0.98rem;
  line-height: 1.08;
}

.battle-left-tip span {
  font-size: 0.8rem;
  line-height: 1.36;
  color: rgba(232, 239, 236, 0.8);
}

.battle-left-card {
  width: 100%;
  min-width: 0;
  height: calc(100vh - 13.2rem);
  max-height: calc(100vh - 13.2rem);
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 0.82rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.battle-left-portrait {
  position: relative;
  width: 52%;
  max-width: 146px;
  min-width: 112px;
  aspect-ratio: 1 / 1;
}

.battle-left-portrait .mech-art.card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.battle-left-avatar {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
}

.battle-left-copy {
  display: grid;
  gap: 0.18rem;
}

.battle-left-copy h3 {
  margin: 0.08rem 0 0.12rem;
  font-size: 1.16rem;
  line-height: 1.08;
}

.battle-left-copy p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.38;
  color: rgba(244, 235, 218, 0.72);
}

.battle-left-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.42rem;
}

.battle-left-tags span,
.battle-left-stat,
.battle-left-line {
  border-radius: 14px;
  border: 1px solid rgba(232, 193, 117, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.battle-left-tags span {
  padding: 0.38rem 0.48rem;
  font-size: 0.68rem;
}

.battle-left-meters {
  display: grid;
  gap: 0.5rem;
}

.battle-left-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.battle-left-stat {
  padding: 0.52rem 0.6rem;
  display: grid;
  gap: 0.18rem;
}

.battle-left-stat span,
.battle-left-line span {
  font-size: 0.72rem;
  color: rgba(240, 231, 210, 0.7);
}

.battle-left-stat strong,
.battle-left-line strong {
  font-size: 0.84rem;
  line-height: 1.34;
  color: #f6f1e6;
}

.battle-left-line {
  padding: 0.52rem 0.6rem;
  display: grid;
  gap: 0.18rem;
}

.battle-left-line.combo strong {
  color: #ffd07f;
}

.battle-deck-stage .unit-status-rows {
  min-height: 34px;
}

.battle-deck-stage .unit-status-row {
  min-height: 16px;
  gap: 0.18rem;
}

@media (max-width: 1480px) {
  .dojo-grid.command-deck-layout {
    grid-template-columns: 296px minmax(0, 1fr) 332px;
  }

  .dojo-ready-unit-grid {
    grid-template-columns: 1fr;
  }

  .battle-stage-shell.battle-command-deck {
    grid-template-columns: 272px minmax(0, 1fr) 300px;
  }

  .dojo-public-room-grid,
  .dojo-room-seat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .dojo-grid.command-deck-layout,
  .battle-stage-shell.battle-command-deck {
    grid-template-columns: 1fr;
  }

  .dojo-overview-panel,
  .dojo-stage-panel,
  .dojo-control-panel {
    height: auto;
    min-height: auto;
    position: static;
  }

  .battle-stage-shell.battle-command-deck {
    grid-template-areas:
      "topbar"
      "left"
      "stage"
      "right";
  }

  .battle-deck-stage,
  .dojo-stage-panel,
  .dojo-overview-panel,
  .dojo-control-panel,
  .battle-deck-left,
  .battle-deck-right {
    overflow: visible;
  }
}

@media (max-width: 780px) {
  .dojo-metric-strip,
  .dojo-cap-strip,
  .dojo-current-lineup-row,
  .battle-side-summary-metrics,
  .dojo-public-player-line,
  .battle-stage-panorama,
  .dojo-room-actions {
    grid-template-columns: 1fr;
  }

  .dojo-public-hero,
  .battle-side-summary-hero,
  .battle-stage-faction-panel {
    grid-template-columns: 1fr;
  }

  .dojo-current-head-side,
  .dojo-current-player-pair,
  .dojo-current-head-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .dojo-current-lineup-row.with-actions {
    grid-template-columns: 1fr;
  }

  .dojo-ready-seat-head .dojo-metric-strip,
  .dojo-ready-unit-grid {
    grid-template-columns: 1fr;
  }

  .battle-stage-faction-panel.right {
    text-align: left;
  }

  .battle-stage-faction-panel.right .battle-stage-faction-art {
    order: 0;
  }

  .battle-stage-faction-panel.right .battle-stage-faction-avatar {
    left: 0.45rem;
    right: auto;
  }

  .battle-stage-sideheads {
    grid-template-columns: 1fr;
  }
}

/* Final battle panel overrides */

.battle-deck-left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.battle-deck-left .battle-turn-banner {
  justify-self: start;
  align-self: start;
  display: inline-grid;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 15.2rem;
  min-width: 0;
  overflow: hidden;
}

.battle-deck-left .battle-turn-banner strong,
.battle-deck-left .battle-turn-banner span {
  display: block;
  width: auto;
}

.battle-deck-left .battle-actor-hud {
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  width: 100%;
  min-width: 0;
  height: calc(100% - 2px);
  max-width: 100%;
  overflow: hidden;
}

.battle-deck-left .battle-actor-hud-media,
.battle-deck-left .battle-actor-hud-copy,
.battle-deck-left .battle-actor-hud-body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
}

.battle-deck-left .battle-actor-hud-media {
  display: block;
}

.battle-deck-left .battle-actor-hud-media .mech-art.card {
  width: 100%;
}

.battle-deck-left {
  max-width: 100%;
  contain: layout inline-size;
}

.battle-deck-stage .unit-chip {
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

.battle-deck-stage .unit-chip-top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.52rem;
  align-items: start;
}

.battle-deck-stage .unit-chip-status-stack {
  display: grid;
  gap: 0.28rem;
}

.battle-deck-stage .unit-chip-bars-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
}

.battle-deck-stage .unit-chip-bars {
  display: grid;
  gap: 0.24rem;
}

.battle-deck-stage .unit-chip-avatar-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.battle-deck-stage .unit-chip-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.18rem 0.34rem;
}

.battle-deck-stage .unit-chip-metrics span {
  font-size: 0.62rem;
  padding: 0.16rem 0.34rem;
}

/* 战报颜色标记 */
.report-event-copy .dmg-text {
  color: #ff6b6b;
  font-weight: 600;
}

.report-event-copy .heal-text {
  color: #51cf66;
  font-weight: 600;
}

.report-event-copy .buff-text {
  color: #74c0fc;
  font-weight: 600;
}

.report-event-copy .debuff-text {
  color: #ffd43b;
  font-weight: 600;
}

/* 回合标题内联样式 */
.report-round-header-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 0.84rem;
  background:
    linear-gradient(180deg, rgba(16, 28, 32, 0.98), rgba(11, 20, 24, 0.98));
  border-top: 1px solid rgba(130, 216, 205, 0.12);
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(130, 216, 205, 0.08);
}

.report-round-header-inline:first-child {
  border-top: none;
}

.report-round-header-inline .report-round-header-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(172, 200, 194, 0.82);
  letter-spacing: 0.05em;
}

.report-round-header-inline .report-round-header-count {
  font-size: 0.7rem;
  color: rgba(130, 216, 205, 0.5);
  margin-left: auto;
}

.report-event-item-empty .report-event-copy {
  color: rgba(172, 200, 194, 0.52);
  font-style: italic;
}

/* Battle command dock absolute final overrides */

#battle-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

body.battle-command-dragging {
  user-select: none;
}

body.battle-command-aiming,
body.battle-command-aiming .battle-overlay,
body.battle-command-aiming .battle-arena-shell {
  cursor: crosshair;
}

.battle-command-drag-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.battle-command-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.battle-command-drag-card {
  min-width: 220px;
  max-width: 280px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.72rem 0.82rem;
  border-radius: 18px;
  border: 1px solid rgba(214, 174, 94, 0.3);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.18), transparent 34%),
    rgba(8, 13, 15, 0.94);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.battle-command-drag-ghost.group-weapon .battle-command-drag-card {
  border-color: rgba(212, 112, 78, 0.36);
}

.battle-command-drag-ghost.group-module .battle-command-drag-card {
  border-color: rgba(98, 170, 255, 0.34);
}

.battle-command-drag-ghost.group-tactic .battle-command-drag-card {
  border-color: rgba(118, 220, 184, 0.34);
}

.battle-command-drag-ghost.is-aiming .battle-command-drag-card {
  transform: translate(18px, 18px) scale(0.92);
}

.battle-command-drag-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.battle-command-drag-copy {
  display: grid;
  gap: 0.14rem;
}

.battle-command-drag-copy small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 228, 0.6);
}

.battle-command-drag-copy strong {
  font-size: 1rem;
  color: rgba(249, 245, 235, 0.96);
}

.battle-command-drag-copy span {
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(229, 235, 232, 0.78);
}

.battle-command-drag-reticle {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}

.battle-command-drag-reticle span,
.battle-command-drag-reticle i {
  position: absolute;
  display: block;
}

.battle-command-drag-reticle span {
  inset: 6px;
  border: 1px solid rgba(242, 246, 244, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(122, 220, 214, 0.26);
}

.battle-command-drag-reticle::before,
.battle-command-drag-reticle::after,
.battle-command-drag-reticle i::before,
.battle-command-drag-reticle i::after {
  content: "";
  position: absolute;
  background: rgba(242, 246, 244, 0.94);
}

.battle-command-drag-reticle::before,
.battle-command-drag-reticle::after {
  left: 50%;
  width: 1px;
  height: 8px;
  transform: translateX(-50%);
}

.battle-command-drag-reticle::before {
  top: 0;
}

.battle-command-drag-reticle::after {
  bottom: 0;
}

.battle-command-drag-reticle i::before,
.battle-command-drag-reticle i::after {
  top: 50%;
  height: 1px;
  width: 8px;
  transform: translateY(-50%);
}

.battle-command-drag-reticle i::before {
  left: 0;
}

.battle-command-drag-reticle i::after {
  right: 0;
}

.battle-command-drag-ghost.is-aiming .battle-command-drag-reticle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.battle-command-drag-target {
  position: fixed;
  border-radius: 20px;
  border: 2px solid rgba(242, 246, 244, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px rgba(122, 220, 214, 0.18),
    inset 0 0 20px rgba(122, 220, 214, 0.12);
  background: rgba(122, 220, 214, 0.08);
  z-index: 1;
}

.battle-command-drag-target.invalid {
  border-color: rgba(255, 122, 122, 0.9);
  background: rgba(255, 122, 122, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(255, 122, 122, 0.18),
    inset 0 0 20px rgba(255, 122, 122, 0.1);
}

.battle-command-drag-target span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 0.22rem 0.56rem;
  border-radius: 999px;
  background: rgba(7, 12, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  white-space: nowrap;
  color: rgba(242, 246, 244, 0.92);
}

.battle-overlay--reborn .battle-action-dock {
  position: relative;
  overflow: hidden;
  border-color: rgba(214, 174, 94, 0.24);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 94, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 17, 20, 0.98), rgba(7, 12, 14, 0.94));
}

.battle-overlay--reborn .battle-action-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    repeating-linear-gradient(90deg, rgba(214, 174, 94, 0.06) 0, rgba(214, 174, 94, 0.06) 1px, transparent 1px, transparent 96px);
  opacity: 0.44;
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock > * {
  position: relative;
  z-index: 1;
}

.battle-overlay--reborn .battle-action-dock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
}

.battle-overlay--reborn .battle-action-dock-headline {
  display: grid;
  gap: 0.18rem;
}

.battle-overlay--reborn .battle-action-dock-headline strong {
  font-family: "Spectral", serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: rgba(244, 241, 230, 0.96);
}

.battle-overlay--reborn .battle-action-dock-headline span {
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(214, 221, 218, 0.72);
}

.battle-overlay--reborn .battle-action-dock-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
}

.battle-overlay--reborn .battle-action-dock-button {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.44rem;
  align-content: start;
  padding: 0.62rem 0.72rem 0.68rem;
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.battle-overlay--reborn .battle-action-dock-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(214, 174, 94, 0.16), rgba(214, 174, 94, 0.02));
  opacity: 0.72;
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.battle-overlay--reborn .battle-action-dock-button:hover:not(.disabled),
.battle-overlay--reborn .battle-action-dock-button.dragging:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.battle-overlay--reborn .battle-action-dock-button.selected {
  border-color: rgba(122, 220, 214, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(122, 220, 214, 0.16),
    0 0 28px rgba(122, 220, 214, 0.14);
}

.battle-overlay--reborn .battle-action-dock-button.dragging {
  opacity: 0.68;
  transform: translateY(-6px) scale(0.985);
}

.battle-overlay--reborn .battle-action-card.group-weapon {
  border-color: rgba(212, 112, 78, 0.28);
}

.battle-overlay--reborn .battle-action-card.group-frame {
  border-color: rgba(214, 174, 94, 0.28);
}

.battle-overlay--reborn .battle-action-card.group-module {
  border-color: rgba(98, 170, 255, 0.26);
}

.battle-overlay--reborn .battle-action-card.group-tactic {
  border-color: rgba(118, 220, 184, 0.24);
}

.battle-overlay--reborn .battle-action-card.group-defense {
  border-color: rgba(162, 182, 194, 0.24);
}

.battle-overlay--reborn .battle-action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.battle-overlay--reborn .battle-action-dock-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.battle-overlay--reborn .battle-action-card-mode {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 242, 239, 0.74);
}

.battle-overlay--reborn .battle-action-card-kicker {
  color: rgba(214, 221, 218, 0.62);
}

.battle-overlay--reborn .battle-action-dock-copy {
  display: grid;
  gap: 0.18rem;
}

.battle-overlay--reborn .battle-action-dock-copy strong {
  font-size: 0.94rem;
  line-height: 1.2;
  color: rgba(248, 245, 236, 0.96);
}

.battle-overlay--reborn .battle-action-dock-copy small {
  font-size: 0.7rem;
  line-height: 1.35;
}

.battle-overlay--reborn .battle-action-dock-button.disabled {
  background:
    linear-gradient(180deg, rgba(54, 63, 68, 0.28), rgba(22, 28, 30, 0.16)),
    rgba(255, 255, 255, 0.02);
}

.battle-overlay--reborn .battle-action-dock-button.disabled .battle-action-card-mode {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1080px) {
  .battle-overlay--reborn .battle-action-dock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-command-drag-card {
    min-width: 196px;
  }
}

@media (max-width: 820px) {
  .battle-overlay--reborn .battle-action-dock-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-overlay--reborn .battle-action-dock-button {
    min-height: 80px;
    padding-inline: 0.64rem;
  }

  .battle-command-drag-card {
    min-width: 180px;
    max-width: 220px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.58rem;
    padding: 0.64rem 0.72rem;
  }

  .battle-command-drag-icon {
    width: 36px;
    height: 36px;
  }
}
