/* tm-checker — all-black live stock UI. One vivid accent, everything else
   greyscale. Custom easing (Emil): ease-out for enters, scale-on-press, modals
   centered, stagger on the grid, transitions (not keyframes) for live updates. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --bg: #08080a;
  --bg-2: #0e0e11;
  --surface: #141418;
  --surface-2: #1a1a20;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f6;
  --muted: #8b8b95;
  --faint: #5a5a63;

  --accent: #46e39a;        /* live / available */
  --accent-ink: #052016;
  --amber: #f5c451;
  --red: #ff6b6b;
  --blue: #6aa8ff;
  --price: #34d399;   /* tooltip price; re-themed darker on white for contrast */

  /* seat-map polygons — color-mix of the themed tokens above, so a single
     definition adapts to both the black and white themes automatically */
  --poly-stroke: color-mix(in srgb, var(--text) 40%, transparent);
  --poly-dim:    color-mix(in srgb, var(--text) 7%, transparent);
  --poly-live:   color-mix(in srgb, var(--accent) 52%, transparent);
  --poly-lo:     color-mix(in srgb, var(--red) 62%, transparent);
  --poly-mid:    color-mix(in srgb, var(--amber) 64%, transparent);
  --poly-hi:     color-mix(in srgb, var(--accent) 66%, transparent);
  --poly-hot:    var(--accent);   /* the "where the tickets are" hue */

  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}

:root[data-theme="white"] {
  --bg: #f6f6f4;
  --bg-2: #efefec;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  /* re-themed for contrast on white (the dark-theme hues drop below 4.5:1) */
  --amber: #8a5a00;
  --red: #b42318;
  --blue: #1a56c4;
  --price: #08704a;
  --line: rgba(0, 0, 0, 0.09);
  --line-2: rgba(0, 0, 0, 0.16);
  --text: #16161a;
  --muted: #5f5f68;
  --faint: #9a9aa2;
  --accent: #10a06a;
  --accent-ink: #ffffff;
  --shadow: 0 10px 40px -14px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* faint dotted backdrop for depth */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(70, 227, 154, 0.07), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(106, 168, 255, 0.05), transparent 55%);
}

/* ── app shell: left menu + main ──────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: 232px; height: 100vh; flex: 0 0 232px;
  display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-right: 1px solid var(--line); z-index: 30;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px; }
.brand h1 { font-size: 18px; font-weight: 900; letter-spacing: 0.06em; }
.brand h1 span { color: var(--accent); }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 11px; cursor: pointer; text-align: left;
  background: transparent; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px;
  transition: background 150ms ease, color 150ms ease, transform 140ms var(--ease-out);
}
.nav-item svg { flex: 0 0 auto; opacity: 0.9; }
.nav-item span { flex: 1; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item:active { transform: scale(0.98); }
.nav-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.nav-item.active svg { color: var(--accent); opacity: 1; }
.nav-item.ghost { color: var(--muted); font-weight: 500; }
.nav-count { font-size: 11px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
}

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; }

.menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 40; width: 40px; height: 40px;
  border-radius: 11px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { display: none; flex-direction: column; min-height: 0; }
.view:not([hidden]) { display: flex; }
.view-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.view-title { font-size: 20px; font-weight: 800; margin-right: auto; }
.view-title .muted { font-size: 13px; font-weight: 500; margin-left: 8px; }

/* reused controls */
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 520px;
  padding: 0 12px; height: 40px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: border-color 160ms ease, background 160ms ease; }
.search.big { height: 46px; flex-basis: 360px; }
.search:focus-within { border-color: var(--line-2); background: var(--surface-2); }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; letter-spacing: -0.01em; }
.search.big input { font-size: 15px; }
.select { height: 40px; padding: 0 30px 0 12px; border-radius: var(--r-sm);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b8b95' stroke-width='2'><path d='M3 4.5 6 7.5l3-3'/></svg>") no-repeat right 10px center;
  border: 1px solid var(--line); color: var(--text); font: inherit; appearance: none; cursor: pointer;
  transition: border-color 160ms ease; }
.select:hover { border-color: var(--line-2); }

/* sections panel: sort + price/stock filters */
.sec-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 12px; }
.sec-controls .select { height: 34px; padding: 0 28px 0 11px; font-size: 13px; }
.sec-f { display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  transition: border-color 160ms ease; }
.sec-f:focus-within { border-color: var(--line-2); }
.sec-f-ic { color: var(--muted); font-size: 14px; line-height: 1; }
.sec-in { width: 74px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; }
.sec-in::placeholder { color: var(--muted); }
.sec-in::-webkit-outer-spin-button, .sec-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sec-in[type=number] { -moz-appearance: textfield; }
.sec-clear { height: 34px; width: 34px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13px;
  transition: transform 140ms ease-out, color 140ms ease-out, border-color 160ms ease; }
.sec-clear:hover { color: var(--text); border-color: var(--line-2); }
.sec-clear:active { transform: scale(0.94); }
.sec-clear[hidden] { display: none; }   /* a display: rule beats the UA [hidden] default, so restore it */
.btn { height: 40px; padding: 0 16px; border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  border: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease-out), background 160ms ease; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.97); }
.btn-primary { width: 100%; background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* ── event list (Home) ────────────────────────────────────────────────── */
.event-list { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px 60px; max-width: 1100px; width: 100%; margin: 0 auto; }
.ev {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center;
  padding: 9px 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  animation: rowIn 300ms var(--ease-out) both;
  transition: border-color 160ms ease, background 160ms ease, transform 140ms var(--ease-out);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } }
.ev:hover { border-color: var(--line-2); background: var(--surface-2); }
.ev:active { transform: scale(0.995); }
.ev-img { width: 64px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; }
.ev-img .noimg { font-size: 12px; font-weight: 800; color: var(--faint); }
.ev-main { min-width: 0; }
.ev-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 3px; }
.ev-meta .sep { color: var(--faint); }
.watch-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.watch-chip svg { opacity: 0.85; }
.ev-price { text-align: right; min-width: 84px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.ev-price b { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ev-price span { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.ev-stock { display: grid; grid-template-columns: auto auto; align-items: center; gap: 10px; min-width: 128px; justify-content: end; }
.ev-stock .count { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.ev-stock.lvl-high .count { color: var(--accent); }
.ev-stock.lvl-medium .count { color: var(--amber); }
.ev-stock.lvl-low .count { color: var(--red); }
.ev-stock.lvl-none .count, .ev-stock.lvl-unknown .count { color: var(--faint); }
.ev-stock .pill { white-space: nowrap; }

/* 100-event cap pill on Home */
.cap-pill { margin-left: auto; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); white-space: nowrap; }
.cap-pill.full { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }

/* ── search results (shared with the drawer styles below) ─────────────── */
.event-list.loading, .drops-list.loading { opacity: 0.55; }

/* ── drops feed ───────────────────────────────────────────────────────── */
.drops-list { display: flex; flex-direction: column; gap: 5px; padding: 12px 20px 60px; max-width: 900px; width: 100%; margin: 0 auto; }
.drop-row {
  display: grid; grid-template-columns: 62px 44px 1fr auto; gap: 11px; align-items: center;
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}
.drop-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.drop-row.arrive { animation: arrive 1200ms var(--ease-out); }
@keyframes arrive { 0% { transform: translateY(-6px); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); } }
.drop-row.resale { border-left: 3px solid var(--blue); }
.dr-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-img { width: 44px; height: 32px; border-radius: 7px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; font-size: 10px; color: var(--faint); font-weight: 700; }
.dr-img img { width: 100%; height: 100%; object-fit: cover; }
.dr-main { min-width: 0; }
.dr-ev { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-where { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-price { color: var(--price); font-weight: 600; }
.dr-delta { font-size: 16px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ── per-day arrivals graph in the detail ─────────────────────────────── */
.live-strip { padding: 11px 18px 9px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ag-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.ag-title { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ag-total { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.ag-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ag-slot { width: 100%; height: 42px; display: flex; align-items: flex-end; justify-content: center; }
.ag-bar { width: 100%; max-width: 20px; min-height: 2px; border-radius: 4px 4px 2px 2px; position: relative;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 72%, transparent));
  transition: height 320ms var(--ease-out); }
.ag-bar.zero { background: var(--line-2); border-radius: 2px; }
.ag-n { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 800;
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-d { font-size: 9px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip-sm { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; padding: 0 5px; margin-right: 2px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: 1px; }

.card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); cursor: pointer; text-align: left;
  opacity: 0; transform: translateY(8px);
  animation: cardIn 360ms var(--ease-out) forwards;
  transition: transform 220ms var(--ease-out), border-color 200ms ease, box-shadow 220ms var(--ease-out);
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
}
.card:active { transform: scale(0.988); }

.card-img {
  position: relative; aspect-ratio: 16 / 9; background: var(--bg-2);
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 500ms var(--ease-out), filter 300ms ease; filter: saturate(1.02); }
@media (hover: hover) { .card:hover .card-img img { transform: scale(1.04); } }
.card-img .noimg { position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--faint); font-weight: 700; font-size: 26px; letter-spacing: 0.1em; opacity: 0.5; }
.card-img::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--surface) 92%, transparent), transparent 55%); }

.chip {
  position: absolute; z-index: 2; top: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); letter-spacing: 0.02em;
}
.chip.region { left: 10px; text-transform: uppercase; }
.chip.cur { right: 10px; color: var(--muted); }

.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.card-sub .sep { color: var(--faint); }

.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.count { display: flex; align-items: baseline; gap: 6px; }
.count b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
  transition: color 240ms ease; }
.count span { font-size: 11px; color: var(--muted); }
.drop { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.01em; border: 1px solid transparent;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lvl-high   { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.lvl-medium { color: var(--amber);  background: color-mix(in srgb, var(--amber) 13%, transparent);  border-color: color-mix(in srgb, var(--amber) 28%, transparent); }
.lvl-low    { color: var(--red);    background: color-mix(in srgb, var(--red) 13%, transparent);    border-color: color-mix(in srgb, var(--red) 28%, transparent); }
.lvl-none   { color: var(--faint);  background: color-mix(in srgb, var(--faint) 14%, transparent); }
.lvl-unknown{ color: var(--muted);  background: color-mix(in srgb, var(--muted) 12%, transparent); }
.count.lvl-high b { color: var(--accent); }
.count.lvl-medium b { color: var(--amber); }
.count.lvl-low b { color: var(--red); }

/* ── overlay + sheets/modals ──────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: clamp(10px, 3vw, 36px);
  background: color-mix(in srgb, #000 55%, transparent); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 220ms var(--ease-out);
}
.overlay[hidden] { display: none; }
.overlay.open { opacity: 1; }

.sheet {
  position: relative; width: min(1180px, 96vw); height: min(90vh, 900px);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column;
  transform: scale(0.97) translateY(6px); opacity: 0;
  transition: transform 260ms var(--ease-out), opacity 260ms var(--ease-out);
}
.overlay.open .sheet { transform: none; opacity: 1; }

.modal {
  position: relative; width: min(460px, 94vw);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: scale(0.96); opacity: 0;
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.overlay.open .modal { transform: none; opacity: 1; }

.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--text);
  border: 1px solid var(--line-2); cursor: pointer; backdrop-filter: blur(6px);
  transition: transform 160ms var(--ease-out), background 160ms ease;
}
.sheet-close:hover { background: var(--surface-2); }
.sheet-close:active { transform: scale(0.92); }

.sheet-head {
  position: relative; padding: 20px 56px 18px 24px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.sheet-head .hero { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: 0.22; }
.sheet-head .hero img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); }
.sheet-head .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var(--bg-2) 10%, transparent); }
.sheet-head .inner { position: relative; z-index: 1; }
.sheet-head h2 { font-size: 20px; font-weight: 800; }
.sheet-head .meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.sheet-head .meta .sep { color: var(--faint); }
.sheet-head .headline { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.sheet-head .headline .big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

.sheet-body { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 0; }

/* map pane */
.map-pane { position: relative; border-right: 1px solid var(--line); background:
  radial-gradient(600px 400px at 50% 40%, rgba(255,255,255,0.03), transparent 70%), var(--bg); overflow: hidden; }
.map-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; }
.map-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px;
  opacity: 0; transition: opacity 400ms var(--ease-out); }
.map-wrap img.loaded { opacity: 0.92; }
.map-chips { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 6px;
  flex-wrap: wrap; max-height: 42%; overflow: auto; padding: 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 66%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); }
.map-chip {
  padding: 4px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-family: "Geist Mono", monospace; letter-spacing: -0.02em;
  transition: transform 140ms var(--ease-out), background 160ms ease, border-color 160ms ease;
}
.map-chip:hover { border-color: var(--accent); }
.map-chip:active { transform: scale(0.95); }
.map-chip.sel { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.map-note { position: absolute; top: 12px; left: 14px; font-size: 11px; color: var(--faint); z-index: 2; }
.map-note #map-hint { color: var(--muted); }
.map-note.map-nomap { position: static; left: auto; top: auto; z-index: auto; width: 100%;
  padding: 30px 16px 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ── live polygon seat map ──────────────────────────────────────────────── */
.seatmap-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 34px 16px 40px; }
/* min-width/height:0 lets the grid item shrink to its padded box instead of to
   width×3/4, so preserveAspectRatio letterboxes the map rather than overflowing
   a short pane (the tablet/phone clip). */
.seatmap { width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: visible; }

/* TM's own venue drawing (stage, floor, outlines, printed names) underneath.
   It is a light drawing: in the black theme it is inverted into a dark one. */
.seatmap .venue { opacity: 0.96; pointer-events: none; }
:root:not([data-theme="white"]) .seatmap .venue { filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(0.95); }

/* Phantom's live-stock heatmap palette (count vs the event's 85th percentile):
   high = green, med = amber, low = red, none = grey, selected = outline only. */
.seatmap { --ls-none: rgba(170, 170, 178, 0.13); --ls-none-s: rgba(170, 170, 178, 0.34);
           --ls-lab-none: var(--muted); --ls-lab: #0d0d10; }
:root[data-theme="white"] .seatmap { --ls-none: rgba(180, 180, 180, 0.36); --ls-none-s: rgba(140, 140, 140, 0.55);
           --ls-lab-none: #55555c; }
.seatmap .poly {
  fill: var(--ls-none); stroke: var(--ls-none-s); stroke-width: 0.8; stroke-linejoin: round;
  cursor: pointer; vector-effect: non-scaling-stroke;
  transition: fill 320ms var(--ease-out), stroke 160ms ease, stroke-width 160ms ease, opacity 200ms ease;
}
.seatmap .poly.has { opacity: 0.92; stroke-width: 1.2; }
.seatmap .poly.t-high { fill: #17b978; stroke: #0e8a59; }
.seatmap .poly.t-med  { fill: #f5a524; stroke: #c97f12; }
.seatmap .poly.t-low  { fill: #f04438; stroke: #c5221a; }
.seatmap .poly.t-high.hot { fill: #12a169; }
.seatmap .poly.t-med.hot  { fill: #e08c12; }
.seatmap .poly.t-low.hot  { fill: #dd342a; }
.seatmap .poly.hot { opacity: 1; stroke: var(--text); stroke-width: 2.2; }
.seatmap .poly.hot:not(.has) { fill: color-mix(in srgb, var(--text) 18%, transparent); }
.seatmap.hovering .poly.has:not(.hot) { opacity: 0.6; }      /* spotlight the hovered one */
.seatmap .poly.sel { stroke: var(--text); stroke-width: 2.6; opacity: 1; }
.seatmap .poly.pulse { animation: polyPulse 1000ms var(--ease-out); }
@keyframes polyPulse { from { stroke: var(--text); stroke-width: 4; } }

/* the TM drawing has NO section numbers (UK or EU): every name is ours */
.seatmap .poly-lab {
  fill: var(--ls-lab-none); opacity: 0.8; font-weight: 700;
  text-anchor: middle; dominant-baseline: central;
  pointer-events: none; font-family: "Inter", system-ui, sans-serif; letter-spacing: -0.01em;
  transition: fill 240ms ease, opacity 240ms ease;
}
.seatmap .poly-lab.has { fill: var(--ls-lab); opacity: 1; }

.map-legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; font-size: 11px; color: var(--muted); z-index: 2; }
.map-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.map-legend .sw.none { background: var(--surface-2); border: 1px solid var(--line-2); }
.map-legend .sw.t-high { background: #17b978; }
.map-legend .sw.t-med { background: #f5a524; }
.map-legend .sw.t-low { background: #f04438; }
.map-tip .tt-h { font-weight: 700; color: var(--blue); margin-bottom: 2px; }
.map-tip .tt-p { color: var(--price); font-weight: 600; font-variant-numeric: tabular-nums; }
.map-tip { white-space: normal; min-width: 150px; line-height: 1.45; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }

/* EU (no polygon geometry yet): the sections that HAVE tickets, as live tiles */
.tiles-wrap { position: absolute; inset: 0; overflow: auto; padding: 36px 14px 14px; }
.tiles-map { display: block; max-width: 100%; max-height: 38%; margin: 0 auto 12px; border-radius: 10px; opacity: 0; transition: opacity 400ms var(--ease-out); }
.tiles-map.loaded { opacity: 0.9; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.tile {
  padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line-2); text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text);
  transition: transform 140ms var(--ease-out), border-color 160ms ease;
}
.tile.t-high { background: #17b978; border-color: #0e8a59; color: #0d0d10; }
.tile.t-med  { background: #f5a524; border-color: #c97f12; color: #0d0d10; }
.tile.t-low  { background: #f04438; border-color: #c5221a; color: #0d0d10; }
.tile:hover { border-color: var(--text); }
.tile:active { transform: scale(0.96); }
.tile.ga { grid-column: span 2; }
.tile b { display: block; font-family: "Geist Mono", monospace; font-size: 12px; letter-spacing: -0.02em; }
.tile span { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile.pulse { animation: tilePulse 1000ms var(--ease-out); }
@keyframes tilePulse { from { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poly-hot) 35%, transparent); } }

/* live bits */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live.on i { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.small { font-size: 11.5px; }
.err { color: var(--red); }
.tm-link { color: var(--blue); }
.mapok { color: var(--accent); }
.from { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ok-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px;
  background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.price-state .sep { color: var(--faint); }
.badge { font-size: 9.5px; padding: 1px 6px; border-radius: 6px; font-weight: 700; letter-spacing: 0.05em; vertical-align: 1px;
  color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2);
  border-top-color: var(--accent); animation: spin 0.7s linear infinite; vertical-align: middle; }
.sec-card.flash { animation: secFlash 1100ms var(--ease-out); }
@keyframes secFlash { from { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); } }
.count.bump b { animation: bump 700ms var(--ease-out); }
@keyframes bump { from { transform: scale(1.16); color: var(--accent); } }
.num { width: 80px; height: 36px; padding: 0 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font: inherit; }
@media (prefers-reduced-motion: reduce) {
  .seatmap .poly.pulse, .tile.pulse, .sec-card.flash, .count.bump b { animation: none; }
}
.map-tip {
  position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 12px));
  padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap;
  pointer-events: none; color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.map-tip[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .seatmap .poly { transition: fill 260ms linear; } }

/* section list */
.sec-pane { display: flex; flex-direction: column; min-height: 0; }
.sec-pane-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sec-pane-head h3 { font-size: 14px; }
.price-state { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.price-state .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sec-list { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.sec-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden;
  flex-shrink: 0;   /* overflow:hidden zeroes a flex item's auto min-height: without this, a long board squashes its cards instead of scrolling */
  transition: border-color 160ms ease, background 160ms ease;
}
.sec-card.hot { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.sec-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 11px 14px; cursor: pointer;
}
.sec-row .nm { font-weight: 700; font-size: 14px; }
.sec-row .av { font-size: 11px; color: var(--muted); }
.sec-row .pr { font-weight: 700; font-variant-numeric: tabular-nums; font-family: "Geist Mono", monospace; }
.sec-row .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 30px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-variant-numeric: tabular-nums; }
.sec-rows { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease-out); }
.sec-card.open .sec-rows { grid-template-rows: 1fr; }
.sec-rows > div { overflow: hidden; min-height: 0; }   /* min-height:0 lets 0fr fully collapse */
.row-line { display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.row-line .rw { color: var(--muted); font-family: "Geist Mono", monospace; }
.row-line .rp { font-weight: 600; font-variant-numeric: tabular-nums; }

.sec-empty { padding: 36px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.sec-empty small { display: block; margin-top: 6px; color: var(--faint); }

/* settings + add */
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head .sheet-close { position: static; }
.modal-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.set-row .lbl b { display: block; font-size: 13.5px; font-weight: 600; }
.set-row .lbl span { font-size: 11.5px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--muted); }
.field input { height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface);
  border: 1px solid var(--line-2); color: var(--text); font: inherit; outline: 0; }
.field input:focus { border-color: var(--accent); }
.hint { font-size: 11.5px; color: var(--faint); margin: 0; }

/* toggle */
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle .track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line-2); transition: background 200ms ease; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform 220ms var(--ease-out), background 200ms ease; }
.toggle input:checked ~ .track { background: color-mix(in srgb, var(--accent) 30%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.toggle input:checked ~ .knob { transform: translateX(18px); background: var(--accent); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg button { padding: 7px 12px; background: var(--surface); color: var(--muted); border: 0; font: inherit; font-weight: 600; cursor: pointer; transition: color 160ms ease, background 160ms ease; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* skeleton shimmer */
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 6%, transparent), transparent);
  animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 500;
  transform: translateY(12px); opacity: 0; transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out); }
.toast.show { transform: none; opacity: 1; }
.toast.err { border-color: color-mix(in srgb, var(--red) 50%, transparent); color: var(--red); }
.toast.ok { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

@media (max-width: 820px) {
  .stats { display: none; }
  .sheet-body { grid-template-columns: 1fr; grid-template-rows: 240px 1fr; }
  .map-pane { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.08ms !important; }
  .card { opacity: 1; transform: none; }
}

/* ── artist / event search column ──────────────────────────────────────── */
.drawer-wrap { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; }  /* .overlay[hidden] still wins */
.drawer {
  width: min(460px, 100vw); height: 100%; display: flex; flex-direction: column;
  background: var(--bg-2); border-left: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform 320ms var(--ease-out);
}
.overlay.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.drawer-head h3 { font-size: 16px; font-weight: 800; }
.drawer-head .sheet-close { position: static; }
.drawer-tools { display: flex; gap: 8px; padding: 0 18px 12px; border-bottom: 1px solid var(--line); }
.drawer-tools .search { flex: 1; }
.drawer-body { flex: 1; overflow: auto; padding: 10px 12px 18px; display: flex; flex-direction: column; gap: 6px; }
.drawer-body.loading { opacity: 0.55; transition: opacity 120ms ease; }
.d-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ── Home discovery feed (hot events + top artists from Discovery) ──────────── */
.disco-head { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--faint); margin: 18px 2px 10px; }
.disco-head:first-child { margin-top: 4px; }
.artist-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.artist-row::-webkit-scrollbar { height: 6px; }
.artist-row::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
.artist-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  color: var(--text); font: inherit; font-weight: 600; font-size: 13px; transition: border-color 160ms ease, transform 120ms ease; }
.artist-chip:hover { border-color: var(--accent); }
.artist-chip:active { transform: scale(0.97); }
.artist-chip .ac-img { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-weight: 800; font-size: 13px; }
.artist-chip .ac-img img { width: 100%; height: 100%; object-fit: cover; }
.artist-chip .ac-n { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent);
  border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.d-item {
  flex-shrink: 0; display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center;
  padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease;
}
.d-item:hover { border-color: var(--line-2); }
.d-item.is-tracked { cursor: pointer; }
.d-img { width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-size: 11px; color: var(--faint); font-weight: 700; }
.d-img img { width: 100%; height: 100%; object-fit: cover; }
.d-main { min-width: 0; }
.d-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sub, .d-art { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.d-art { color: var(--faint); }
.chip-sm { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; padding: 0 5px; margin-right: 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: 1px; }
.d-track {
  height: 30px; padding: 0 11px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  transition: transform 140ms var(--ease-out), opacity 160ms ease, background 160ms ease;
}
.d-track:active { transform: scale(0.96); }
.d-track:disabled { background: transparent; border-color: var(--line-2); color: var(--muted); cursor: default; }
.d-more { margin: 8px auto 0; display: block; font: inherit; font-size: 12px; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 8px; }
.d-more:hover { text-decoration: underline; }
.btn-ghost {
  margin-left: auto; height: 28px; padding: 0 10px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2);
  transition: color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
.btn-ghost:hover { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn-ghost:active { transform: scale(0.96); }
.btn svg { vertical-align: -2px; margin-right: 2px; }
.field em { font-style: normal; color: var(--faint); font-weight: 400; }
@media (max-width: 640px) { .drawer { width: 100vw; border-left: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

/* ticket-type tags on price levels (standard has none) */
.ktag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; vertical-align: 1px;
  border: 1px solid var(--line-2); color: var(--muted); }
.ktag.k-acc  { color: var(--blue);   background: color-mix(in srgb, var(--blue) 14%, transparent); border-color: transparent; }
.ktag.k-comp { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: transparent; }
.ktag.k-plat { color: var(--amber);  background: color-mix(in srgb, var(--amber) 16%, transparent); border-color: transparent; }
.ktag.k-pre  { color: var(--muted); }

/* ── responsive: sidebar collapses to a slide-over ────────────────────── */
@media (max-width: 760px) {
  .menu-btn { display: grid; place-items: center; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform 260ms var(--ease-out);
    box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .view-head { padding-left: 62px; }
  .ev { grid-template-columns: 54px 1fr auto; }
  .ev-price { display: none; }
  .event-list, .drops-list { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev, .drop-row.arrive, .ls-chip, .sidebar { animation: none; transition: none; }
}

/* resale on the section board */
.row-line.resale .rw { color: var(--blue); }
.resale-pr { color: var(--blue); }
.ktag.k-res { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); border-color: transparent; }
.vg-link { color: #ff5a3c; font-weight: 600; }

/* event info: genre + on-sale state */
.genre { color: var(--muted); }
.sheet-head .meta.links { margin-top: 5px; font-size: 12px; }
.onsale { font-weight: 600; padding: 0 7px; border-radius: 6px; font-size: 11px; }
.onsale.ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.onsale.soon { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.onsale.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent); }
.onsale.err { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.onsale.muted { color: var(--muted); }

/* ── login / register gate ─────────────────────────────────────────────────── */
.auth-gate {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: 24px; background: var(--bg);
  opacity: 0; transition: opacity 240ms var(--ease-out);
}
.auth-gate[hidden] { display: none; }
.auth-gate.open { opacity: 1; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 28px 26px 24px;
  transform: scale(0.98); transition: transform 240ms var(--ease-out);
}
.auth-gate.open .auth-card { transform: none; }
.auth-brand h1 { font-size: 20px; font-weight: 900; letter-spacing: 0.06em; margin: 0; }
.auth-brand h1 span { color: var(--accent); }
.auth-tag { margin: 6px 0 20px; font-size: 12.5px; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { margin: 0 0 2px; font-size: 16px; font-weight: 700; }
/* .field sets display:flex, which beats the UA [hidden] rule — make hidden win */
.field[hidden] { display: none; }
.auth-error {
  margin: 0; font-size: 12.5px; color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: var(--r-sm); padding: 8px 10px;
}
.auth-error[hidden] { display: none; }
.auth-submit { margin-top: 2px; }
.auth-switch { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.linkish { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.linkish:hover { text-decoration: underline; }

/* ── settings: separators + the registration allow-list ────────────────────── */
.set-sep {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px;
}
.set-note { font-size: 11.5px; color: var(--muted); margin: -8px 0 0; }
.allow-list { display: flex; flex-direction: column; gap: 6px; }
.allow-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 10px; font-size: 12.5px;
}
.allow-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allow-x { background: none; border: 0; color: var(--faint); font: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: color 160ms ease; }
.allow-x:hover { color: var(--red); }
.allow-x:active { transform: scale(0.9); }
.allow-empty { font-size: 12px; color: var(--faint); padding: 4px 2px; }
.allow-add { display: flex; gap: 8px; }
.allow-add .num { flex: 1; width: auto; }

/* ── queue now + drops & restock (2026-11-24) ─────────────────────────────── */
.q-chip { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0 6px; border-radius: 5px; vertical-align: 1px; margin-right: 4px; }
.q-chip.on { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.q-chip.wait { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.rs-chip { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 5px; margin-left: 2px;
  color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); font-variant-numeric: tabular-nums; }
.hist-box { padding: 11px 18px 10px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--blue) 5%, transparent); }
.hist-box .ag-title { color: var(--blue); }
.hb-est { font-size: 12.5px; line-height: 1.45; margin-bottom: 4px; }
.hb-est b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.hb-est .muted { font-size: 11.5px; }
.hb-cap { font-size: 11px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.hb-waves { display: flex; flex-direction: column; gap: 3px; max-height: 168px; overflow-y: auto; }
.hb-wave { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: baseline; column-gap: 8px;
  font-size: 12px; padding: 3px 0; border-top: 1px solid var(--line); }
.hb-wave:first-child { border-top: 0; }
.hb-n { color: var(--faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.hb-lab { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-when { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.hb-tot { color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.hb-parts { grid-column: 2 / -1; font-size: 10.5px; }
.hb-empty { font-size: 11.5px; }
