:root {
  /* Inspired by Aidalon faction bios (condensed display) + deep-teal geometric brand sans */
  --font-serif: "Barlow Condensed", "Jost", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Core Aidalon signature swatches (sampled from reference art & brand assets) */
  --aidalon-teal: #0a2128;
  --aidalon-teal-mid: #133640;
  --aidalon-cream: #f7f7df;
  --aidalon-rose: #e26d82;
  --aidalon-blush: #f6b6bf;
  --aidalon-peach: #f6cca4;
  --aidalon-ochre: #b57b28;

  --motion-duration: 180ms;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
}

[data-motion="instant"] { --motion-duration: 0ms; }
[data-motion="fast"] { --motion-duration: 100ms; }
[data-motion="normal"] { --motion-duration: 180ms; }
[data-motion="slow"] { --motion-duration: 340ms; }
[data-animations="false"] * {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

/* =========================================================================
   DEFAULT THEME: AIDALON PASTEL (Luminous Sunset Pink, Frosted Cream & Deep Teal)
   ========================================================================= */
[data-theme="light"] {
  --bg: #f8d8dc;
  --bg-elevated: rgba(255, 250, 246, 0.78);
  --surface: rgba(255, 250, 246, 0.88);
  --surface-2: rgba(252, 235, 238, 0.86);
  --surface-hover: rgba(249, 220, 226, 0.94);
  --border: rgba(10, 33, 40, 0.16);
  --border-strong: rgba(10, 33, 40, 0.30);
  --text: #0a2128;
  --text-muted: #3c535c;
  --text-dim: #627881;
  --gold: #c64b68;
  --gold-hover: #ab3955;
  --gold-soft: rgba(226, 109, 130, 0.16);
  --gold-ink: #f7f7df;
  --cta-bg: #0a2128;
  --cta-bg-hover: #c64b68;
  --cta-ink: #f7f7df;
  --green: #1e7b5e;
  --green-soft: rgba(30, 123, 94, 0.13);
  --amber: #b57b28;
  --amber-soft: rgba(181, 123, 40, 0.14);
  --red: #c4364a;
  --red-soft: rgba(196, 54, 74, 0.13);
  --blue: #2a7b99;
  --shadow: 0 18px 42px rgba(64, 24, 42, 0.14), 0 2px 8px rgba(10, 33, 40, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --veil-bg: linear-gradient(
    180deg,
    rgba(255, 240, 242, 0.34) 0%,
    rgba(249, 206, 214, 0.28) 48%,
    rgba(255, 238, 235, 0.48) 100%
  );
  --nav-bg: rgba(255, 249, 246, 0.84);
}

/* =========================================================================
   TWILIGHT DARK MODE (Matches In-Game Darkened Pastel Cityscape + Deep Petrol Teal!)
   ========================================================================= */
[data-theme="dark"] {
  --bg: #0a2128;
  --bg-elevated: rgba(10, 31, 38, 0.86);
  --surface: rgba(14, 42, 51, 0.90);
  --surface-2: rgba(20, 54, 65, 0.88);
  --surface-hover: rgba(28, 70, 83, 0.95);
  --border: rgba(242, 157, 163, 0.28);
  --border-strong: rgba(242, 157, 163, 0.48);
  --text: #f7f7df;
  --text-muted: #bdd3d9;
  --text-dim: #83a3ac;
  --gold: #f29da3;
  --gold-hover: #f8b7bc;
  --gold-soft: rgba(242, 157, 163, 0.16);
  --gold-ink: #0a2128;
  --cta-bg: #f29da3;
  --cta-bg-hover: #f8b8bd;
  --cta-ink: #0a2128;
  --green: #79d1af;
  --green-soft: rgba(121, 209, 175, 0.16);
  --amber: #f2be85;
  --amber-soft: rgba(242, 190, 133, 0.16);
  --red: #f28390;
  --red-soft: rgba(242, 131, 144, 0.16);
  --blue: #8bd4e6;
  --shadow: 0 20px 50px rgba(3, 12, 16, 0.62), 0 2px 10px rgba(0, 0, 0, 0.35);
  --glass-highlight: inset 0 1px 0 rgba(247, 247, 223, 0.09);
  /* Exact match to the in-game darkened pastel cityscape veil! */
  --veil-bg: linear-gradient(
    155deg,
    rgba(10, 33, 40, 0.80) 0%,
    rgba(36, 26, 46, 0.74) 52%,
    rgba(10, 33, 40, 0.85) 100%
  );
  --nav-bg: rgba(11, 35, 43, 0.88);
}

/* Pastel theme-toggle pill in topbar & landing header */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-duration), border-color var(--motion-duration), transform var(--motion-duration);
  white-space: nowrap;
}
.theme-toggle-btn:hover {
  border-color: var(--gold);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.theme-toggle-btn svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

/* Crisp pastel readability in Twilight Dark faction bio cards */
[data-theme="dark"] .faction-bio-card {
  background: linear-gradient(145deg, rgba(16, 47, 57, 0.90), rgba(10, 33, 40, 0.94));
}
[data-theme="dark"] .faction-bio-card.is-collective { --faction-accent: #7ecde2; }
[data-theme="dark"] .faction-bio-card.is-old-aidalon { --faction-accent: #7ad1ae; }
[data-theme="dark"] .faction-bio-card.is-remnants { --faction-accent: #f29da3; }
[data-theme="dark"] .faction-bio-card.is-omniworks { --faction-accent: #f2be85; }
[data-theme="dark"] .panel,
[data-theme="dark"] .match-cell,
[data-theme="dark"] .page-hero-strip,
[data-theme="dark"] .landing-hero,
[data-theme="dark"] .filter-bar,
[data-theme="dark"] .card-tile {
  background: linear-gradient(145deg, rgba(16, 47, 57, 0.88), rgba(10, 33, 40, 0.93));
}
[data-theme="dark"] .btn-gold {
  box-shadow: 0 6px 18px rgba(242, 157, 163, 0.25);
}
[data-theme="dark"] .btn-gold:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(242, 157, 163, 0.38);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  background: var(--bg);
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Full-viewport illustrated Aidalon Pastel cityscape background (landscape desktop + portrait mobile) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("/assets/aidalon-bg-desktop.jpg");
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--veil-bg);
  pointer-events: none;
}

@media (max-aspect-ratio: 4/5), (max-width: 720px) {
  body::before {
    background-image: url("/assets/aidalon-bg-mobile.jpg");
    background-position: center top;
  }
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* =========================================================================
   TYPOGRAPHY & BRAND WORDMARK
   ========================================================================= */
.serif {
  font-family: var(--font-serif);
  letter-spacing: 0.01em;
}
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-gold::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0a2128;
  border: 1.5px solid rgba(242, 157, 163, 0.55);
  box-shadow: 0 3px 10px rgba(10, 33, 40, 0.22);
  flex-shrink: 0;
}
.brand-mark svg {
  width: 17px;
  height: 15px;
  color: #f7f7df;
}

.wordmark {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wordmark .dot {
  color: var(--gold);
  font-weight: 600;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.02;
  margin: 6px 0 8px;
  letter-spacing: 0.01em;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.gold-italic {
  color: var(--gold);
  font-style: italic;
}

/* =========================================================================
   NAVIGATION BAR (Frosted Blush-Cream / Deep Teal Glass)
   ========================================================================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 6px 24px rgba(45, 22, 36, 0.08);
}
.topnav-inner {
  max-width: 1260px;
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topnav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 60px;
}
.nav-link {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2.5px solid transparent;
  transition: color var(--motion-duration), border-color var(--motion-duration);
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--gold);
}
.topnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--motion-duration), border-color var(--motion-duration), color var(--motion-duration), transform var(--motion-duration), box-shadow var(--motion-duration);
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-gold {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-color: var(--cta-bg);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(10, 33, 40, 0.2);
}
.btn-gold:hover:not(:disabled) {
  background: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-ink);
  box-shadow: 0 8px 22px rgba(198, 75, 104, 0.3);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}
.btn-danger {
  border-color: rgba(196, 54, 74, 0.45);
  color: var(--red);
  background: var(--red-soft);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(196, 54, 74, 0.22);
}
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; }
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-xs);
}

/* =========================================================================
   BADGES & PILLS
   ========================================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge-ready {
  background: var(--green-soft);
  border-color: rgba(30, 123, 94, 0.38);
  color: var(--green);
}
.badge-warn {
  background: var(--amber-soft);
  border-color: rgba(181, 123, 40, 0.4);
  color: var(--amber);
}
.badge-gold {
  background: var(--gold-soft);
  border-color: rgba(198, 75, 104, 0.4);
  color: var(--gold);
}
.badge-danger {
  background: var(--red-soft);
  border-color: rgba(196, 54, 74, 0.4);
  color: var(--red);
}

/* =========================================================================
   CONTAINERS & FROSTED FACTION-BIO-STYLE PANELS
   ========================================================================= */
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.page-hero-strip {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow), var(--glass-highlight);
}
.panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow), var(--glass-highlight);
}
.panel-tight { padding: 14px 16px; }

/* Improve header readability directly over pastel art on subpages */
main.container > .eyebrow,
main.container > .page-title,
main.container > p.muted,
main.container > p.dim {
  text-shadow: 0 1px 12px rgba(255, 246, 244, 0.85);
}
[data-theme="dark"] main.container > .eyebrow,
[data-theme="dark"] main.container > .page-title,
[data-theme="dark"] main.container > p.muted,
[data-theme="dark"] main.container > p.dim {
  text-shadow: 0 2px 14px rgba(5, 18, 22, 0.9);
}

/* =========================================================================
   INPUTS & CONTROLS
   ========================================================================= */
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  color: var(--text);
  outline: none;
  transition: border-color var(--motion-duration), box-shadow var(--motion-duration);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.textarea { resize: vertical; min-height: 96px; }

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 2px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"]:checked {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: "✓";
  color: var(--cta-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* Tabs */
.tab-group {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--bg-elevated);
}
.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--border);
}
.tab-btn:last-child { border-right: none; }
.tab-btn.active {
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 600;
}

/* =========================================================================
   LANDING PAGE (/) — Pastel Cityscape Hero + Frosted Faction Bio Aesthetic
   ========================================================================= */
.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.landing-header {
  max-width: 1320px;
  width: calc(100% - 32px);
  margin: 16px auto 0;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow), var(--glass-highlight);
}
.landing-main {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 28px;
  display: grid;
  grid-template-columns: minmax(340px, 490px) 1fr;
  gap: 36px;
  align-items: center;
}
.landing-hero {
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 30px 30px 26px;
  box-shadow: var(--shadow), var(--glass-highlight);
}
.landing-hero > h1 {
  font-family: var(--font-serif);
  font-size: clamp(44px, 4.6vw, 62px);
  font-weight: 800;
  line-height: 0.98;
  margin: 10px 0 12px;
  letter-spacing: 0.01em;
}
.landing-hero > h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
}

/* Four Factions Showcase Strip (directly inspired by uploaded faction bio cards!) */
.factions-section {
  max-width: 1320px;
  width: 100%;
  margin: 4px auto 30px;
  padding: 0 24px;
}
.factions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.faction-bio-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--faction-accent, var(--gold));
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow), var(--glass-highlight);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--motion-duration), box-shadow var(--motion-duration);
}
.faction-bio-card:hover {
  transform: translateY(-3px);
}
.faction-bio-card h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--faction-accent, var(--aidalon-ochre));
  letter-spacing: 0.015em;
}
.faction-bio-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: var(--text-muted);
}

.waitlist-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.waitlist-row {
  display: flex;
  gap: 10px;
}
.waitlist-row .input { flex: 1; }

.landing-footer {
  max-width: 1320px;
  width: calc(100% - 32px);
  margin: 0 auto 18px;
  padding: 16px 22px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* =========================================================================
   AUTHENTIC MINIATURE GAMEBOARD 3D PREVIEW ON `/` (Matches live playmat!)
   ========================================================================= */
.preview-stage {
  position: relative;
  border: 1.5px solid rgba(242, 157, 163, 0.36);
  background:
    linear-gradient(155deg, rgba(10, 33, 40, 0.84) 0%, rgba(36, 26, 46, 0.78) 52%, rgba(10, 33, 40, 0.88) 100%),
    url("/assets/aidalon-bg-desktop.jpg") center / cover no-repeat;
  border-radius: 18px;
  overflow: hidden;
  min-height: 505px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 18px 54px;
  perspective: 1200px;
  box-shadow: 0 24px 54px rgba(4, 14, 18, 0.45), inset 0 1px 0 rgba(247, 247, 223, 0.12);
  color: #f7f7df;
}
.preview-stage.fullscreen-mode {
  position: fixed;
  inset: 0;
  z-index: 120;
  border-radius: 0;
  border: none;
}
.preview-blueprint-grid {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #4ba8be 0%, #e26d82 52%, #e8b86d 100%);
  -webkit-mask: url("/assets/table-bg-blueprint.svg") center / cover no-repeat;
  mask: url("/assets/table-bg-blueprint.svg") center / cover no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
.preview-board-3d {
  width: 96%;
  max-width: 630px;
  transform: rotateX(12deg) rotateZ(-2.5deg);
  transform-style: preserve-3d;
  transition: transform 400ms ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.preview-stage.fullscreen-mode .preview-board-3d {
  max-width: 820px;
  transform: none;
}
.preview-board-3d.paused * { animation-play-state: paused !important; }

.preview-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(16, 47, 57, 0.94), rgba(10, 33, 40, 0.96));
  border: 1px solid rgba(242, 157, 163, 0.34);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #d6e6ea;
  box-shadow: 0 8px 20px rgba(3, 12, 16, 0.42);
}
.preview-hud-bar strong { color: #f2be85; }
.preview-hud-bar .pv-pill {
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(242, 190, 133, 0.16);
  border: 1px solid rgba(242, 190, 133, 0.55);
  color: #f7dfa7;
  font-weight: 700;
}

.preview-playmat {
  position: relative;
  aspect-ratio: 1.70 / 1;
  width: 100%;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #e0bc7e 72%, #25365e);
  background-color: #25365e;
  background-image:
    linear-gradient(rgba(37, 54, 94, 0.34), rgba(37, 54, 94, 0.34)),
    url("/assets/playmat-blueprint.svg");
  background-position: 50%;
  background-size: cover;
  box-shadow:
    0 0 0 2px #d8ae64,
    0 0 22px rgba(242, 190, 133, 0.25),
    0 20px 44px rgba(3, 10, 16, 0.6);
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.66fr) minmax(0, 0.66fr);
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
  gap: 7px 8px;
}
.pv-lane-head {
  grid-row: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #e4eef9;
  padding: 2px 4px 4px;
  border-bottom: 2px solid var(--lane, #98cbdc);
  line-height: 1;
  letter-spacing: 0.02em;
}
.pv-lane-head.is-lit {
  background: rgba(245, 161, 59, 0.24);
  color: #ffe2ad;
  border-radius: 4px 4px 0 0;
}
.pv-slot, .pv-pile, .pv-seeker, .pv-score {
  position: relative;
  border: 1px solid var(--lane, #c6d4ed);
  border-radius: 5px;
  background: color-mix(in srgb, #eef3ff 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  transition: border-color 220ms, box-shadow 220ms, transform 220ms;
}
.pv-slot.is-council { background: color-mix(in srgb, #eef3ff 16%, transparent); }
.pv-slot.active-delve {
  border-color: #f5a13b !important;
  box-shadow: 0 0 0 2px rgba(245, 161, 59, 0.8), 0 0 18px rgba(245, 161, 59, 0.45), inset 0 0 14px rgba(245, 161, 59, 0.25);
  z-index: 6;
}
.pv-slot.is-passed {
  border-color: #69b88e !important;
}
.pv-card {
  height: 86%;
  aspect-ratio: 63 / 88;
  max-width: 86%;
  border-radius: 4px;
  overflow: hidden;
  border: 1.5px solid rgba(242, 190, 133, 0.72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.52);
  position: relative;
  background: #0c1726;
}
.pv-card.is-facedown {
  border-color: rgba(198, 212, 237, 0.42);
}
.pv-card img, .pv-card svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-stat-pill {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(14, 24, 38, 0.88);
  border: 1px solid rgba(226, 236, 250, 0.28);
  color: #f7f7df;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.2;
}
.pv-pile {
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 3px;
}
.pv-pile-lbl {
  font-size: 8px;
  color: #c7d9f0;
  font-weight: 600;
  line-height: 1;
}
.pv-pile-art {
  flex: 1;
  min-height: 0;
  aspect-ratio: 63 / 88;
  max-height: 64%;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2px 0;
}
.pv-pile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-pile-cnt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #f7f7df;
  line-height: 1;
}
.pv-score {
  flex-direction: column;
  justify-content: flex-start;
  padding: 5px;
  gap: 5px;
  background: color-mix(in srgb, #eef3ff 16%, transparent);
}
.pv-score-card {
  width: 78%;
  aspect-ratio: 88 / 63;
  border-radius: 4px;
  overflow: hidden;
  border: 1.5px solid #f2be85;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1424;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.48);
}
.pv-score-card img {
  height: 140%;
  width: auto;
  aspect-ratio: 63 / 88;
  transform: rotate(90deg);
  object-fit: cover;
}
.pv-delve-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}
.pv-delve-line {
  fill: none;
  stroke: #f5a13b;
  stroke-width: 4.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(245, 161, 59, 0.85));
  transition: all 320ms ease;
}
.pv-delve-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5a13b;
  color: #0a2128;
  border: 2px solid #0a2128;
  font-size: 9px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 9;
}

.preview-controls {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  gap: 7px;
  z-index: 8;
}
.preview-controls .btn {
  background: rgba(10, 33, 40, 0.9);
  color: #f7f7df;
  border-color: rgba(242, 157, 163, 0.38);
}
.preview-controls .btn:hover {
  background: #f29da3;
  color: #0a2128;
  border-color: #f29da3;
}
.preview-hud-caption {
  position: absolute;
  bottom: 12px;
  left: 14px;
  max-width: calc(100% - 175px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f7f7df;
  background: rgba(10, 33, 40, 0.92);
  border: 1px solid rgba(242, 157, 163, 0.38);
  border-radius: 7px;
  padding: 5px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 8;
}

/* Signed-in welcome card clean hierarchy on `/` */
.landing-welcome-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.landing-welcome-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
.landing-welcome-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.01em;
}
.landing-welcome-name strong {
  color: var(--gold);
  font-weight: 700;
}

/* =========================================================================
   LOBBY PAGE (/lobby)
   ========================================================================= */
.lobby-deck-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  margin-top: 20px;
}
.lobby-seeker-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.lobby-seeker-col .card-frame-wrap {
  max-width: 240px;
}
.slot-counts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.slot-counts-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.deck-list-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.deck-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 5px;
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
}
.deck-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  transition: background var(--motion-duration);
}
.deck-mini-row:hover { background: var(--surface-hover); }
.deck-mini-thumb {
  width: 24px;
  height: 32px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.deck-mini-qty {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  min-width: 22px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.match-cell {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow), var(--glass-highlight);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.match-cell h3 {
  font-family: var(--font-serif);
  font-size: 25px;
  margin: 0 0 4px;
  font-weight: 700;
}
.tables-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.table-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

/* Stats bars */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--aidalon-rose));
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.access-table th, .access-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.access-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Chat Panel */
.chat-panel {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}
.chat-messages {
  height: 220px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg {
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.chat-msg-actions {
  opacity: 0;
  display: inline-flex;
  gap: 4px;
  transition: opacity 140ms;
}
.chat-msg:hover .chat-msg-actions { opacity: 1; }
.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* =========================================================================
   CARDS DATABASE (/cards) & DETAIL (/cards/:id)
   ========================================================================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 14px;
  padding: 12px 14px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow), var(--glass-highlight);
}
.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.type-tab {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: background var(--motion-duration), border-color var(--motion-duration), color var(--motion-duration);
}
.type-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.type-tab.active {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 600;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width, 200px), 1fr));
  gap: 16px;
}
/* Make card tiles and captions crisp & luminous right over the illustrated pastel city! */
.card-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 7px;
  border-radius: 13px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border);
  box-shadow: 0 10px 26px rgba(45, 22, 36, 0.14), var(--glass-highlight);
  transition: transform var(--motion-duration), box-shadow var(--motion-duration);
}
.card-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(45, 22, 36, 0.22), var(--glass-highlight);
}
.card-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 63 / 88;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 12px 26px rgba(10, 33, 40, 0.24);
}
.card-frame-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}
.not-in-beta-pill {
  position: absolute;
  top: 16%;
  right: 7%;
  background: rgba(10, 33, 40, 0.92);
  border: 1px solid var(--aidalon-blush);
  color: #f7f7df;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cards-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cards-table th, .cards-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cards-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-2);
}
.cards-table tr:hover td { background: var(--surface-hover); }

.card-detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  margin-top: 22px;
  align-items: start;
}
.card-detail-layout > div:first-child {
  max-width: 330px;
}
.icon-token {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  margin: 0 1px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--gold-soft);
  border: 1px solid rgba(198, 75, 104, 0.35);
  color: var(--gold);
  vertical-align: baseline;
}

/* =========================================================================
   DECKBUILDER (/deckbuilder)
   ========================================================================= */
.builder-layout {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
}
.builder-sticky {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.filter-drawer {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  box-shadow: var(--shadow);
}
.trait-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12px;
}
.chip.active {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-ink);
}

/* =========================================================================
   LEGACY FALLBACK TABLE CLASSES
   ========================================================================= */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  max-width: 1420px;
  margin: 0 auto;
  padding: 16px 20px 32px;
}
.game-layout > *,
.lobby-deck-panel > *,
.builder-layout > * {
  min-width: 0;
}
.board-surface {
  min-width: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.player-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.player-strip.active-turn {
  border-color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
}
.districts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.district-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.district-col.delve-target {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.district-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.grid-slot {
  min-height: 64px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  transition: border-color var(--motion-duration), background var(--motion-duration);
}
.grid-slot.droppable {
  border-color: var(--gold);
  background: var(--gold-soft);
  cursor: pointer;
}
.grid-slot.occupied {
  border-style: solid;
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.grid-slot.forged {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-soft), var(--surface-2));
}
.grid-slot.exhausted { opacity: 0.62; }
.grid-slot.approaching {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-soft);
}
.delve-banner {
  background: var(--surface-2);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.hand-tray {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 4px;
}
.hand-card {
  width: 142px;
  min-width: 142px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 9px;
  transition: transform var(--motion-duration), border-color var(--motion-duration);
}
.hand-card:hover { transform: translateY(-4px); }
.hand-card.selected {
  border-color: var(--gold);
  transform: translateY(-6px);
}

/* =========================================================================
   LOGIN PAGE (/login)
   ========================================================================= */
.login-grid {
  max-width: 1020px;
  margin: 34px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow), var(--glass-highlight);
}
.login-art-pane {
  padding: 36px;
  background: linear-gradient(155deg, rgba(249, 208, 215, 0.35), rgba(255, 250, 246, 0.45));
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
[data-theme="dark"] .login-art-pane {
  background: linear-gradient(155deg, rgba(242, 157, 163, 0.12), rgba(10, 33, 40, 0.72));
}
.login-form-pane {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 11.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin: 6px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =========================================================================
   MODALS & TOASTS
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 33, 40, 0.62);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow), var(--glass-highlight);
  padding: 24px 26px;
}
.modal-box.modal-wide { max-width: 780px; }
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  line-height: 1.05;
}
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.shortcut-table td {
  padding: 5px 6px;
  vertical-align: top;
}
.shortcut-table td:first-child {
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  width: 115px;
}

.toast-root {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-strong);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-width: 240px;
  max-width: 380px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.app-footer {
  max-width: 1212px;
  margin: 42px auto 24px;
  padding: 18px 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1060px) {
  .factions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .landing-main,
  .lobby-deck-panel,
  .card-detail-layout,
  .builder-layout,
  .game-layout,
  .login-grid,
  .chat-panel {
    grid-template-columns: 1fr;
  }
  .match-grid, .tables-grid {
    grid-template-columns: 1fr;
  }
  .builder-sticky {
    position: static;
    max-height: none;
  }
  .login-art-pane {
    border-right: none;
    border-top: 1.5px solid var(--border);
    order: 2;
    padding: 24px;
  }
  .login-form-pane {
    order: 1;
    padding: 24px;
  }
  .lobby-seeker-col {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }
  .lobby-seeker-col .card-frame-wrap {
    width: 150px;
    max-width: 150px;
    flex-shrink: 0;
  }
  .lobby-seeker-col .slot-counts {
    flex: 1;
    min-width: 160px;
  }
}

@media (max-width: 640px) {
  .districts-grid,
  .factions-grid {
    grid-template-columns: 1fr;
  }
  .landing-header {
    width: calc(100% - 20px);
    padding: 11px 14px;
  }
  .landing-hero {
    padding: 22px 18px;
  }
}
