/* ──────────────────────────────────────────────────────────────
   BloxCord design system — "Bauklotz-Scoreboard"
   Baseplate background, chunky bricks with a hard bottom edge,
   playtime shown as stacked bricks (one brick = one hour).
   ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&display=swap');

:root {
  /* base */
  --plate: #E9EAF5;
  --plate-stud: #DCDEEF;
  --panel: #FFFFFF;
  --panel-2: #F3F3FB;
  --ink: #1A1640;
  --ink-2: #4C4874;
  --ink-3: #726E96;
  --line: #CFCDE6;
  --line-strong: #1A1640;

  /* brick colours — taken from the BloxCord cube logo */
  --blue:   #4363F2;  --blue-d:   #2A3DB8;  --blue-t:   #E0E5FD;
  --violet: #8D4DF6;  --violet-d: #5E28C2;  --violet-t: #EDE3FE;
  --lav:    #C9C3FF;
  /* status / rank colours */
  --yellow: #FFC72C;  --yellow-d: #C99400;  --yellow-t: #FFF3CC;
  --red:    #E5442F;  --red-d:    #A82E1E;  --red-t:    #FBE0DB;
  --green:  #23A55A;  --green-d:  #167A40;  --green-t:  #D7F2E2;

  /* theme-switchable accent (set by global-settings.js) */
  --accent: var(--blue);
  --accent-d: var(--blue-d);
  --accent-t: var(--blue-t);
  --on-accent: #FFFFFF;

  /* type */
  --font: 'Bricolage Grotesque', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-md: 1.0625rem;   /* 17 */
  --fs-lg: 1.3125rem;   /* 21 */
  --fs-xl: 1.625rem;    /* 26 */
  --fs-2xl: 2.125rem;   /* 34 */
  --fs-3xl: clamp(2.5rem, 5vw, 3.5rem);
  --fs-hero: clamp(2.75rem, 7.2vw, 5.75rem);

  /* shape */
  --r-brick: 6px;
  --r-panel: 14px;
  --r-pill: 999px;
  --lift: 4px;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* Night baseplate */
:root[data-mode="dark"] {
  --plate: #13103A;
  --plate-stud: #1B1748;
  --panel: #1F1B52;
  --panel-2: #28235F;
  --ink: #F1EFFF;
  --ink-2: #BDB8E6;
  --ink-3: #9590C2;
  --line: #3A347A;
  --line-strong: #07051C;
  --blue-t: #27306E; --violet-t: #34226B; --yellow-t: #4A3D12; --red-t: #4E2420; --green-t: #173F2A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--plate);
  background-image: radial-gradient(circle at 12px 12px, var(--plate-stud) 0 5px, transparent 5.5px);
  background-size: 24px 24px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-d); }
button, input, select, textarea { font: inherit; color: inherit; }
.num, [data-num] { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.page { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.page--narrow { max-width: 820px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  border-bottom: 3px solid var(--line-strong);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0.7rem var(--gutter);
  display: flex; align-items: center; gap: 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; flex: none; }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  padding: 0.45rem 0.75rem; border-radius: var(--r-brick);
}
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a[aria-current="page"] { color: #fff; background: var(--blue); box-shadow: inset 0 -3px 0 var(--blue-d); }
.site-header .nav-toggle { display: none; margin-left: auto; }
.header-user { display: flex; align-items: center; gap: 0.6rem; }
.header-user img { width: 34px; height: 34px; border-radius: var(--r-brick); border: 2px solid var(--line-strong); }

.mode-toggle { padding: 0.35rem; min-height: 36px; width: 38px; flex: none; }
.site-header .nav-toggle + .nav + .mode-toggle, .nav + .mode-toggle { margin-left: 0.25rem; }
.btn .mode-icon { width: 20px; height: 20px; }
.mode-icon--sun { display: none; }
:root[data-mode="dark"] .mode-icon--sun { display: block; }
:root[data-mode="dark"] .mode-icon--moon { display: none; }
:root[data-mode="dark"] .site-header { border-bottom-color: #07051C; }
:root[data-mode="dark"] .brand span { color: var(--ink); }

@media (max-width: 860px) {
  .site-header .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel); border-bottom: 3px solid var(--line-strong); padding: 0.5rem var(--gutter) 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0.5rem; font-size: var(--fs-md); }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto; background: #17124A; color: #C9C3FF;
  border-top: 6px solid var(--violet);
  font-size: var(--fs-sm);
}
:root[data-mode="dark"] .site-footer { background: #0B0926; }
.footer-wordmark { height: 44px; width: auto; display: block; }
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 2rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { color: var(--lav); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-meta { color: #A39DDA; display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }

/* ── Bricks: buttons ────────────────────────────────────────── */
.btn {
  --b: var(--panel); --b-d: var(--line-strong); --b-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.7rem 1.25rem; min-height: 44px;
  font-weight: 700; font-size: var(--fs-md); line-height: 1.1;
  color: var(--b-ink); background: var(--b);
  border: 2px solid var(--line-strong); border-radius: var(--r-brick);
  box-shadow: 0 var(--lift) 0 var(--b-d);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, box-shadow .08s ease, filter .12s ease;
}
.btn:hover { color: var(--b-ink); filter: brightness(1.04); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--b-d); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { --b: var(--accent); --b-d: var(--accent-d); --b-ink: var(--on-accent); }
.btn--yellow  { --b: var(--yellow); --b-d: var(--yellow-d); --b-ink: #17203A; }
.btn--blue    { --b: var(--blue);   --b-d: var(--blue-d);   --b-ink: #fff; }
.btn--violet  { --b: var(--violet); --b-d: var(--violet-d); --b-ink: #fff; }
.btn--red, .btn--danger { --b: var(--red); --b-d: var(--red-d); --b-ink: #fff; }
.btn--green   { --b: var(--green);  --b-d: var(--green-d);  --b-ink: #fff; }
.btn--discord { --b: #5865F2; --b-d: #3B45B8; --b-ink: #fff; }
.btn--ghost   { --b: transparent; box-shadow: none; border-color: var(--line); }
.btn--ghost:active { transform: none; }
.btn--sm { padding: 0.4rem 0.8rem; min-height: 34px; font-size: var(--fs-sm); --lift: 3px; }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--fs-lg); --lift: 5px; }
.btn--block { width: 100%; }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn .spinner { display: none; }
.btn.loading { pointer-events: none; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { opacity: .7; }

.spinner {
  width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 3px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Panels ─────────────────────────────────────────────────── */
.panel {
  background: var(--panel); color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--r-panel);
  box-shadow: 0 6px 0 var(--line-strong);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}
.panel--flat { box-shadow: none; border-color: var(--line); }
.panel--tint { background: var(--panel-2); box-shadow: none; border-color: var(--line); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel__title { font-size: var(--fs-lg); font-weight: 800; }
.panel__sub { color: var(--ink-2); font-size: var(--fs-sm); }

/* stud strip on top of a panel: purely decorative, marks "headline" panels */
.studs { position: relative; }
.studs::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -9px; height: 9px;
  background: radial-gradient(ellipse 9px 7px at 50% 100%, var(--stud, var(--blue)) 98%, transparent) 0 0 / 30px 9px repeat-x;
  pointer-events: none;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1.75rem; }
.page-head h1 { font-size: var(--fs-3xl); }
.page-head p { color: var(--ink-2); max-width: 60ch; margin-top: 0.4rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stack > * + * { margin-top: 1rem; }

/* ── Stat tiles ─────────────────────────────────────────────── */
.stat {
  background: var(--panel); border: 2px solid var(--line-strong); border-radius: var(--r-brick);
  box-shadow: 0 4px 0 var(--line-strong);
  padding: 0.9rem 1rem;
}
.stat__value { font-size: var(--fs-2xl); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat__label { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 0.35rem; }
.stat--yellow { background: var(--yellow); color: #17203A; }
.stat--yellow .stat__label { color: #4A3A00; }
.stat--blue { background: var(--blue); color: #fff; }
.stat--blue .stat__label { color: #DCE3FF; }
.stat--violet { background: var(--violet); color: #fff; }
.stat--violet .stat__label { color: #EDE3FE; }

/* ── Forms ──────────────────────────────────────────────────── */
.field { display: grid; gap: 0.35rem; }
.field label, .label { font-weight: 700; font-size: var(--fs-sm); }
.hint { color: var(--ink-3); font-size: var(--fs-xs); }
.input, input[type="text"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.8rem;
  background: var(--panel); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-brick);
  transition: border-color .12s ease;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.input:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-t); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* toggle switch (global-settings.js toggles `.active`) */
.toggle-switch {
  position: relative; flex: none; width: 52px; height: 30px; padding: 0;
  background: var(--line); border: 2px solid var(--line-strong); border-radius: var(--r-brick);
  cursor: pointer; transition: background .15s ease;
}
.toggle-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: var(--panel); border: 2px solid var(--line-strong); border-radius: 4px;
  transition: transform .15s ease; pointer-events: none;
}
.toggle-switch.active { background: var(--green); }
.toggle-switch.active::after { transform: translateX(22px); }

/* ── Lists / rows ───────────────────────────────────────────── */
.rows { display: grid; gap: 0.5rem; }
.row {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.85rem; background: var(--panel);
  border: 2px solid var(--line); border-radius: var(--r-brick);
}
.row:hover { border-color: var(--ink-3); }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { color: var(--ink-2); font-size: var(--fs-sm); }
.avatar { width: 42px; height: 42px; border-radius: var(--r-brick); object-fit: cover; background: var(--panel-2); border: 2px solid var(--line-strong); flex: none; }
.avatar--lg { width: 72px; height: 72px; }

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.15rem 0.55rem; border-radius: 4px;
  font-size: var(--fs-xs); font-weight: 700;
  background: var(--panel-2); color: var(--ink-2); border: 1.5px solid var(--line);
}
.badge--live { background: var(--green-t); color: var(--green-d); border-color: var(--green); }
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--green); animation: blink 1.4s steps(2, start) infinite; }
.badge--yellow { background: var(--yellow-t); color: #6A4E00; border-color: var(--yellow-d); }
.badge--red { background: var(--red-t); color: var(--red-d); border-color: var(--red); }
.badge--blue { background: var(--blue-t); color: var(--blue-d); border-color: var(--blue); }
.badge--violet { background: var(--violet-t); color: var(--violet-d); border-color: var(--violet); }
:root[data-mode="dark"] .badge--yellow { color: var(--yellow); }
:root[data-mode="dark"] .badge--red { color: #FF9C8F; }
:root[data-mode="dark"] .badge--blue { color: #A9C1FF; }
:root[data-mode="dark"] .badge--live { color: #7BE3A6; }
@keyframes blink { to { visibility: hidden; } }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tab {
  padding: 0.5rem 0.95rem; font-weight: 700; font-size: var(--fs-sm);
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--r-brick);
  cursor: pointer; color: var(--ink-2);
}
.tab:hover { color: var(--ink); border-color: var(--ink-3); }
.tab.active, .tab[aria-selected="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }

/* ── Tables ─────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 700; color: var(--ink-2); padding: 0.55rem 0.7rem; border-bottom: 2px solid var(--line-strong); }
.table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }

/* ── Notices / toasts / modal ───────────────────────────────── */
.notice {
  padding: 0.8rem 1rem; border-radius: var(--r-brick); border: 2px solid var(--line);
  background: var(--panel-2); font-size: var(--fs-sm);
}
.notice--error { background: var(--red-t); border-color: var(--red); color: var(--red-d); }
.notice--ok, .notice--success { background: var(--green-t); border-color: var(--green); color: var(--green-d); }
.notice--info { background: var(--blue-t); border-color: var(--blue); color: var(--blue-d); }
:root[data-mode="dark"] .notice--error { color: #FFB3A8; }
:root[data-mode="dark"] .notice--ok, :root[data-mode="dark"] .notice--success { color: #9BE8BC; }
:root[data-mode="dark"] .notice--info { color: #BFD0FF; }

.toast-host { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: grid; gap: 0.5rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast {
  padding: 0.8rem 1rem; background: var(--ink); color: #fff; font-weight: 600; font-size: var(--fs-sm);
  border-radius: var(--r-brick); box-shadow: 0 4px 0 #000;
  border-left: 8px solid var(--blue);
  animation: toast-in .18s ease-out;
}
.toast--error { border-left-color: var(--red); }
.toast--success { border-left-color: var(--green); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.modal-backdrop, .modal-overlay {
  position: fixed; inset: 0; z-index: 150; display: none;
  background: rgba(15, 20, 40, .55);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.active, .modal-backdrop.open, .modal-overlay.active, .modal-overlay.open, .modal-overlay.show { display: flex; }
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 2rem); overflow: auto;
  background: var(--panel); color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--r-panel);
  box-shadow: 0 8px 0 var(--line-strong);
  padding: 1.5rem;
}
.modal h2, .modal h3 { font-size: var(--fs-xl); margin-bottom: 0.75rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.25rem; flex-wrap: wrap; }

.empty {
  text-align: center; padding: 2.25rem 1rem; color: var(--ink-2);
  border: 2px dashed var(--line); border-radius: var(--r-panel);
}
.empty strong { display: block; color: var(--ink); font-size: var(--fs-lg); margin-bottom: 0.3rem; }

/* ── Brick tower (playtime as bricks) ───────────────────────── */
.brick {
  --c: var(--blue); --cd: var(--blue-d);
  position: relative; display: block;
  height: 22px; border-radius: 4px;
  background: var(--c); border: 2px solid var(--line-strong);
  box-shadow: inset 0 -4px 0 var(--cd);
}
.brick::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: -8px; height: 8px;
  background: radial-gradient(circle at 50% 100%, var(--c) 0 5px, var(--line-strong) 5.5px 7px, transparent 7.5px) 0 0 / 26px 8px repeat-x;
}
.brick--blue { --c: var(--blue); --cd: var(--blue-d); }
.brick--violet { --c: var(--violet); --cd: var(--violet-d); }
.brick--lav { --c: var(--lav); --cd: #A79EF5; }
.brick--yellow { --c: var(--yellow); --cd: var(--yellow-d); }
.brick--red { --c: var(--red); --cd: var(--red-d); }
.brick--green { --c: var(--green); --cd: var(--green-d); }
.brick--ghost { --c: transparent; --cd: transparent; border-style: dashed; border-color: var(--line); }
.brick--ghost::before { display: none; }

/* horizontal progress built from bricks */
.brickbar { display: flex; gap: 3px; height: 18px; }
.brickbar > i { flex: 1; border-radius: 3px; background: var(--panel-2); border: 1.5px solid var(--line); }
.brickbar > i.on { background: var(--blue); border-color: var(--line-strong); box-shadow: inset 0 -3px 0 var(--blue-d); }
.brickbar > i.on:nth-child(even) { background: var(--violet); box-shadow: inset 0 -3px 0 var(--violet-d); }

/* rank markers on leaderboard */
.rank {
  display: inline-grid; place-items: center; flex: none;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.35rem;
  font-weight: 800; font-variant-numeric: tabular-nums;
  border-radius: var(--r-brick); background: var(--panel-2); border: 2px solid var(--line);
}
.rank--1 { background: var(--yellow); border-color: var(--line-strong); color: #17203A; }
.rank--2 { background: #DCDEEB; border-color: var(--line-strong); color: #17203A; }
.rank--3 { background: #F2B58A; border-color: var(--line-strong); color: #17203A; }

/* ── Utilities ──────────────────────────────────────────────── */
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 0.75rem; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

/* long-form legal text */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--fs-xl); margin: 2.2rem 0 0.6rem; }
.prose h3 { font-size: var(--fs-lg); margin: 1.6rem 0 0.4rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; color: var(--ink); }
.prose li { margin-bottom: 0.35rem; }

/* density setting */
:root[data-density="compact"] { --fs-md: 0.9688rem; }
:root[data-density="compact"] .page { padding-top: 1.25rem; }
:root[data-density="compact"] .panel { padding: 0.9rem 1rem; }
:root[data-density="compact"] .row { padding: 0.45rem 0.65rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
}

/* ── Playtime components (assets/playtime.js) ───────────────── */
.game-strip { display: flex; height: 22px; gap: 3px; margin-bottom: 1rem; }
.game-strip > span { min-width: 6px; border: 2px solid var(--line-strong); border-radius: 4px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.game-row { display: grid; grid-template-columns: 10px 36px minmax(0, 1fr) auto auto; align-items: center; gap: 0.75rem; padding: 0.45rem 0.25rem; border-bottom: 1px solid var(--line); }
.game-row:last-child { border-bottom: 0; }
.game-swatch { width: 10px; height: 26px; border-radius: 3px; border: 1.5px solid var(--line-strong); }
.game-thumb { width: 36px; height: 36px; border-radius: var(--r-brick); object-fit: cover; background: var(--panel-2); border: 1.5px solid var(--line); }
.game-thumb--blank { background: repeating-linear-gradient(45deg, var(--panel-2) 0 6px, var(--plate-stud) 6px 12px); }
.game-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-pct { color: var(--ink-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.game-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 7.5ch; text-align: right; }

.days { display: grid; grid-template-columns: repeat(var(--cols, 7), 1fr); gap: 0.6rem; align-items: end; }
.day-col { display: grid; justify-items: center; gap: 0.3rem; min-width: 0; }
.day-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 4px; width: 100%; max-width: 54px; min-height: calc(var(--rows, 4) * 18px); }
.day-stack i { display: block; height: 14px; border-radius: 3px; background: var(--blue); border: 1.5px solid var(--line-strong); box-shadow: inset 0 -3px 0 var(--blue-d); }
.day-stack i:nth-child(even) { background: var(--violet); box-shadow: inset 0 -3px 0 var(--violet-d); }
.day-stack i.part { background: linear-gradient(90deg, var(--lav) calc(var(--p) * 100%), transparent 0); border-style: dashed; box-shadow: none; }
.day-val { font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-label { font-size: var(--fs-xs); color: var(--ink-3); }

.session-row { display: grid; grid-template-columns: 6.5rem 7.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0.25rem; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.session-row:last-child { border-bottom: 0; }
.session-day { color: var(--ink-2); }
.session-span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.session-game { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-time { font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .session-row { grid-template-columns: 1fr auto; }
  .session-day, .session-span { grid-column: 1; font-size: var(--fs-xs); }
  .session-game { grid-column: 1; }
  .game-row { grid-template-columns: 10px 32px minmax(0, 1fr) auto; }
  .game-pct { display: none; }
}

.live { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; }
.live__icon { width: 64px; height: 64px; border-radius: var(--r-brick); border: 2px solid var(--line-strong); object-fit: cover; background: var(--panel-2); }
.live__title { font-weight: 800; font-size: var(--fs-lg); }
.live__meta { color: var(--ink-2); font-size: var(--fs-sm); }
.live__clock { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.live--off .live__clock { color: var(--ink-3); }
@media (max-width: 640px) { .live { grid-template-columns: auto 1fr; } .live__clock { grid-column: 1 / -1; } }

/* ── Legacy aliases: older page markup and inline styles ────── */
:root {
  --text: var(--ink); --text-muted: var(--ink-2); --muted: var(--ink-2);
  --neon: var(--blue); --neon2: var(--violet); --neon3: var(--lav);
  --primary: var(--blue); --success: var(--green); --danger: var(--red); --warning: var(--yellow-d);
  --border: var(--line); --card: var(--panel); --bg: var(--plate); --glass: var(--panel);
}
.btn-primary { --b: var(--accent); --b-d: var(--accent-d); --b-ink: #fff; }
.btn-danger { --b: var(--red); --b-d: var(--red-d); --b-ink: #fff; }
.btn-success { --b: var(--green); --b-d: var(--green-d); --b-ink: #fff; }
.btn-outline, .btn-secondary, .btn-muted { --b: var(--panel); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.92em; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 4px; padding: 0.1em 0.4em; }

/* Unknown-game help popup */
.help-modal { max-width: 560px; }
.help-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.5rem; }
.help-head h2 { margin: 0; font-size: var(--fs-xl); }
.help-steps { counter-reset: step; list-style: none; padding: 0; margin: 1.1rem 0 0.75rem; display: grid; gap: 0.6rem; }
.help-steps li { counter-increment: step; position: relative; padding: 0.15rem 0 0.15rem 2.6rem; min-height: 2rem; }
.help-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--blue); border: 2px solid var(--line-strong); border-radius: var(--r-brick); box-shadow: inset 0 -3px 0 var(--blue-d);
}
.help-steps li:nth-child(even)::before { background: var(--violet); box-shadow: inset 0 -3px 0 var(--violet-d); }
.live__fix { margin-top: 0.4rem; }
