:root, [data-theme="red"] {
  --bg: #0b0506;
  --bg-2: #140809;
  --card: #1a0b0d;
  --card-2: #221012;
  --border: #3a1a1d;
  --text: #fbeff0;
  --muted: #b99a9d;
  --red: #ff2d3d;          /* theme accent */
  --red-2: #ff5a3c;        /* accent highlight */
  --red-dim: #8a1520;      /* accent, dim */
  --deep: #5a0c14;         /* accent, darkest (banner) */
  --accent-rgb: 255, 45, 61;
  --accent2-rgb: 255, 90, 60;
  --green: #3ddc84;
  --danger: #ff4d5e;       /* "doesn't work" / delete: red in every theme */
  --danger-rgb: 255, 77, 94;
  --glow: 0 0 24px rgba(var(--accent-rgb), 0.45);
  --radius: 14px;
}
[data-theme="purple"] {
  --bg: #07050b; --bg-2: #0e0916; --card: #140d1f; --card-2: #1b1229; --border: #2e2142;
  --text: #f5f0fb; --muted: #a99cbc;
  --red: #a855f7; --red-2: #d946ef; --red-dim: #5b2391; --deep: #2e1150;
  --accent-rgb: 168, 85, 247; --accent2-rgb: 217, 70, 239;
}
[data-theme="blue"] {
  --bg: #04070b; --bg-2: #080e16; --card: #0c1420; --card-2: #111b2a; --border: #1c2c42;
  --text: #eef5fb; --muted: #93a6bd;
  --red: #3b82f6; --red-2: #0ea5e9; --red-dim: #1e4e8a; --deep: #0c2a50;
  --accent-rgb: 59, 130, 246; --accent2-rgb: 14, 165, 233;
}
[data-theme="pink"] {
  --bg: #0b0508; --bg-2: #14080e; --card: #1c0b14; --card-2: #25101b; --border: #3d1a2c;
  --text: #fcf0f6; --muted: #bc9aab;
  --red: #ec4899; --red-2: #f472b6; --red-dim: #7a1f4f; --deep: #45102c;
  --accent-rgb: 236, 72, 153; --accent2-rgb: 244, 114, 182;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(var(--accent-rgb), 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 20%, rgba(var(--accent2-rgb), 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

a { color: inherit; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #000;
  animation: splash-out 0.6s ease 2.1s forwards;
}
.splash-inner { display: grid; justify-items: center; gap: 0.25rem; }
.splash-small {
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.35em; font-size: 0.85rem;
  opacity: 0; animation: fade-up 0.5s ease 0.15s forwards;
}
.splash-big {
  font-size: clamp(3rem, 12vw, 7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--red);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.8), 0 0 60px rgba(var(--accent-rgb), 0.5);
  animation: flash 1.6s steps(1) 0.2s both;
}
@keyframes flash {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  18%  { opacity: 0.15; }
  26%  { opacity: 1; }
  32%  { opacity: 0.3; }
  38%, 100% { opacity: 1; }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ---------- network particles ---------- */
.net { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 5, 6, 0.7);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700; font-size: 1.2rem; color: var(--red); }
.brand-icon { width: 26px; height: 26px; fill: var(--red); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.7)); }
.chips { display: flex; gap: 0.5rem; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot.live { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.6s ease-in-out infinite; }
.search {
  display: flex; align-items: center; gap: 0.5rem;
  flex: 0 1 340px; min-width: 180px;
  padding: 0.45rem 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.search svg { width: 16px; height: 16px; stroke: var(--red); fill: none; stroke-width: 2.2; flex: none; }
.search input { all: unset; width: 100%; font-size: 0.9rem; color: var(--text); }
.search input::placeholder { color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 4.5rem 1.25rem 3rem;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.8rem); line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 1rem; font-weight: 800;
}
.accent { color: var(--red); text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.6); }
.caret { color: var(--red); font-weight: 400; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-text p { color: var(--muted); font-size: 1.05rem; max-width: 42ch; margin: 0 0 1.75rem; }
.hero-text p b { color: var(--text); }
.hero-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.kbd-hint { color: var(--muted); font-size: 0.85rem; display: inline-block; }
kbd {
  font-family: inherit; font-size: 0.75rem; font-weight: 600;
  padding: 0.15rem 0.45rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--card);
  color: var(--text);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 0.75rem 1.4rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(180deg, var(--red-2), var(--red)); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.7); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--red-dim); }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.82rem; border-radius: 8px; }

/* ---------- spotlight ---------- */
.spotlight {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.spot-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  margin-bottom: 1rem;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.spot-card { min-height: 190px; display: grid; align-content: center; }
.spot-card.flash { animation: card-flash 0.55s ease; }
@keyframes card-flash {
  0%   { opacity: 0; filter: brightness(2.2); transform: scale(0.98); }
  40%  { opacity: 1; filter: brightness(1.6); }
  100% { opacity: 1; filter: none; transform: none; }
}
.spot-empty { color: var(--muted); text-align: center; }
.spot-name { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.15rem; word-break: break-word; }
.spot-url { color: var(--muted); font-size: 0.85rem; word-break: break-all; margin-bottom: 1rem; }
.spot-dots { display: flex; gap: 6px; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.spot-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--border); cursor: pointer; }
.spot-dots button.on { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- vote bits (shared) ---------- */
.meter { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 0.6rem 0 0.4rem; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--danger), var(--green)); transition: width 0.4s; }
.stats { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 6px; border: 1px solid; white-space: nowrap;
}
.badge.good { color: var(--green); border-color: rgba(61, 220, 132, 0.35); background: rgba(61, 220, 132, 0.08); }
.badge.bad { color: var(--danger); border-color: rgba(var(--danger-rgb), 0.35); background: rgba(var(--danger-rgb), 0.08); }
.badge.new { color: var(--muted); border-color: var(--border); }
.vote-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.85rem; }
.vote {
  flex: 1; min-width: 0;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}
.vote.yes:hover, .vote.yes.picked { border-color: var(--green); background: rgba(61, 220, 132, 0.12); color: var(--green); }
.vote.no:hover, .vote.no.picked { border-color: var(--danger); background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.vote:disabled { cursor: default; opacity: 0.55; }
.vote.picked { opacity: 1; }

/* ---------- grid ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: fade-up 0.35s ease both;
}
.card:hover { transform: translateY(-3px); border-color: var(--red-dim); box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.12); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.card h3 { margin: 0; font-size: 1.05rem; word-break: break-word; }
.card .url { color: var(--muted); font-size: 0.78rem; word-break: break-all; margin: 0.15rem 0 0; }
.open-link { display: block; margin-top: 0.6rem; text-align: center; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 3rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); }

.center { text-align: center; padding-top: 8rem; }
.center h1 { font-size: 5rem; margin: 0; color: var(--red); text-shadow: var(--glow); }

.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 1rem 5rem; border-top: 1px solid var(--border); }

/* ---------- admin ---------- */
.admin-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.65rem 1rem; border-radius: 12px; cursor: pointer;
  background: rgba(26, 11, 13, 0.9); color: var(--text);
  border: 1px solid var(--red-dim); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.admin-fab svg { width: 16px; height: 16px; stroke: var(--red); fill: none; stroke-width: 2.2; }
.admin-fab:hover { border-color: var(--red); box-shadow: var(--glow); }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 1rem;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: 100%; max-width: 420px; max-height: 90vh; overflow: auto;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border); border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: fade-up 0.25s ease;
}
.modal-box.wide { max-width: 720px; }
.modal-box h3 { margin: 0 0 1rem; font-size: 1.4rem; }
.eyebrow { margin: 0 0 0.25rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.x:hover { border-color: var(--red); }
.form { display: grid; gap: 0.75rem; }
input:not(#search):not([type=checkbox]) {
  font: inherit; font-size: 0.95rem; color: var(--text);
  padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2);
  width: 100%; min-width: 0;
}
input:not(#search):not([type=checkbox]):focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.status { margin: 0; min-height: 1.3em; font-size: 0.85rem; color: var(--muted); }
.status.err { color: var(--danger); }
.status.ok { color: var(--green); }

.add-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 0.6rem; }
.admin-list { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.admin-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2);
}
.admin-row .name { font-weight: 600; word-break: break-word; }
.admin-row .url { color: var(--muted); font-size: 0.78rem; word-break: break-all; }
.admin-row .votes { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.admin-row .votes b.g { color: var(--green); }
.admin-row .votes b.r { color: var(--danger); }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.admin-row.editing { border-color: var(--red-dim); }
.edit-fields { display: grid; gap: 0.5rem; }
.edit-fields input { padding: 0.5rem 0.7rem; font-size: 0.88rem; }
.btn-danger { background: rgba(var(--danger-rgb), 0.12); border-color: rgba(var(--danger-rgb), 0.4); color: var(--danger); }
.btn-danger:hover { background: rgba(var(--danger-rgb), 0.22); }
.dash-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--card-2); border: 1px solid var(--red-dim); color: var(--text);
  padding: 0.65rem 1rem; border-radius: 10px; font-size: 0.88rem; font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; gap: 2rem; }
  .hide-sm { display: none; }
  .search { flex: 1; }
  .add-form { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .admin-row { grid-template-columns: 1fr; }
  .admin-fab { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .splash { animation: splash-out 0.2s ease 0.8s forwards !important; }
}

/* keep long URLs on one line with … instead of wrapping mid-word */
.card-top > div:first-child { min-width: 0; flex: 1; }
.card .url, .spot-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.edit-fields .status:empty { display: none; }


/* ================= announcement banner ================= */
.announce {
  position: relative; z-index: 11;
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.6rem 3rem 0.6rem 1rem;
  background: linear-gradient(90deg, var(--deep), var(--red-dim) 50%, var(--deep));
  border-bottom: 1px solid var(--red);
  color: #fff; font-size: 0.9rem; font-weight: 500; text-align: center;
}
.announce[hidden] { display: none; }
.announce p { margin: 0; word-break: break-word; }
.announce-tag {
  flex: none; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 6px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15);
}
.announce-x {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.announce-x:hover { background: rgba(0, 0, 0, 0.45); }
.announce.preview { position: static; border: 1px solid var(--red); border-radius: 10px; padding: 0.6rem 1rem; justify-content: flex-start; text-align: left; }

.modal-sub { margin: -0.5rem 0 1rem; }
.small { font-size: 0.82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= full-screen admin ================= */
.dash {
  position: fixed; inset: 0; z-index: 70;
  display: grid; grid-template-columns: 240px 1fr;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    var(--bg);
  animation: fade-up 0.25s ease;
}
.dash[hidden] { display: none; }
.dash-side {
  display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.25rem 1rem; border-right: 1px solid var(--border); background: rgba(20, 8, 9, 0.85);
}
.dash-brand small { color: var(--muted); font-weight: 600; font-size: 0.75rem; margin-left: 0.2rem; text-transform: uppercase; letter-spacing: 0.1em; }
.dash-nav { display: grid; gap: 0.3rem; }
.tab {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  font: inherit; font-size: 0.92rem; font-weight: 600; text-align: left;
  padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--card); }
.tab.on { color: var(--text); background: var(--card-2); border-color: var(--red-dim); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.08); }
.badge-count {
  margin-left: auto; min-width: 22px; padding: 0.05rem 0.45rem; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 0.75rem; text-align: center;
}
.badge-count[hidden] { display: none; }
.dash-side-foot { margin-top: auto; display: grid; gap: 0.5rem; }

.dash-main { overflow-y: auto; padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; }
.panel { max-width: 1100px; }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.panel-head h2 { margin: 0; font-size: 1.7rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile {
  display: grid; gap: 0.2rem; padding: 1.1rem 1.2rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.tile-label { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.tile b { font-size: 2.2rem; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--muted); font-size: 0.75rem; }
.tile-hero { border-color: var(--red-dim); background: linear-gradient(180deg, var(--card-2), var(--card)); box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.1); }
.tile-hero b { color: var(--text); text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.45); }
.tile-click { cursor: pointer; transition: border-color 0.2s; }
.tile-click:hover { border-color: var(--red-dim); }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.card-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; min-width: 0; }
.card-box h3 { margin: 0 0 0.75rem; font-size: 1rem; }

/* 7-day bar chart: one series, one color, rounded data-ends on the baseline */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 190px; padding-top: 22px; border-bottom: 1px solid var(--border); }
.bar-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bar { width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--red-dim); transition: height 0.4s ease, background 0.2s; cursor: default; }
.bar-col.today .bar { background: var(--red); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.4); }
.bar-col:hover .bar { background: var(--red-2); }
.bar-val { position: absolute; left: 0; right: 0; text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--text); transform: translateY(-1.3em); }
.bar-tip {
  position: absolute; left: 50%; transform: translate(-50%, -110%); top: 0; white-space: nowrap; pointer-events: none;
  background: var(--card-2); border: 1px solid var(--red-dim); padding: 0.3rem 0.55rem; border-radius: 8px; font-size: 0.75rem;
  opacity: 0; transition: opacity 0.12s;
}
.bar-col:hover .bar-tip { opacity: 1; }
.bar-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 0.4rem; }
.bar-labels span { text-align: center; font-size: 0.75rem; color: var(--muted); }
.bar-labels span.today { color: var(--text); font-weight: 700; }

.attn { display: grid; gap: 0.5rem; }
.attn-row { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.attn-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.9rem; }
.attn-empty { color: var(--muted); font-size: 0.88rem; padding: 0.75rem 0; }

.admin-search { margin: 0.5rem 0 1rem; }
.dash .add-form { max-width: none; }
.sug-note { color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; font-style: italic; word-break: break-word; }
.sug-meta { color: var(--muted); font-size: 0.75rem; margin-top: 0.2rem; }
.admin-row .url a { color: var(--muted); }
.admin-row .url a:hover { color: var(--text); }
.btn-ok { background: rgba(61, 220, 132, 0.12); border-color: rgba(61, 220, 132, 0.45); color: var(--green); }
.btn-ok:hover { background: rgba(61, 220, 132, 0.22); }

.ann-form { display: grid; gap: 0.9rem; max-width: 720px; }
.ann-form textarea {
  font: inherit; font-size: 0.95rem; color: var(--text); resize: vertical;
  padding: 0.8rem 0.9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2);
}
.ann-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.ann-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ann-form p.muted.small { margin: 0 0 -0.4rem; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; cursor: pointer; user-select: none; }
.switch input { position: absolute; left: 0; top: 0; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.slider { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--border); transition: background 0.2s; flex: none; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .slider { background: var(--red); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--red-2); outline-offset: 2px; }

@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .dash-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.75rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .dash-brand { display: none; }
  .dash-nav { display: flex; gap: 0.3rem; overflow-x: auto; flex: 1 1 100%; }
  .tab { width: auto; flex: none; padding: 0.55rem 0.7rem; font-size: 0.85rem; }
  .dash-side-foot { margin: 0; display: flex; gap: 0.4rem; flex: 1 1 100%; justify-content: space-between; }
  .dash-main { padding: 1.25rem 1rem 3rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .announce { font-size: 0.82rem; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .tab span { display: none; }
  .tab[data-tab="suggestions"] span:not(.badge-count) { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile-hero { grid-column: 1 / -1; }
}
.toast { z-index: 80; }
/* keep chart tooltips inside the card at the edges */
.bar-col:nth-child(-n+2) .bar-tip { left: 0; transform: translateY(-110%); }
.bar-col:nth-last-child(-n+2) .bar-tip { left: auto; right: 0; transform: translateY(-110%); }
.dash-main { overflow-x: hidden; }


/* ================= settings popover (theme / lite / install) ================= */
.settings-wrap { position: relative; }
.chip-btn { cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text); }
.chip-btn:hover { border-color: var(--red-dim); }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); animation: fade-up 0.18s ease;
}
.pop[hidden] { display: none; }
.pop h4 { margin: 0 0 0.6rem; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.swatch {
  display: grid; justify-items: center; gap: 0.3rem; padding: 0.5rem 0.2rem; border-radius: 10px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: 0.7rem; font-weight: 600;
}
.swatch i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.swatch.on { border-color: var(--red); color: var(--text); }
.pop .switch { font-size: 0.88rem; }
.pop-note { color: var(--muted); font-size: 0.75rem; margin: 0.35rem 0 0; }
.pop hr { border: 0; border-top: 1px solid var(--border); margin: 0.9rem 0; }
.pop .btn { width: 100%; }

/* ================= lite mode (for slow Chromebooks) ================= */
[data-lite] .net { display: none; }
[data-lite] .topbar, [data-lite] .modal, [data-lite] .admin-fab { backdrop-filter: none; }
[data-lite] .card, [data-lite] .spot-card.flash { animation: none; }
[data-lite] .card:hover { transform: none; }

/* ================= popular ================= */
.sort-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sort-chip {
  font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  padding: 0.35rem 0.75rem; border-radius: 99px; border: 1px solid var(--border); background: var(--card); color: var(--muted);
}
.sort-chip:hover { color: var(--text); }
.sort-chip.on { color: var(--text); border-color: var(--red); background: rgba(var(--accent-rgb), 0.12); }
.hot {
  display: inline-block; margin-left: 0.35rem; vertical-align: middle;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.12rem 0.45rem; border-radius: 6px; color: #ffb347; background: rgba(255, 150, 50, 0.12); border: 1px solid rgba(255, 150, 50, 0.35);
}
.opens { color: var(--muted); font-size: 0.75rem; margin-top: 0.1rem; }
.section-head { flex-wrap: wrap; }

/* ================= activity log ================= */
.act-list { display: grid; gap: 0.4rem; }
.act-day { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0.9rem 0 0.2rem; }
.act-day:first-child { margin-top: 0; }
.act-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.act-row.warn { border-color: rgba(var(--danger-rgb), 0.45); }
.act-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--card-2); border: 1px solid var(--border); font-size: 0.95rem; }
.act-text { min-width: 0; word-break: break-word; font-size: 0.9rem; }
.act-time { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.act-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ================= app install / offline ================= */
.install-btn[hidden], .offline-chip[hidden] { display: none; }
.offline-chip { color: #ffb347; border-color: rgba(255, 150, 50, 0.4); }
@media (display-mode: standalone) { .kbd-hint { display: none; } }


/* ================= admins + bulk add ================= */
.who { color: var(--muted); font-size: 0.75rem; text-align: center; margin: 0.4rem 0 0; }
.bulk { margin: 0.25rem 0 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); padding: 0 0.9rem; }
.bulk summary { cursor: pointer; padding: 0.7rem 0; font-weight: 600; color: var(--red); font-size: 0.9rem; list-style: none; }
.bulk summary::-webkit-details-marker { display: none; }
.bulk[open] { padding-bottom: 0.9rem; }
.bulk textarea {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--text); resize: vertical; line-height: 1.5;
  padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--border); background: var(--card);
}
.bulk textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.bulk code { background: var(--card); border: 1px solid var(--border); border-radius: 5px; padding: 0.05rem 0.3rem; font-size: 0.85em; }

.tab[hidden] { display: none; }


/* ================= link favicons ================= */
.card-id { display: flex; gap: 0.6rem; align-items: flex-start; min-width: 0; flex: 1; }
.card-id-text { min-width: 0; flex: 1; }
.favi {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 8px; margin-top: 0.1rem;
  display: grid; place-items: center; overflow: hidden;
  font-weight: 700; font-size: 1rem; color: #fff;
  background: hsl(var(--h, 0), 55%, 42%); border: 1px solid rgba(255, 255, 255, 0.12);
}
.favi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; opacity: 0; }
.favi.has-img { background: var(--card-2); }
.favi.has-img img { opacity: 1; }
.favi.has-img { color: transparent; }
.spot-card .favi { width: 40px; height: 40px; font-size: 1.15rem; }

.status.warn { color: #ffb347; }

/* ================= milestone confetti ================= */
.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0.7; }
}

/* ================= tab cloak dropdown ================= */
.cloak-select {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--text); cursor: pointer;
  padding: 0.55rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b99a9d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 16px; padding-right: 2rem;
}
.cloak-select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.cloak-select option { background: var(--card); color: var(--text); }

/* ================= splash tip ================= */
.splash-tip { margin-top: 1.5rem; color: var(--muted); font-size: 0.85rem; max-width: 30ch; text-align: center; opacity: 0; animation: fade-up 0.6s ease 1s forwards; }

/* ================= XP chip ================= */
.xp-chip { cursor: help; }
.xp-chip #xp-level { color: var(--red); font-weight: 800; }

/* ================= verified pill ================= */
.vpill {
  display: inline-block; margin-left: 0.4rem; vertical-align: middle;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem; border-radius: 6px;
  color: #4ea1ff; background: rgba(78, 161, 255, 0.12); border: 1px solid rgba(78, 161, 255, 0.4);
}

/* ================= poll (public) ================= */
.poll-card { max-width: 620px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.poll-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.poll-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); padding: 0.2rem 0.5rem; border: 1px solid var(--red-dim); border-radius: 6px; }
.poll-head h3 { margin: 0; font-size: 1.15rem; }
.poll-opts { display: grid; gap: 0.6rem; }
.poll-opt {
  font: inherit; font-size: 0.95rem; font-weight: 600; text-align: left; cursor: pointer;
  padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.poll-opt:hover { border-color: var(--red); background: rgba(var(--accent-rgb), 0.08); }
.poll-result { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); }
.poll-result.mine { border-color: var(--red); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(var(--accent-rgb), 0.18); transition: width 0.5s ease; z-index: 0; }
.poll-otext, .poll-pct { position: relative; z-index: 1; font-weight: 600; font-size: 0.92rem; }
.poll-pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-check { color: var(--red); }
.poll-total { margin: 0.9rem 0 0; }

/* poll admin */
.poll-opt-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.poll-opt-input { flex: 1; }
#poll-opts { margin: 0.2rem 0; }

/* ================= themed cursor ================= */
[data-cursor], [data-cursor] * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5' fill='%23ff2d3d'/%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23ff2d3d' stroke-width='1.5' opacity='0.5'/%3E%3C/svg%3E") 12 12, auto;
}
[data-cursor] a, [data-cursor] button, [data-cursor] .poll-opt, [data-cursor] input, [data-cursor] select, [data-cursor] textarea {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='%23ff5a3c'/%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23ff5a3c' stroke-width='2'/%3E%3C/svg%3E") 13 13, pointer;
}

/* ================= maintenance screen ================= */
.maint {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(800px 500px at 50% 0%, rgba(var(--accent-rgb), 0.15), transparent 60%),
    var(--bg);
}
.maint[hidden] { display: none; }
.maint-box { text-align: center; max-width: 30rem; display: grid; justify-items: center; gap: 0.75rem; }
.maint-icon { width: 64px; height: 64px; fill: var(--red); filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.6)); }
.maint-box h1 { margin: 0.5rem 0 0; font-size: clamp(2rem, 7vw, 3rem); }
.maint-box p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.maint-box .btn { margin-top: 1rem; opacity: 0.6; }
.maint-box .btn:hover { opacity: 1; }

/* keep login/dash modals above the maintenance screen so admins can get in */
.modal { z-index: 210; }
.toast { z-index: 220; }

/* ================= emergency screen (deliberately plain / low-key) ================= */
.emerg {
  position: fixed; inset: 0; z-index: 205;
  display: grid; place-items: center; padding: 1.5rem;
  background: #0a0a0a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.emerg[hidden] { display: none; }
.emerg-box { text-align: center; max-width: 30rem; }
.emerg-box p { color: #9aa0a6; font-size: 1.05rem; margin: 0; }
.emerg-dot { margin-top: 2rem; background: none; border: 0; color: #2a2a2a; font-size: 1.5rem; line-height: 1; cursor: default; padding: 0.5rem 1rem; }
.emerg-dot:hover { color: #3a3a3a; }

/* ================= customizable screen bits (maintenance + emergency) ================= */
.screen-logo { max-width: 160px; max-height: 120px; width: auto; object-fit: contain; margin: 0 auto 0.4rem; display: block; }
.screen-logo[hidden] { display: none; }
.screen-title { margin: 0.4rem 0 0; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.1; }
.screen-title[hidden] { display: none; }
.screen-sub { margin: 0.5rem 0 0; font-size: 0.92rem; opacity: 0.82; }
.screen-sub[hidden] { display: none; }
.emerg-box { display: grid; justify-items: center; gap: 0.4rem; }

/* settings: the logo/color row */
.screen-custom { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.screen-custom > label { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 100%; }
.screen-custom .color-pick, .screen-custom .file-pick {
  flex: 0 0 auto; flex-direction: row; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.55rem; background: var(--card); cursor: pointer;
}
.screen-custom input[type="color"] { width: 28px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; }
.screen-custom .file-pick { color: var(--text); }

/* ================= compact mode (per-visitor, tighter layout) ================= */
:root[data-compact] body { font-size: 0.92rem; }
:root[data-compact] .wrap, :root[data-compact] main { padding-top: 0.6rem; }
:root[data-compact] .hero { padding: 1rem 0; }
:root[data-compact] .hero-text p { margin-bottom: 0.9rem; }
:root[data-compact] .grid { gap: 0.6rem; }
:root[data-compact] .card { padding: 0.7rem 0.85rem; }
:root[data-compact] .spotlight { padding: 1.1rem; }
:root[data-compact] section { margin: 1rem 0; }
:root[data-compact] .card h3 { font-size: 0.98rem; }

/* ================= welcome tour ================= */
.tour-backdrop { position: fixed; inset: 0; z-index: 230; background: rgba(0,0,0,0.62); backdrop-filter: blur(1px); }
.tour-ring {
  position: fixed; border: 2px solid rgba(var(--accent-rgb), 0.95); border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.28), 0 0 26px rgba(var(--accent-rgb), 0.5);
  pointer-events: none; transition: all 0.25s ease;
}
.tour-ring[hidden] { display: none; }
.tour-card {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: min(26rem, calc(100vw - 32px)); background: var(--card-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.1rem 1.25rem; box-shadow: 0 16px 50px rgba(0,0,0,0.5);
}
.tour-card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.tour-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: 0.75rem; }
.tour-dots { display: flex; gap: 6px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-dot.on { background: rgb(var(--accent-rgb)); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8); }
.tour-btns { display: flex; gap: 0.4rem; }

/* ================= categories, favorites, surprise ================= */
.cat-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.cat-chips:empty { display: none; }
.cat-chip {
  padding: 0.3rem 0.7rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--muted); font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.cat-chip:hover { color: var(--text); border-color: var(--red-dim); }
.cat-chip.on { background: rgba(var(--accent-rgb), 0.16); color: var(--text); border-color: rgb(var(--accent-rgb)); }
.cat-chip.fav.on { background: rgba(255, 196, 0, 0.16); border-color: #f5c242; color: #ffe08a; }
.cat-badge {
  display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.7rem; vertical-align: middle; letter-spacing: 0.02em;
}
.card-top-right { display: flex; align-items: center; gap: 0.4rem; }
.fav-btn {
  background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1;
  color: var(--muted); padding: 0.1rem 0.2rem; transition: transform 0.12s, color 0.15s;
}
.fav-btn:hover { transform: scale(1.2); color: #f5c242; }
.fav-btn.on { color: #f5c242; text-shadow: 0 0 12px rgba(245, 194, 66, 0.7); }

/* ================= analytics panel ================= */
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.6rem; margin-bottom: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 0.9rem; text-align: center; }
.kpi-num { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.kpi-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.an-chart { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.an-chart.an-wide { grid-column: 1 / -1; }
.an-chart h3 { margin: 0 0 0.85rem; font-size: 0.98rem; }
.an-body { min-height: 40px; }
.an-empty { color: var(--muted); font-size: 0.9rem; padding: 0.6rem 0; }

/* horizontal bars (top links) */
.bar-row { display: grid; grid-template-columns: 9rem 1fr 2.5rem; align-items: center; gap: 0.6rem; margin: 0.4rem 0; }
.bar-label { font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--card-2); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.65), rgb(var(--accent-rgb))); }
.bar-val { font-size: 0.82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* vertical bars (visitors) */
.vbars { display: flex; align-items: flex-end; gap: 0.5rem; height: 150px; padding-top: 0.5rem; }
.vbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.vbar-num { font-size: 0.72rem; color: var(--muted); height: 1rem; font-variant-numeric: tabular-nums; }
.vbar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.vbar { width: 70%; max-width: 32px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, rgb(var(--accent-rgb)), rgba(var(--accent-rgb), 0.45)); transition: height 0.3s; }
.vbar-x { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; }

/* works-vs-broken ratio bar (status colors + direct labels + 2px gap) */
.ratio-bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: var(--card-2); gap: 2px; }
.ratio-good { background: #22c55e; }
.ratio-bad { background: #ef4444; }
.ratio-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.6rem; font-size: 0.85rem; }
.ratio-legend .leg.good { color: #4ade80; }
.ratio-legend .leg.bad { color: #f87171; }

/* ================= "you" tag in activity + device info ================= */
.you-chip {
  display: inline-block; margin-left: 0.4rem; padding: 0.02rem 0.4rem; border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.2); border: 1px solid rgb(var(--accent-rgb));
  color: var(--text); font-size: 0.68rem; font-weight: 700; vertical-align: middle; letter-spacing: 0.03em;
}

/* ================= keyboard shortcuts cheat sheet ================= */
.kbd-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.kbd-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.kbd-list li:last-child { border-bottom: 0; }
.kbd-list li > span { flex: 0 0 5.5rem; display: flex; gap: 0.25rem; }
.kbd-list kbd {
  padding: 0.12rem 0.45rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px;
  background: var(--card); font-size: 0.82rem; font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ================= data saver (strip effects for speed / low data) ================= */
:root[data-saver] body { background: var(--bg) !important; }
:root[data-saver] .net, :root[data-saver] .confetti { display: none !important; }
:root[data-saver] * { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }
:root[data-saver] .card:hover { transform: none; }
:root[data-saver] .spotlight, :root[data-saver] .card { background-image: none !important; }
:root[data-saver] .btn-primary { background: rgb(var(--accent-rgb)) !important; color: #fff; }
:root[data-saver] .bar-fill, :root[data-saver] .vbar { background: rgb(var(--accent-rgb)) !important; }

/* ================= readable mode (big text + high contrast) ================= */
:root[data-readable] body { font-size: 1.12rem; }
:root[data-readable] { --muted: #e8e8ec; --border: #6b6b78; }
:root[data-readable] .card, :root[data-readable] .kpi, :root[data-readable] .an-chart,
:root[data-readable] .chip, :root[data-readable] .cat-chip { border-width: 2px; }
:root[data-readable] .url, :root[data-readable] .muted, :root[data-readable] .pop-note { color: #e8e8ec !important; }
:root[data-readable] h1, :root[data-readable] h2, :root[data-readable] h3 { letter-spacing: 0; }


/* ================= other addresses / mirrors ================= */
.mirror-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.6rem; }
.mirror-card { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; transition: border-color 0.15s, transform 0.12s; }
.mirror-card:hover { border-color: var(--red-dim); transform: translateY(-2px); }
.mirror-open { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.85rem; min-width: 0; text-decoration: none; }
.mirror-label { color: var(--text); font-weight: 650; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mirror-url { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mirror-copy { flex: 0 0 auto; width: 2.6rem; border: 0; border-left: 1px solid var(--border); background: var(--card-2); color: var(--muted); font-size: 1.05rem; cursor: pointer; transition: color 0.15s, background 0.15s; }
.mirror-copy:hover { color: var(--text); background: rgba(var(--accent-rgb), 0.14); }
:root[data-saver] .mirror-card:hover { transform: none; }
