@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d141b;
  --panel: #141e28;
  --panel-2: #1a2733;
  --panel-3: #243442;
  --line: #3e5263;
  --line-strong: #6b8295;
  --text: #f0f5f8;
  --muted: #b1c1ce;
  --accent: #c1ee70;
  --accent-ink: #18220c;
  --amber: var(--accent);
  --amber-ink: var(--accent-ink);
  --olive: #9baebf;
  --green: #6fddb3;
  --danger: #ff8d86;
  --steel: #a4b5c3;
  --discord: #9ca8ff;
  --radius: 4px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --data: "Barlow Condensed", "Arial Narrow", sans-serif;
  --shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf2f6;
  --panel: #ffffff;
  --panel-2: #f1f5f8;
  --panel-3: #e0e9f0;
  --line: #889cac;
  --line-strong: #597083;
  --text: #172b3a;
  --muted: #4b6071;
  --accent: #3b6410;
  --accent-ink: #ffffff;
  --olive: #526c80;
  --green: #146c50;
  --danger: #b12c30;
  --steel: #506575;
  --discord: #4b54b6;
  --shadow: 0 18px 42px rgba(53, 50, 37, .16);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--display);
  background: var(--bg);
}
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.02em; }
h2 { margin-bottom: 8px; font-size: 24px; letter-spacing: -.02em; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.admin-only-debug[aria-hidden="true"] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.auth-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.auth-card::before { content: ""; display: block; height: 4px; margin: -30px -30px 24px; background: var(--amber); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--muted); font-size: 18px; font-weight: 700; text-transform: uppercase; }
.auth-locale { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px 0 18px; color: var(--muted); font-size: 12px; }
.auth-locale select { width: auto; min-height: 32px; padding: 4px 28px 4px 8px; font-size: 13px; }
.auth-card h1 { margin: 0 0 20px; font-size: 34px; }
.auth-form { display: grid; gap: 14px; }
.auth-instruction { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.onboarding-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.onboarding-steps li { flex: 1; min-width: 0; padding: 6px 4px; border: 1px solid var(--line); text-align: center; }
.onboarding-steps li.active { border-color: var(--amber); background: color-mix(in srgb,var(--amber) 13%,transparent); color: var(--amber); }
.auth-form label, .field, .filter-bar > label:not(.search-main):not(.compact-check) { display: grid; gap: 5px; }
.auth-form label > span, .field > span, .filter-bar label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.auth-message { min-height: 20px; margin: 12px 0 0; color: var(--amber); font-size: 13px; line-height: 1.45; }
.auth-legal-note { margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.auth-legal-note a, .public-links a { color: var(--amber); }
.public-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 12px; margin-top: 15px; }
.public-links a { font-size: 11px; text-decoration: none; }
.public-links a:hover { color: var(--text); text-decoration: underline; }

.app-shell { min-height: 100vh; }
.topbar {
  position: relative;
  z-index: 30;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.brand, .auth-brand { display: flex; align-items: center; }
.brand { gap: 10px; }
.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel-3);
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
}
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; }
.brand-mark::before { width: 18px; height: 18px; border: 2px solid var(--amber); transform: rotate(45deg); }
.brand-mark::after { width: 5px; height: 5px; background: var(--amber); }
.brand-mark span { width: 2px; height: 25px; background: var(--panel-3); transform: rotate(45deg); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.auth-switch {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.auth-switch:hover { border-color: var(--line); color: var(--text); background: var(--panel-2); }
.auth-card > .auth-switch { width: 100%; margin-top: 10px; color: var(--amber); }
.credits-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel-2); color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.credits-button strong { color: var(--amber); font-size: 13px; }
.credits-button:hover { border-color: var(--amber); color: var(--text); }
.auth-features-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 12px; text-decoration: none; }
.auth-features-link:hover { color: var(--amber); }

.maintenance-page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 78% 0%, color-mix(in srgb, var(--amber) 13%, transparent), transparent 36%), var(--bg); }
.maintenance-topbar { width: min(1120px, calc(100% - 32px)); min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.maintenance-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.maintenance-label i, .maintenance-status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 14%, transparent); }
.maintenance-main { width: min(900px, calc(100% - 32px)); flex: 1 0 auto; margin: 0 auto; padding: clamp(78px, 13vh, 150px) 0 80px; }
.maintenance-main h1 { max-width: 720px; margin: 0; font-size: clamp(48px, 8vw, 92px); line-height: .9; letter-spacing: -.045em; }
.maintenance-main h1 em { color: var(--amber); font-style: normal; }
.maintenance-copy { max-width: 580px; margin: 28px 0 30px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.maintenance-status { width: min(100%, 580px); display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; margin-bottom: 28px; padding: 14px 15px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; }
.maintenance-status strong { color: var(--text); }
.maintenance-status span:last-child { margin-left: auto; }
.maintenance-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
@media (max-width: 560px) {
  .maintenance-topbar, .maintenance-main, .maintenance-footer { width: calc(100% - 24px); }
  .maintenance-topbar { min-height: 64px; }
  .maintenance-label { font-size: 9px; }
  .maintenance-main { padding: 68px 0 54px; }
  .maintenance-copy { margin: 22px 0 25px; font-size: 15px; }
  .maintenance-status { align-items: flex-start; flex-direction: column; gap: 7px; }
  .maintenance-status span:last-child { margin-left: 0; }
}

.features-page { min-height: 100vh; background: var(--bg); }
.features-topbar { width: min(1120px, calc(100% - 32px)); min-height: 74px; display: flex; align-items: center; justify-content: space-between; margin: 0 auto; border-bottom: 1px solid var(--line); }
.features-brand { margin: 0; color: var(--text); text-decoration: none; }
.features-main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 70px 0 52px; }
.features-hero { max-width: 760px; padding-bottom: 58px; }
.features-kicker { margin: 0 0 11px; color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.features-hero h1 { max-width: 650px; margin: 0; font-size: clamp(42px, 7vw, 76px); line-height: .94; letter-spacing: -.035em; }
.features-hero > p:not(.features-kicker) { max-width: 650px; margin: 22px 0 26px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.features-hero .button { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.feature-card { min-height: 220px; padding: 24px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: color-mix(in srgb, var(--panel) 90%, transparent); }
.feature-index { display: block; margin-bottom: 34px; color: var(--amber); font-size: 11px; font-weight: 700; }
.feature-card h2 { margin: 0; font-size: 24px; line-height: 1; }
.feature-card p { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.features-callout { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 44px; padding: 28px; border: 1px solid var(--amber); background: linear-gradient(120deg, color-mix(in srgb, var(--amber) 15%, var(--panel)), var(--panel)); }
.features-callout h2 { margin: 0; font-size: clamp(26px, 4vw, 42px); line-height: 1; }
.features-callout .button { text-decoration: none; white-space: nowrap; }
.public-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding: 20px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.public-footer p { max-width: 660px; margin: 0; }
.public-footer .public-links { justify-content: flex-end; margin: 0; }
.info-page { min-height: 100vh; background: var(--bg); }
.info-main { width: min(840px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 52px; }
.info-article { padding: clamp(22px, 4vw, 42px); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--panel) 92%, transparent); }
.info-article h1 { margin: 0 0 8px; font-size: clamp(34px, 6vw, 56px); line-height: .98; }
.info-article h2 { margin: 30px 0 8px; font-size: 23px; }
.info-article p, .info-article li { color: var(--muted); font-size: 15px; line-height: 1.62; }
.info-article ul { padding-left: 20px; }
.info-meta { margin: 0 0 26px !important; color: var(--amber) !important; font-size: 12px !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.info-article a { color: var(--amber); }
.status-summary { display: flex; align-items: center; gap: 9px; margin: 20px 0; padding: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; font-weight: 700; }
.status-summary i { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.status-summary.ok i { background: var(--green); }
.status-summary.error i { background: var(--danger); }

select, input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: 0;
  background: var(--panel-2);
  color: var(--text);
}
select { padding: 0 34px 0 10px; }
input { padding: 0 10px; }
select:focus, input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 22%, transparent); }
input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--amber); }

.status-badge {
  min-width: 78px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.complete { color: var(--green); }
.status-badge.running { color: var(--amber); }
.status-badge.cancelled { color: var(--steel); }
.status-badge.error { color: var(--danger); }
.status-badge.running i { animation: signal 1.2s ease-in-out infinite; }
@keyframes signal { 50% { opacity: .25; transform: scale(.75); } }

.button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.button:hover { border-color: var(--line-strong); background: var(--panel-3); }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button-scan {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--accent);
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 15px;
  text-transform: uppercase;
  clip-path: polygon(0 7px, 7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}
.button-scan:hover { border-color: var(--accent); background: var(--accent); }
.button-signal { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--amber); background: currentColor; }
.button-cancel { border-color: color-mix(in srgb, var(--danger) 60%, var(--line)); color: var(--danger); }

.workspace { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.workspace.no-results { grid-template-columns: minmax(320px, 460px); justify-content: center; padding: 38px 18px; }
.workspace.no-results .control-panel { min-height: auto; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.workspace.no-results .content-panel { display: none; }
.control-panel { padding: 20px 18px; border-right: 1px solid var(--line-strong); background: var(--panel); }
.panel-section { position: relative; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.panel-section h2 { margin: 0; font-size: 23px; }
.scan-form { display: grid; gap: 13px; padding: 16px 0; }
.scan-mode-description { margin: -5px 0 0; padding: 9px 10px; border-left: 2px solid var(--amber); background: color-mix(in srgb,var(--amber) 6%,transparent); color: var(--muted); font-size: 11px; line-height: 1.45; }
.rotation-notice { margin: 0 0 14px; border: 1px solid var(--line); background: var(--panel-2); }
.rotation-notice header { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.rotation-notice header span { color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rotation-notice time { color: var(--amber); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.button-load-rotation { min-height: 24px; padding: 2px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; border: 1px solid var(--line-strong); background: var(--panel-3); color: var(--amber); cursor: pointer; border-radius: 2px; }
.button-load-rotation:hover { border-color: var(--amber); background: var(--panel); }
.rotation-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.4; }
.rotation-line span { color: var(--muted); text-transform: uppercase; }
.rotation-line strong { color: var(--text); text-align: right; overflow-wrap: anywhere; }
.rotation-shiny strong { color: var(--amber); }
.scan-meta { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.scan-meta div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.scan-meta span { color: var(--muted); text-transform: uppercase; }
.scan-meta strong { max-width: 150px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.scan-meta .progress-track { display: block; height: 7px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-3); }
.progress-track span { display: block; width: 100%; height: 100%; background: var(--amber); transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.progress-counts { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.activity-console { margin-top: 15px; border: 1px solid var(--line); background: var(--panel-2); }
.scan-issue { margin-top: 12px; padding: 12px; border: 1px solid color-mix(in srgb,#db6a5b 65%,var(--line)); background: color-mix(in srgb,#db6a5b 10%,var(--panel-2)); }
.scan-issue strong { color: #ef8b7f; text-transform: uppercase; font-size: 12px; }
.scan-issue p { margin: 7px 0 10px; color: var(--text); overflow-wrap: anywhere; }
.scan-issue > div { display: flex; align-items: center; gap: 8px; }
.activity-console header { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.activity-console header span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.activity-list { max-height: 190px; overflow-y: auto; padding: 6px 9px; scrollbar-color: var(--line-strong) transparent; }
.activity-list p { margin: 0; padding: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.activity-entry { display: grid; grid-template-columns: 55px 1fr; gap: 6px; border-bottom: 1px solid var(--line); }
.activity-entry time { color: var(--amber); }
.activity-entry span, .entity-entry span { overflow-wrap: anywhere; color: var(--text); }
.activity-warning span { color: #e7c474; }
.activity-error span { color: #efa39a; }
.entity-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.entity-entry .auth-switch { min-height: 28px; padding: 0 5px; font-size: 10px; }

.content-panel { min-width: 0; padding: 16px 18px 22px; }
.summary-grid {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.metric {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.metric strong { overflow: hidden; color: var(--text); font-size: 25px; line-height: 1; text-overflow: ellipsis; }
.metric-cyan strong, .metric-violet strong { color: var(--text); }
.metric-orange strong { color: var(--amber); }
.metric-green strong { color: var(--green); }

.main-tabs {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.main-tab {
  min-width: 82px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
  cursor: pointer;
}
.main-tab:last-child { border-right: 0; }
.main-tab:hover { color: var(--text); background: var(--panel-2); }
.main-tab.active { color: var(--amber-ink); background: var(--amber); }
.view-panel { display: none; }
.view-panel.active { display: block; }
.content-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

.map-console, .search-console, .member-console, .bot-account-console { overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); }
.console-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.console-header h2 { margin: 0; font-size: 22px; }
.console-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.result-total { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.map-header { gap: 18px; }
.map-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.layer-toggles { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.layer-toggles label {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.layer-toggles input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.layer-toggles label > span { width: 8px; height: 8px; background: currentColor; }
.layer-toggles label:has(input:checked) { color: var(--text); background: var(--panel-3); }
.layer-toggles label:not(:has(input:checked)) { opacity: .45; }
.layer-base > span { color: var(--green); }
.layer-task > span { color: var(--amber); transform: rotate(45deg); }
.layer-truck > span { color: #cf725c; border-radius: 50%; }
.layer-resource > span { color: var(--green); border-radius: 50%; }
.layer-territory > span { color: #70dff3; transform: rotate(45deg); }
.zoom-controls { display: flex; align-items: center; gap: 4px; }
.zoom-controls button { min-width: 32px; min-height: 32px; padding: 0 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.zoom-controls button:hover { border-color: var(--amber); color: var(--amber); }
.zoom-controls output { min-width: 48px; color: var(--amber); font-size: 12px; text-align: center; }
.map-stage {
  position: relative;
  width: min(100%, 760px);
  margin: 16px auto;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #12150f;
  box-shadow: inset 0 0 50px rgba(0,0,0,.42);
}
#world-map { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#world-map.dragging { cursor: grabbing; }
.map-hint, .map-viewport-status { position: absolute; padding: 5px 7px; border: 1px solid var(--line); background: rgba(20,23,17,.9); font-size: 10px; pointer-events: none; }
.map-hint { right: 8px; bottom: 8px; color: var(--muted); }
.map-viewport-status { top: 8px; left: 8px; color: var(--amber); }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px,1.4fr) repeat(3,minmax(120px,.7fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.filter-bar.compact-filters { grid-template-columns: repeat(3,minmax(135px,200px)) auto; justify-content: start; }
.range-filter { min-width: 190px; }
.range-filter > span { display: flex !important; justify-content: space-between; gap: 8px; }
.range-filter output { color: var(--amber); font-size: 10px; }
.range-filter input[type="range"] { accent-color: var(--amber); }
.multi-select { position: relative; min-height: 40px; }
.multi-select summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 30px 0 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; list-style: none; white-space: nowrap; }
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary::after { content: "⌄"; position: absolute; right: 10px; color: var(--muted); font-size: 15px; }
.multi-select[open] summary { border-color: var(--amber); color: var(--amber); }
.filter-multi-options { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; display: flex; flex-wrap: wrap; gap: 5px; width: max-content; min-width: 100%; max-width: min(310px, calc(100vw - 28px)); max-height: 182px; overflow-y: auto; padding: 7px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 10px 24px rgba(0,0,0,.36); }
.filter-multi-options[data-portal="true"] { z-index: 100; min-width: 0; }
.filter-multi-option { flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 4px; min-height: 28px; padding: 0 6px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.filter-multi-option:has(input:checked) { border-color: var(--amber); color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); }
.filter-multi-option:hover { border-color: var(--line-strong); }
.filter-multi-option input { width: 13px; min-height: 13px; margin: 0; accent-color: var(--amber); }

/* Searchable single-value filters. The native select stays as the source of
   truth for filtering and accessibility fallbacks, while the details control
   provides a faster, touch-friendly picker for long lists. */
.filter-select-field { position: relative; min-width: 0; }
.filter-select-native { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; pointer-events: none; }
.filter-select { position: relative; min-height: 40px; }
.filter-select summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 30px 0 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-select summary::-webkit-details-marker { display: none; }
.filter-select summary::after { content: "⌄"; position: absolute; right: 10px; color: var(--muted); font-size: 15px; }
.filter-select[open] summary { border-color: var(--amber); color: var(--amber); }
.filter-select-menu { position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; width: max(100%, 220px); max-width: min(340px, calc(100vw - 28px)); padding: 7px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 10px 24px rgba(0,0,0,.42); }
.filter-select-menu[data-portal="true"] { position: fixed; }
.filter-select-menu > input { width: 100%; min-height: 34px; margin-bottom: 6px; padding: 0 9px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; font-size: 12px; }
.filter-select-options { display: flex; flex-wrap: wrap; max-height: min(250px, 45vh); gap: 5px; overflow-y: auto; scrollbar-color: var(--line-strong) transparent; }
.filter-single-option { flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 5px; min-height: 30px; padding: 0 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 12px; }
.filter-single-option:hover { border-color: var(--line-strong); }
.filter-single-option:has(input:checked) { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); color: var(--amber); }
.filter-single-option input { width: 13px; min-height: 13px; margin: 0; accent-color: var(--amber); }

.search-main { position: relative; }
.search-main input { padding-left: 34px; }
.search-icon { position: absolute; top: 13px; left: 12px; width: 11px; height: 11px; border: 2px solid var(--muted); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 2px; background: var(--muted); transform: rotate(45deg); }
.compact-check { min-height: 40px; display: flex !important; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.compact-check span { display: inline !important; }
.button-search { color: var(--amber); }
.continue-filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.continue-filter-group > label { flex: 0 0 150px; }
.continue-filter-group .compact-check { flex-basis: auto; }
.continue-limit { margin: 12px 14px; color: var(--muted); font-size: 11px; }
.continue-limit strong { color: var(--amber); }

/* Continue Scan has its own compact form. It must not inherit the one-line
   scrolling filter layout used by the data tables. */
.continue-console .filter-bar,
.continue-console .filter-bar.compact-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  overflow: visible;
}
.continue-console .continue-filter-group { display: contents; }
.continue-console .continue-filter-group > label { min-width: 0; flex: initial; }
.continue-console #continue-scan-button { grid-column: 1 / -1; width: 100%; }
.continue-console .activity-console { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.continue-console .activity-list { flex: 1 1 auto; min-height: 0; max-height: none; }
.continue-console .activity-entry { display: block; }
.continue-console .activity-list p { overflow-wrap: anywhere; white-space: pre-wrap; }

.results { min-height: 270px; max-height: calc(100vh - 285px); overflow: auto; scrollbar-color: var(--line-strong) transparent; }
.record-row {
  --rank-color: var(--olive);
  position: relative;
  min-width: 1230px;
  min-height: 67px;
  display: grid;
  grid-template-columns: minmax(280px,1.65fr) repeat(8,minmax(92px,.62fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .16s ease;
}
.record-row::before { content: ""; position: absolute; top: 50%; left: 7px; width: 6px; height: 6px; background: var(--rank-color); transform: translateY(-50%) rotate(45deg); }
.record-row:hover { background: var(--panel-2); }
.players-record { min-width: 1050px; grid-template-columns: minmax(300px,1.75fr) repeat(5,minmax(105px,.7fr)) auto; }
.tasks-record { min-width: 1120px; grid-template-columns: minmax(280px,1.6fr) repeat(6,minmax(95px,.65fr)) auto; }
.trucks-record { min-width: 1000px; grid-template-columns: minmax(300px,1.8fr) repeat(6,minmax(100px,.7fr)) auto; }
.resources-record { min-width: 900px; grid-template-columns: minmax(270px,1.6fr) repeat(5,minmax(100px,.7fr)) auto; }
.record-row[data-rarity="UR"], .record-row[data-rarity="5"] { --rank-color: var(--amber); }
.record-row[data-rarity="SSR"], .record-row[data-rarity="4"] { --rank-color: #a878bd; }
.record-row[data-rarity="SR"], .record-row[data-rarity="3"] { --rank-color: #5f9bbb; }
.record-row[data-rarity="R"], .record-row[data-rarity="2"] { --rank-color: var(--olive); }
.record-row[data-rarity="N"], .record-row[data-rarity="1"] { --rank-color: var(--steel); }
.players-record.enemy-player { --rank-color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--panel)); }
.players-record.enemy-player:hover { background: color-mix(in srgb, var(--danger) 14%, var(--panel-2)); }
.players-record.enemy-player .record-identity strong { color: #efa39a; }
.record-identity { min-width: 0; }
.record-identity strong { display: block; overflow: hidden; margin-bottom: 2px; font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.record-identity small { color: var(--muted); font-size: 11px; }
.record-cell span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.record-cell strong { display: block; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.record-details, .game-share, .record-map-view, .save-player { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel-2); font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.record-details { color: var(--amber); }
.record-map-view { color: var(--text); }
.game-share { color: var(--green); }
.save-player { color: var(--violet); }
.record-map-view:hover:not(:disabled), .record-details:hover:not(:disabled), .game-share:hover:not(:disabled), .save-player:hover:not(:disabled) { border-color: currentColor; background: var(--panel-3); }
.game-share:disabled, .save-player:disabled { opacity: .4; cursor: not-allowed; }
.saved-player-auto { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.saved-player-auto input { accent-color: var(--amber); }
.list-limit { padding: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.empty-state { min-height: 270px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); }
.empty-state p { max-width: 390px; margin: 0; font-size: 13px; line-height: 1.45; }

.entity-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100vh - 30px);
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 35px 100px rgba(0,0,0,.65);
}
.entity-dialog::backdrop { background: rgba(5,6,4,.8); }
.entity-dialog h2 { padding-right: 36px; }
.credits-dialog { width: min(440px, calc(100vw - 24px)); }
.credits-dialog p { color: var(--muted); line-height: 1.55; }
.credits-kicker { margin: 0 0 7px; color: var(--amber) !important; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.credits-dialog-balance { display: block; margin: 16px 0; color: var(--amber); font-size: clamp(30px, 8vw, 42px); line-height: 1; }
.credits-dialog .button { width: 100%; margin-top: 8px; }
.credit-packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 8px; }
.credit-packages > p { grid-column: 1 / -1; margin: 0; }
.credits-history { margin-top: 22px; }
.credits-history header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.credits-history h3 { margin: 0; font-size: 14px; }
.credits-history .button { width: auto; margin: 0; }
.credit-pack { min-height: 48px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--panel-2); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.credit-pack:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); }
.credit-pack:disabled { opacity: .6; cursor: wait; }
.history-list { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.history-list > p { margin: 0; padding: 18px; background: var(--panel); color: var(--muted); }
.history-row { display: grid; grid-template-columns: minmax(120px,1.2fr) minmax(180px,2fr) minmax(100px,1fr) minmax(150px,1.5fr); gap: 10px; align-items: center; padding: 12px; background: var(--panel-2); font-size: 12px; }
.history-row strong { text-transform: capitalize; color: var(--text); }
.history-row span { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 640px) { .history-row { grid-template-columns: 1fr 1fr; font-size: 11px; } }
.dialog-close, .drawer-close { display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; font-size: 20px; }
.dialog-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 14px; border: 1px solid var(--line); }
.dialog-content .record-cell { min-height: 62px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.dialog-content .record-cell strong { white-space: normal; }
.squad-info, .squad-back { min-height: 30px; margin-top: 8px; padding: 0 10px; border: 1px solid var(--amber); border-radius: 2px; background: transparent; color: var(--amber); font-size: 10px; font-weight: 700; cursor: pointer; }
.squad-info:hover, .squad-back:hover { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.squad-back { grid-column: 1 / -1; justify-self: start; margin: 10px; }
.squad-cell .squad-line { display: flex; align-items: center; gap: 7px; }
.squad-cell .squad-line strong { flex: 1 1 auto; min-width: 0; }
.squad-cell .squad-info { flex: 0 0 auto; min-height: 25px; margin: 0; padding: 0 7px; }
.cargo-section { grid-column: 1 / -1; padding: 12px; background: var(--panel); }
.cargo-section h3 { margin: 0 0 9px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.cargo-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; }
.cargo-card { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.cargo-icon { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; }
.cargo-copy { min-width: 0; }
.cargo-copy span { display: block; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cargo-copy strong { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 12px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.temporary-password-dialog p { color: var(--muted); line-height: 1.5; }
.temporary-password { display: block; margin: 16px 0; padding: 14px; border: 1px solid var(--amber); background: var(--panel-3); color: var(--amber); font-family: monospace; font-size: 24px; letter-spacing: .12em; text-align: center; user-select: all; }
.temporary-password-dialog .dialog-actions { grid-template-columns: 1fr 1fr; }
.session-profile-dialog p { color: var(--muted); line-height: 1.5; }
.session-profile-dialog form, .session-profile-dialog label { display: grid; gap: 7px; }
.session-profile-dialog label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.session-profile-dialog textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 2px; background: var(--field); color: var(--text); padding: 10px; font-family: monospace; font-size: 11px; line-height: 1.45; }
.dialog-share { width: 100%; min-height: 40px; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 80; max-width: min(360px,calc(100vw - 32px)); padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--panel-2); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s cubic-bezier(.22,1,.36,1); }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: var(--danger); color: #efa39a; }

.admin-workspace { width: min(1080px,calc(100% - 32px)); margin: 0 auto; padding: 28px 0 50px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.admin-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.admin-filter-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--line); border-bottom: 0; background: var(--panel); }
.admin-filter-form input, .admin-filter-form select { min-height: 34px; flex: 1 1 170px; padding: 0 9px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font: inherit; }
.admin-filter-form .button { min-height: 34px; }
.admin-summary { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
.admin-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
.admin-tab { min-height: 44px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.admin-tab:last-child { border-right: 0; }
.admin-tab.active { background: var(--amber); color: var(--accent-ink); }
.admin-panel[hidden] { display: none; }
.bot-account-console { margin-bottom: 14px; }
.bot-account-console > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bot-account-console > header h2 { margin: 0; font-size: 21px; }
.bot-account-console > header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.bot-account-form { display: grid; grid-template-columns: minmax(120px,.65fr) minmax(160px,1fr) minmax(260px,1.6fr) minmax(130px,.6fr) auto; align-items: end; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bot-account-form label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.bot-account-form input { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 2px; background: var(--field); color: var(--text); padding: 0 9px; }
.bot-account-form .button { min-height: 38px; }
.bot-account-list { display: grid; }
.bot-account-row { min-height: 66px; display: grid; grid-template-columns: minmax(150px,1fr) minmax(220px,1.5fr) minmax(100px,.55fr) minmax(80px,.45fr) minmax(80px,.45fr) auto; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.member-console > header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.member-console > header h2 { margin: 0; font-size: 21px; }
.member-list { display: grid; }
.member-row { min-height: 66px; display: grid; grid-template-columns: minmax(210px,1.4fr) repeat(3,minmax(110px,.65fr)) auto; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.member-identity strong, .member-cell strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.member-identity small, .member-cell span { display: block; color: var(--muted); font-size: 10px; }
.member-cell span { margin-bottom: 2px; text-transform: uppercase; }
.member-actions { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.admin-action { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel-2); color: var(--amber); font-size: 11px; font-weight: 700; cursor: pointer; }
.admin-action.danger { color: var(--danger); }
.access-denied { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 22px; text-align: center; }

.mobile-scan-toggle, .drawer-close, .scan-drawer-backdrop { display: none; }

/* Features page: an editorial command brief instead of a generic marketing grid. */
.features-page { overflow-x: hidden; background: radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--amber) 14%, transparent), transparent 34%), var(--bg); }
.features-topbar { width: min(1180px, calc(100% - 40px)); min-height: 76px; }
.features-main { width: min(1180px, calc(100% - 40px)); padding: 74px 0 56px; }
.features-hero { max-width: none; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(350px,.92fr); align-items: center; gap: clamp(38px, 7vw, 100px); padding-bottom: 92px; }
.features-hero-copy { min-width: 0; }
.features-kicker { margin-bottom: 12px; color: var(--amber); font-size: 10px; letter-spacing: .15em; }
.features-hero h1 { max-width: 720px; margin: 0; font-size: clamp(48px, 7.2vw, 86px); line-height: .9; letter-spacing: -.045em; }
.features-hero h1 em { color: var(--amber); font-style: normal; }
.features-hero > .features-hero-copy > p:not(.features-kicker) { max-width: 610px; margin: 26px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.features-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.features-actions .button { min-height: 46px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.features-text-link { color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none; }
.features-text-link:hover { color: var(--amber); }
.features-proof { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 32px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.proof-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.proof-divider { width: 1px; height: 14px; background: var(--line); }
.features-field-card { min-width: 0; padding: 10px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 18px 18px 0 color-mix(in srgb, var(--amber) 9%, transparent); }
.field-card-head, .field-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.field-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.field-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.field-map { position: relative; aspect-ratio: 1.14; overflow: hidden; border: 1px solid var(--line); background: #151d22; }
.field-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(137,148,81,.17) 1px, transparent 1px), linear-gradient(90deg, rgba(137,148,81,.17) 1px, transparent 1px); background-size: 12.5% 12.5%; opacity: .8; }
.field-map::before, .field-map::after { content: ""; position: absolute; background: color-mix(in srgb, var(--amber) 45%, transparent); }
.field-map::before { top: 16%; bottom: 16%; left: 50%; width: 1px; }
.field-map::after { top: 50%; right: 16%; left: 16%; height: 1px; }
.field-marker { position: absolute; width: 18px; height: 18px; border: 2px solid var(--panel); outline: 1px solid currentColor; transform: rotate(45deg); }
.marker-a { top: 24%; left: 22%; color: var(--amber); background: var(--amber); }
.marker-b { top: 32%; right: 24%; color: #65c8d9; background: #65c8d9; }
.marker-c { right: 30%; bottom: 22%; color: var(--green); background: var(--green); }
.marker-d { bottom: 25%; left: 27%; color: #be6b9b; background: #be6b9b; }
.field-crosshair { position: absolute; top: 50%; left: 50%; color: var(--text); font-size: 24px; line-height: 1; transform: translate(-50%, -54%); }
.field-card-foot { padding: 14px 8px 6px; }
.field-card-foot > div { min-width: 0; display: grid; gap: 2px; }
.field-card-foot strong { color: var(--text); font-size: 17px; letter-spacing: -.01em; }
.field-card-foot span { color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.features-intro { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: end; gap: 24px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line-strong); }
.features-intro .features-kicker { margin: 0; align-self: start; }
.features-intro h2 { max-width: 680px; margin: 0; font-size: clamp(28px, 4vw, 46px); line-height: .98; }
.features-intro > p:last-child { grid-column: 2; margin: 0; color: var(--muted); font-size: 14px; }
.features-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 10px; border: 0; }
.feature-card { min-height: 0; grid-column: span 3; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.feature-card-wide { grid-column: span 6; min-height: 278px; }
.feature-card:hover { border-color: var(--line-strong); background: var(--panel-2); transform: translateY(-2px); }
.feature-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feature-index { margin: 0; color: var(--amber); font-size: 11px; font-weight: 700; }
.feature-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.feature-icon { width: 36px; height: 36px; display: grid; place-items: center; margin: 28px 0 22px; border: 1px solid var(--line); color: var(--amber); }
.feature-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.feature-card h2 { max-width: 390px; margin: auto 0 0; font-size: 24px; line-height: 1; }
.feature-card:not(.feature-card-wide) h2 { font-size: 21px; }
.feature-card p { max-width: 450px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.feature-tags span { padding: 5px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.features-callout { align-items: center; margin-top: 54px; padding: 30px; }
.features-callout h2 { max-width: 650px; }
.features-callout .button { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 1050px) {
  .filter-bar, .filter-bar.compact-filters { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .results { max-height: 580px; }
}

@media (max-width: 760px) {
  body { overflow-x: hidden; padding-bottom: 116px; }
  .features-page { padding-bottom: 28px; }
  .features-topbar { width: calc(100% - 24px); min-height: 62px; }
  .features-main { width: calc(100% - 24px); padding: 45px 0 28px; }
  .features-hero { padding-bottom: 38px; }
  .features-hero > p:not(.features-kicker) { font-size: 14px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 20px; }
  .feature-index { margin-bottom: 22px; }
  .features-callout { align-items: flex-start; flex-direction: column; margin-top: 28px; padding: 20px; }
  .features-callout .button { width: 100%; }
  .public-footer { align-items: flex-start; flex-direction: column; }
  .public-footer .public-links { justify-content: flex-start; }
  .info-main { width: calc(100% - 24px); padding: 42px 0 28px; }
  .topbar { position: sticky; top: 0; min-height: 56px; padding: 7px 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand h1 { font-size: 21px; }
  .topbar-actions { min-width: 0; gap: 3px; overflow-x: auto; }
  .topbar-actions .auth-switch { min-height: 32px; padding: 0 7px; font-size: 11px; white-space: nowrap; }
  .status-badge { min-width: 62px; min-height: 30px; padding: 0 7px; font-size: 10px; }
  .mobile-scan-toggle {
    position: fixed;
    right: 8px;
    bottom: 66px;
    left: 8px;
    z-index: 41;
    min-height: 44px !important;
    display: inline-flex;
    border-color: var(--accent);
    background: var(--amber);
    color: var(--amber-ink) !important;
    font-size: 14px !important;
    text-transform: uppercase;
    clip-path: polygon(0 6px, 6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
    box-shadow: 0 8px 22px rgba(0,0,0,.3);
  }
  .mobile-scan-toggle:hover { border-color: var(--accent); background: var(--accent); }
  .workspace, .workspace.no-results { display: block; min-height: calc(100vh - 56px); padding: 0; }
  .content-panel { width: 100%; padding: 8px; }
  .summary-grid { min-height: 50px; margin-bottom: 8px; }
  .metric { display: grid; justify-items: center; gap: 1px; padding: 5px 3px; text-align: center; }
  .metric span { font-size: 9px; }
  .metric strong { font-size: 20px; }
  .main-tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; min-height: 84px; margin: 0; border-width: 1px 0 0; box-shadow: 0 -10px 28px rgba(0,0,0,.24); }
  .main-tab { min-width: 0; min-height: 42px; padding: 0 4px; font-size: 11px; }
  .console-header { min-height: 48px; padding: 8px 10px; }
  .console-header h2 { font-size: 20px; }
  .console-actions { min-width: 0; gap: 6px; }
  .console-actions .button { min-height: 34px; max-width: 160px; overflow: hidden; padding: 0 8px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .map-header { align-items: flex-start; flex-direction: column; }
  .map-actions { width: 100%; align-items: flex-start; justify-content: space-between; }
  .layer-toggles { flex-wrap: nowrap; }
  .layer-toggles label { min-height: 30px; padding: 0 6px; }
  .zoom-controls output { min-width: 42px; }
  .map-stage { margin: 8px auto; border-width: 1px 0; }
  .map-hint { display: none; }
  .filter-bar, .filter-bar.compact-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 8px; }

  .search-main, .filter-bar .button-search { grid-column: 1 / -1; }
  .filter-bar select, .filter-bar input { min-height: 36px; }
  .compact-check { min-height: 36px; }
  .results { min-height: 240px; max-height: none; overflow: visible; }
  .record-row, .players-record, .tasks-record {
    min-width: 0;
    min-height: 0;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 5px 8px;
    padding: 8px 8px 8px 17px;
  }
  .record-row::before { left: 7px; }
  .record-identity { grid-column: 1 / -1; padding-right: 4px; }
  .record-identity strong { overflow: visible; margin-bottom: 1px; font-size: 14px; white-space: normal; }
  .record-cell[data-priority="secondary"] { display: none; }
  .record-cell { display: grid; gap: 1px; min-width: 0; border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent); padding-top: 4px; }
  .record-cell span { margin: 0; font-size: 9px; }
  .record-cell strong { font-size: 11px; text-align: left; }
  .record-actions { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); gap: 4px; }
  .record-actions button { min-height: 28px; padding: 0 4px; }
  .content-actions { padding-bottom: 8px; }
  .scan-drawer-backdrop { position: fixed; inset: 0; z-index: 45; width: 100%; height: 100%; border: 0; background: rgba(5,6,4,.78); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .control-panel { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(90vw,370px); max-height: 100dvh; overflow-y: auto; border-right: 1px solid var(--line-strong); box-shadow: 24px 0 60px rgba(0,0,0,.48); transform: translateX(-105%); transition: transform .24s cubic-bezier(.22,1,.36,1); }
  body.scan-drawer-open { overflow: hidden; }
  body.scan-drawer-open .control-panel { transform: translateX(0); }
  body.scan-drawer-open .scan-drawer-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .intro-section { padding-right: 42px; }
  .drawer-close { position: absolute; top: -5px; right: 0; width: 34px; height: 34px; font-size: 20px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-summary { grid-template-columns: repeat(3,1fr); }
  .member-row, .bot-account-row { grid-template-columns: 1fr 1fr; }
  .member-identity, .member-actions { grid-column: 1 / -1; }
  .bot-account-form { grid-template-columns: 1fr 1fr; }
  .bot-account-form .config-path-field, .bot-account-form .button { grid-column: 1 / -1; }
  .member-actions { justify-content: flex-start; }
  .toast { bottom: 122px; }
}

@media (max-width: 430px) {
  .topbar-actions #theme-toggle { display: none; }
  .auth-card { padding: 24px 20px; }
  .auth-card::before { margin: -24px -20px 20px; }
  .map-actions { display: grid; justify-content: stretch; }
  .zoom-controls { justify-content: space-between; }
  .filter-bar, .filter-bar.compact-filters { grid-template-columns: 1fr 1fr; }
  .dialog-content { grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
  .admin-workspace { width: calc(100% - 16px); padding-top: 16px; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-summary .metric { min-height: 48px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-summary .metric:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Mobile command layout: fixed navigation and independently scrolling records. */
@media (max-width: 760px) {
  html, body { min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  body { padding-bottom: env(safe-area-inset-bottom, 16px); }
  .app-shell { min-height: 100dvh; height: auto; display: block; overflow: visible; }
  .topbar { position: relative; flex: 0 0 auto; }

  .mobile-scan-toggle {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    flex: 0 0 34px;
    width: 34px;
    min-height: 34px !important;
    display: grid;
    place-items: center;
    padding: 0 !important;
    border-color: var(--line-strong);
    background: var(--panel-2);
    color: var(--amber) !important;
    clip-path: none;
    box-shadow: none;
    font-family: Arial, sans-serif;
    font-size: 21px !important;
    line-height: 1;
    text-transform: none;
  }
  .mobile-scan-toggle:hover { border-color: var(--amber); background: var(--panel-3); }

  .workspace, .workspace.no-results { min-height: 0; overflow: visible; }
  .content-panel { width: 100%; height: auto; min-height: 0; display: block; overflow: visible; }
  .main-tabs {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 25;
    order: -2;
    flex: 0 0 auto;
    grid-template-columns: repeat(4, 1fr);
    min-height: 44px;
    margin: 0 0 8px;
    border-width: 1px;
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
  }
  .main-tab { min-height: 44px; font-size: 10px; }
  .summary-grid { order: -1; flex: 0 0 auto; }
  .view-panel.active { min-height: 0; overflow: visible; }
  .view-panel > .search-console, .view-panel > .map-console { width: 100%; height: auto; min-height: 0; }
  .search-console, .map-console { display: block; overflow: visible; }
  .console-header, .filter-bar, .content-actions { flex: 0 0 auto; }
  .results { min-height: 240px; max-height: none; overflow: visible; }
  .map-stage {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: auto;
  }
  .content-actions { margin-top: 8px; padding-bottom: 0; }
  .toast { bottom: 14px; }
}

/* Unified scan and result navigation. */
.workspace,
.workspace.no-results {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-content: start;
  min-height: calc(100vh - 66px);
  padding: 16px 18px 22px;
}
.workspace > .main-tabs { grid-template-columns: repeat(9,1fr); }
.control-panel {
  display: none;
  position: static;
  width: min(460px,100%);
  max-height: none;
  margin: 0 auto;
  padding: 20px 18px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: none;
}
.workspace.scan-view .control-panel { display: block; }
.workspace.scan-view .content-panel { display: none; }
.content-panel { min-width: 0; padding: 0; }
.main-tab:disabled {
  color: color-mix(in srgb,var(--muted) 45%,transparent);
  background: var(--panel-2);
  cursor: not-allowed;
}
.main-tab:disabled:hover { color: color-mix(in srgb,var(--muted) 45%,transparent); background: var(--panel-2); }

@media (max-width: 760px) {
  .workspace,
  .workspace.no-results {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 8px;
    overflow: visible;
  }
  .workspace > .main-tabs { grid-template-columns: repeat(4,1fr); order: -2; }
  .workspace.scan-view .control-panel {
    width: 100%;
    overflow: visible;
  }
  .main-tab { min-width: 0; padding-inline: 4px; font-size: 11px; }
  .workspace.scan-view .control-panel, .content-panel { padding-bottom: 88px; }
  input, select { font-size: 16px; }
  .toast { bottom: 14px; }
}

/* Keep list filters compact on one horizontal line. */
.filter-bar,
.filter-bar.compact-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.filter-bar > label { flex: 0 0 160px; min-width: 0; }
.filter-bar > .search-main { flex-basis: 270px; }
.filter-bar > .compact-check { flex-basis: auto; white-space: nowrap; }
.filter-bar > .button-search { flex: 0 0 auto; grid-column: auto; }
.bulk-share { color: var(--amber); white-space: nowrap; }

@media (max-width: 760px) {
  .filter-bar,
  .filter-bar.compact-filters {
    display: flex;
    padding: 8px;
  }
  .filter-bar > label { flex-basis: 145px; }
  .filter-bar > .search-main { flex-basis: 230px; grid-column: auto; }
  .filter-bar > .button-search { grid-column: auto; }
  .continue-console .filter-bar,
  .continue-console .filter-bar.compact-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}

@media (max-width: 390px) {
  .continue-console .filter-bar,
  .continue-console .filter-bar.compact-filters { grid-template-columns: 1fr; }
}

/* Operational admin console */
/* There are seven summary cards and seven sections.  Keeping both grids at
   seven columns prevents the final card/tab from wrapping into a sparse,
   misleading second row on desktop. */
.admin-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.admin-summary .metric {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: 4px;
  padding: 12px 14px;
}
.admin-summary .metric strong { white-space: nowrap; }
.admin-summary .metric small { color: var(--muted); font-size: 10px; line-height: 1.25; }
.metric-amber strong { color: var(--amber); }
.admin-tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.admin-overview { overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); margin-bottom: 14px; }
.admin-panel-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.admin-panel-heading h2 { margin: 0; font-size: 21px; }
.admin-panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-bottom: 1px solid var(--line); }
.overview-card { min-height: 92px; display: grid; align-content: center; gap: 3px; padding: 12px 14px; border-right: 1px solid var(--line); }
.overview-card:last-child { border-right: 0; }
.overview-card span, .overview-card small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.overview-card small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.overview-card strong { color: var(--amber); font-size: 25px; overflow-wrap: anywhere; }
.overview-sections { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(0, 1.7fr); gap: 12px; padding: 12px; background: var(--panel-2); }
.overview-sections section { min-width: 0; }
.overview-sections h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.attention-list { display: grid; gap: 6px; }
.attention-list > p { margin: 0; color: var(--muted); font-size: 12px; }
.attention-item { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); background: var(--panel); }
.attention-item strong { color: var(--amber); font-size: 12px; }
.attention-item span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.admin-pagination { min-height: 50px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.pagination-status { color: var(--muted); font-size: 11px; }
.admin-status { width: fit-content; padding: 3px 7px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1; text-transform: uppercase; }
.admin-status.status-completed { border-color: rgba(99, 215, 139, .5); color: var(--green); }
.admin-status.status-running, .admin-status.status-queued { border-color: rgba(74, 223, 255, .5); color: var(--cyan); }
.admin-status.status-failed { border-color: rgba(255, 104, 104, .55); color: var(--danger); }
.admin-status.status-refunded, .admin-status.status-cancelled, .admin-status.status-partial { border-color: rgba(242, 179, 45, .55); color: var(--amber); }
.history-row { grid-template-columns: minmax(120px,1.1fr) minmax(145px,1.3fr) minmax(105px,.7fr) minmax(82px,.55fr) minmax(155px,1fr); }
@media (max-width: 1100px) {
  .admin-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-card:nth-child(2) { border-right: 0; }
  .overview-card:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-summary .metric { min-height: 74px; border-bottom: 1px solid var(--line); }
  .admin-summary .metric:nth-child(even) { border-right: 0; }
  .admin-tabs { display: flex; overflow-x: auto; scrollbar-width: thin; }
  .admin-tab { flex: 0 0 112px; }
  .admin-panel-heading { align-items: flex-start; flex-direction: column; }
  .overview-sections { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 1fr 1fr; gap: 7px; }
  .history-row strong { grid-column: 1 / -1; }
  .admin-pagination { justify-content: center; }
}

/* Mobile admin layout fixes */
html, body {
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
}
.bot-account-row, .member-row, .bot-account-form {
  min-width: 0;
}
.bot-account-row *, .member-row *, .bot-account-form * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 580px) {
  .bot-account-form, .bot-account-row, .member-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .member-actions {
    justify-content: flex-start;
  }
}

/* Credit dialog: keep transaction records readable on desktop and phones.
   These scoped rules intentionally come after the admin history grid so the
   member-facing dialog cannot inherit its wider five-column layout. */
.credits-dialog {
  width: min(560px, calc(100vw - 24px));
  overflow-x: hidden;
}
.credits-balance-card {
  display: grid;
  gap: 5px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
}
.credits-balance-card span, .credits-balance-card small {
  color: var(--muted);
  font-size: 11px;
}
.credits-balance-card small { line-height: 1.4; }
.credits-balance-card strong {
  color: var(--amber);
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1;
}
.credits-purchase-section > header { margin-bottom: 8px; }
.credits-purchase-section h3 { margin: 0; font-size: 14px; }
.credits-purchase-section p, .credits-history header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.credit-history-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 20px 0 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.credit-history-tab {
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}
.credit-history-tab:hover, .credit-history-tab:focus-visible { border-color: var(--line-strong); color: var(--text); }
.credit-history-tab.active { border-color: var(--amber); background: var(--amber); color: var(--accent-ink); }
.credits-dialog .credits-history { margin-top: 14px; }
.credits-dialog .history-list { min-width: 0; overflow: hidden; }
.credits-dialog .history-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  min-width: 0;
  gap: 8px 12px;
  padding: 12px;
}
.credits-dialog [data-credit-panel="scans"] .history-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(80px, .8fr) minmax(0, 1.25fr) minmax(0, 1.15fr); }
.credits-dialog .history-row strong, .credits-dialog .history-row span { min-width: 0; overflow-wrap: anywhere; }
.credits-dialog .history-title { line-height: 1.25; }
.credits-dialog .history-value { line-height: 1.35; }
.credits-dialog .history-date { font-size: 10px; }
.credits-dialog .history-delta.positive { color: var(--green); }
.credits-dialog .history-delta.negative { color: var(--danger); }
.credits-dialog .history-status { color: var(--green); }
.credits-dialog .history-status.status-created, .credits-dialog .history-status.status-pending { color: var(--amber); }
.credits-dialog .history-status.status-expired, .credits-dialog .history-status.status-refunded, .credits-dialog .history-status.status-dispute_review { color: var(--danger); }
@media (max-width: 640px) {
  .credits-dialog .history-row, .credits-dialog [data-credit-panel="scans"] .history-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .credits-dialog .history-title { grid-column: 1 / -1; }
  .credits-dialog .history-date { text-align: right; }
}

/* Active filter pills */
.active-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.filter-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel-3);
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill:hover {
  border-color: var(--amber);
}
.filter-pill.clear-all {
  border-color: var(--danger);
  color: var(--danger);
}

/* Data richness badge */
.data-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}
.data-badge.full-scan {
  border: 1px solid rgba(74,223,255,0.4);
  background: rgba(74,223,255,0.12);
  color: var(--cyan);
}
.data-badge.quick-scan {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.data-badge.pumpkin-skin {
  border: 1px solid rgba(244, 140, 36, .65);
  background: rgba(244, 140, 36, .14);
  color: #ffb24b;
}
.filter-match-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Map button & Tactical empty states */
.record-map-view, .button-map-view {
  color: var(--cyan);
  border-color: var(--cyan);
}
.record-map-view:hover, .button-map-view:hover {
  background: rgba(74,223,255,0.15);
}
.empty-state-tactical {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--amber);
}

/* Confirm Dialog */
.confirm-dialog {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  max-width: 420px;
  width: 90vw;
}
.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.confirm-content {
  padding: 20px;
}
.confirm-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--amber);
}
.confirm-content p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Virtual chunking load more button */
.button-load-more {
  width: 100%;
  min-height: 38px;
  margin: 8px 0;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--amber);
  font-weight: 700;
  cursor: pointer;
}
.button-load-more:hover {
  border-color: var(--amber);
  background: var(--panel-3);
}

/* Multi Scan uses the same compact, horizontally scrollable filter bar as lists. */
.continue-console .filter-bar,
.continue-console .filter-bar.compact-filters {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
.continue-console .filter-bar > label,
.continue-console .continue-filter-group > label {
  flex: 0 0 150px;
}
.continue-console .continue-filter-group {
  display: contents;
}
.continue-console .compact-check {
  min-height: 36px;
  padding-inline: 8px;
  font-size: 10px;
}
.continue-console .continue-server-picker {
  min-width: 0;
}
.continue-console #continue-scan-button {
  flex: 0 0 auto;
  width: auto;
}

/* Final responsive overrides for the redesigned public Features page. */
@media (max-width: 840px) {
  .features-hero { grid-template-columns: 1fr; gap: 38px; padding-bottom: 64px; }
  .features-field-card { width: min(100%, 560px); }
  .feature-card-wide, .feature-card:not(.feature-card-wide) { grid-column: span 6; }
}
@media (max-width: 560px) {
  .features-topbar, .features-main { width: calc(100% - 24px); }
  .features-topbar { min-height: 64px; }
  .features-main { padding: 42px 0 30px; }
  .features-hero { gap: 30px; padding-bottom: 52px; }
  .features-hero h1 { font-size: clamp(45px, 15vw, 66px); }
  .features-hero > .features-hero-copy > p:not(.features-kicker) { margin: 22px 0 24px; font-size: 15px; }
  .features-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .features-actions .button { justify-content: center; }
  .features-text-link { padding: 10px 0; text-align: center; }
  .features-proof { margin-top: 22px; font-size: 9px; }
  .features-field-card { box-shadow: 9px 9px 0 color-mix(in srgb, var(--amber) 9%, transparent); }
  .features-intro { display: block; margin-bottom: 16px; padding-bottom: 16px; }
  .features-intro h2 { margin-top: 18px; font-size: 31px; }
  .features-intro > p:last-child { margin-top: 11px; font-size: 13px; }
  .features-grid { grid-template-columns: 1fr; gap: 8px; }
  .feature-card, .feature-card-wide, .feature-card:not(.feature-card-wide) { grid-column: auto; min-height: 0; padding: 19px; }
  .feature-icon { margin: 23px 0 17px; }
  .features-callout { align-items: flex-start; flex-direction: column; gap: 22px; margin-top: 32px; padding: 21px; }
  .features-callout h2 { font-size: 30px; }
  .features-callout .button { width: 100%; justify-content: center; }
  .public-footer { align-items: flex-start; flex-direction: column; }
  .public-footer .public-links { justify-content: flex-start; margin: 0; }
}

/* Mobile result layout: keep filters and records inside the viewport instead
   of treating desktop rows as a horizontally clipped table. */
@media (max-width: 760px) {
  .content-panel { padding-inline: 6px; }
  .search-console, .map-console { width: 100%; }
  .filter-bar, .filter-bar.compact-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 7px;
    overflow: visible;
    padding: 8px;
  }
  .filter-bar > label, .filter-bar > .search-main, .filter-bar > .compact-check { width: 100%; min-width: 0; flex: initial; }
  .filter-bar > .search-main, .filter-bar > .button-search { grid-column: 1 / -1; }
  .filter-bar select, .filter-bar input:not([type="checkbox"]):not([type="radio"]) { min-width: 0; min-height: 40px; }
  .filter-bar .multi-filter { min-width: 0; }
  .filter-bar .multi-select summary, .filter-bar .filter-select summary { min-height: 40px; }
  .filter-bar .compact-check { min-height: 40px; }
  .filter-bar:has(.filter-select[open]), .filter-bar:has(.multi-select[open]) { overflow: visible; }
  .record-row, .players-record, .tasks-record, .trucks-record, .resources-record {
    width: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
    padding: 12px 10px 12px 18px;
  }
  .record-row::before { left: 8px; top: 18px; transform: rotate(45deg); }
  .record-identity { grid-column: 1 / -1; padding-right: 0; }
  .record-identity strong { margin-bottom: 3px; font-size: 15px; line-height: 1.2; }
  .record-identity small { font-size: 10px; }
  .record-cell { min-width: 0; min-height: 38px; padding-top: 5px; }
  .record-cell strong { overflow: visible; font-size: 12px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  .record-cell span { font-size: 9px; }
  .record-cell[data-priority="secondary"] { display: none; }
  .record-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-top: 2px; }
  .record-actions button { min-height: 36px; padding: 0 6px; font-size: 10px; }
  .saved-player-auto { min-height: 36px; justify-content: center; padding: 0 5px; border: 1px solid var(--line); }
  .list-limit { padding: 12px 8px; }
}
@media (max-width: 390px) {
  .filter-bar, .filter-bar.compact-filters { grid-template-columns: 1fr; }
  .filter-bar > .search-main, .filter-bar > .button-search { grid-column: auto; }
  .record-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.mobile-filter-toggle { display: none; }
@media (max-width: 760px) {
  .mobile-filter-toggle {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel-3);
    color: var(--text);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .mobile-filter-toggle:hover, .mobile-filter-toggle:focus-visible { border-color: var(--amber); color: var(--amber); }
  .mobile-filter-toggle-icon { color: var(--amber); font-size: 18px; line-height: 1; }
  .filter-bar.mobile-filters-collapsed { grid-template-columns: 1fr; }
  .filter-bar.mobile-filters-collapsed > :not(.mobile-filter-toggle) { display: none !important; }
}

/* scoutX identity. Operational data keeps its compact, familiar typography. */
.brand-wordmark {
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 750;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.065em;
  text-transform: none;
  color: var(--text);
}
.brand-wordmark .brand-x { color: var(--accent); letter-spacing: -.045em; }
.brand-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  clip-path: none;
  background: url("assets/scoutx-mark.svg") center / contain no-repeat;
}
.brand-mark::before, .brand-mark::after, .brand-mark > span { display: none; }
.auth-brand { text-transform: none; }
.auth-gate {
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(32px, 7vw, 100px);
  padding: max(32px, env(safe-area-inset-top)) 32px max(32px, env(safe-area-inset-bottom));
}
.auth-intro { max-width: 520px; align-self: center; }
.auth-intro-kicker { color: var(--accent); font-size: 12px; letter-spacing: .14em; font-weight: 700; }
.auth-intro h2 { margin: 24px 0; font-size: clamp(48px, 5.5vw, 72px); line-height: 1.04; text-wrap: balance; }
.auth-intro p { max-width: 390px; color: var(--muted); font: 16px/1.7 system-ui, sans-serif; }
.auth-intro-index { display: flex; gap: 24px; padding-top: 26px; margin-top: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.auth-card { border-color: var(--line); border-radius: 14px; overflow: hidden; padding: 32px; }
.auth-card::before { display: none; }
.auth-card .auth-brand { margin-bottom: 32px; }
.auth-card .brand-wordmark { font-size: 32px; }
.auth-card .brand-mark { width: 44px; height: 44px; }
.auth-card input, .auth-card select { min-height: 44px; border-radius: 6px; font: 16px system-ui, sans-serif; }
.auth-card .auth-form label > span, .auth-locale { font-size: 12px; }
.auth-card .button { border-radius: 6px; clip-path: none; font-size: 14px; }
.auth-card .auth-switch, .auth-features-link { min-height: 44px; font-size: 14px; }
.public-links a { padding: 6px 0; font-size: 13px; }
.features-page { background: var(--bg); }
.features-topbar .auth-switch { min-height: 44px; }
.features-hero-copy > p:not(.features-kicker), .feature-card p, .legal-card p, .legal-card li { font-family: system-ui, sans-serif; font-size: 15px; line-height: 1.65; }
.features-field-card { border-color: var(--line-strong); }
.feature-card { border-color: var(--line); }
.topbar { border-bottom-color: var(--line); box-shadow: none; }
.topbar .brand { flex-shrink: 0; }
.topbar .brand-wordmark { font-size: 25px; }
.button-scan:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, var(--text)); color: var(--accent-ink); }
@media (max-width: 760px) {
  .auth-gate { grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 500px; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
  .auth-intro { width: 100%; }
  .auth-intro h2 { margin: 12px 0 0; font-size: 34px; }
  .auth-intro p, .auth-intro-index { display: none; }
  .auth-intro-kicker { font-size: 11px; }
  .auth-card { width: 100%; padding: 24px; }
  .topbar .brand-wordmark { font-size: 22px; }
  .topbar .brand-mark { width: 30px; height: 30px; }
  .topbar .brand { gap: 6px; }
  .topbar-actions { flex-wrap: wrap; }
  .features-brand .brand-wordmark { font-size: 24px; }
  .public-links a { min-height: 44px; display: inline-flex; align-items: center; }
}
