/* ==========================================================================
   BoredBay Design System & Authentic Theme Presets (base.css)
   Mobile-first layout • Flicker-free touch controls • Zero layout-jump themes:
   - Neon:   Dark arcade cabinet, subtle cyan/amber glow & crisp focus states
   - Pastel: Warm airy daylight, soft cushion corners & calm contrast
   - Retro:  Late-80s/90s pixel-arcade bevels, stepped corners & Silkscreen UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&family=Silkscreen:wght@400;700&family=Space+Grotesk:wght@600;700&display=swap');

/* 1. NEON THEME (Default Dark Arcade) */
:root,
[data-theme="neon"] {
  --bg: #080c14;
  --bg-elevated: #0e1522;
  --surface: #121b2b;
  --surface-2: #19253a;
  --surface-hover: #21314c;
  --text: #eef6ff;
  --text-soft: #c5d6eb;
  --muted: #7f95b2;

  --accent: #00e5ff;
  --accent-hover: #33ecff;
  --accent-ink: #031921;
  --accent-2: #ffaa00;
  --accent-2-hover: #ffbb33;
  --accent-2-ink: #1f1200;

  --ok: #00f5a0;
  --ok-bg: rgba(0, 245, 160, 0.13);
  --danger: #ff5c77;
  --danger-bg: rgba(255, 92, 119, 0.15);
  --warn-bg: rgba(255, 170, 0, 0.15);

  --border: rgba(0, 229, 255, 0.18);
  --border-strong: rgba(0, 229, 255, 0.42);
  --focus-ring: 0 0 0 2px rgba(0, 229, 255, 0.55), 0 0 14px rgba(0, 229, 255, 0.35);

  --card-shadow: 0 0 0 1px rgba(0, 229, 255, 0.06), 0 0 22px rgba(0, 229, 255, 0.06), 0 10px 28px rgba(0, 0, 0, 0.48);
  --subtle-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --btn-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  --btn-primary-shadow: 0 0 16px rgba(0, 229, 255, 0.32);
  --btn-warn-shadow: 0 0 16px rgba(255, 170, 0, 0.28);
  --btn-active-transform: translateY(1px);
  --text-glow: 0 0 14px rgba(0, 229, 255, 0.28);

  --canvas-bg: #060a10;
  --canvas-grid: rgba(0, 229, 255, 0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-eyebrow: var(--font-mono);

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

/* 2. PASTEL THEME (Soft Airy Daylight & Rounder Cushion Geometry) */
[data-theme="pastel"] {
  --bg: #f8f3ec;
  --bg-elevated: #fffcf8;
  --surface: #fffdf9;
  --surface-2: #f1e9df;
  --surface-hover: #e7ddd0;
  --text: #25303d;
  --text-soft: #435264;
  --muted: #738294;

  --accent: #2c8c85;
  --accent-hover: #247771;
  --accent-ink: #ffffff;
  --accent-2: #df7857;
  --accent-2-hover: #cf6847;
  --accent-2-ink: #ffffff;

  --ok: #2e8558;
  --ok-bg: rgba(46, 133, 88, 0.12);
  --danger: #cc525f;
  --danger-bg: rgba(204, 82, 95, 0.12);
  --warn-bg: rgba(223, 120, 87, 0.14);

  --border: rgba(67, 82, 100, 0.11);
  --border-strong: rgba(44, 140, 133, 0.32);
  --focus-ring: 0 0 0 3px rgba(44, 140, 133, 0.28);

  --card-shadow: 0 8px 26px rgba(84, 68, 52, 0.07);
  --subtle-shadow: none;
  --btn-shadow: 0 2px 6px rgba(84, 68, 52, 0.06);
  --btn-primary-shadow: 0 4px 14px rgba(44, 140, 133, 0.22);
  --btn-warn-shadow: 0 4px 14px rgba(223, 120, 87, 0.22);
  --btn-active-transform: translateY(1px);
  --text-glow: none;

  --canvas-bg: #efe7dc;
  --canvas-grid: rgba(67, 82, 100, 0.06);

  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-eyebrow: var(--font-sans);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 26px;
  --radius-pill: 999px;
}

/* 3. RETRO THEME (Late-80s / 90s Pixel-Arcade Cabinet) */
[data-theme="retro"] {
  --bg: #110d08;
  --bg-elevated: #1a140d;
  --surface: #201810;
  --surface-2: #2b2116;
  --surface-hover: #382b1d;
  --text: #ffe8a3;
  --text-soft: #f6ce71;
  --muted: #b89456;

  --accent: #ffb703;
  --accent-hover: #ffc633;
  --accent-ink: #1a1000;
  --accent-2: #fb6107;
  --accent-2-hover: #ff7726;
  --accent-2-ink: #1a0800;

  --ok: #80ed99;
  --ok-bg: rgba(128, 237, 153, 0.14);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.16);
  --warn-bg: rgba(255, 183, 3, 0.16);

  --border: rgba(255, 183, 3, 0.28);
  --border-strong: rgba(255, 183, 3, 0.62);
  --focus-ring: 0 0 0 2px #ffb703;

  --card-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.14), 4px 4px 0px rgba(0, 0, 0, 0.78);
  --subtle-shadow: 2px 2px 0px rgba(0, 0, 0, 0.55);
  --btn-shadow: 2px 2px 0px rgba(0, 0, 0, 0.78);
  --btn-primary-shadow: 3px 3px 0px #7a4f00;
  --btn-warn-shadow: 3px 3px 0px #782900;
  --btn-active-transform: translate(2px, 2px);
  --text-glow: 0 0 8px rgba(255, 183, 3, 0.24);

  --canvas-bg: #0c0905;
  --canvas-grid: rgba(255, 183, 3, 0.08);

  --font-display: 'Silkscreen', 'JetBrains Mono', monospace;
  --font-eyebrow: 'Silkscreen', 'JetBrains Mono', monospace;

  --radius-xs: 2px;
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 4px;
  --radius-pill: 4px;
}

/* ==========================================================================
   Reset, Mobile Viewport & Anti-Flicker Foundations
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Subtle CRT scanline texture in Retro mode without blocking pointer events */
[data-theme="retro"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 950;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.11) 3px
  );
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin: 0 0 0.45rem;
  color: var(--text);
}

[data-theme="retro"] h1,
[data-theme="retro"] h2,
[data-theme="retro"] h3 {
  letter-spacing: -0.03em;
  font-weight: 700;
}

h1 { font-size: clamp(1.32rem, 4vw, 1.9rem); }
h2 { font-size: clamp(1.1rem, 3vw, 1.38rem); }
h3 { font-size: 1rem; }

[data-theme="retro"] h1 { font-size: clamp(1.15rem, 3.4vw, 1.58rem); }
[data-theme="retro"] h2 { font-size: clamp(0.98rem, 2.6vw, 1.2rem); }
[data-theme="retro"] h3 { font-size: 0.92rem; }

p {
  margin: 0 0 0.65rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration: underline;
  }
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Mobile-First Shell & Compact Header
   ========================================================================== */
.shell-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 12px 44px;
  flex: 1;
}

@media (min-width: 768px) {
  .shell-wrap {
    padding: 16px 20px 56px;
  }
}

/* Suppress staggered child transitions during theme switches */
[data-theme-switching] *,
[data-theme-switching] *::before,
[data-theme-switching] *::after {
  transition: none !important;
}

.site-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 880px) {
  .site-header {
    flex-wrap: nowrap;
    padding: 11px 16px;
    margin-bottom: 16px;
  }
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  min-height: 38px;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--btn-primary-shadow);
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand-domain {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.site-nav {
  order: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.header-controls {
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 880px) {
  .site-nav {
    order: 2;
    width: auto;
    border-top: 0;
    padding-top: 0;
  }
  .header-controls {
    order: 3;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  touch-action: manipulation;
  flex: 1 0 auto;
}

@media (min-width: 560px) {
  .nav-link {
    flex: 0 0 auto;
  }
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
  }
}

.nav-link.active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--btn-primary-shadow);
}

/* ==========================================================================
   Theme Switcher (Zero Layout Shift)
   ========================================================================== */
.theme-switcher {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.theme-opt {
  min-height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .theme-opt:hover:not(.active) {
    color: var(--text);
    background: transparent;
    border-color: transparent;
  }
}

.theme-opt.active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: none;
}

/* ==========================================================================
   Compact Page Strip & Mobile-First Stepper Deck
   ========================================================================== */
.page-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 768px) {
  .page-hero {
    padding: 18px 22px;
    margin-bottom: 16px;
  }
}

.page-hero-copy {
  max-width: 620px;
}

.page-hero-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
  text-shadow: var(--text-glow);
}

/* Step-Card Flow Deck Navigation */
.deck-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}

.deck-step-btn {
  min-height: 40px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.deck-step-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--btn-primary-shadow);
}

.deck-step-btn.completed:not(.active) {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

/* ==========================================================================
   Grid & Surface Primitives (Mobile 1-Col First!)
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--card-shadow);
}

@media (min-width: 768px) {
  .card {
    padding: 20px;
  }
}

.card-subtle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--subtle-shadow);
}

.bay-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--card-shadow);
  touch-action: manipulation;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

@media (hover: hover) and (pointer: fine) {
  .bay-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
    text-decoration: none;
  }
}

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

.bay-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bay-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Buttons & Inputs — Flicker-Free, Thumb-Friendly (42px–48px Mobile Targets)
   ========================================================================== */
button,
.btn,
select,
input,
textarea {
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  min-height: 42px;
  line-height: 1.3;
  touch-action: manipulation;
}

input[type="checkbox"],
input[type="radio"] {
  min-height: 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: var(--accent);
}

input[type="range"] {
  min-height: 36px;
  accent-color: var(--accent);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 84px;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: var(--btn-shadow);
  /* Specific properties only — avoids filter/all GPU layer thrashing */
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled):not(.primary):not(.warn):not(.ok):not(.danger):not(.theme-opt):not(.seg-tab):not(.deck-step-btn),
  .btn:hover:not(.primary):not(.warn):not(.ok):not(.danger) {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    text-decoration: none;
  }
}

button:active:not(:disabled),
.btn:active {
  transform: var(--btn-active-transform);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

button.primary,
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: var(--btn-primary-shadow);
}

@media (hover: hover) and (pointer: fine) {
  button.primary:hover:not(:disabled),
  .btn.primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
  }
}

button.warn,
.btn.warn {
  background: var(--accent-2);
  color: var(--accent-2-ink);
  border-color: transparent;
  box-shadow: var(--btn-warn-shadow);
}

@media (hover: hover) and (pointer: fine) {
  button.warn:hover:not(:disabled),
  .btn.warn:hover {
    background: var(--accent-2-hover);
    text-decoration: none;
  }
}

button.ok,
.btn.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok);
  box-shadow: none;
}

button.danger,
.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
}

button.sm,
.btn.sm {
  font-size: 0.82rem;
  min-height: 36px;
  padding: 5px 10px;
}

button.lg,
.btn.lg {
  font-size: 1rem;
  min-height: 48px;
  padding: 11px 18px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Badges, Readouts & Segmented Controls
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.badge.town,
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: transparent;
}

.badge.evil,
.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: transparent;
}

.badge.neutral,
.badge.warn {
  background: var(--warn-bg);
  color: var(--accent-2);
  border-color: transparent;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.readout-lg {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 4.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: var(--text-glow);
  font-variant-numeric: tabular-nums;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.seg-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seg-tab {
  min-height: 36px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
}

.seg-tab.active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: none;
}

/* ==========================================================================
   List Rows, Modular Ad Pit-Stop, Footer & Feedback Drawer
   ========================================================================== */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.list-row.eliminated {
  opacity: 0.52;
}

.list-row.eliminated .player-label {
  text-decoration: line-through;
}

.ad-pitstop {
  margin: 20px 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.ad-pitstop-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ad-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.site-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.68);
  backdrop-filter: blur(3px);
  z-index: 960;
  display: none;
  justify-content: flex-end;
}

.drawer-backdrop.open {
  display: flex;
}

.drawer-panel {
  width: min(420px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  padding: 18px 16px;
  overflow-y: auto;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 5px;
}

@media (max-width: 410px) {
  .hide-xs {
    display: none;
  }
}
