:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #111722;
  --surface-2: #171f2e;
  --surface-3: #202a3b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #98a6ba;
  --cyan: #35d6ff;
  --blue: #2f6cff;
  --green: #68f27a;
  --yellow: #ffd64d;
  --red: #ff4d5d;
  --violet: #a66cff;
  --magenta: #ff2fe6;
  --acid: #b8ff2c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.52);
  --neon-shadow:
    0 0 18px rgba(53, 214, 255, 0.18),
    0 0 36px rgba(255, 47, 230, 0.11);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(53, 214, 255, 0.035) 0,
      rgba(53, 214, 255, 0.035) 1px,
      transparent 1px,
      transparent 92px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 47, 230, 0.028) 0,
      rgba(255, 47, 230, 0.028) 1px,
      transparent 1px,
      transparent 78px
    ),
    linear-gradient(180deg, rgba(53, 214, 255, 0.12), transparent 280px),
    linear-gradient(90deg, rgba(255, 47, 230, 0.08), transparent 42%),
    var(--bg);
}

body.body-has-game-overlay {
  overflow: hidden;
  overscroll-behavior: none;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: overlay;
  opacity: 0.22;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
select,
input {
  border: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px;
  border-right: 1px solid rgba(53, 214, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(53, 214, 255, 0.08), transparent 26%),
    rgba(10, 14, 22, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 12px 0 42px rgba(0, 0, 0, 0.34);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand.compact {
  margin: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(53, 214, 255, 0.5);
  border-radius: var(--radius);
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.2), rgba(255, 47, 230, 0.08)),
    #0c1625;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 12px rgba(53, 214, 255, 0.9);
  box-shadow: 0 0 24px rgba(53, 214, 255, 0.18);
}

.brand strong {
  display: block;
  font-weight: 900;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.search-box input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.04)),
    #0c111a;
  outline: none;
}

.search-box input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 214, 255, 0.16);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #c9d3e2;
}

.nav-list a:hover,
.nav-list a.active {
  border-color: rgba(53, 214, 255, 0.28);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.16), rgba(255, 47, 230, 0.08));
  box-shadow: inset 3px 0 0 var(--cyan), 0 0 20px rgba(53, 214, 255, 0.1);
}

.source-card {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.source-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.content {
  position: relative;
  min-width: 0;
}

body[data-route="player"] .app-shell,
body[data-route="board"] .app-shell {
  grid-template-columns: 1fr;
}

body[data-route="player"] .sidebar,
body[data-route="board"] .sidebar,
body[data-route="player"] .mobile-header,
body[data-route="board"] .mobile-header {
  display: none;
}

body[data-route="player"] .page,
body[data-route="board"] .page {
  width: min(100vw, 100%);
  max-width: none;
  padding: 20px;
}

.mobile-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.92);
  backdrop-filter: blur(14px);
}

.page {
  width: min(1240px, calc(100vw - 324px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.hero {
  min-height: min(760px, calc(100vh - 56px));
}

.hero-home {
  display: block;
  min-height: auto;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 18px;
}

.hero-banner {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 47, 230, 0.28);
  border-radius: var(--radius);
  background: #160526;
  box-shadow:
    0 0 0 1px rgba(53, 214, 255, 0.16),
    0 0 42px rgba(255, 47, 230, 0.2);
}

.hero-banner::after,
.ambience-frame::after,
.game-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 47, 230, 0.18), transparent 18%, transparent 82%, rgba(53, 214, 255, 0.18)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 1px, transparent 8px);
  mix-blend-mode: screen;
  opacity: 0.32;
}

.hero-banner img {
  width: 100%;
  aspect-ratio: 1240 / 343;
  object-fit: cover;
}

.hero-copy {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(53, 214, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(7, 12, 22, 0.96), rgba(28, 8, 43, 0.86)),
    rgba(17, 23, 34, 0.9);
  box-shadow: var(--neon-shadow);
}

.hero h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.8rem, 5.8vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(53, 214, 255, 0.28),
    0 0 30px rgba(255, 47, 230, 0.18);
}

.page-header h1 {
  margin: 10px 0 16px;
  font-size: clamp(3rem, 7vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero p,
.page-header p {
  max-width: 780px;
  margin: 0;
  color: #d4dbe7;
  font-size: clamp(1rem, 1.5vw, 1.24rem);
  line-height: 1.65;
}

.hero-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(53, 214, 255, 0.24);
  border-radius: var(--radius);
  background: #07101a;
  box-shadow: var(--shadow), var(--neon-shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.ambience-frame img {
  filter: saturate(1.24) contrast(1.08);
}

.ambience-split .image-panel img {
  min-height: 320px;
  filter: saturate(1.2) contrast(1.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: #020408;
  background:
    linear-gradient(90deg, var(--cyan), #85f7ff 48%, var(--acid));
  box-shadow: 0 0 24px rgba(53, 214, 255, 0.28);
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 47, 230, 0.12), rgba(53, 214, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid rgba(53, 214, 255, 0.34);
  color: var(--cyan);
  background:
    radial-gradient(circle at 30% 10%, rgba(53, 214, 255, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(255, 47, 230, 0.18), rgba(53, 214, 255, 0.1)),
    #0b1320;
  font-size: 1.35rem;
  box-shadow: 0 0 20px rgba(53, 214, 255, 0.14);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--cyan);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(53, 214, 255, 0.14),
    0 0 28px rgba(255, 47, 230, 0.18);
}

.resource-token,
.resource-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.08em;
}

.resource-token {
  position: relative;
  width: 1.5em;
  min-width: 1.5em;
  max-width: none;
  height: 1.5em;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  margin: 0 0.08em;
  border-radius: 999px;
  color: #080a0f;
  background:
    radial-gradient(circle at 34% 28%, #fff6a8, transparent 28%),
    linear-gradient(135deg, #ffec7a, #ffb531 52%, #b66a08);
  font-size: 0.96em;
  font-weight: 950;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    inset 0 -3px 0 rgba(79, 38, 0, 0.28),
    0 0 12px rgba(255, 214, 77, 0.28);
}

.resource-token::before {
  position: absolute;
  inset: 3px;
  content: "";
  border: 1px solid rgba(70, 34, 0, 0.42);
  border-radius: inherit;
}

.resource-token.token-bifcoin {
  width: 1.34em;
  min-width: 1.34em;
  height: 1.34em;
  margin-inline: 0.12em;
  overflow: hidden;
  font-size: 0.9em;
  line-height: 1;
}

.resource-token.token-bifcoin::before {
  display: none;
}

.resource-token.token-bifcoin::after {
  position: absolute;
  inset: 3px;
  content: "";
  border: 1px solid rgba(70, 34, 0, 0.42);
  border-radius: 999px;
  pointer-events: none;
}

.token-bifcoin .resource-symbol {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.resource-chip {
  width: fit-content;
  max-width: max-content;
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 1.65em;
  margin: 0 0.08em;
  padding: 0.17em 0.5em 0.16em;
  gap: 0.28em;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(5, 8, 18, 0.72);
  font-size: 0.82em;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.04),
    0 0 12px color-mix(in srgb, currentColor, transparent 78%);
}

.resource-glyph {
  display: inline-flex;
  width: 1em;
  align-items: center;
  justify-content: center;
  line-height: 1;
  filter: drop-shadow(0 0 4px currentColor);
}

.token-pa {
  color: #b8ff2c;
  background: rgba(20, 44, 14, 0.78);
}

.token-xp {
  color: #dfceff;
  background: rgba(39, 20, 66, 0.78);
}

.token-power {
  color: #ff8d4d;
  background: rgba(59, 21, 7, 0.78);
}

.token-crypto {
  color: #83f8ff;
  background: rgba(7, 38, 48, 0.78);
}

.eyebrow {
  display: inline-flex;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(53, 214, 255, 0.6);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 44px;
}

.stat-grid article,
.mini-grid article,
.glossary-grid article,
.aid-card,
.game-card,
.panel,
.faction-card,
.timeline article {
  border: 1px solid rgba(53, 214, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.07), transparent 42%),
    linear-gradient(315deg, rgba(255, 47, 230, 0.07), transparent 48%),
    rgba(17, 23, 34, 0.9);
  box-shadow: 0 0 24px rgba(53, 214, 255, 0.06);
}

.stat-grid article {
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.stat-grid article::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-top: 1px solid rgba(53, 214, 255, 0.28);
}

.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
}

.section-grid {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}

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

.panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.panel::before,
.aid-card::before,
.timeline article::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.panel h2,
.rules-section h2,
.aid-card h2,
.game-card h2,
.faction-card h2,
.timeline h2,
.glossary-grid h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.panel p,
.timeline p,
.glossary-grid p,
.faction-card p,
.game-card p {
  color: #cbd5e4;
  line-height: 1.6;
}

.image-panel {
  padding: 0;
  overflow: hidden;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.link-grid,
.decision-list {
  display: grid;
  gap: 10px;
}

.link-grid a,
.decision-list span {
  padding: 12px;
  border: 1px solid rgba(53, 214, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.page-header {
  position: relative;
  margin-bottom: 18px;
  padding: 22px 72px 24px 22px;
  overflow: hidden;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.11), rgba(255, 47, 230, 0.07) 45%, transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 32px),
    rgba(9, 13, 21, 0.74);
  box-shadow: var(--neon-shadow);
}

.page-header::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 44%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--magenta), transparent);
}

.page-header::after {
  position: absolute;
  right: 16px;
  bottom: 12px;
  content: "LOG // T47 // V2A";
  color: rgba(255, 255, 255, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
}

.page-header h1 {
  font-size: clamp(2.45rem, 5.4vw, 5.5rem);
}

.page-header .hero-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
}

.anchor-strip {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
  padding: 12px 4px;
  overflow-x: auto;
  border: 1px solid rgba(53, 214, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.98), rgba(14, 9, 26, 0.94)),
    rgba(8, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  scroll-padding-inline: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(53, 214, 255, 0.45) transparent;
}

.anchor-strip a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #cdd6e4;
  background: #0d131d;
  font-size: 0.92rem;
}

.anchor-strip a:hover,
.anchor-strip a:focus-visible,
.anchor-strip a.is-active {
  border-color: rgba(53, 214, 255, 0.58);
  color: #ffffff;
  outline: none;
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.22), rgba(255, 47, 230, 0.12)),
    #0e1724;
  box-shadow:
    inset 0 -2px 0 var(--cyan),
    0 0 22px rgba(53, 214, 255, 0.12);
}

.rules-section {
  scroll-margin-top: 104px;
  position: relative;
  margin: 20px 0;
  padding: 28px 22px 30px;
  overflow: hidden;
  border: 1px solid rgba(53, 214, 255, 0.13);
  border-left: 3px solid rgba(53, 214, 255, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.045), transparent 34%),
    rgba(12, 17, 27, 0.58);
}

.section-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

.section-index {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(53, 214, 255, 0.32);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(53, 214, 255, 0.06);
}

.lead {
  max-width: 860px;
  color: #dce4ef;
  font-size: 1.18rem;
  line-height: 1.65;
}

.rule-block {
  margin: 18px 0;
}

.rule-block h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 7px 0;
  color: #d1dae7;
  line-height: 1.5;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(53, 214, 255, 0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.04), transparent),
    rgba(9, 13, 21, 0.72);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(53, 214, 255, 0.45);
}

td {
  color: #dce3ee;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.callout {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(255, 214, 77, 0.2);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 214, 77, 0.14), transparent),
    rgba(255, 214, 77, 0.08);
  box-shadow: 0 0 28px rgba(255, 214, 77, 0.08);
}

.callout p {
  margin: 8px 0 0;
  color: #f3e6b1;
  line-height: 1.55;
}

.step-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.step-list li {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.step-list p {
  margin: 6px 0 0;
}

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

.mini-grid article {
  padding: 16px;
}

.mini-grid h3 {
  margin: 0 0 8px;
}

.mini-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.wide-image {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.wide-image img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.wide-image figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid rgba(53, 214, 255, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.07), rgba(255, 47, 230, 0.03)),
    rgba(255, 255, 255, 0.04);
}

summary {
  cursor: pointer;
  padding: 14px;
  font-weight: 800;
}

details p {
  margin: 0;
  padding: 0 14px 14px;
  color: #cdd7e6;
}

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

.aid-card {
  position: relative;
  padding: 18px;
  min-height: 0;
}

.aid-card h2 {
  color: var(--cyan);
}

.aid-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.aid-hero-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.aid-hero-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.98;
  max-width: 13ch;
}

.aid-hero-copy p {
  margin: 0;
  color: #cbd5e4;
  line-height: 1.55;
  max-width: 62ch;
}

.aid-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.aid-command-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 72%);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 78%), transparent 32%),
    linear-gradient(90deg, color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 90%), transparent 62%),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 3px 0 0 var(--aid-accent, var(--cyan)),
    0 0 24px color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 88%);
}

.aid-command-index,
.aid-summary-rule {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.aid-command-index {
  color: var(--aid-accent, var(--cyan));
  border: 1px solid color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 56%);
  background: color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 90%);
}

.aid-command-card strong {
  color: #f5fbff;
  font-size: 1.1rem;
  line-height: 1.08;
}

.aid-command-card span:last-child {
  color: #c5d2e3;
  font-size: 0.82rem;
  line-height: 1.35;
}

.aid-phase-strip {
  position: sticky;
  top: 18px;
  z-index: 3;
  margin-bottom: 18px;
}

.aid-master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.aid-summary-card {
  border-color: color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 68%);
  box-shadow:
    inset 3px 0 0 var(--aid-accent, var(--cyan)),
    0 0 24px color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 88%);
}

.aid-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.aid-summary-card::before,
.aid-reference-card::before {
  background: linear-gradient(90deg, var(--aid-accent, var(--cyan)), transparent);
}

.aid-step-index,
.aid-summary-rule {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.aid-step-index {
  border: 1px solid color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 55%);
  color: var(--aid-accent, var(--cyan));
  background: color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 88%);
}

.aid-summary-rule {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.aid-summary-card h2,
.aid-reference-card h2 {
  margin-bottom: 8px;
  color: var(--aid-accent, var(--cyan));
}

.aid-summary-lead {
  margin: 0 0 12px;
  color: #e5edf8;
  font-size: 0.96rem;
  line-height: 1.45;
}

.aid-dense-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aid-dense-list li {
  position: relative;
  margin: 0;
  padding: 10px 0 10px 18px;
  color: #cdd7e6;
  line-height: 1.45;
}

.aid-dense-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.aid-dense-list li::before {
  position: absolute;
  top: 12px;
  left: 0;
  content: "•";
  color: var(--aid-accent, var(--cyan));
  font-weight: 900;
}

.aid-step p,
.aid-reference-card li,
.aid-phase-node p {
  color: #cdd7e6;
  line-height: 1.5;
}

.aid-step-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--aid-accent, var(--cyan));
  border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 90%);
}

.aid-card ul:not(.aid-dense-list) {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.aid-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.aid-turn-card {
  display: grid;
  gap: 12px;
}

.aid-turn-card h2 {
  margin-bottom: 2px;
}

.aid-phase-lane {
  display: grid;
  gap: 10px;
}

.aid-phase-node {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 72%);
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--aid-accent, var(--cyan)), transparent 92%), transparent 72%),
    rgba(255, 255, 255, 0.035);
}

.aid-phase-node strong {
  color: var(--aid-accent, var(--cyan));
  font-size: 0.9rem;
  text-transform: uppercase;
}

.aid-phase-node p {
  margin: 0;
  font-size: 0.9rem;
}

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

.aid-reference-card {
  min-height: 0;
  box-shadow:
    inset 3px 0 0 var(--aid-accent, var(--cyan)),
    0 0 24px rgba(53, 214, 255, 0.05);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 23, 34, 0.72);
}

.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: grid;
  aspect-ratio: 7 / 12;
  min-width: 0;
  overflow: hidden;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  border-color: color-mix(in srgb, var(--card-accent), transparent 62%);
  background:
    radial-gradient(circle at 16% 2%, color-mix(in srgb, var(--card-accent), transparent 78%), transparent 28%),
    linear-gradient(180deg, rgba(2, 5, 14, 0.82), rgba(30, 5, 45, 0.54) 68%, color-mix(in srgb, var(--card-accent), #03050c 74%)),
    var(--card-bg, linear-gradient(180deg, rgba(2, 5, 14, 0.98), rgba(30, 5, 45, 0.92) 68%, color-mix(in srgb, var(--card-accent), #03050c 74%)));
  background-position: center;
  background-size: auto, auto, cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 34px color-mix(in srgb, var(--card-accent), transparent 84%),
    var(--shadow);
}

.game-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.06) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 38%, rgba(255, 255, 255, 0.045) 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 18px);
  opacity: 0.52;
}

.card-titlebar,
.card-art,
.card-log,
.card-rule,
.card-bottom,
.card-meta-line {
  position: relative;
  z-index: 1;
}

.card-faction-mark {
  position: absolute;
  top: 11px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent), white 18%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.26), transparent 28%),
    rgba(4, 7, 15, 0.8);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.38),
    0 0 18px color-mix(in srgb, var(--card-accent), transparent 44%);
}

.card-faction-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.28));
}

.card-titlebar {
  display: grid;
  gap: 3px;
  min-height: 0;
  align-content: center;
  padding: 16px 16px 8px;
  text-align: center;
  text-transform: uppercase;
}

.game-card .card-titlebar h2 {
  margin: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  font-style: italic;
  line-height: 0.95;
  text-shadow: 0 0 16px color-mix(in srgb, var(--card-accent), transparent 50%);
}

.card-titlebar span {
  color: rgba(255, 255, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.56rem;
  letter-spacing: 0.4em;
}

.card-art {
  margin: 0 16px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #070914;
  box-shadow: 0 0 24px color-mix(in srgb, var(--card-accent), transparent 82%);
}

.card-art img,
.card-art-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.card-art img {
  object-fit: cover;
}

.deck-count-mark {
  position: absolute;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.9),
    0 0 10px color-mix(in srgb, var(--card-accent), transparent 35%);
}

.deck-count-mark small {
  display: inline-flex;
  min-width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  margin-top: -8px;
  border-radius: 999px;
  color: #040813;
  background: #fff;
  font-size: 0.52rem;
  text-shadow: none;
}

.card-art-placeholder {
  display: grid;
  place-items: center;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--card-accent), transparent 78%), transparent 68%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 18px),
    linear-gradient(135deg, rgba(53, 214, 255, 0.12), rgba(255, 47, 230, 0.08));
}

.card-art-placeholder span {
  align-self: end;
  color: var(--card-accent);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-art-placeholder strong {
  align-self: start;
  color: #fff;
  font-size: 1.55rem;
  text-transform: uppercase;
  text-shadow: 0 0 18px var(--card-accent);
}

.card-log {
  position: relative;
  min-height: 0;
  margin: 10px 16px 0;
  padding: 8px 10px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(17, 14, 28, 0.82);
}

.card-log::before,
.card-log::after {
  position: absolute;
  left: 26px;
  pointer-events: none;
  content: "";
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.card-log::before {
  bottom: -14px;
  width: 25px;
  height: 15px;
  background: rgba(255, 255, 255, 0.14);
}

.card-log::after {
  bottom: -12px;
  width: 23px;
  height: 13px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(17, 14, 28, 0.96);
}

.card-log span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.46);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.3em;
}

.game-card .card-log p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #eef4ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.game-card .card-rule {
  display: block;
  min-height: 0;
  align-self: center;
  width: 100%;
  margin: 0;
  padding: 20px 16px 10px;
  overflow: hidden;
  color: #f7f2ff;
  font-size: clamp(0.68rem, 0.9vw, 0.86rem);
  font-weight: 800;
  line-height: 1.32;
  text-align: center;
  text-transform: uppercase;
}

.card-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  padding: 8px 16px 12px;
  border-bottom: 8px solid var(--card-accent);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(103, 132, 173, 0.045) 0,
      rgba(103, 132, 173, 0.045) 2px,
      rgba(248, 251, 255, 0) 2px,
      rgba(248, 251, 255, 0) 8px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 245, 255, 0.96)),
    #f8fbff;
}

.card-bottom .resource-chip,
.cost-chip .resource-chip {
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.04),
    0 0 10px color-mix(in srgb, currentColor, transparent 72%);
}

.card-bottom .token-pa,
.cost-chip .token-pa {
  color: #b8ff2c;
  background: rgba(9, 28, 12, 0.92);
}

.card-bottom .token-xp,
.cost-chip .token-xp {
  color: #e6d5ff;
  background: rgba(30, 17, 54, 0.92);
}

.card-bottom .token-power,
.cost-chip .token-power {
  color: #ff9b58;
  background: rgba(45, 16, 6, 0.92);
}

.card-bottom .token-crypto,
.cost-chip .token-crypto {
  color: #8af8ff;
  background: rgba(5, 32, 42, 0.92);
}

.card-effect {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #040813;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 0.9vw, 0.88rem);
}

.card-effect strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cost-chip {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff;
  background: var(--card-accent);
  font-size: 0.7rem;
}

.sell-chip {
  display: grid;
  grid-template-rows: auto auto;
  gap: 2px;
  min-height: 0;
  align-content: center;
  justify-items: center;
  padding: 5px 6px;
  border-radius: 6px;
  color: #fff;
  background: #150016;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.sell-chip small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.sell-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
}

.sell-chip .resource-token {
  width: 1.05em;
  min-width: 1.05em;
  max-width: none;
  height: 1.05em;
  aspect-ratio: 1 / 1;
  margin: 0;
  font-size: 0.92em;
  vertical-align: 0;
}

.sell-chip.is-muted {
  font-size: 0.64rem;
}

.card-meta-line {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
  padding: 7px 16px 10px;
  overflow: hidden;
  background: rgba(5, 4, 12, 0.84);
}

.tag-row,
.keyword-row,
.reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.keyword-row small,
.reward-row strong,
.card-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #dce4ef;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.badge.gear {
  color: #bfe0ff;
  border-color: rgba(53, 214, 255, 0.38);
}

.badge.hack {
  color: #dfceff;
  border-color: rgba(166, 108, 255, 0.42);
}

.badge.mission {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
}

.badge.mystere {
  color: #ffe79a;
  border-color: rgba(255, 214, 77, 0.5);
}

.badge.faction {
  color: #ffc7cc;
  border-color: rgba(255, 77, 93, 0.5);
}

.flavor {
  padding: 10px;
  border-left: 2px solid var(--violet);
  background: rgba(166, 108, 255, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.game-card footer:not(.card-bottom) {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.reward-row strong {
  color: #041014;
  border-color: transparent;
  background: var(--cyan);
}

.card-admin {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(420px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-toolbar label,
.card-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-toolbar input,
.admin-toolbar select,
.card-edit-form input,
.card-edit-form select,
.card-edit-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.04)),
    #0c111a;
  outline: none;
}

.card-edit-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.admin-table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid rgba(53, 214, 255, 0.16);
  border-radius: var(--radius);
}

.admin-table {
  min-width: 620px;
}

.admin-table tbody tr {
  cursor: pointer;
  transition: background 150ms ease;
}

.admin-table tbody tr:hover td,
.admin-table tbody tr:focus-visible td {
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.09), rgba(255, 47, 230, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr.is-selected td {
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.12), rgba(255, 47, 230, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.admin-table tbody tr.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--cyan);
}

.admin-table td strong,
.admin-table td small {
  display: block;
}

.admin-table td small {
  margin-top: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.admin-editor {
  position: sticky;
  top: 18px;
}

.editor-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.editor-preview {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.06)),
    rgba(255, 255, 255, 0.04);
}

.preview-header strong {
  color: #eaf2ff;
  text-transform: uppercase;
}

.live-card-preview {
  width: min(100%, 340px);
  margin: 0 auto;
}

.live-card-preview .game-card {
  width: 100%;
}

.card-edit-form {
  display: grid;
  gap: 14px;
}

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

.editor-heading h2 {
  margin: 6px 0 4px;
}

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

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.muted,
.empty-state {
  color: var(--muted);
}

.fact-list {
  display: grid;
  gap: 10px;
}

.fact-list div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(53, 214, 255, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.06), transparent),
    rgba(255, 255, 255, 0.04);
}

.fact-list span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.zone-grid span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(53, 214, 255, 0.36);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.08);
  font-weight: 900;
}

.board-page-hero,
.board-topology-grid,
.board-section,
.board-protocol-grid,
.board-mystery-grid {
  scroll-margin-top: 88px;
}

.board-page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(24px, 4vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(83, 235, 255, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(4, 10, 18, 0.92) 0, rgba(4, 10, 18, 0.74) 42%, rgba(4, 10, 18, 0.9) 100%),
    url("./assets/plateau-photo.jpg") center / cover;
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(53, 214, 255, 0.14);
}

.board-page-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 16%, rgba(53, 214, 255, 0.24), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(255, 47, 230, 0.22), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    44px 44px,
    44px 44px;
  mix-blend-mode: screen;
  opacity: 0.5;
}

.board-page-hero-copy,
.board-page-hero-aside {
  position: relative;
  z-index: 1;
}

.board-page-hero-copy {
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 520px;
}

.board-page-hero-copy h1 {
  margin: 0;
  font-size: clamp(3.8rem, 9vw, 7.4rem);
  line-height: 0.84;
  text-transform: uppercase;
  text-shadow:
    0 0 28px rgba(53, 214, 255, 0.2),
    0 0 40px rgba(255, 47, 230, 0.18);
}

.board-page-hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #edf5ff;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  line-height: 1.7;
}

.board-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.board-hero-tags span,
.board-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #eef6ff;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.14), rgba(255, 47, 230, 0.08)),
    rgba(4, 10, 18, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.board-page-hero-aside {
  display: grid;
  gap: 14px;
  align-content: end;
}

.board-hero-card,
.board-hero-callout {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.09), rgba(255, 47, 230, 0.05) 72%),
    rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 22px rgba(53, 214, 255, 0.08);
}

.board-hero-card h2,
.board-hero-callout h2,
.board-schema-head h2,
.board-district-card h3,
.board-economy-card h3,
.board-route-visual-copy h2,
.board-protocol-panel h2,
.board-mystery-panel h2,
.board-mystery-protocol h2 {
  margin: 6px 0 0;
}

.board-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.board-hero-fact {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 68%),
    rgba(255, 255, 255, 0.025);
}

.board-hero-fact span,
.board-topology-stat span,
.board-layer-card span,
.board-zone-card-head span,
.board-economy-metrics small,
.board-protocol-item span,
.board-mystery-zone-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-hero-fact strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.board-hero-callout p {
  margin: 8px 0 0;
  color: #d4dfef;
  line-height: 1.65;
}

.board-topology-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 18px;
  margin: 22px 0;
}

.board-schema-panel,
.board-intel-panel,
.board-route-visual,
.board-protocol-panel,
.board-mystery-panel,
.board-mystery-protocol {
  min-width: 0;
}

.board-schema-panel {
  display: grid;
  gap: 18px;
  padding: 0;
}

.board-schema-head {
  display: grid;
  gap: 10px;
  padding: 22px 22px 0;
}

.board-schema-head p {
  margin: 0;
  max-width: 58ch;
}

.board-schema-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.board-schema-media::after,
.board-route-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 47, 230, 0.14), transparent 24%, transparent 76%, rgba(53, 214, 255, 0.16)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 1px, transparent 7px);
  mix-blend-mode: screen;
  opacity: 0.26;
}

.board-schema-media img {
  width: 100%;
  min-height: 440px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.board-intel-panel {
  display: grid;
  gap: 18px;
}

.board-topology-stats,
.board-economy-grid,
.board-district-grid {
  display: grid;
  gap: 12px;
}

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

.board-topology-stat,
.board-layer-card,
.board-zone-card,
.board-protocol-item,
.board-mystery-zone {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.025);
}

.board-topology-stat {
  display: grid;
  gap: 5px;
  min-height: 120px;
  padding: 14px;
}

.board-topology-stat strong {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 0.92;
}

.board-topology-stat small {
  color: #cfdbeb;
  font-size: 0.82rem;
  line-height: 1.4;
}

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

.board-layer-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 16px;
}

.board-layer-card strong,
.board-protocol-item strong,
.board-mystery-zone-head strong,
.board-district-copy h3,
.board-district-footer span,
.board-mystery-zone small {
  color: #fff;
}

.board-layer-card p,
.board-protocol-item p,
.board-district-copy p,
.board-route-visual-copy p {
  margin: 0;
  color: #d1dceb;
  line-height: 1.55;
}

.board-section {
  margin: 22px 0;
}

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

.board-district-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--district-color), transparent 72%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--district-color), transparent 82%), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 62%),
    rgba(11, 16, 26, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 24px color-mix(in srgb, var(--district-color), transparent 90%);
}

.board-district-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.board-district-copy h3 {
  margin: 6px 0 10px;
  font-size: clamp(1.34rem, 2vw, 1.86rem);
  line-height: 1;
}

.board-district-copy p {
  max-width: 50ch;
}

.board-district-faction {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 132px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 60%),
    rgba(255, 255, 255, 0.025);
  text-align: center;
}

.board-district-faction img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--district-color), transparent 68%));
}

.board-district-faction span {
  color: #d6e3f5;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.board-district-zones {
  display: grid;
  gap: 10px;
}

.board-zone-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.board-zone-card.is-central {
  border-color: rgba(255, 214, 77, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 214, 77, 0.09), transparent 64%),
    rgba(255, 255, 255, 0.025);
}

.board-zone-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-zone-card-head strong {
  color: #fff;
  font-size: 0.92rem;
}

.board-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-chip {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.board-district-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 4px;
}

.board-district-footer span {
  color: #d7e3f4;
  font-size: 0.76rem;
  font-weight: 800;
}

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

.board-economy-card {
  display: grid;
  gap: 14px;
  min-height: 250px;
  padding: 18px;
  border-radius: 18px;
}

.board-economy-card h3 {
  color: #fff;
  font-size: 1.18rem;
  line-height: 1.35;
}

.board-economy-peripherie {
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.07), transparent 28%),
    linear-gradient(135deg, rgba(110, 126, 146, 0.18), transparent 62%),
    rgba(13, 18, 28, 0.94);
}

.board-economy-centre {
  background:
    radial-gradient(circle at 0 0, rgba(53, 214, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(53, 214, 255, 0.16), transparent 62%),
    rgba(9, 16, 28, 0.94);
}

.board-economy-sacre {
  background:
    radial-gradient(circle at 0 0, rgba(255, 214, 77, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 214, 77, 0.18), transparent 62%),
    rgba(14, 12, 20, 0.94);
}

.board-economy-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.board-economy-metrics span {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 68%),
    rgba(255, 255, 255, 0.025);
}

.board-economy-metrics strong {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
}

.board-protocol-grid {
  align-items: stretch;
}

.board-route-visual {
  position: relative;
  display: grid;
  min-height: 100%;
  padding: 0;
}

.board-route-visual img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
  filter: saturate(1.16) contrast(1.04);
}

.board-route-visual-copy {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  max-width: 480px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.05) 72%),
    rgba(8, 12, 20, 0.84);
  backdrop-filter: blur(14px);
}

.board-protocol-panel,
.board-mystery-panel,
.board-mystery-protocol {
  display: grid;
  gap: 14px;
}

.board-protocol-list {
  display: grid;
  gap: 10px;
}

.board-protocol-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.board-protocol-item > span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(127, 232, 255, 0.18);
  border-radius: 12px;
  color: #9af2ff;
  background: rgba(53, 214, 255, 0.08);
}

.board-protocol-item.is-mystery > span {
  border-color: rgba(255, 214, 77, 0.22);
  color: #ffe08a;
  background: rgba(255, 214, 77, 0.1);
}

.board-mystery-zone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.board-mystery-zone {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 12px;
}

.board-mystery-zone.is-central {
  border-color: rgba(255, 214, 77, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 214, 77, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.025);
}

.board-mystery-zone-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.board-mystery-zone-head strong {
  font-size: 1.28rem;
  line-height: 1;
}

.board-mystery-zone small {
  color: #cad7e9;
  font-size: 0.8rem;
  line-height: 1.35;
}

@media (max-width: 920px) {
  .board-page-hero,
  .board-topology-grid,
  .board-district-grid,
  .board-economy-grid,
  .board-layer-grid,
  .board-mystery-zone-grid {
    grid-template-columns: 1fr;
  }

  .board-page-hero-copy {
    min-height: auto;
  }

  .board-hero-facts,
  .board-topology-stats,
  .board-economy-metrics {
    grid-template-columns: 1fr;
  }

  .board-district-top {
    grid-template-columns: 1fr;
  }

  .board-district-faction {
    width: 100%;
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .board-route-visual img {
    min-height: 360px;
  }
}

@media (max-width: 700px) {
  .board-page-hero {
    padding: 18px;
  }

  .board-page-hero-copy h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .board-hero-facts,
  .board-topology-stats,
  .board-economy-metrics,
  .board-mystery-zone-grid {
    grid-template-columns: 1fr;
  }

  .board-route-visual-copy {
    position: relative;
    inset: auto;
    margin: 0;
    max-width: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 18px 18px;
  }

  .board-route-visual img {
    min-height: 300px;
  }

  .board-protocol-item {
    grid-template-columns: 1fr;
  }
}

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

.faction-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--faction-color), transparent 45%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--faction-color), transparent 82%), transparent 38%),
    linear-gradient(315deg, rgba(53, 214, 255, 0.08), transparent 48%),
    rgba(15, 19, 30, 0.94);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--faction-color), transparent 82%),
    0 0 34px color-mix(in srgb, var(--faction-color), transparent 82%),
    var(--shadow);
}

.faction-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 14px);
  opacity: 0.18;
}

.faction-card figure {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 170px;
  margin: 0;
  place-items: center;
}

.faction-card figure::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  content: "";
  border: 1px solid color-mix(in srgb, var(--faction-color), transparent 38%);
  border-radius: 50%;
  box-shadow: 0 0 38px color-mix(in srgb, var(--faction-color), transparent 62%);
}

.faction-card img {
  position: relative;
  z-index: 1;
  width: min(100%, 150px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--faction-color), transparent 55%));
}

.faction-content {
  position: relative;
  z-index: 1;
}

.faction-content blockquote {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--faction-color);
  border-radius: 0 14px 14px 0;
  color: #f4f7ff;
  background: color-mix(in srgb, var(--faction-color), transparent 88%);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
}

.faction-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--faction-color);
  box-shadow: 0 0 24px var(--faction-color);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.glossary-grid article {
  padding: 18px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  position: relative;
  padding: 20px;
}

.search-results {
  position: sticky;
  z-index: 10;
  top: 0;
  width: min(1240px, calc(100vw - 324px));
  margin: 0 auto;
  padding-top: 12px;
}

.search-results-inner {
  padding: 14px;
  border: 1px solid rgba(53, 214, 255, 0.36);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.96);
  box-shadow: var(--shadow);
}

.search-results-inner a {
  display: block;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.search-results-inner a span {
  display: block;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.play-hub,
.play-session {
  display: grid;
  gap: 18px;
}

.play-session {
  position: relative;
}

.turn-pass-transition {
  position: fixed;
  z-index: 72;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  pointer-events: all;
  background:
    radial-gradient(circle at 18% 24%, color-mix(in srgb, var(--from-player-color), transparent 82%), transparent 28%),
    radial-gradient(circle at 82% 72%, color-mix(in srgb, var(--to-player-color), transparent 82%), transparent 28%),
    rgba(4, 7, 12, 0.74);
  backdrop-filter: blur(14px);
}

.turn-pass-swipe {
  position: absolute;
  inset: -10% -22%;
  background:
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0) 0%,
      color-mix(in srgb, var(--from-player-color), transparent 16%) 18%,
      rgba(255, 255, 255, 0.84) 33%,
      color-mix(in srgb, var(--to-player-color), transparent 12%) 52%,
      rgba(255, 255, 255, 0) 72%
    );
  opacity: 0;
  transform: translateX(-118%) skewX(-18deg);
  filter: blur(3px);
  animation: turn-pass-swipe var(--turn-pass-duration) cubic-bezier(0.2, 0.76, 0.22, 1) forwards;
}

.turn-pass-card {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: min(440px, calc(100vw - 56px));
  max-width: min(440px, calc(100vw - 56px));
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.08)),
    rgba(8, 12, 20, 0.94);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(53, 214, 255, 0.12);
  text-align: center;
}

.turn-pass-card img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.18));
}

.turn-pass-card strong {
  color: #fff;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.turn-pass-card small {
  color: #d2deef;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.turn-pass-card .eyebrow {
  color: #c3f6ff;
  text-shadow: 0 0 18px rgba(127, 232, 255, 0.2);
}

.turn-pass-card.is-from {
  transform: translateX(0);
  animation: turn-pass-card-out var(--turn-pass-duration) cubic-bezier(0.2, 0.76, 0.22, 1) forwards;
}

.turn-pass-card.is-to {
  transform: translateX(112%);
  animation: turn-pass-card-in var(--turn-pass-duration) cubic-bezier(0.2, 0.76, 0.22, 1) forwards;
}

@keyframes turn-pass-swipe {
  0% {
    opacity: 0;
    transform: translateX(-118%) skewX(-18deg);
  }
  18% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(118%) skewX(-18deg);
  }
}

@keyframes turn-pass-card-out {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  52% {
    opacity: 0.18;
    transform: translateX(-24%) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translateX(-34%) scale(0.94);
  }
}

@keyframes turn-pass-card-in {
  0% {
    opacity: 0;
    transform: translateX(112%) scale(1.04);
  }
  38% {
    opacity: 0.16;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.play-create-panel {
  border-color: rgba(53, 214, 255, 0.28);
  box-shadow: var(--neon-shadow);
}

.play-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.play-create-grid label,
.lobby-player label,
.agent-control label,
.manual-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.play-create-grid input,
.play-create-grid select,
.lobby-player input,
.lobby-player select,
.agent-control select,
.manual-form input,
.manual-form select,
.manual-form textarea,
.play-move-form select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05)),
    #0b1019;
  outline: none;
}

.play-full-width {
  grid-column: 1 / -2;
}

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

.session-card {
  display: grid;
  gap: 14px;
}

.session-meta,
.session-players,
.session-actions,
.buy-row,
.location-tags,
.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-meta span,
.session-players span,
.location-tags span,
.mystery-marker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(53, 214, 255, 0.16);
  border-radius: var(--radius);
  color: #dbe7f5;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}

.session-players span {
  border-color: color-mix(in srgb, var(--player-color), transparent 56%);
  box-shadow: inset 3px 0 0 var(--player-color);
}

.play-topbar {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(53, 214, 255, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 7% 0, color-mix(in srgb, var(--player-color), transparent 74%), transparent 32%),
    linear-gradient(90deg, rgba(255, 47, 230, 0.08), rgba(53, 214, 255, 0.07)),
    rgba(10, 14, 22, 0.92);
  box-shadow:
    inset 4px 0 0 var(--player-color),
    var(--neon-shadow);
}

.play-topbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 18px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.play-turn-focus {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.play-topbar-copy {
  min-width: 0;
}

.play-turn-focus {
  justify-content: space-between;
}

.play-turn-focus img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--player-color), transparent 48%));
}

.play-topbar h1 {
  margin: 2px 0;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.play-topbar p {
  margin: 0;
  color: var(--muted);
}

.turn-timer-chip {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 9px 12px;
  border: 1px solid rgba(127, 232, 255, 0.24);
  border-radius: 12px;
  color: #dffbff;
  background:
    linear-gradient(180deg, rgba(17, 27, 40, 0.92), rgba(9, 13, 22, 0.98)),
    rgba(9, 13, 22, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(127, 232, 255, 0.06),
    0 0 22px rgba(53, 214, 255, 0.12);
  font: inherit;
  text-align: center;
  text-shadow: 0 0 8px rgba(127, 232, 255, 0.3);
  cursor: pointer;
}

.turn-timer-chip small {
  color: #7fe8ff;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.turn-timer-chip strong {
  color: #f6feff;
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.turn-timer-chip:hover,
.turn-timer-chip:focus-visible {
  border-color: rgba(127, 232, 255, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(127, 232, 255, 0.1),
    0 0 26px rgba(53, 214, 255, 0.24);
}

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

.play-topbar-metric {
  display: grid;
  gap: 5px;
  min-height: 58px;
  align-content: center;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 54%),
    rgba(255, 255, 255, 0.035);
}

.play-topbar-metric small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.play-topbar-metric strong {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  color: #fff;
  font-size: 1rem;
  line-height: 1.1;
}

.play-topbar-metrics > .metric-cash {
  border-color: rgba(255, 214, 77, 0.28);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 77, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.play-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: absolute;
  top: -18px;
  right: 16px;
  justify-content: flex-end;
  align-items: center;
}

.play-topbar-actions .icon-button {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: #7fe8ff;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 14px rgba(53, 214, 255, 0.22);
}

.play-topbar-actions .icon-button:hover,
.play-topbar-actions .icon-button:focus-visible {
  color: #d6fbff;
  background: transparent;
  box-shadow: none;
  text-shadow:
    0 0 8px rgba(53, 214, 255, 0.18),
    0 0 18px rgba(53, 214, 255, 0.34);
}

.play-topbar-actions .icon-button:disabled {
  opacity: 0.32;
  text-shadow: none;
}

.play-lobby-grid,
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 18px;
  align-items: start;
}

.play-hand-band {
  min-width: 0;
}

.session-viewer-panel,
.viewer-link-field {
  display: grid;
  gap: 12px;
}

.viewer-link-grid {
  display: grid;
  gap: 12px;
}

.viewer-link-field {
  padding: 12px;
  border: 1px solid rgba(53, 214, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.52);
}

.viewer-link-field label {
  display: grid;
  gap: 6px;
}

.viewer-link-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.viewer-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.host-hand-inspector,
.host-hand-list,
.host-hand-card {
  display: grid;
  gap: 12px;
}

.host-hand-card {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--player-color), transparent 72%);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.45);
}

.host-hand-card summary {
  cursor: pointer;
  list-style: none;
}

.host-hand-card summary::-webkit-details-marker {
  display: none;
}

.host-hand-card summary span {
  display: grid;
  gap: 4px;
}

.lobby-player-list {
  display: grid;
  gap: 12px;
}

.lobby-player {
  display: grid;
  gap: 12px;
  border-color: color-mix(in srgb, var(--player-color), transparent 62%);
  box-shadow: inset 3px 0 0 var(--player-color);
}

.phase-strip {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgba(53, 214, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(14px);
}

.phase-strip span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.phase-strip .is-active {
  border-color: rgba(53, 214, 255, 0.56);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.12);
  box-shadow: 0 0 20px rgba(53, 214, 255, 0.14);
}

.phase-strip .is-ready-to-finish {
  border-color: rgba(255, 77, 93, 0.4);
  color: #ffd7ef;
  background:
    linear-gradient(135deg, rgba(255, 77, 93, 0.16), rgba(162, 76, 255, 0.16)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 0 1px rgba(255, 77, 93, 0.12) inset,
    0 0 18px rgba(255, 47, 230, 0.16);
  animation: phase-finish-chip-pulse 1.6s ease-in-out infinite;
}

.phase-strip-actions {
  display: flex;
  margin-left: auto;
}

.phase-strip-cta {
  white-space: nowrap;
}

.phase-strip-cta.is-ready-to-finish {
  border-color: rgba(255, 77, 93, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 77, 93, 0.82), rgba(166, 108, 255, 0.88)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 18px rgba(255, 77, 93, 0.28),
    0 0 28px rgba(166, 108, 255, 0.24);
  animation: phase-finish-pulse 1.4s ease-in-out infinite;
}

@keyframes phase-finish-pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06) inset,
      0 0 18px rgba(255, 77, 93, 0.28),
      0 0 28px rgba(166, 108, 255, 0.24);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1) inset,
      0 0 26px rgba(255, 77, 93, 0.38),
      0 0 42px rgba(166, 108, 255, 0.32);
  }
}

@keyframes phase-finish-chip-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 77, 93, 0.12) inset,
      0 0 18px rgba(255, 47, 230, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 77, 93, 0.18) inset,
      0 0 24px rgba(255, 77, 93, 0.22),
      0 0 38px rgba(166, 108, 255, 0.24);
  }
}

.play-main,
.play-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.viewer-shell,
.viewer-player-stack,
.viewer-board-only {
  display: grid;
  gap: 16px;
}

.viewer-shell {
  min-width: 0;
}

.viewer-corner-label {
  display: grid;
  justify-self: start;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--player-color, var(--cyan)), transparent 56%);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--player-color, var(--cyan)), transparent 78%), transparent 34%),
    rgba(8, 12, 20, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 22px color-mix(in srgb, var(--player-color, var(--cyan)), transparent 80%);
}

.viewer-corner-label strong {
  color: color-mix(in srgb, var(--player-color, var(--cyan)), white 18%);
  font-size: 1.15rem;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 18px color-mix(in srgb, var(--player-color, var(--cyan)), transparent 58%);
}

.viewer-status-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-color: color-mix(in srgb, var(--player-color, var(--cyan)), transparent 62%);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--player-color, var(--cyan)), transparent 80%), transparent 34%),
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05) 62%),
    rgba(8, 12, 20, 0.94);
}

.viewer-status-copy {
  display: grid;
  gap: 4px;
}

.viewer-status-copy strong {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.viewer-status-copy p,
.viewer-hand-note {
  margin: 0;
  color: var(--muted);
}

.viewer-status-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.viewer-status-metrics span {
  display: grid;
  gap: 3px;
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.viewer-status-metrics small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-status-metrics b {
  color: #fff;
  font-size: 0.92rem;
}

.viewer-shell-player .board-stage,
.viewer-shell-board .board-stage {
  margin: 0;
}

.viewer-play-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
  gap: 14px;
}

.viewer-play-side {
  align-content: start;
}

.viewer-shell-player .radial-board-wrap {
  --board-wrap-limit: 1120px;
  --board-wrap-vh-offset: 220px;
}

.viewer-shell-board .radial-board-wrap {
  --board-wrap-limit: 1120px;
  --board-wrap-vh-offset: 190px;
}

.viewer-shell-player .board-stage-actions,
.viewer-shell-board .board-stage-actions {
  justify-content: flex-end;
}

.hand-panel-viewer .hand-panel-content {
  overflow: visible;
}

.hand-panel-viewer .hand-card-rail {
  padding-bottom: 10px;
}

.play-side-top {
  align-content: start;
}

.active-console {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--player-color), transparent 56%);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--player-color), transparent 74%), transparent 34%),
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.06)),
    rgba(8, 12, 20, 0.94);
  box-shadow:
    inset 4px 0 0 var(--player-color),
    var(--neon-shadow);
}

.active-console-compact {
  padding: 14px;
}

.active-console-header {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
}

.active-console-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.active-console-title img {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--player-color), transparent 48%));
}

.active-console h2 {
  margin: 4px 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.active-console p {
  margin: 0;
  color: var(--muted);
}

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

.active-metrics > span,
.active-agent-strip,
.action-hints span,
.quick-correction-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 54%),
    rgba(255, 255, 255, 0.035);
}

.active-metrics > span {
  display: grid;
  gap: 5px;
  min-height: 58px;
  align-content: center;
  padding: 9px;
}

.command-agent-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.command-agent-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #eef6ff;
  text-align: left;
  background:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--player-color), transparent 72%), transparent 52%),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.command-agent-chip img {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--player-color), transparent 42%));
}

.command-agent-chip.is-special img {
  width: 42px;
  height: 42px;
}

.command-agent-chip strong,
.command-agent-chip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-agent-chip strong {
  color: #fff;
  font-size: 0.82rem;
  line-height: 1;
  text-transform: uppercase;
}

.command-agent-chip small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.command-agent-chip.is-active {
  border-color: rgba(86, 255, 52, 0.68);
  box-shadow: 0 0 20px rgba(86, 255, 52, 0.18);
}

.command-agent-chip.is-locked {
  cursor: not-allowed;
  opacity: 0.38;
  filter: grayscale(0.85);
}

.active-metrics > span > small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.active-metrics > span > strong {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  color: #fff;
  font-size: 1rem;
  line-height: 1.1;
}

.active-metrics > .metric-cash {
  border-color: rgba(255, 214, 77, 0.28);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 77, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.active-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.8fr);
  gap: 12px;
  margin-top: 16px;
}

.active-console-grid:not(:has(.action-hints)) {
  grid-template-columns: 1fr;
}

.active-agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.active-agent-strip {
  display: grid;
  gap: 5px;
  padding: 10px;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--player-color), transparent 20%);
}

.active-agent-strip.is-muted {
  opacity: 0.62;
}

.active-agent-strip strong,
.quick-correction-card strong {
  color: #fff;
}

.active-agent-strip > span,
.active-agent-strip small,
.quick-correction-card small {
  color: var(--muted);
  font-size: 0.76rem;
}

.active-agent-strip small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.action-hints {
  display: grid;
  gap: 8px;
}

.action-hints span {
  display: block;
  padding: 10px 12px;
  color: #eef6ff;
  font-size: 0.86rem;
  line-height: 1.35;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.turn-panel-header,
.side-panel-header,
.location-head,
.agent-control header {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.board-hover-panel {
  display: grid;
  gap: 10px;
}

.board-hover-panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.board-hover-panel-head img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.16));
}

.board-hover-panel-head strong {
  display: block;
  color: #fff;
}

.board-hover-panel-head small,
.board-hover-summary small {
  display: block;
  color: var(--muted);
}

.board-hover-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.board-hover-metrics > span,
.board-hover-agent-chip {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 54%),
    rgba(255, 255, 255, 0.03);
}

.board-hover-metrics > span {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.board-hover-metrics small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-hover-metrics strong {
  color: #fff;
  font-size: 0.92rem;
}

.board-hover-agent-list {
  display: grid;
  gap: 8px;
}

.board-hover-agent-chip {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  color: inherit;
  text-align: left;
  box-shadow: inset 3px 0 0 var(--player-color);
}

.board-hover-agent-chip strong {
  color: #fff;
}

.board-hover-agent-chip small {
  color: var(--muted);
}

.board-hover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.turn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.turn-actions .primary-button,
.turn-actions .ghost-button {
  min-height: 40px;
  padding: 8px 12px;
}

.income-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.compact-turn p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.income-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.income-details {
  width: fit-content;
  max-width: 100%;
}

.income-details summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.income-details summary::-webkit-details-marker {
  display: none;
}

.income-details summary::before {
  content: "+";
  display: inline-flex;
  width: 1.2em;
  justify-content: center;
  margin-right: 4px;
  border: 1px solid rgba(53, 214, 255, 0.4);
  border-radius: 999px;
}

.income-details[open] summary::before {
  content: "-";
}

.income-details > div {
  display: grid;
  gap: 7px;
  width: min(540px, 78vw);
  margin-top: 8px;
}

.income-details span {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.board-stage {
  position: relative;
  overflow: visible;
  padding: 14px;
  border: 1px solid rgba(53, 214, 255, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 50%, rgba(53, 214, 255, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(166, 108, 255, 0.11), rgba(5, 9, 17, 0.92) 46%, rgba(255, 47, 230, 0.07)),
    rgba(6, 10, 18, 0.94);
  box-shadow: var(--neon-shadow);
}

.board-stage::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(53, 214, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 214, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 0 62%, transparent 85%);
}

.board-stage-header,
.board-workbench,
.radial-board-wrap,
.board-action-dock {
  position: relative;
  z-index: 1;
}

.board-stage-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.board-stage.is-minimal .board-stage-actions-standalone {
  margin-bottom: 12px;
}

.board-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-stage-header h2 {
  margin: 2px 0 0;
  color: #fff;
  line-height: 0.92;
  text-transform: uppercase;
}

.board-shop-toggle.is-active {
  border-color: rgba(127, 232, 255, 0.48);
  color: #09131f;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.92), rgba(176, 255, 47, 0.94)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 22px rgba(53, 214, 255, 0.22);
}

.legend-owner {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 77, 93, 0.92), rgba(104, 242, 122, 0.9)) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
}

.legend-shop {
  background: var(--yellow) !important;
}

.legend-turret {
  background: var(--red) !important;
}

.legend-reachable {
  background: #fff !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.38);
}

.board-workbench {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  justify-items: center;
  overflow: visible;
}

.radial-board-wrap {
  --board-wrap-limit: 980px;
  --board-wrap-vh-offset: 220px;
  position: relative;
  display: grid;
  width: min(100%, var(--board-wrap-limit), calc(100vh - var(--board-wrap-vh-offset)));
  aspect-ratio: 1;
  justify-self: center;
  place-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.045), transparent 58%),
    rgba(0, 0, 0, 0.18);
  overflow: visible;
  isolation: isolate;
}

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

.radial-board-wrap.has-open-popover {
  z-index: 12;
}

.radial-board-wrap.has-open-shop .radial-board-svg {
  pointer-events: none;
  opacity: 0.2;
  filter: saturate(0.82) brightness(0.76);
}

.radial-board-wrap.is-board-locked .radial-board-svg {
  pointer-events: none;
}

.radial-board-wrap.is-board-locked:not(:has(.board-phase-overlay)) .radial-board-svg {
  filter: saturate(0.84) brightness(0.92);
}

.board-phase-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at center, rgba(7, 11, 19, 0.18), rgba(7, 11, 19, 0.78)),
    rgba(6, 8, 14, 0.3);
  backdrop-filter: blur(8px);
}

.board-phase-card {
  display: grid;
  gap: 12px;
  width: min(520px, calc(100% - 12px));
  max-height: calc(100% - 8px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--phase-tone, var(--cyan)), transparent 52%);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--phase-tone, var(--cyan)), transparent 82%), transparent 46%),
    linear-gradient(135deg, rgba(83, 235, 255, 0.08), rgba(255, 47, 230, 0.06) 72%),
    rgba(9, 13, 22, 0.94);
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.34),
    0 0 28px color-mix(in srgb, var(--phase-tone, var(--cyan)), transparent 84%);
}

.board-phase-card > strong {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.board-phase-card > p {
  margin: 0;
  color: #eef6ff;
  font-size: 1.02rem;
  line-height: 1.45;
}

.board-phase-doctrine {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--phase-tone, var(--cyan)), transparent 68%);
  border-left: 4px solid var(--phase-tone, var(--cyan));
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--phase-tone, var(--cyan)), transparent 88%), transparent 72%),
    rgba(255, 255, 255, 0.035);
}

.board-phase-doctrine small {
  color: color-mix(in srgb, var(--phase-tone, var(--cyan)), #ffffff 28%);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.board-phase-doctrine span {
  color: #f8fbff;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.42;
}

.board-phase-income-grid,
.board-phase-summary-list {
  display: grid;
  gap: 8px;
}

.board-phase-income-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.board-phase-income-grid span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.028);
}

.board-phase-summary-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.028);
}

.board-phase-income-grid small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-phase-income-grid b,
.board-phase-summary-item {
  color: #fff;
}

.board-phase-card.is-end-turn {
  width: min(760px, calc(100% - 12px));
}

.board-phase-summary-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.board-phase-summary-glyph,
.board-phase-summary-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(83, 235, 255, 0.16), rgba(196, 255, 60, 0.14)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 1px rgba(127, 232, 255, 0.12) inset,
    0 0 14px rgba(83, 235, 255, 0.08);
  color: #f5fbff;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 900;
}

.board-phase-summary-glyph.is-after-agent {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
}

.board-phase-summary-count {
  width: auto;
  min-width: 26px;
  padding-inline: 8px;
  font-size: 0.72rem;
}

.board-phase-summary-agent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5, 9, 17, 0.92);
  border: 1px solid rgba(127, 232, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 16px rgba(83, 235, 255, 0.08);
}

.board-phase-summary-agent.is-special {
  width: 34px;
  height: 34px;
}

.board-phase-summary-agent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-phase-summary-agent b {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.board-phase-summary-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 4px;
  min-height: 28px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 158, 57, 0.16), rgba(255, 210, 101, 0.18)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 1px rgba(255, 166, 78, 0.18) inset,
    0 0 14px rgba(255, 166, 78, 0.12);
  color: #fff1dc;
}

.board-phase-summary-xp-pill .resource-chip {
  margin: 0;
}

.board-phase-summary-xp-pill b {
  color: #fff1dc;
  font-weight: 950;
}

.board-phase-summary-text {
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.board-phase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.board-phase-actions .primary-button {
  min-height: 46px;
  padding: 10px 18px;
}

.board-phase-reaction-form {
  display: grid;
  gap: 12px;
}

.board-phase-reaction-form label {
  display: grid;
  gap: 6px;
  color: #eef6ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.board-phase-reaction-form select {
  min-height: 42px;
}

.board-phase-overlay.is-tactics-finish-prompt {
  align-items: end;
  padding: 22px 22px 34px;
  background:
    radial-gradient(circle at center, rgba(7, 11, 19, 0.04), rgba(7, 11, 19, 0.18)),
    transparent;
  backdrop-filter: none;
}

.board-phase-card.is-tactics-finish-prompt {
  width: min(520px, calc(100% - 20px));
  gap: 10px;
  border-color: rgba(255, 77, 93, 0.2);
  background:
    radial-gradient(circle at 12% 0, rgba(255, 77, 93, 0.12), transparent 40%),
    linear-gradient(135deg, rgba(83, 235, 255, 0.08), rgba(255, 47, 230, 0.08)),
    rgba(9, 13, 22, 0.94);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(255, 77, 93, 0.12);
}

.board-phase-card.is-tactics-finish-prompt > strong {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.board-phase-actions.is-compact-confirm {
  justify-content: flex-end;
}

.board-phase-overlay.is-search-reveal {
  z-index: 61;
  background:
    radial-gradient(circle at center, rgba(83, 235, 255, 0.08), rgba(7, 11, 19, 0.7)),
    rgba(6, 8, 14, 0.34);
}

.board-phase-card.is-search-reveal {
  width: min(540px, calc(100% - 12px));
  gap: 12px;
}

.board-search-reveal-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.board-search-reveal-stats span,
.board-search-reveal-reward {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.028);
}

.board-search-reveal-stats small,
.board-search-reveal-reward small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-search-reveal-stats b,
.board-search-reveal-reward strong {
  color: #fff;
  font-size: 0.96rem;
  line-height: 1.2;
}

.board-search-reveal-reward {
  border-color: rgba(255, 255, 255, 0.1);
}

.board-search-reveal-reward.is-win {
  border-color: rgba(127, 232, 255, 0.22);
  box-shadow: 0 0 22px rgba(127, 232, 255, 0.08);
}

.board-search-reveal-reward.is-loss {
  border-color: rgba(255, 109, 122, 0.22);
  box-shadow: 0 0 22px rgba(255, 109, 122, 0.08);
}

.board-inline-shop-panel {
  position: absolute;
  left: 18px;
  top: 18px;
  width: min(1020px, calc(100% - 36px));
  max-width: 100%;
  pointer-events: auto;
}

.board-phase-card.is-shop {
  width: min(1040px, calc(100% - 12px));
  gap: 0;
  padding: 18px;
}

.board-phase-card.is-shop.is-inline-shop {
  width: 100%;
  max-height: calc(100% - 24px);
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(8, 14, 24, 0.94), rgba(18, 20, 34, 0.92)),
    rgba(10, 14, 22, 0.96);
  box-shadow:
    0 0 0 1px rgba(127, 232, 255, 0.08) inset,
    0 16px 30px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(53, 214, 255, 0.12);
}

.board-phase-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.82fr);
  gap: 14px;
  align-items: stretch;
}

.board-phase-shop-main,
.board-phase-shop-info-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.board-phase-shop-main {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at 14% 0%, rgba(83, 235, 255, 0.14), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(255, 47, 230, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 0 0 1px rgba(127, 232, 255, 0.04),
    0 0 24px rgba(53, 214, 255, 0.08);
}

.board-phase-shop-head {
  display: grid;
  gap: 0;
}

.board-phase-shop-head .eyebrow {
  color: #7fe8ff;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(127, 232, 255, 0.18);
}

.board-phase-shop-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.board-phase-shop-subhead {
  margin-top: 4px;
  color: rgba(174, 243, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(127, 232, 255, 0.18);
}

.board-phase-shop-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(53, 214, 255, 0.05), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.board-phase-shop-line.is-key {
  border-color: rgba(255, 209, 101, 0.2);
  background:
    linear-gradient(90deg, rgba(255, 209, 101, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.board-phase-shop-line.is-disabled {
  opacity: 0.54;
}

.board-phase-shop-line-copy {
  display: grid;
  gap: 5px;
}

.board-phase-shop-line-copy.is-compact {
  gap: 0;
  align-items: center;
}

.board-phase-shop-line-copy strong {
  color: #fff;
  font-size: 1.08rem;
  line-height: 1;
}

.board-phase-shop-line-copy small {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.4;
}

.board-phase-shop-line-price {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.board-phase-shop-buy {
  min-width: 122px;
  min-height: 42px;
  padding-inline: 16px;
  box-shadow:
    0 0 0 1px rgba(127, 232, 255, 0.16) inset,
    0 0 18px rgba(53, 214, 255, 0.12);
}

.board-phase-shop-line:not(.is-object) .board-phase-shop-buy {
  min-width: 92px;
  min-height: 34px;
  padding-inline: 12px;
}

.board-phase-shop-buy.is-inline {
  min-width: 98px;
  min-height: 38px;
  padding-inline: 12px;
}

.board-phase-shop-line.is-object {
  grid-template-columns: 1fr;
  gap: 10px;
}

.board-phase-shop-object-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.board-phase-shop-object-head strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.05;
}

.board-phase-shop-object-head .board-phase-shop-line-price {
  flex: 0 0 auto;
}

.board-phase-shop-object-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.board-phase-shop-object-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 232, 255, 0.18);
  background: rgba(8, 16, 28, 0.82);
  color: #e8fbff;
  font-size: 0.82rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 14px rgba(53, 214, 255, 0.08);
}

.board-phase-shop-object-form .board-phase-shop-buy.is-inline {
  min-width: 112px;
}

.board-phase-shop-object-form select:disabled {
  opacity: 0.55;
}

.board-phase-shop-side {
  display: grid;
  gap: 12px;
}

.board-phase-shop-info-card {
  display: grid;
  gap: 12px;
  padding: 14px 14px 13px;
}

.board-phase-shop-info-card.is-discreet {
  opacity: 0.92;
}

.board-phase-shop-info-card .eyebrow {
  color: #aef3ff;
}

.board-phase-shop-info-block {
  display: grid;
  gap: 6px;
}

.board-phase-shop-info-block strong {
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.1;
}

.board-phase-shop-info-block small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.board-phase-shop-info-rows {
  display: grid;
  gap: 6px;
}

.board-phase-shop-info-rows span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.board-phase-shop-info-rows span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.board-phase-shop-info-rows b {
  color: #fff;
  font-size: 0.82rem;
}

.board-phase-shop-info-rows i {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #c6f8ff;
  font-style: normal;
  font-size: 0.79rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.board-phase-actions .primary-button.is-shop-exit {
  min-height: 50px;
  padding-inline: 20px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 22px rgba(127, 232, 255, 0.14);
}

.board-phase-actions.is-shop-main-actions {
  margin-top: 2px;
}

.board-phase-overlay.is-mystery {
  z-index: 62;
  padding: 20px;
  background:
    radial-gradient(circle at center, rgba(255, 214, 77, 0.18), rgba(7, 11, 19, 0.88)),
    rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(12px);
}

.board-phase-card.is-mystery-reveal {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 12px);
  min-width: 0;
  gap: 0;
  justify-items: center;
  padding: 14px;
  border-color: rgba(255, 214, 77, 0.16);
  background: rgba(9, 13, 22, 0.28);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(255, 214, 77, 0.08);
  backdrop-filter: blur(6px);
}

.board-phase-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  color: #fff4c5;
  background: rgba(255, 214, 77, 0.12);
  box-shadow: 0 0 20px rgba(255, 214, 77, 0.12);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.board-mystery-reveal-card {
  display: grid;
  place-items: center;
  width: auto;
  padding: 4px 0 0;
}

.board-mystery-reveal-hover {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.board-mystery-reveal-card .game-card {
  width: min(100%, 420px);
  margin: 0 auto;
  transition:
    filter 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(255, 214, 77, 0.14);
}

.board-mystery-reveal-cta {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  background:
    radial-gradient(circle at center, rgba(7, 11, 19, 0.18), rgba(7, 11, 19, 0.56)),
    linear-gradient(180deg, rgba(255, 214, 77, 0.06), rgba(5, 8, 14, 0.14));
  border-radius: 22px;
}

.board-mystery-reveal-hover:hover .board-mystery-reveal-cta,
.board-mystery-reveal-hover:focus-within .board-mystery-reveal-cta {
  opacity: 1;
  pointer-events: auto;
}

.board-mystery-reveal-hover:hover .game-card,
.board-mystery-reveal-hover:focus-within .game-card {
  filter: brightness(0.7) saturate(0.9);
  transform: scale(0.994);
}

.board-mystery-reveal-cta-button {
  min-width: min(100%, 320px);
  min-height: 54px;
  padding-inline: 22px;
  font-size: 1.05rem;
  box-shadow:
    0 0 0 1px rgba(255, 214, 77, 0.2) inset,
    0 0 0 1px rgba(83, 235, 255, 0.12),
    0 0 28px rgba(83, 235, 255, 0.2),
    0 0 42px rgba(255, 214, 77, 0.12);
}

.board-mystery-reveal-cta-button:hover:not(:disabled),
.board-mystery-reveal-cta-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 214, 77, 0.24) inset,
    0 0 0 1px rgba(83, 235, 255, 0.2),
    0 0 32px rgba(83, 235, 255, 0.28),
    0 0 46px rgba(255, 214, 77, 0.18);
}

.board-agent-tooltip,
.board-location-popover {
  position: absolute;
  left: 0;
  top: 0;
  border: 1px solid rgba(83, 235, 255, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(83, 235, 255, 0.12), rgba(255, 47, 230, 0.05) 72%),
    rgba(9, 13, 22, 0.96);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(53, 214, 255, 0.12);
}

.board-agent-tooltip {
  max-width: 220px;
  padding: 10px 12px;
  pointer-events: none;
}

.board-location-popover {
  z-index: 50;
  width: min(280px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 11px 12px;
  overflow: auto;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition:
    opacity 150ms ease,
    transform 170ms ease;
}

.board-location-popover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.board-location-popover.is-closing {
  opacity: 0;
  transform: translateY(4px) scale(0.985);
  pointer-events: none;
}

.board-agent-tooltip::after,
.board-location-popover::after {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(83, 235, 255, 0.28);
  border-bottom: 1px solid rgba(83, 235, 255, 0.28);
  background: rgba(9, 13, 22, 0.96);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.board-agent-tooltip[data-side="top"]::after,
.board-location-popover[data-side="top"]::after {
  bottom: -7px;
}

.board-agent-tooltip[data-side="left"]::after,
.board-location-popover[data-side="left"]::after {
  top: 50%;
  right: -7px;
  left: auto;
  transform: translateY(-50%) rotate(315deg);
}

.board-agent-tooltip[data-side="right"]::after,
.board-location-popover[data-side="right"]::after {
  top: 50%;
  left: -7px;
  transform: translateY(-50%) rotate(135deg);
}

.board-agent-tooltip[data-side="bottom"]::after,
.board-location-popover[data-side="bottom"]::after {
  top: -7px;
  transform: translateX(-50%) rotate(225deg);
}

.board-agent-tooltip-card,
.board-location-popover-card {
  display: grid;
  gap: 6px;
}

.board-agent-tooltip-card strong {
  color: #fff;
  font-size: 0.92rem;
  line-height: 1;
}

.board-agent-tooltip-card span {
  color: #8deeff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.board-location-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.board-popover-close {
  border: 0;
  color: #8deeff;
  background: transparent;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.board-location-popover-card > strong {
  color: #fff;
  font-size: 1.12rem;
  line-height: 1;
}

.board-location-popover-card.is-compact-move {
  gap: 10px;
}

.board-location-popover-card.is-compact-move > strong {
  font-size: 1.16rem;
}

.board-location-popover-card.is-compact-move .board-location-popover-actions {
  justify-content: flex-start;
}

.board-location-popover-card > small,
.board-location-popover-card .muted {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

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

.board-location-popover-metrics > span,
.board-location-popover-agent {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.board-location-popover-metrics > span {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
}

.board-location-popover-metrics small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-location-popover-metrics strong {
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.1;
}

.board-location-popover-agents {
  display: grid;
  gap: 6px;
}

.board-location-popover-agent {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 7px 9px;
  color: inherit;
  text-align: left;
  box-shadow: inset 3px 0 0 var(--player-color);
}

.board-location-popover-agent strong {
  color: #fff;
  font-size: 0.88rem;
}

.board-location-popover-agent small {
  color: var(--muted);
  font-size: 0.72rem;
}

.board-location-popover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.radial-board-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(78vh, 780px);
}

.radial-board-svg [tabindex]:focus {
  outline: none;
}

.board-sector {
  fill: color-mix(in srgb, color-mix(in srgb, var(--district-color) 50%, #8b95a6 50%), transparent 91%);
  stroke: color-mix(in srgb, color-mix(in srgb, var(--district-color) 50%, #8b95a6 50%), transparent 68%);
  stroke-width: 1.2;
}

.board-faction-corner {
  cursor: pointer;
  pointer-events: auto;
  outline: none;
}

.board-faction-halo {
  fill: rgba(5, 9, 17, 0.72);
  stroke: color-mix(in srgb, var(--faction-color), #ffffff 18%);
  stroke-width: 1.8;
  filter: url("#boardGlow");
}

.board-faction-corner image {
  opacity: 0.96;
}

.board-faction-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.2;
}

.board-faction-corner.is-current-qg .board-faction-halo,
.board-faction-corner:focus-visible .board-faction-halo,
.board-faction-corner:hover .board-faction-halo {
  stroke: #fff;
  stroke-width: 2.6;
}

.board-ring,
.board-axis {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.4;
}

.board-ring-middle {
  stroke: rgba(53, 214, 255, 0.2);
}

.board-ring-inner {
  stroke: rgba(255, 214, 77, 0.24);
}

.board-route {
  fill: none;
  opacity: 0.08;
  pointer-events: none;
  stroke: rgba(238, 246, 255, 0.24);
  stroke-linecap: round;
  stroke-width: 2.6;
  transition:
    opacity 160ms ease,
    stroke 160ms ease,
    stroke-width 160ms ease;
}

.board-route-overlay {
  opacity: 0;
  stroke-width: 0;
}

.radial-board-wrap:hover .board-route:not(.is-reachable-route) {
  opacity: 0.08;
}

.radial-board-wrap.has-hovered-location .board-route:not(.is-hover-route):not(.is-reachable-route) {
  opacity: 0.08;
}

.radial-board-wrap:hover .board-route-overlay:not(.is-reachable-route) {
  opacity: 0;
}

.radial-board-wrap.has-hovered-location .board-route-overlay:not(.is-hover-route):not(.is-reachable-route) {
  opacity: 0;
}

.board-route.is-qg-route {
  opacity: 0.08;
  stroke-dasharray: 8 8;
  stroke-width: 2.4;
}

.board-route.is-tunnel-route {
  opacity: 0.08;
  stroke: rgba(238, 246, 255, 0.24);
  stroke-dasharray: 14 6;
}

.board-route.is-cross-zone-route {
  opacity: 0.08;
  stroke: rgba(238, 246, 255, 0.24);
  stroke-width: 2.6;
}

.board-route.is-external-tunnel-route {
  opacity: 0.08;
  stroke-width: 2.6;
}

.board-route.is-sacred-tunnel-route {
  opacity: 0.08;
  stroke: rgba(238, 246, 255, 0.24);
  stroke-dasharray: 10 7;
  stroke-width: 2.6;
}

.board-route.is-central-bridge-route {
  opacity: 0.08;
  stroke: rgba(238, 246, 255, 0.24);
  stroke-dasharray: none;
  stroke-width: 2.6;
}

.board-route.is-station-gate-route {
  opacity: 0.08;
  stroke: rgba(255, 214, 77, 0.24);
  stroke-dasharray: 10 10;
  stroke-width: 2.4;
}

.board-route.is-selected-route {
  opacity: 0.08;
  stroke: rgba(238, 246, 255, 0.24);
}

.board-route.is-reachable-route {
  opacity: 0.42;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 3.8;
  filter: url("#boardGlow");
}

.board-route.is-hover-route {
  opacity: 0.88;
  stroke: rgba(238, 246, 255, 0.9);
  stroke-width: 4.2;
  filter: url("#boardGlow");
}

.radial-board-wrap.has-hovered-location .board-route.is-reachable-route.is-hover-route {
  opacity: 1;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4.8;
}

.board-route-overlay.is-reachable-route {
  opacity: 0.62;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 5.2;
}

.board-route-overlay.is-hover-route {
  opacity: 1;
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 5.4;
}

.radial-board-wrap.has-hovered-location .board-route-overlay.is-reachable-route.is-hover-route {
  opacity: 1;
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 5.8;
}

.board-zone-capsule {
  fill: none;
  opacity: 0.2;
  stroke: color-mix(in srgb, var(--zone-color) 50%, #8b95a6 50%);
  stroke-linecap: round;
  stroke-width: 62;
}

.board-zone-shell {
  fill: color-mix(in srgb, color-mix(in srgb, var(--zone-color) 50%, #8b95a6 50%), transparent 91%);
  opacity: 0.64;
  stroke: none;
}

.board-zone-index {
  dominant-baseline: middle;
  fill: rgba(238, 246, 255, 0.42);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
  text-anchor: middle;
}

.board-location {
  cursor: pointer;
  outline: none;
}

.board-location-hit {
  fill: transparent;
}

.board-location-core {
  fill: rgba(7, 11, 19, 0.9);
  stroke: rgba(238, 246, 255, 0.4);
  stroke-width: 2;
  transition:
    fill 160ms ease,
    stroke 160ms ease,
    stroke-width 160ms ease;
}

.location-peripherie .board-location-core {
  fill: rgba(129, 149, 168, 0.32);
}

.location-centre .board-location-core {
  fill: rgba(53, 214, 255, 0.13);
}

.location-sacre .board-location-core {
  fill: rgba(255, 214, 77, 0.14);
}

.location-qg .board-location-core {
  fill: color-mix(in srgb, var(--owner-color), transparent 62%);
  stroke-dasharray: 5 6;
}

.location-central .board-location-core {
  fill: rgba(255, 214, 77, 0.18);
  stroke: rgba(255, 214, 77, 0.72);
}

.board-location.has-owner .board-location-core {
  fill: color-mix(in srgb, var(--owner-color), rgba(7, 11, 19, 0.94) 48%);
  stroke: var(--owner-color);
}

.board-location.is-reachable .board-location-core {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 4;
  filter: url("#boardGlow");
}

.board-location.is-current-location .board-location-core {
  stroke: #fff;
  stroke-width: 4.8;
  filter: url("#boardGlow");
  animation: board-current-pulse 1680ms ease-in-out infinite;
}

.board-location.location-qg:not(.is-current-location) {
  opacity: 0.82;
}

.board-location:focus-visible .board-location-core,
.board-location:hover .board-location-core {
  fill: color-mix(in srgb, var(--location-color), transparent 72%);
}

.board-location-icon,
.board-location-name,
.board-shop-label,
.board-turret-label,
.board-agent-token text,
.board-mystery {
  pointer-events: none;
  text-anchor: middle;
  user-select: none;
}

.board-location-icon {
  fill: #fff;
  font-size: 12px;
  font-weight: 950;
}

.board-location-picto {
  pointer-events: none;
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.34));
}

.board-location-picto circle,
.board-location-picto rect,
.board-location-picto path {
  fill: none;
  stroke: inherit;
}

.kind-armement .board-location-picto {
  stroke: rgba(255, 255, 255, 0.98);
}

.kind-nature .board-location-picto {
  stroke: rgba(187, 255, 104, 0.98);
}

.kind-technologie .board-location-picto {
  stroke: rgba(126, 235, 255, 0.98);
}

.kind-residentiel .board-location-picto {
  stroke: rgba(255, 255, 255, 0.94);
}

.kind-bar .board-location-picto {
  stroke: rgba(255, 236, 176, 0.98);
}

.kind-theatre .board-location-picto {
  stroke: rgba(255, 255, 255, 0.98);
}

.kind-cathedrale .board-location-picto {
  stroke: rgba(255, 214, 77, 0.98);
}

.board-location-name {
  fill: rgba(238, 246, 255, 0.78);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.board-shop-token,
.board-turret-token {
  fill: rgba(5, 9, 17, 0.82);
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1;
}

.board-shop-token.is-active {
  fill: var(--yellow);
  stroke: #fff;
}

.board-turret-token.is-active {
  fill: var(--red);
  stroke: #fff;
}

.board-shop-label,
.board-turret-label {
  fill: #050912;
  font-size: 6px;
  font-weight: 950;
}

.board-shop-token:not(.is-active) + .board-shop-label,
.board-turret-token:not(.is-active) + .board-turret-label {
  fill: rgba(255, 255, 255, 0.5);
}

.board-agent-token {
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  transform-box: fill-box;
  transform-origin: center;
}

.board-agent-token-hit {
  fill: transparent;
  pointer-events: all;
}

.board-agent-token-backdrop {
  fill: rgba(5, 9, 17, 0.92);
  stroke: color-mix(in srgb, var(--agent-color), #ffffff 18%);
  stroke-width: 1.2;
}

.board-agent-token-image {
  filter: saturate(1.05) contrast(1.05);
}

.board-agent-token-ring {
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
}

.board-agent-token-index-backdrop {
  fill: rgba(5, 9, 17, 0.96);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 0.9;
}

.board-agent-token-index {
  fill: #f7fbff;
  font-size: 5px;
  font-weight: 1000;
  dominant-baseline: middle;
  text-anchor: middle;
  pointer-events: none;
}

.board-agent-token.is-selected-agent .board-agent-token-backdrop,
.board-agent-token.is-selected-agent .board-agent-token-ring {
  stroke-width: 2.2;
  filter: url("#boardGlow");
}

.board-agent-token.is-special-token .board-agent-token-index-backdrop {
  stroke: rgba(255, 214, 77, 0.92);
}

.board-agent-token:focus-visible .board-agent-token-backdrop,
.board-agent-token:hover .board-agent-token-backdrop {
  stroke-width: 1.8;
  filter: url("#boardGlow");
}

@keyframes board-current-pulse {
  0%,
  100% {
    stroke-opacity: 0.82;
    stroke-width: 4.1;
  }
  50% {
    stroke-opacity: 1;
    stroke-width: 6.25;
  }
}

.board-mystery {
  fill: var(--yellow);
  font-size: 17px;
  font-weight: 950;
  filter: url("#boardGlow");
}

.board-action-dock {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.06)),
    rgba(5, 9, 17, 0.72);
  z-index: 1;
}

.board-action-row,
.reachable-strip {
  grid-column: 1 / -1;
}

.agent-switcher {
  display: grid;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-switch-card,
.agent-summary-button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #eef6ff;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.08)),
    rgba(255, 255, 255, 0.035);
  font: inherit;
  cursor: pointer;
}

.agent-switch-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 78px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  text-align: left;
}

.agent-switch-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(53, 214, 255, 0.18));
}

.agent-switch-card.is-special img {
  width: 54px;
  height: 54px;
}

.agent-switch-card.is-locked {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.8);
}

.agent-switch-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agent-switch-card.is-active,
.agent-summary-button.is-active {
  border-color: rgba(86, 255, 52, 0.66);
  background:
    radial-gradient(circle at 12% 10%, rgba(86, 255, 52, 0.18), transparent 54%),
    rgba(53, 214, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(86, 255, 52, 0.16),
    0 0 22px rgba(86, 255, 52, 0.18);
}

.agent-switch-card strong {
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
}

.agent-switch-card b {
  overflow: hidden;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-switch-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
}

.agents-quick-panel {
  display: grid;
  gap: 12px;
}

.agent-quick-stack {
  display: grid;
  gap: 10px;
}

.agent-quick-card {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  color: #eef6ff;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.1), rgba(255, 47, 230, 0.08)),
    rgba(255, 255, 255, 0.035);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.agent-quick-card.is-active {
  border-color: rgba(86, 255, 52, 0.66);
  background:
    radial-gradient(circle at 12% 10%, rgba(86, 255, 52, 0.18), transparent 54%),
    rgba(53, 214, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(86, 255, 52, 0.16),
    0 0 22px rgba(86, 255, 52, 0.18);
}

.agent-quick-card.is-locked {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.8);
}

.agent-quick-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.agent-quick-top img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(53, 214, 255, 0.18));
}

.agent-quick-card.is-special .agent-quick-top img {
  width: 58px;
  height: 58px;
}

.agent-quick-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-quick-head strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-quick-head small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.25;
}

.agent-quick-power {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.agent-quick-power b {
  color: #fff;
  font-size: 1.52rem;
  font-weight: 1000;
  line-height: 0.9;
}

.agent-quick-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.agent-quick-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.agent-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: -1px;
}

.agent-quick-tags .equipment-tag {
  padding: 4px 8px;
  font-size: 0.59rem;
}

.agent-quick-xp {
  display: grid;
  gap: 5px;
}

.agent-quick-xp small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(198, 248, 255, 0.82);
  font-size: 0.67rem;
  font-weight: 850;
}

.agent-quick-xp small b {
  color: #eef6ff;
}

.agent-quick-xp-track {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(127, 232, 255, 0.08);
}

.agent-quick-xp-track i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 153, 79, 0.92), rgba(255, 221, 94, 0.96));
  box-shadow: 0 0 16px rgba(255, 186, 78, 0.18);
}

.board-agent-picker,
.board-location-summary {
  display: grid;
  gap: 6px;
}

.board-agent-picker strong,
.board-location-summary strong {
  color: #fff;
  line-height: 1.05;
}

.board-agent-picker p,
.board-location-summary small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.board-entry-note {
  margin: 0;
  color: rgba(238, 246, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.35;
}

.board-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reachable-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reachable-strip .eyebrow {
  flex: 1 1 100%;
}

.reachable-strip button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  white-space: nowrap;
  padding: 5px 8px;
  border: 1px solid rgba(86, 255, 52, 0.32);
  border-radius: 999px;
  color: #dfffd8;
  background: rgba(86, 255, 52, 0.08);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.district-board {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--district-color), transparent 68%);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 10% 0, color-mix(in srgb, var(--district-color), transparent 76%), transparent 34%),
    rgba(11, 16, 25, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

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

.central-board {
  grid-column: 1 / -1;
}

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

.location-node {
  display: grid;
  gap: 9px;
  min-height: 178px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%),
    rgba(255, 255, 255, 0.035);
}

.location-node.is-owned {
  border-color: color-mix(in srgb, var(--owner-color), transparent 46%);
  box-shadow: inset 4px 0 0 var(--owner-color);
}

.location-node.is-central {
  min-height: 120px;
  background:
    radial-gradient(circle, rgba(255, 214, 77, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.04);
}

.location-head span,
.location-state span,
.agent-stack small,
.agent-control small,
.hand-card span,
.log-list span {
  color: var(--muted);
  font-size: 0.78rem;
}

.location-head strong,
.location-state b {
  text-transform: uppercase;
}

.mystery-marker {
  width: fit-content;
  border-color: rgba(255, 214, 77, 0.5);
  color: var(--yellow);
  background: rgba(255, 214, 77, 0.1);
}

.agent-stack {
  display: grid;
  gap: 5px;
}

.agent-stack span {
  padding: 5px 7px;
  border-radius: 6px;
  color: #fff;
  background: color-mix(in srgb, var(--agent-color), transparent 72%);
  font-size: 0.72rem;
  box-shadow: inset 3px 0 0 var(--agent-color);
}

.player-state-list,
.hand-list,
.log-list,
.deck-state-grid {
  display: grid;
  gap: 9px;
}

.players-panel {
  width: 100%;
}

.players-panel .player-state-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-state-list > div,
.agent-control,
.hand-card,
.deck-state-grid > div,
.log-list > div {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.player-state-list > div {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--player-color), transparent 30%);
}

.player-state-list .is-active {
  border-color: rgba(53, 214, 255, 0.36);
  background: rgba(53, 214, 255, 0.08);
}

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

.player-wallet > span {
  display: grid;
  gap: 7px;
  min-height: 66px;
  align-content: start;
  padding: 11px 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 52%),
    linear-gradient(135deg, rgba(53, 214, 255, 0.03), transparent 62%),
    rgba(7, 12, 22, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 26px rgba(2, 6, 12, 0.18);
}

.player-wallet small,
.player-wallet strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.player-wallet small {
  color: color-mix(in srgb, var(--muted), #dcecff 22%);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-wallet strong {
  color: #fff;
  font-size: 1.28rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.player-wallet strong .resource-token {
  transform: scale(0.88);
  transform-origin: left center;
}

.player-wallet strong .resource-chip {
  transform: scale(0.92);
  transform-origin: left center;
}

.player-state-list strong,
.player-state-list span,
.player-state-list small,
.deck-state-grid strong,
.deck-state-grid span,
.log-list strong,
.log-list small {
  display: block;
}

.player-state-list small,
.deck-state-grid span,
.log-list small {
  margin-top: 5px;
  color: var(--muted);
}

.player-state-list .player-wallet {
  display: grid;
}

.player-state-list .player-wallet > span {
  display: grid;
}

.player-state-list .player-wallet small,
.player-state-list .player-wallet strong {
  display: flex;
  margin: 0;
}

.agent-control {
  display: grid;
  gap: 10px;
}

.agent-summary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  text-align: left;
}

.agent-summary-button span {
  display: grid;
  gap: 3px;
}

.agent-summary-button strong {
  color: #fff;
  line-height: 1.05;
}

.agent-summary-button small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.agent-summary-button b {
  display: inline-flex;
  width: fit-content;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 999px;
  color: #05101c;
  background: var(--cyan);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.agent-control p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.equipment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.equipment-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  white-space: nowrap;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #dbe7f4;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.63rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.equipment-tag.is-empty {
  color: rgba(219, 231, 244, 0.58);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.equipment-implant {
  border-color: rgba(53, 214, 255, 0.48);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.1);
}

.equipment-drone {
  border-color: rgba(86, 255, 52, 0.46);
  color: var(--green);
  background: rgba(86, 255, 52, 0.1);
}

.play-move-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.hand-panel {
  position: relative;
  min-width: 0;
}

.hand-panel-content {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-right: 0;
  overflow: visible;
  overscroll-behavior: contain;
}

.hand-panel.is-readonly .hand-panel-content {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}

.hand-panel.is-readonly .hand-card-command-row,
.hand-panel.is-readonly .public-mission-item button,
.hand-panel.is-readonly .hand-card-actions form,
.hand-panel.is-readonly .hand-card-actions > .ghost-button {
  opacity: 0.82;
}

.hand-panel-lock {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 232, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.04) 72%),
    rgba(9, 13, 22, 0.82);
  box-shadow: 0 0 18px rgba(53, 214, 255, 0.08);
}

.hand-panel-lock strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
}

.hand-panel-lock p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.play-ops-bubble {
  display: grid;
}

.play-ops-details {
  overflow: hidden;
  border: 1px solid rgba(53, 214, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.06), rgba(255, 47, 230, 0.04) 72%),
    rgba(9, 13, 22, 0.82);
  box-shadow: 0 0 18px rgba(53, 214, 255, 0.08);
}

.play-ops-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.play-ops-details summary::-webkit-details-marker {
  display: none;
}

.play-ops-details summary strong {
  color: #eef7ff;
  font-size: 0.92rem;
}

.play-ops-details summary::after {
  content: "+";
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(127, 232, 255, 0.24);
  border-radius: 999px;
  color: #7fe8ff;
  font-size: 1rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.play-ops-details[open] summary::after {
  content: "−";
}

.play-ops-content {
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
}

@media (max-width: 920px) {
  .viewer-status-bar {
    grid-template-columns: 1fr;
  }

  .viewer-status-metrics {
    justify-content: flex-start;
  }

  .board-phase-shop-layout {
    grid-template-columns: 1fr;
  }

  .board-phase-card.is-shop {
    width: min(560px, calc(100% - 12px));
  }

  .board-phase-shop-line {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .board-phase-shop-line.is-object {
    grid-template-columns: 1fr;
  }

  .board-phase-shop-object-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .board-phase-shop-buy {
    width: 100%;
  }
}

.turn-timer-modal-backdrop {
  position: fixed;
  z-index: 38;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(53, 214, 255, 0.12), transparent 30%),
    rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(10px);
}

.turn-timer-modal {
  width: min(940px, 100%);
  max-height: min(84vh, 920px);
  overflow: auto;
  border: 1px solid rgba(53, 214, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05) 42%, transparent 72%),
    rgba(7, 11, 18, 0.98);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.turn-timer-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.turn-timer-modal-header h2 {
  margin: 2px 0 0;
}

.turn-timer-modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.turn-timer-modal-header p strong {
  color: #fff;
}

.turn-timer-modal-grid {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
}

.turn-timer-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.turn-timer-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--player-color), transparent 58%);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--player-color), transparent 82%), transparent 52%),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 3px 0 0 var(--player-color);
}

.turn-timer-summary-card strong {
  color: #fff;
}

.turn-timer-summary-card small,
.turn-timer-summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.turn-timer-log-table {
  display: grid;
  gap: 10px;
}

.turn-timer-log-table > strong {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.postgame-overlay {
  position: fixed;
  z-index: 73;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--postgame-color), transparent 84%), transparent 28%),
    radial-gradient(circle at 80% 72%, rgba(255, 77, 93, 0.12), transparent 24%),
    rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(14px);
}

.postgame-winner-card,
.postgame-report-card {
  display: grid;
  gap: 18px;
  width: min(980px, calc(100vw - 56px));
  padding: 26px 28px;
  border: 1px solid color-mix(in srgb, var(--postgame-color), transparent 56%);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--postgame-color), transparent 84%), transparent 34%),
    linear-gradient(135deg, rgba(83, 235, 255, 0.08), rgba(255, 47, 230, 0.06)),
    rgba(8, 12, 20, 0.96);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.42),
    0 0 42px color-mix(in srgb, var(--postgame-color), transparent 84%);
}

.postgame-winner-card {
  width: min(620px, calc(100vw - 56px));
  justify-items: center;
  text-align: center;
}

.postgame-winner-card strong {
  color: #fff;
  font-size: clamp(2.8rem, 8vw, 5.3rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.postgame-winner-card p,
.postgame-report-head p {
  margin: 0;
  color: #d7e5f6;
  font-size: 1rem;
  line-height: 1.4;
}

.postgame-winner-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--postgame-color), transparent 62%));
}

.postgame-winner-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.postgame-winner-stats span,
.postgame-award-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.postgame-winner-stats small,
.postgame-award-card small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.postgame-winner-stats b,
.postgame-award-card strong,
.postgame-award-card b,
.postgame-report-head h2 {
  color: #fff;
}

.postgame-report-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.postgame-report-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 0.96;
}

.postgame-awards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.postgame-award-card {
  position: relative;
  padding-left: 54px;
  border-color: color-mix(in srgb, var(--player-color, var(--postgame-color)), transparent 54%);
}

.postgame-award-glyph {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(83, 235, 255, 0.16), rgba(196, 255, 60, 0.14)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 1px rgba(127, 232, 255, 0.12) inset,
    0 0 14px rgba(83, 235, 255, 0.08);
  color: #f5fbff;
  font-size: 0.82rem;
  font-weight: 900;
}

.postgame-journal {
  display: grid;
  gap: 10px;
}

.postgame-journal strong {
  color: #fff;
  font-size: 1rem;
}

.postgame-journal-list {
  display: grid;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
}

.postgame-journal-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.postgame-journal-item span {
  color: #8deeff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.postgame-journal-item p {
  margin: 0;
  color: #eef6ff;
  line-height: 1.4;
}

.hand-card-rail {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 4px 2px 18px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.hand-card-shell {
  display: grid;
  flex: 0 0 clamp(280px, 18vw, 356px);
  gap: 10px;
  scroll-snap-align: start;
}

.hand-card-render {
  min-width: 0;
}

.hand-card-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 12;
  perspective: 1400px;
}

.hand-card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hand-card-shell:hover .hand-card-flip-inner,
.hand-card-shell:focus-within .hand-card-flip-inner {
  transform: rotateY(180deg);
}

.hand-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hand-card-face.is-back {
  transform: rotateY(180deg);
}

.hand-card-render .game-card,
.hand-card-face .game-card {
  width: 100%;
  aspect-ratio: 7 / 12;
  min-height: 0;
}

.hand-card-render .game-card .card-titlebar h2 {
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
}

.hand-card-render .card-rule {
  font-size: clamp(0.68rem, 0.9vw, 0.86rem);
}

.hand-card-actions {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.mission-card-back {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 2%, rgba(83, 235, 255, 0.12), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(255, 214, 77, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(6, 11, 21, 0.96), rgba(19, 10, 30, 0.94));
}

.mission-card-back-head {
  display: grid;
  gap: 4px;
}

.mission-card-back-head .eyebrow {
  color: var(--cyan);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mission-card-back-head strong {
  color: #fff;
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(83, 235, 255, 0.16);
}

.mission-card-back-head small,
.mission-card-back-foot small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mission-card-back-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.mission-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.025);
}

.mission-check-item i {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.mission-check-item strong {
  display: block;
  color: #f5f8ff;
  font-size: 0.8rem;
  line-height: 1.25;
}

.mission-check-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.mission-check-item.is-done {
  border-color: rgba(104, 242, 122, 0.22);
  background:
    linear-gradient(135deg, rgba(104, 242, 122, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.mission-check-item.is-done i {
  color: #07100a;
  background: #68f27a;
  box-shadow: 0 0 14px rgba(104, 242, 122, 0.3);
}

.mission-check-item.is-pending i {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.mission-card-back-foot {
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(83, 235, 255, 0.08), rgba(255, 214, 77, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.mission-card-back-foot span {
  color: #fff5d8;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hand-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hand-card-actions small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.hand-card-command-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attach-equipment-form,
.card-action-form {
  display: grid;
  flex: 1 1 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
  padding: 8px;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), transparent 62%),
    rgba(5, 9, 17, 0.58);
}

.attach-equipment-form label,
.card-action-form label {
  display: grid;
  gap: 4px;
}

.attach-equipment-form label span,
.card-action-form label span {
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.public-mission-list,
.combat-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(53, 214, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), transparent 60%),
    rgba(5, 9, 17, 0.54);
}

.public-mission-item,
.combat-breakdown-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--player-color, #35d6ff), transparent 62%);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.public-mission-item span,
.combat-breakdown-card small {
  color: var(--muted);
}

.combat-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.combat-toolbar label,
.combat-panel .manual-form label {
  display: grid;
  gap: 5px;
}

.combat-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.combat-rule-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.combat-versus-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.combat-versus-side {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--player-color, #35d6ff), transparent 52%);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 16%, color-mix(in srgb, var(--player-color, #35d6ff), transparent 76%), transparent 52%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--player-color, #35d6ff), transparent 10%);
}

.combat-versus-head,
.combat-side-topline,
.combat-panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.combat-versus-head {
  align-items: flex-start;
}

.combat-versus-head strong,
.combat-side-topline h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-power-meter {
  display: grid;
  min-width: 74px;
  justify-items: center;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--player-color, var(--cyan)), transparent 58%);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.combat-power-meter span {
  line-height: 1;
  font-size: 0.9rem;
}

.combat-power-meter b {
  color: #fff;
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 0.95;
}

.combat-power-meter small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.combat-vs-core {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-width: 58px;
}

.combat-vs-core span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 214, 77, 0.48);
  border-radius: 50%;
  color: var(--yellow);
  background: rgba(255, 214, 77, 0.1);
  box-shadow: 0 0 22px rgba(255, 214, 77, 0.14);
  font-size: 0.95rem;
  font-weight: 950;
}

.combat-vs-core small {
  max-width: 90px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.combat-modal-side .combat-versus-strip {
  grid-template-columns: 1fr;
}

.combat-modal-side .combat-toolbar {
  grid-template-columns: 1fr;
}

.combat-modal-side .combat-panel-actions .compact-button {
  width: 100%;
}

.combat-modal-side .combat-vs-core {
  min-width: 0;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.combat-modal-side .combat-vs-core::before,
.combat-modal-side .combat-vs-core::after {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  content: "";
}

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

.combat-defense-stack span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.combat-defense-stack b {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-defense-stack strong {
  color: #fff;
  font-size: 0.9rem;
}

.combat-unit-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.combat-unit-list em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.combat-unit-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.12);
}

.combat-unit-chip img,
.combat-unit-chip > b {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--player-color, var(--cyan)), transparent 68%));
}

.combat-unit-chip.is-special img {
  width: 44px;
  height: 44px;
}

.combat-unit-chip > b {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #fff;
  font-size: 0.7rem;
}

.combat-unit-chip > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.combat-unit-chip strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-unit-chip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-unit-chip.is-pls,
.combat-unit-chip.is-downed_pending {
  border-color: rgba(165, 142, 255, 0.34);
  background: rgba(165, 142, 255, 0.08);
}

.combat-unit-chip.is-executed {
  border-color: rgba(255, 83, 109, 0.44);
  background: rgba(255, 83, 109, 0.09);
}

.combat-panel-actions {
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.combat-panel-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.combat-feed {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(53, 214, 255, 0.13);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.combat-feed > strong,
.combat-log-preview > strong,
.combat-roll-history > strong {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.combat-roll-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(255, 255, 255, 0.025);
}

.combat-roll-history-list {
  display: grid;
  gap: 6px;
}

.combat-roll-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.028);
}

.combat-roll-row small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.combat-roll-row b {
  overflow: hidden;
  color: #eef6ff;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-roll-row strong {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}

.combat-feed-list {
  display: grid;
  gap: 6px;
}

.combat-feed-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.combat-feed-line i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.combat-feed-line em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  line-height: 1.35;
}

.combat-feed-line.is-impact i {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(53, 214, 255, 0.32);
}

.combat-feed-line.is-alert i {
  background: var(--magenta);
  box-shadow: 0 0 12px rgba(255, 47, 230, 0.3);
}

.combat-feed-line.is-result i {
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 214, 77, 0.34);
}

.combat-feed-line.is-latest {
  border-color: rgba(53, 214, 255, 0.22);
  background: rgba(53, 214, 255, 0.055);
}

.combat-agent-list {
  display: grid;
  gap: 4px;
}

.combat-agent-list span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 0.78rem;
}

.combat-agent-list button {
  padding: 2px 6px;
  border: 1px solid rgba(255, 83, 109, 0.45);
  border-radius: 999px;
  color: #ffb4c0;
  background: rgba(255, 83, 109, 0.12);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.combat-modal-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top, rgba(53, 214, 255, 0.12), transparent 28%),
    rgba(4, 7, 12, 0.76);
  backdrop-filter: blur(10px);
}

.combat-modal {
  width: min(1180px, 100%);
  max-height: min(90vh, 960px);
  overflow: hidden;
  border: 1px solid rgba(53, 214, 255, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.08), rgba(255, 47, 230, 0.05) 42%, transparent 72%),
    rgba(7, 11, 18, 0.98);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.combat-modal-header,
.combat-modal-main,
.combat-modal-side {
  min-width: 0;
}

.combat-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.combat-modal-header h2,
.combat-phase-copy h2,
.combat-tactic-card h3,
.virtual-dice-head h3 {
  margin: 2px 0 0;
}

.combat-step-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 0;
}

.combat-step-rail span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.combat-step-rail .is-active {
  border-color: rgba(53, 214, 255, 0.5);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.12);
}

.combat-step-rail .is-done {
  color: #dbe7f5;
  border-color: rgba(86, 255, 52, 0.34);
  background: rgba(86, 255, 52, 0.08);
}

.combat-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.82fr);
  gap: 0;
  max-height: calc(90vh - 104px);
}

.combat-modal-main,
.combat-modal-side {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 20px;
}

.combat-modal-side {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.combat-phase-body,
.combat-condition,
.combat-log-preview,
.combat-side-card,
.virtual-dice-card,
.combat-tactic-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(53, 214, 255, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(53, 214, 255, 0.07), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.combat-phase-body {
  gap: 16px;
}

.combat-phase-copy p,
.combat-condition p {
  margin: 0;
  color: var(--muted);
}

.combat-inline-field,
.combat-hit-card,
.combat-tactic-form {
  display: grid;
  gap: 6px;
}

.combat-burst-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.combat-inline-field span,
.combat-hit-card span {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.combat-side-grid,
.combat-tactic-grid,
.combat-hit-grid,
.combat-choice-grid {
  display: grid;
  gap: 12px;
}

.combat-side-grid,
.combat-tactic-grid,
.combat-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.combat-side-grid.is-stack {
  grid-template-columns: 1fr;
}

.combat-side-card {
  border-color: color-mix(in srgb, var(--player-color), transparent 62%);
  box-shadow: inset 3px 0 0 var(--player-color);
}

.combat-side-card h3,
.combat-tactic-card h3 {
  font-size: 1rem;
}

.combat-pill-row,
.combat-result-list,
.combat-auto-lines,
.combat-log-preview div {
  display: grid;
  gap: 8px;
}

.combat-agent-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.combat-agent-pill small,
.combat-side-card small,
.combat-log-preview span,
.combat-auto-lines span,
.combat-result-list span {
  color: var(--muted);
}

.combat-agent-pill.is-pls {
  border-color: rgba(165, 142, 255, 0.36);
  background: rgba(165, 142, 255, 0.09);
}

.combat-agent-pill.is-executed {
  border-color: rgba(255, 83, 109, 0.42);
  background: rgba(255, 83, 109, 0.08);
}

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

.combat-tactic-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.combat-tactic-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.virtual-dice-head,
.virtual-dice-actions,
.combat-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.combat-manual-roll-form {
  display: grid;
  flex: 1 1 320px;
  grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.4fr) auto;
  gap: 8px;
  align-items: end;
}

.dice-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dice-chip {
  min-width: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: center;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.04);
  animation: diceSpin 360ms ease;
}

.dice-chip.is-success {
  border-color: rgba(53, 214, 255, 0.4);
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.1);
}

.dice-chip.is-critical {
  border-color: rgba(255, 214, 77, 0.52);
  color: var(--yellow);
  background: rgba(255, 214, 77, 0.12);
  box-shadow: 0 0 18px rgba(255, 214, 77, 0.16);
}

.impact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.impact-strip span {
  color: var(--cyan);
  font-size: 1.05rem;
  line-height: 1;
  animation: impactPop 220ms ease;
}

.combat-hit-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.combat-hit-card {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.combat-choice-grid .is-danger {
  border-color: rgba(255, 83, 109, 0.42);
  background: rgba(255, 83, 109, 0.12);
}

@keyframes diceSpin {
  0% {
    transform: translateY(6px) scale(0.96) rotate(-8deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes impactPop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.automation-badge {
  display: inline-flex;
  width: fit-content;
  max-width: max-content;
  align-items: center;
  white-space: nowrap;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 12px color-mix(in srgb, currentColor, transparent 78%);
}

.automation-auto {
  color: var(--green);
  background: rgba(86, 255, 52, 0.1);
}

.automation-semi {
  color: var(--cyan);
  background: rgba(53, 214, 255, 0.1);
}

.automation-manual {
  color: var(--yellow);
  background: rgba(255, 214, 77, 0.1);
}

.manual-form {
  display: grid;
  gap: 10px;
}

.manual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 92px;
  gap: 8px;
}

.quick-corrections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-player-grid,
.quick-agent-grid {
  display: grid;
  gap: 8px;
}

.quick-correction-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--player-color, var(--cyan)), transparent 24%);
}

.quick-agent-card {
  --player-color: var(--cyan);
}

.quick-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-row .compact-button {
  min-height: 30px;
  padding: 5px 8px;
}

.log-list {
  max-height: 520px;
  overflow: auto;
}

.log-list > div {
  border-left: 3px solid rgba(53, 214, 255, 0.44);
}

.log-list > div.is-correction {
  border-left-color: var(--yellow);
  background: rgba(255, 214, 77, 0.06);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .page,
  .search-results {
    width: min(100% - 32px, 980px);
  }

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

  .aid-hero {
    grid-template-columns: 1fr;
  }

  .aid-master-grid,
  .aid-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aid-ops-grid {
    grid-template-columns: 1fr;
  }

  .mini-grid,
  .cards-grid,
  .faction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-admin {
    grid-template-columns: 1fr;
  }

  .play-create-grid,
  .play-lobby-grid,
  .play-layout,
  .active-console-header,
  .active-console-grid,
  .board-workbench,
  .combat-modal-layout,
  .combat-side-grid,
  .combat-versus-strip,
  .combat-tactic-grid {
    grid-template-columns: 1fr;
  }

  .combat-vs-core {
    min-width: 0;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .combat-vs-core::before,
  .combat-vs-core::after {
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    content: "";
  }

  .session-list,
  .active-agent-grid,
  .command-agent-row {
    grid-template-columns: 1fr;
  }

  .players-panel .player-state-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radial-board-svg {
    min-height: auto;
  }

  .admin-editor {
    position: static;
  }

  .play-layout,
  .viewer-play-layout {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .play-main,
  .play-side,
  .viewer-shell,
  .viewer-player-stack,
  .viewer-board-only,
  .viewer-play-side,
  .play-side-top {
    gap: 12px;
  }

  .play-main {
    order: 1;
  }

  .play-side,
  .viewer-play-side {
    order: 2;
  }

  .play-layout {
    order: 1;
  }

  .phase-strip {
    order: 2;
  }

  .play-hand-band {
    order: 3;
  }

  .players-panel {
    order: 4;
  }

  .play-ops-bubble {
    order: 5;
  }

  .play-topbar {
    order: 6;
  }

  .viewer-shell-player .viewer-player-stack,
  .viewer-shell-board .viewer-board-only {
    order: 1;
  }

  .viewer-corner-label {
    order: 2;
  }

  .viewer-corner-label {
    padding: 8px 12px;
  }

  .viewer-corner-label strong {
    font-size: 1rem;
  }

  .viewer-status-bar {
    gap: 12px;
    padding: 12px 14px;
  }

  .viewer-status-copy {
    gap: 3px;
  }

  .viewer-status-copy strong {
    font-size: clamp(1.32rem, 3.2vw, 1.9rem);
  }

  .viewer-status-metrics {
    gap: 8px;
  }

  .viewer-status-metrics span {
    min-width: 96px;
    padding: 8px 10px;
  }

  .active-console-compact {
    padding: 12px;
  }

  .active-console-header {
    gap: 12px;
  }

  .active-console-title {
    gap: 10px;
  }

  .active-console-title img {
    width: 56px;
    height: 56px;
  }

  .active-console h2 {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
  }

  .active-console-grid {
    gap: 10px;
    margin-top: 12px;
  }

  .active-metrics {
    gap: 7px;
  }

  .active-metrics > span {
    min-height: 52px;
    padding: 8px;
  }

  .command-agent-row {
    margin-top: 8px;
  }

  .command-agent-chip {
    min-height: 52px;
    padding: 6px 8px;
  }

  .board-stage {
    padding: 10px;
  }

  .board-stage-header {
    gap: 8px;
    margin-bottom: 10px;
  }

  .board-stage-header h2 {
    font-size: 1.6rem;
  }

  .board-stage-actions {
    gap: 6px;
  }

  .viewer-shell-player .radial-board-wrap,
  .viewer-shell-board .radial-board-wrap {
    --board-wrap-limit: 100%;
    --board-wrap-vh-offset: 140px;
  }

  .radial-board-wrap {
    --board-wrap-limit: 100%;
    --board-wrap-vh-offset: 150px;
    width: min(100%, calc(100vw - 40px), calc(100vh - var(--board-wrap-vh-offset)));
  }

  .board-workbench,
  .board-stage,
  .play-main,
  .viewer-play-layout,
  .play-layout {
    width: 100%;
  }

  .board-phase-overlay {
    padding: 16px;
  }

  .board-phase-card {
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
  }

  .board-phase-card > strong {
    font-size: clamp(1.65rem, 3.8vw, 2.5rem);
  }

  .board-phase-card > p,
  .board-phase-summary-text {
    font-size: 0.94rem;
  }

  .board-phase-doctrine,
  .board-phase-income-grid span,
  .board-phase-summary-item,
  .board-search-reveal-stats span,
  .board-search-reveal-reward {
    padding: 8px 10px;
  }

  .board-phase-actions .primary-button {
    min-height: 42px;
    padding: 9px 14px;
  }

  .hand-panel-lock {
    margin: 8px 0 10px;
    padding: 10px 12px;
  }

  .hand-card-rail {
    gap: 14px;
    padding-bottom: 14px;
  }

  .hand-card-shell {
    flex-basis: clamp(248px, 28vw, 320px);
  }

  .combat-modal-backdrop {
    place-items: start center;
    padding: 14px;
  }

  .combat-modal {
    max-height: min(94dvh, 960px);
    border-radius: 22px;
  }

  .combat-modal-header {
    gap: 10px;
    padding: 16px 16px 10px;
  }

  .combat-step-rail {
    padding: 10px 16px 0;
  }

  .combat-modal-layout {
    max-height: calc(94dvh - 94px);
  }

  .combat-modal-main,
  .combat-modal-side {
    padding: 16px;
  }

  .combat-phase-body,
  .combat-condition,
  .combat-log-preview,
  .combat-side-card,
  .virtual-dice-card,
  .combat-tactic-card {
    gap: 8px;
    padding: 12px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .page,
  .search-results {
    width: min(100% - 28px, 760px);
  }

  .players-panel .player-state-list {
    grid-template-columns: 1fr;
  }

  .page {
    padding-top: 24px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 14px;
  }

  .hero-copy {
    order: 1;
  }

  .hero-media {
    order: 2;
  }

  .hero h1,
  .page-header h1 {
    font-size: clamp(2.8rem, 16vw, 5rem);
  }

  .two-columns,
  .toolbar,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .editor-workbench {
    grid-template-columns: 1fr;
  }

  .editor-preview {
    position: static;
  }

  .live-card-preview {
    width: min(100%, 360px);
  }

  .stat-grid,
  .aid-grid,
  .glossary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aid-hero,
  .aid-master-grid,
  .aid-command-grid,
  .aid-reference-grid,
  .aid-ops-grid {
    grid-template-columns: 1fr;
  }

  .combat-modal {
    width: min(100%, 940px);
  }

  .combat-modal-side {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .combat-choice-grid {
    grid-template-columns: 1fr;
  }

  .viewer-status-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .viewer-status-metrics {
    justify-content: flex-start;
  }

  .board-phase-overlay {
    padding: 12px;
  }

  .board-phase-card {
    width: min(100%, 560px);
    max-height: calc(100% - 4px);
    padding: 14px;
  }

  .board-phase-card.is-end-turn,
  .board-phase-card.is-shop,
  .board-phase-card.is-search-reveal,
  .board-phase-card.is-mystery-reveal,
  .board-phase-card.is-card-reaction {
    width: min(100%, 560px);
  }

  .board-phase-shop-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .board-inline-shop-panel {
    left: 12px;
    top: 12px;
    width: calc(100% - 24px);
  }

  .combat-modal-backdrop {
    padding: 10px;
  }

  .combat-modal {
    max-height: min(100dvh - 20px, 960px);
  }

  .anchor-strip {
    top: 70px;
  }

  .rules-section {
    scroll-margin-top: 150px;
  }
}

@media (max-width: 560px) {
  .stat-grid,
  .aid-grid,
  .mini-grid,
  .cards-grid,
  .glossary-grid,
  .faction-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .page-header {
    padding: 18px;
  }

  .page-header .hero-actions {
    position: static;
    margin-top: 14px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .zone-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .panel,
  .aid-card,
  .glossary-grid article {
    padding: 16px;
  }

  .aid-step-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-effect {
    align-items: flex-start;
    flex-direction: column;
  }

  .faction-card figure {
    min-height: 190px;
  }

  .play-topbar,
  .turn-panel-header {
    display: grid;
  }

  .play-topbar-actions,
  .play-topbar-main,
  .play-topbar-metrics,
  .play-move-form,
  .attach-equipment-form,
  .combat-manual-roll-form,
  .manual-grid,
  .location-grid,
  .board-action-dock,
  .active-metrics,
  .command-agent-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .board-action-row,
  .reachable-strip {
    grid-column: auto;
  }

  .agent-switcher {
    grid-column: auto;
    min-width: 0;
  }

  .agent-switcher-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .agent-switch-card {
    flex: 0 0 230px;
    scroll-snap-align: start;
  }

  .play-topbar-actions .secondary-button,
  .play-topbar-actions .ghost-button {
    width: 100%;
  }

  .combat-modal-backdrop {
    padding: 0;
    align-items: end;
    overflow: hidden;
  }

  .combat-modal {
    width: 100%;
    max-height: 100dvh;
    border-radius: 20px 20px 0 0;
    animation: combatSheetIn 180ms ease;
  }

  .combat-modal-main,
  .combat-modal-side,
  .combat-modal-header {
    padding-inline: 16px;
  }

  .combat-step-rail {
    padding-inline: 16px;
  }

  .combat-modal-layout {
    max-height: calc(100dvh - 92px);
  }

  .virtual-dice-actions,
  .combat-modal-actions {
    align-items: stretch;
  }

  .virtual-dice-actions > *,
  .combat-modal-actions > * {
    width: 100%;
  }
}

@keyframes combatSheetIn {
  0% {
    transform: translateY(28px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media print {
  body {
    color: #111;
    background: #fff;
  }

  .sidebar,
  .mobile-header,
  .anchor-strip,
  .hero-actions,
  .search-results,
  .toolbar {
    display: none !important;
  }

  .app-shell,
  .page {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .panel,
  .rules-section,
  .aid-card,
  .game-card,
  .glossary-grid article,
  .timeline article {
    break-inside: avoid;
    color: #111;
    border-color: #ccc;
    background: #fff;
  }

  p,
  li,
  td,
  .muted {
    color: #222;
  }
}
