/* ==== WAN Show Bingo Admin — theme (LTT / WAN Show) ==== */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/dosis-latin.woff2') format('woff2');
}

:root {
  --bg: #0E0F11;
  --surface: #16181B;
  --surface2: #1E2125;
  --border: #2B3036;
  --text: #ECECEE;
  --muted: #9AA0A8;
  --accent: #C13E05;       /* WAN Show burnt orange (fills) */
  --accent-hot: #F24405;   /* hover */
  --accent-300: #FF7A45;   /* small orange text/links on dark */
  --accent-ink: #FFFFFF;
  --danger: #DC3741;
  --success: #3FB950;
  --warn: #E8A33D;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.45);
  --font: 'Dosis', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5; font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 800; margin: 0; letter-spacing: .2px; }
.muted { color: var(--muted); }
.centered { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* ---- forms & inputs ---- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
label.row { flex-direction: row; align-items: center; gap: 9px; color: var(--text); }
input, select, textarea {
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; font: inherit; font-weight: 500; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { resize: vertical; }

/* ---- buttons ---- */
.btn {
  cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text);
  border-radius: var(--radius); padding: 10px 15px; font: inherit; font-weight: 700; letter-spacing: .2px;
  transition: filter .12s, border-color .12s, background .12s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); }
.btn.ghost { background: transparent; }
.btn.outline { background: transparent; border-color: var(--accent); color: var(--accent-300); }
.btn.outline:hover { background: rgba(193,62,5,.12); }
.btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { filter: brightness(1.08); }
.btn.danger-ghost { color: var(--danger); background: transparent; border-color: transparent; }
.btn.danger-ghost:hover { border-color: var(--danger); }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.big { padding: 14px 18px; font-size: 17px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }

/* ---- auth cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.auth-card { width: min(390px, 92vw); display: flex; flex-direction: column; gap: 15px; }
.auth-brand { text-align: center; margin-bottom: 2px; }
.auth-brand .wm { font-size: 26px; font-weight: 800; }
.auth-brand .wm .o { color: var(--accent-300); }
.auth-note { font-size: 13px; text-align: center; }

/* ---- app shell / header ---- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 14px 22px;
  background: linear-gradient(45deg, #C13E05, #912700); color: #fff; box-shadow: var(--shadow);
}
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: .5px; display: flex; align-items: baseline; gap: 8px; }
.wordmark .sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: .85; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.topbar .btn { background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.35); color: #fff; }
.topbar .btn:hover { background: rgba(0,0,0,.30); border-color: #fff; }

/* ---- nav ---- */
.nav { display: flex; gap: 2px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 14px; position: sticky; top: 0; z-index: 5; }
.tab {
  background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--muted);
  padding: 13px 16px; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--accent); }

.tab-panel { padding: 22px; max-width: 1080px; margin: 0 auto; }
/* The live console uses the full window so the whole board fits on one screen. */
#tab-live { max-width: none; padding: 12px 14px; }
.page-title { font-size: 22px; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.grow { flex: 1 1 220px; }
.toolbar select { width: auto; }
.count { color: var(--muted); margin-bottom: 10px; font-size: 14px; }
.safe-note { background: rgba(63,185,107,.10); border: 1px solid rgba(63,185,107,.30); color: #bfe9cd; border-radius: var(--radius); padding: 9px 13px; font-size: 14px; margin-bottom: 14px; }

/* ---- home dashboard ---- */
.hero {
  border-radius: 14px; padding: 22px 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero.ok { background: linear-gradient(135deg, rgba(63,185,107,.16), rgba(63,185,107,.05)); border-color: rgba(63,185,107,.4); }
.hero.warn { background: linear-gradient(135deg, rgba(232,163,61,.18), rgba(232,163,61,.05)); border-color: rgba(232,163,61,.5); }
.hero .big-dot { font-size: 34px; line-height: 1; }
.hero h2 { font-size: 22px; }
.hero p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.hero .spacer { flex: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat .n.orange { color: var(--accent-300); }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 600; }

.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 22px 0 10px; font-weight: 700; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.action-grid .btn { justify-content: center; text-align: center; }

.help-box { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin-top: 20px; font-size: 14.5px; }
.help-box h3 { font-size: 15px; margin-bottom: 8px; }
.help-box ul { margin: 0; padding-left: 18px; color: var(--muted); }
.help-box li { margin: 4px 0; }

/* mini chart */
.chart { display: flex; align-items: flex-end; gap: 5px; height: 90px; padding: 8px 0; }
.chart .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 3px; opacity: .85; }
.chart .bar:hover { background: var(--accent-hot); opacity: 1; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.grid { width: 100%; border-collapse: collapse; min-width: 720px; }
table.grid th, table.grid td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid thead th { background: var(--surface); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
table.grid tbody tr:hover { background: var(--surface); }
table.grid tbody tr:last-child td { border-bottom: none; }
.c-id { width: 46px; color: var(--muted); } .c-cat { width: 140px; } .c-en { width: 84px; }
.c-meta { width: 175px; color: var(--muted); font-size: 13px; } .c-act { width: 150px; text-align: right; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); font-weight: 700; }
.cat-pill { background: var(--surface2); }
.pill.you { background: rgba(193,62,5,.15); border-color: var(--accent); color: var(--accent-300); }
.pill.owner { background: rgba(193,62,5,.15); border-color: var(--accent); color: var(--accent-300); }
.pill.archived { background: rgba(154,160,168,.12); }
.pill.ok { background: rgba(63,185,107,.12); border-color: rgba(63,185,107,.4); color: #7fe0a0; }
.pill.banned { background: rgba(220,55,65,.14); border-color: rgba(220,55,65,.45); color: #f39098; }
.c-perf { width: 150px; }
/* performance badges */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.badge.good { background: rgba(63,185,107,.15); color: #7fe0a0; border-color: rgba(63,185,107,.4); }
.badge.ok   { background: var(--surface2); color: var(--muted); border-color: var(--border); }
.badge.warn { background: rgba(232,163,61,.15); color: #f0c07a; border-color: rgba(232,163,61,.45); }
.badge.bad  { background: rgba(220,55,65,.15); color: #f39098; border-color: rgba(220,55,65,.45); }
.badge.muted{ background: transparent; color: var(--muted); border-color: var(--border); }
.perf-rate { font-weight: 800; font-size: 14px; }
.perf-sub { font-size: 11px; color: var(--muted); }

/* on/off switch */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #3a4552; border-radius: 999px; transition: .15s; cursor: pointer; }
.slider::before { content: ""; position: absolute; height: 19px; width: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(19px); }

/* ---- services ---- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.svc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.svc h3 { font-size: 17px; }
.svc .desc { color: var(--muted); font-size: 13.5px; margin: 4px 0 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.status .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }
.status.up .dot { background: var(--success); box-shadow: 0 0 8px rgba(63,185,107,.6); }
.status.down .dot { background: var(--danger); }
.status.busy .dot { background: var(--warn); animation: pulse 1s infinite; }
.status.na .dot { background: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.svc .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tech { margin-top: 12px; font-size: 13px; color: var(--muted); }
.tech summary { cursor: pointer; color: var(--muted); }
.tech .tech-body { margin-top: 8px; padding: 10px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); }
.tech code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

/* ---- live show console ---- */
.live-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.live-bar .live-count { font-size: 20px; }
.live-bar .spacer { flex: 1; }
.live-pill { background: var(--danger); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; animation: livepulse 1.6s infinite; }
@keyframes livepulse { 50% { opacity: .55; } }
.live-count { font-size: 26px; font-weight: 800; color: var(--accent-300); }

.cat-block { margin-bottom: 22px; }
.cat-head { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* Balanced columns so every square fits one screen (1080p target, chat beside it) */
.live-columns { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px; align-items: start; }
.live-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.live-columns .cat-head { margin: 6px 0 2px; font-size: 11px; }
.live-columns .live-col > .cat-head:first-child { margin-top: 0; }

.tile-btn {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  min-height: 62px; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-weight: 600; font-size: 15px; touch-action: manipulation;
  transition: background .12s, border-color .12s;
}
/* Compact rows — the whole board visible without scrolling.
   --tile-font is tuned at runtime by fitLiveGrid() so everything always fits. */
.live-columns.compact { --tile-font: 12.5px; }
.live-columns.compact .live-col { gap: 2px; }
.live-columns.compact .tile-btn {
  min-height: 0; font-size: var(--tile-font); padding: calc(var(--tile-font) * 0.30) 8px;
  border-radius: 5px; gap: 6px; line-height: 1.2;
}
.live-columns.compact .cat-head { margin: 5px 0 1px; font-size: calc(var(--tile-font) * 0.82); }
.live-columns.compact .tile-btn .mark {
  width: calc(var(--tile-font) * 1.15); height: calc(var(--tile-font) * 1.15);
  border-radius: 3px; border-width: 1.5px; font-size: calc(var(--tile-font) * 0.8);
}
.live-columns.compact .tile-btn .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-btn .txt { min-width: 0; }
.tile-btn:hover { border-color: var(--muted); }
.tile-btn .mark { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); flex: 0 0 auto; display: grid; place-items: center; font-size: 14px; }
.tile-btn.on { background: rgba(63,185,107,.16); border-color: var(--success); }
.tile-btn.on .mark { background: var(--success); border-color: var(--success); color: #08260f; }
.tile-btn .who { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.tile-btn.busy { opacity: .55; pointer-events: none; }

/* ---- history ---- */
.hist-tile { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.hist-tile:last-child { border-bottom: none; }
.hist-tile .mark { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; background: var(--surface2); color: var(--muted); }
.hist-tile.on .mark { background: var(--success); color: #08260f; font-weight: 800; }
.hist-tile.off { color: var(--muted); }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.bar-row .name { flex: 0 0 46%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { flex: 1; display: block; background: var(--surface2); border-radius: 999px; height: 16px; overflow: hidden; }
/* must be block — an inline span ignores width/height */
.bar-row .fill { display: block; background: var(--accent); height: 100%; border-radius: 999px; min-width: 3px; }
.bar-row .val { flex: 0 0 84px; text-align: right; font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---- modals ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; z-index: 40; }
.modal-card { width: min(480px, 94vw); display: flex; flex-direction: column; gap: 15px; }
.modal-card h2 { font-size: 19px; }
.modal-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.reveal { display: flex; gap: 8px; }
.reveal input { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---- toast ---- */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(560px, 92vw); }
.toast { background: var(--surface2); border: 1px solid var(--border); padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; width: 100%; }
.toast.err { border-color: var(--danger); }
.toast.ok { border-color: var(--success); }
.toast .msg { flex: 1; font-weight: 600; font-size: 14.5px; }
.toast .x { cursor: pointer; color: var(--muted); background: none; border: none; font-size: 18px; line-height: 1; }

/* spinner */
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .topbar .user { width: 100%; }
  .nav { overflow-x: auto; }
  .hero { flex-direction: column; text-align: center; }
}

/* Header logo (served locally — the panel CSP is img-src 'self') */
.wordmark-logo { height: 26px; width: auto; display: block; }
@media (max-width: 640px) { .wordmark-logo { height: 22px; } }

/* ---------- "is the WAN Show on air?" card (Home) ---------- */
.showcard { display: flex; gap: 16px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow); margin-bottom: 20px; }
.showcard[hidden] { display: none; }
.showcard.on { background: linear-gradient(135deg, rgba(193,62,5,.20), rgba(193,62,5,.05));
  border-color: rgba(242,68,5,.55); }
.showcard.ask { background: linear-gradient(135deg, rgba(193,62,5,.28), rgba(193,62,5,.07));
  border-color: var(--accent-hot); box-shadow: 0 0 0 1px rgba(242,68,5,.25), var(--shadow-lg); }
.showcard .sc-thumb { width: 160px; height: 90px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); flex: none; background: var(--surface2); }
.showcard .sc-thumb[hidden] { display: none; }
.showcard .sc-body { min-width: 0; flex: 1; }
.showcard .sc-head { display: flex; align-items: center; gap: 10px; min-height: 20px; }
.showcard .sc-head .muted { font-size: 12px; font-weight: 600; }
.showcard .sc-pill { background: var(--danger); color: #fff; font-weight: 800; font-size: 12px;
  padding: 3px 9px; border-radius: 999px; animation: livepulse 1.6s infinite; }
.showcard .sc-pill[hidden] { display: none; }
.showcard h3 { font-size: 19px; margin: 4px 0 0; overflow-wrap: anywhere; }
.showcard p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.showcard .sc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.showcard .sc-actions:empty { display: none; }
@media (max-width: 640px) { .showcard { flex-direction: column; align-items: stretch; }
  .showcard .sc-thumb { width: 100%; height: auto; aspect-ratio: 16/9; } }

/* ---- players: community tenure (how long they've been in our Discord) ---- */
.cell-sub { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 3px; }
.cell-marks { margin-top: 5px; }
.pill.staff { background: rgba(232,163,61,.12); border-color: rgba(232,163,61,.42); color: #f0c17a; }
.pill.admin { background: rgba(193,62,5,.18); border-color: var(--accent); color: var(--accent-300); }
.pill.away { background: rgba(154,160,168,.10); border-color: var(--border); color: var(--muted); font-weight: 600; }

/* ---------- site images: the pictures the public website uses ---------- */
.slot-grid { display: grid; gap: 16px; }
.slot { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.slot-thumb { flex: 0 0 190px; height: 116px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2) repeating-conic-gradient(#22262b 0% 25%, #1a1d21 0% 50%) 50%/16px 16px;
  display: grid; place-items: center; overflow: hidden; }
.slot-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
/* The logo is drawn in white, so it needs the orange it normally sits on. */
.slot-thumb.on-orange { background: linear-gradient(45deg, #C13E05, #912700); padding: 10px; }
.slot-none { color: var(--muted); font-size: 13px; }
.slot-body { min-width: 0; flex: 1; }
.slot-body h3 { font-size: 17px; }
.slot-where { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.slot-facts { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent-300); }
.slot-when { font-size: 12.5px; margin-top: 2px; }
.rec-note { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.slot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.slot-actions .btn { text-decoration: none; display: inline-block; }
.slot-history { margin-top: 12px; }
.slot-history summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; }
.hist-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; }
.hist-item { display: flex; flex-direction: column; gap: 6px; width: 132px; }
.hist-item img { width: 132px; height: 78px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); }
.hist-meta { font-size: 12px; line-height: 1.3; }

/* ---- the change-a-picture window ---- */
.image-card { width: min(1000px, 96vw); }
.img-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; }
.img-pick { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pick-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.pick-tab { background: none; border: none; border-bottom: 3px solid transparent; color: var(--muted);
  font: inherit; font-weight: 700; font-size: 14px; padding: 8px 12px; cursor: pointer; }
.pick-tab:hover { color: var(--text); }
.pick-tab.active { color: #fff; border-bottom-color: var(--accent); }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 2px dashed var(--border); border-radius: 10px; padding: 26px 16px; cursor: pointer;
  background: var(--surface2); transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(193,62,5,.08); }
.drop .drop-icon { font-size: 26px; }
.drop b { color: var(--text); font-size: 15px; }
.drop .muted { font-size: 13px; }
.drop .muted.small { font-size: 12px; }
.pick-meta { color: var(--accent-300); font-size: 13px; font-weight: 700; min-height: 18px; overflow-wrap: anywhere; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px;
  max-height: 320px; overflow-y: auto; padding: 2px; }
.lib-item { display: flex; flex-direction: column; gap: 3px; padding: 5px; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  font: inherit; text-align: left; }
.lib-item:hover { border-color: var(--muted); }
.lib-item.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lib-item img { width: 100%; height: 62px; object-fit: cover; border-radius: 5px; background: #000; }
.lib-name { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-size { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.lib-item.too-big { opacity: .5; cursor: not-allowed; }

.img-preview { min-width: 0; }
.preview-head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 8px; }
.preview-head .muted { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---- the little copy of the real page ---- */
.mock { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #333; }
.mk { position: relative; height: 340px; overflow: hidden; font-family: var(--font); }
.mk-bg { position: absolute; inset: 0; background: #555 center/cover no-repeat; }
.mk-dim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.mk-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,.29) 100%); }
.mk-nav { position: relative; display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 10px;
  background: rgba(51,51,51,.88); color: #fff; font-size: 9px; font-weight: 700; }
.mk-brand { letter-spacing: .5px; }
.mk-links { color: #ddd; font-weight: 600; }
.mk-login { margin-left: auto; color: #ddd; font-weight: 600; }
.mk-wrap { position: relative; padding: 14px; display: flex; justify-content: center; }
.mk-card { width: 250px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 12px rgba(0,0,0,.35); }
.mk-head { background: linear-gradient(45deg, #c13e05, #912700); padding: 10px; text-align: center; }
.mk-head .mk-logo { height: 20px; width: auto; display: inline-block; }
.mk-logo-none { color: #fff; font-size: 13px; font-weight: 800; }
.mk-tag { display: block; color: #ffe2d5; font-size: 7px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; margin-top: 4px; }
.mk-body { background: #f4f0e6 repeat; padding: 12px 12px 14px; color: #1c1a17; }
.mk-h1 { font-size: 14px; font-weight: 800; text-align: center; }
.mk-lede { font-size: 9px; color: #55504a; text-align: center; margin: 3px 0 9px; }
.mk-discord { background: #5865f2; color: #fff; border-radius: 5px; text-align: center; padding: 8px;
  font-size: 10px; font-weight: 700; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.mk-fine { font-size: 7.5px; color: #55504a; text-align: center; margin-top: 7px; }
.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mk-sq { background: #f4f0e6 repeat; border: 1px solid #c13e05; border-radius: 2px; height: 42px;
  display: grid; place-items: center; text-align: center; font-size: 7px; font-weight: 700;
  color: #1c1a17; padding: 3px; line-height: 1.15; }
.mk-panel { width: 260px; background: rgba(255,255,255,.93); border-radius: 8px; padding: 12px;
  color: #1c1a17; box-shadow: 0 8px 12px rgba(0,0,0,.35); }
.mk-h2 { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.mk-row { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600;
  padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,.12); }
.mk-row:last-child { border-bottom: none; }
.mk-rank { width: 15px; height: 15px; border-radius: 50%; background: #c13e05; color: #fff;
  display: grid; place-items: center; font-size: 8px; font-weight: 800; flex: none; }

@media (max-width: 820px) {
  .img-cols { grid-template-columns: minmax(0, 1fr); }
  .slot { flex-direction: column; }
  .slot-thumb { flex: none; width: 100%; }
}

/* ---- Call After Dark (Live Show console) ----------------------------------
   Deliberately not red: it is not destructive, it is theatrical. Once the undo
   window closes the button disappears and only the line about tonight is left. */
.btn.afterdark {
  background: #241a3a;
  border-color: #4a3a72;
  color: #e6dcff;
}
.btn.afterdark:hover { background: #33285a; border-color: #7a63b8; }
.afterdark-line {
  font-size: 12px;
  font-weight: 600;
  color: #c9bcf0;
  background: #241a3a;
  border: 1px solid #4a3a72;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
