/* ValoLineups Pro web — HUD theme mirroring theme/colors.ts */
:root {
  --bg: #0A141E;
  --bg-elevated: #111E2B;
  --surface: #1B2733;
  --surface-alt: #22323F;
  --border: #2B3A47;
  --border-strong: #3A4C5A;
  --primary: #FF4655;
  --primary-dim: #BD3944;
  --primary-glow: rgba(255, 70, 85, 0.18);
  --text: #ECE8E1;
  --text-muted: #8B978F;
  --text-faint: #5A6872;
  --teal: #63F7FF;
  --teal-dim: rgba(99, 247, 255, 0.14);
  --amber: #FFBA20;
  --duelist: #FF4655;
  --initiator: #F4C95D;
  --controller: #7B86F0;
  --sentinel: #4FC1A6;
  --display: "Chakra Petch", sans-serif;
  --mono: "Share Tech Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.mono { font-family: var(--mono); letter-spacing: 1px; }
.faint { color: var(--text-faint); }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(17, 30, 43, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  object-fit: cover; display: block;
}
.brand-text { font-family: var(--display); font-weight: 700; letter-spacing: 1px; font-size: 15px; }
.brand-text em { color: var(--primary); font-style: normal; }
.nav { display: flex; gap: 6px; }
.nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 8px 14px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--primary); background: var(--primary-glow); }

/* ── Layout ── */
#app { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.loading { display: grid; place-items: center; gap: 18px; padding: 120px 0; color: var(--text-muted); }
.loading-spin {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hud-title { font-family: var(--display); font-weight: 700; letter-spacing: 1px; }
.hud-title em { color: var(--primary); font-style: normal; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head .sub { font-family: var(--mono); font-size: 12px; color: var(--text-faint); letter-spacing: 1px; }

/* ── Breadcrumb ── */
.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  padding: 10px 0 18px; color: var(--text-muted);
}
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-faint); }
.crumbs .here { color: var(--primary); }

/* ── Chips ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.active.teal { background: var(--teal); border-color: var(--teal); color: #06202a; }
.chip.active.amber { background: var(--amber); border-color: var(--amber); color: #2a1d00; }

/* ── Search input ── */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px; height: 46px; margin-bottom: 18px;
}
.searchbar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px;
}
.searchbar input::placeholder { color: var(--text-faint); }
.searchbar .icon { color: var(--text-muted); }

/* ── Stats row ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; text-align: center;
}
.stat b { font-family: var(--display); font-size: 26px; display: block; }
.stat span { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--text-muted); }

/* ── Agent grid ── */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.agent-card {
  position: relative; height: 128px; border-radius: 14px; overflow: hidden;
  background: var(--surface); border-left: 3px solid var(--border-strong);
  display: flex; align-items: center; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.agent-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.agent-card.disabled { opacity: 0.45; pointer-events: none; }
.agent-card img {
  position: absolute; right: 0; top: 0; height: 100%; width: 45%;
  object-fit: cover; object-position: top;
}
.agent-card .info { position: relative; z-index: 1; padding: 0 45% 0 16px; }
.agent-card .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.agent-card .rank { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--teal); }
.agent-card .rank.top { color: var(--amber); }
.agent-card .role {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px;
  padding: 2px 7px; border: 1px solid; border-radius: 6px;
  background: rgba(8, 14, 20, 0.5);
}
.agent-card .name {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: 1px; color: #fff; white-space: nowrap;
}
.agent-card .count { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; margin-top: 5px; }

/* ── Map banners ── */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.map-card {
  position: relative; height: 140px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); display: grid; place-items: center; cursor: pointer;
  transition: transform 0.15s;
}
.map-card:hover { transform: translateY(-2px); }
.map-card.disabled { opacity: 0.45; pointer-events: none; }
.map-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-card::after { content: ""; position: absolute; inset: 0; background: rgba(10, 20, 30, 0.42); }
.map-card .name {
  position: relative; z-index: 1; font-family: var(--display); font-weight: 700;
  font-size: 26px; letter-spacing: 3px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}
.map-card .badge {
  position: absolute; z-index: 1; bottom: 10px; right: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  background: rgba(8, 14, 20, 0.74); padding: 4px 8px; border-radius: 8px;
}
.section-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px;
  color: var(--text-muted); margin: 26px 0 12px;
}

/* ── Side / site tiles ── */
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.big-tile {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--border); padding: 30px 22px; cursor: pointer;
  background: var(--surface); text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}
.big-tile:hover { transform: translateY(-2px); }
.big-tile.disabled { opacity: 0.4; pointer-events: none; }
.big-tile .k { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--text-muted); }
.big-tile .v { font-family: var(--display); font-weight: 700; font-size: 38px; margin: 6px 0; }
.big-tile .c { font-family: var(--mono); font-size: 11px; color: var(--text); }

/* ── Lineup rows ── */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: 10px; border-left: 3px solid var(--primary);
  padding: 12px 16px; cursor: pointer; transition: background 0.15s;
}
.row:hover { background: var(--surface-alt); }
.row .thumbwrap { position: relative; flex: none; }
.row .thumb {
  width: 74px; height: 74px; border-radius: 8px; object-fit: cover;
  background: var(--surface-alt); display: block;
}
.row .ability-badge {
  position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.row .ability-badge img { width: 16px; height: 16px; }
.row .body { flex: 1; min-width: 0; }
.row .title { font-weight: 700; font-size: 15px; }
.row .sub { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.row .heart { font-size: 20px; color: var(--text-muted); padding: 6px; }
.row .heart.on { color: var(--primary); }
.row .chev { color: var(--primary); font-size: 24px; font-weight: 300; }
.empty { text-align: center; color: var(--text-muted); padding: 60px 20px; line-height: 1.6; }
.empty .glyph { font-size: 44px; color: var(--text-faint); display: block; margin-bottom: 10px; }

/* ── Viewer ── */
.viewer { max-width: 900px; margin: 0 auto; }
.viewer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.viewer-head .title { font-family: var(--display); font-weight: 700; font-size: 20px; flex: 1; min-width: 200px; }
.viewer-head .ability { font-family: var(--mono); color: var(--primary); font-size: 13px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn.on { color: var(--primary); border-color: var(--primary); }
.route {
  font-family: var(--mono); color: var(--teal); font-size: 13px;
  background: var(--teal-dim); border-radius: 10px; padding: 8px 14px;
  margin-bottom: 14px; display: inline-block;
}
/* Fixed 16:9 stage — Valorant's native aspect. Sources captured on stretched
   4:3 resolutions get object-fit:fill via JS, which un-stretches them. */
.stage {
  position: relative; background: #000; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 16 / 9; max-height: 78vh;
}
.stage img { width: 100%; height: 100%; display: block; object-fit: contain; }
.stage .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(8, 14, 20, 0.65); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); font-size: 26px; font-weight: 700;
  display: grid; place-items: center;
}
.stage .arrow:hover { background: rgba(8, 14, 20, 0.9); }
.stage .arrow.l { left: 12px; }
.stage .arrow.r { right: 12px; }
.stage-foot { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 0 4px; flex-wrap: wrap; }
.role-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  color: var(--teal); background: var(--teal-dim); border-radius: 8px; padding: 5px 12px;
}
.dots { display: flex; gap: 6px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 4px; background: var(--text-faint); transition: all 0.2s; cursor: pointer; }
.dot.on { width: 20px; background: var(--primary); }
.counter { font-family: var(--mono); font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.viewer-cta {
  margin-top: 26px; padding: 22px; border-radius: 14px; text-align: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
}
.viewer-cta h3 { font-family: var(--display); letter-spacing: 1px; margin-bottom: 6px; }
.viewer-cta p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* ── Store badges ── */
.store-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 18px; color: var(--text-muted); background: var(--surface);
  transition: all 0.15s;
}
.badge b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: 1px; color: var(--text); margin-top: 2px; }
.badge:hover { border-color: var(--primary); }

/* ── Home hero ── */
.hero {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); padding: 60px 34px; margin-bottom: 8px;
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(10, 20, 30, 0.8); }
.hero > div { position: relative; z-index: 1; max-width: 560px; }
.hero .tag { font-family: var(--mono); color: var(--primary); font-size: 12px; letter-spacing: 1.5px; }
.hero h1 { font-family: var(--display); font-size: 40px; letter-spacing: 0.5px; line-height: 1.1; margin: 12px 0; color: #fff; }
.hero h1 em { color: var(--primary); font-style: normal; }
.hero p { color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; }
.cta {
  display: inline-block; background: var(--primary); color: #fff;
  font-family: var(--display); font-weight: 700; letter-spacing: 1.5px;
  padding: 15px 30px; border-radius: 12px; font-size: 15px;
  transition: filter 0.15s;
}
.cta:hover { filter: brightness(1.1); }

/* ── LOTD card ── */
.lotd {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); height: 170px; display: flex; align-items: flex-end;
  margin-top: 22px;
}
.lotd img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lotd::after { content: ""; position: absolute; inset: 0; background: rgba(10, 20, 30, 0.45); }
.lotd .body { position: relative; z-index: 1; width: 100%; padding: 14px 16px; background: rgba(10, 20, 30, 0.62); }
.lotd .k { font-family: var(--mono); color: var(--amber); font-size: 11px; letter-spacing: 1px; }
.lotd .t { font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff; margin-top: 4px; }
.lotd .s { font-family: var(--mono); color: rgba(217, 227, 242, 0.75); font-size: 11px; margin-top: 3px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border); background: var(--bg-elevated);
  padding: 30px 22px 40px; text-align: center; display: grid; gap: 16px;
}
.footer .disclaimer { color: var(--text-faint); font-size: 11px; max-width: 640px; margin: 0 auto; line-height: 1.6; }

/* ── Pagination ── */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 22px 0 6px; flex-wrap: wrap;
}
.pg-btn {
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 1px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px; transition: all 0.15s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn:disabled { opacity: 0.35; cursor: default; }
.pg-info { font-size: 11px; color: var(--text-muted); }

/* ── Select filters ── */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 150px; max-width: 240px; }
.field > span { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--text-muted); }
.field select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238B978F'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px; padding: 12px 38px 12px 14px;
  cursor: pointer; outline: none; width: 100%;
}
.field select:focus { border-color: var(--primary); }
.clear-btn {
  align-self: flex-end;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 1px;
  color: var(--primary); background: var(--primary-glow);
  border: 1px solid var(--primary-dim); border-radius: 10px;
  padding: 12px 16px; transition: all 0.15s;
}
.clear-btn:hover { background: var(--primary); color: #fff; }

/* ── Contact page ── */
.contact { max-width: 640px; margin: 0 auto; }
.contact-intro { color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.flabel {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 1.5px; color: var(--text-muted); margin: 0 0 10px;
}
.contact textarea, .contact input[type="text"] {
  width: 100%; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; color: var(--text); font-size: 15px; font-family: inherit;
  padding: 14px; outline: none; resize: vertical;
}
.contact textarea:focus, .contact input[type="text"]:focus { border-color: var(--primary); }
.contact input[type="text"] { height: 50px; }
.contact .cta:disabled { opacity: 0.6; }

/* ── Profile ── */
.profile-id {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; margin-bottom: 22px;
}
.profile-id .pfp {
  width: 84px; height: 84px; border-radius: 20px; object-fit: cover;
  border: 2px solid var(--teal);
}
.callsign { display: flex; align-items: center; gap: 10px; }
.callsign span { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 1px; color: #fff; }
.row.pref { border-left-color: var(--border-strong); }
.row.pref .glyph { width: 24px; text-align: center; font-size: 18px; flex: none; }

/* ── Pre-rendered SEO pages (build-seo.js) ── */
.seo-article { max-width: 900px; margin: 0 auto; }
.seo-article h1 {
  font-family: var(--display); font-weight: 700; font-size: 30px;
  letter-spacing: 0.5px; color: #fff; margin-bottom: 12px; line-height: 1.2;
}
.seo-article h2 {
  font-family: var(--display); font-size: 19px; letter-spacing: 0.5px;
  margin: 30px 0 14px; color: var(--text);
}
.seo-article h2 .count { color: var(--text-faint); font-size: 14px; }
.seo-lede { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.seo-lede strong { color: var(--text); }
.seo-article > .route { margin-bottom: 22px; }

.seo-steps { list-style: none; counter-reset: step; }
.seo-steps li { counter-increment: step; margin-bottom: 28px; }
.seo-steps li h2 {
  font-size: 15px; margin: 0 0 10px; color: var(--teal);
  font-family: var(--mono); letter-spacing: 1.5px; text-transform: uppercase;
}
.seo-steps li h2::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 6px; margin-right: 10px;
  background: var(--primary); color: #fff; font-family: var(--display); font-size: 12px;
  vertical-align: middle;
}
.seo-steps img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid var(--border); background: #000;
}

.seo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px; margin-bottom: 8px;
}
.seo-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.seo-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.seo-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-alt); }
.seo-card .t { padding: 10px 12px 2px; font-weight: 700; font-size: 14px; color: var(--text); }
.seo-card .s { padding: 0 12px 12px; font-family: var(--mono); font-size: 11px; color: var(--text-muted); }

.seo-meta dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; }
.seo-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--text-muted); padding-top: 2px; }
.seo-meta dd { color: var(--text); font-size: 15px; }
.seo-meta a, .seo-related a, .seo-article p a { color: var(--teal); }
.seo-meta a:hover, .seo-related a:hover { text-decoration: underline; }

.seo-links { list-style: none; columns: 2; column-gap: 30px; }
.seo-links li { padding: 7px 0; break-inside: avoid; }
.seo-links a { color: var(--text); font-size: 15px; }
.seo-links a:hover { color: var(--primary); }
.seo-links .count { color: var(--text-faint); font-family: var(--mono); font-size: 12px; }

.seo-cta-line { margin: 26px 0; }
.seo-related { margin-top: 34px; }

@media (max-width: 640px) {
  .seo-links { columns: 1; }
  .seo-meta dl { grid-template-columns: 100px 1fr; }
  .seo-article h1 { font-size: 24px; }
}

/* ── Legal pages ── */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.7; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal h2 {
  font-family: var(--display); font-size: 17px; letter-spacing: 0.5px;
  margin: 28px 0 10px; color: var(--text);
}
.legal p, .legal li { color: var(--text-muted); font-size: 15px; }
.legal b { color: var(--text); }
.legal ul { padding-left: 22px; margin: 10px 0; }

/* ── Desktop scale-up (the site should feel like a website, not a phone) ── */
@media (min-width: 900px) {
  #app { max-width: 1320px; padding: 34px 30px 80px; }
  .topbar { padding: 16px 34px; }
  .brand-text { font-size: 17px; }
  .nav a { font-size: 13px; padding: 9px 16px; }
  .hero { padding: 90px 56px; }
  .hero > div { max-width: 680px; }
  .hero .tag { font-size: 13px; }
  .hero h1 { font-size: 56px; }
  .hero p { font-size: 17px; }
  .cta { font-size: 16px; padding: 17px 36px; }
  .page-head h1 { font-size: 34px; }
  .lotd { height: 230px; }
  .lotd .t { font-size: 24px; }
  .lotd .s { font-size: 13px; }
  .stat { padding: 26px; }
  .stat b { font-size: 38px; }
  .stat span { font-size: 12px; }
  .section-label { font-size: 14px; margin: 34px 0 16px; }
  .agent-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
  .agent-card { height: 168px; }
  .agent-card .name { font-size: 26px; }
  .agent-card .count { font-size: 11px; }
  .agent-card .role { font-size: 10px; }
  .map-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
  .map-card { height: 190px; }
  .map-card .name { font-size: 34px; }
  .big-tile { padding: 44px 26px; }
  .big-tile .v { font-size: 52px; }
  .searchbar { height: 54px; }
  .searchbar input { font-size: 16px; }
  .chip { padding: 9px 18px; font-size: 13px; }
  .row { padding: 16px 20px; }
  .row .thumb { width: 96px; height: 96px; }
  .row .title { font-size: 17px; }
  .row .sub { font-size: 13px; }
  .viewer { max-width: 1060px; }
  .viewer-head .title { font-size: 26px; }
  .stage img { max-height: 78vh; }
  .footer { padding: 40px 30px 50px; }
}

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

@media (max-width: 640px) {
  .nav a { padding: 8px 9px; font-size: 11px; }
  .hero { padding: 40px 22px; }
  .hero h1 { font-size: 30px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat b { font-size: 19px; }
  .row .thumb { width: 60px; height: 60px; }
}
