/* SC2 Match Tracker — dashboard styles */

:root {
  --bg: #0b1120;
  --bg-deep: #070c17;
  --panel: #111a2e;
  --panel-2: #172239;
  --line: #243352;
  --line-soft: #1b2740;
  --text: #e6edf7;
  --muted: #8ea0c0;
  --accent: #45d5ff;
  --accent-dim: rgba(69, 213, 255, 0.16);
  --win: #35d07f;
  --win-dim: rgba(53, 208, 127, 0.12);
  --loss: #ff5a6e;
  --loss-dim: rgba(255, 90, 110, 0.12);
  --warn: #ffb84d;
  --display: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --radius: 6px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(69, 213, 255, 0.08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(620px 200px at 16% -60%, rgba(69, 213, 255, .12), transparent 70%),
    radial-gradient(520px 180px at 82% -70%, rgba(179, 136, 255, .10), transparent 72%),
    linear-gradient(180deg, rgba(23, 34, 57, 0.9), rgba(11, 17, 32, 0.9));
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
  overflow: hidden;   /* clip the drifting starfield */
}
/* two parallax star layers drifting across the whole nav — including behind the
   (transparent) logo, so no part of the bar reads as empty */
.topbar::before, .topbar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.topbar::before {
  /* far layer: small stars, slow drift */
  background-image:
    radial-gradient(1.3px 1.3px at 16px 12px, rgba(255, 255, 255, .95), transparent 55%),
    radial-gradient(1.3px 1.3px at 44px 44px, rgba(190, 220, 255, .85), transparent 55%),
    radial-gradient(1.3px 1.3px at 72px 24px, rgba(255, 255, 255, .80), transparent 55%),
    radial-gradient(1.3px 1.3px at 100px 58px, rgba(205, 230, 255, .80), transparent 55%),
    radial-gradient(1.3px 1.3px at 128px 16px, rgba(255, 255, 255, .90), transparent 55%),
    radial-gradient(1.3px 1.3px at 156px 48px, rgba(180, 210, 255, .80), transparent 55%),
    radial-gradient(1.3px 1.3px at 184px 30px, rgba(255, 255, 255, .85), transparent 55%),
    radial-gradient(1.3px 1.3px at 212px 62px, rgba(195, 220, 255, .80), transparent 55%),
    radial-gradient(1.3px 1.3px at 240px 20px, rgba(255, 255, 255, .90), transparent 55%),
    radial-gradient(1.3px 1.3px at 268px 50px, rgba(185, 215, 255, .80), transparent 55%),
    radial-gradient(1.3px 1.3px at 296px 34px, rgba(255, 255, 255, .85), transparent 55%),
    radial-gradient(1.3px 1.3px at 322px 10px, rgba(205, 230, 255, .80), transparent 55%);
  background-size: 340px 70px; background-repeat: repeat;
  opacity: .9; animation: stars-far 90s linear infinite;
}
.topbar::after {
  /* near layer: bright stars, faster drift + gentle twinkle + soft glow halo */
  background-image:
    radial-gradient(2px 2px at 40px 22px, rgba(255, 255, 255, 1), transparent 58%),
    radial-gradient(2px 2px at 110px 52px, rgba(140, 225, 255, .95), transparent 58%),
    radial-gradient(2px 2px at 150px 14px, rgba(255, 255, 255, 1), transparent 58%),
    radial-gradient(2px 2px at 210px 40px, rgba(190, 150, 255, .95), transparent 58%),
    radial-gradient(2px 2px at 280px 26px, rgba(255, 255, 255, 1), transparent 58%),
    radial-gradient(2px 2px at 330px 60px, rgba(140, 225, 255, .95), transparent 58%),
    radial-gradient(2px 2px at 400px 32px, rgba(255, 255, 255, 1), transparent 58%),
    radial-gradient(2px 2px at 452px 18px, rgba(190, 150, 255, .90), transparent 58%);
  background-size: 480px 66px; background-repeat: repeat;
  opacity: 1; filter: drop-shadow(0 0 2px rgba(180, 225, 255, .55));
  animation: stars-near 55s linear infinite, stars-twinkle 3.6s ease-in-out infinite;
}
.topbar-inner {
  position: relative; z-index: 1;
  max-width: 1400px; margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
@keyframes stars-far     { from { background-position: 0 0; } to { background-position: -340px 0; } }
@keyframes stars-near    { from { background-position: 0 0; } to { background-position: -480px 0; } }
@keyframes stars-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@media (prefers-reduced-motion: reduce) {
  .topbar::before, .topbar::after { animation: none; }
}
.brand-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 0 18px rgba(69, 213, 255, 0.35);
}
.brand-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.08em;
  color: var(--muted); white-space: nowrap;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live[data-state="live"] { color: var(--win); border-color: rgba(53, 208, 127, 0.4); }
.live[data-state="live"] .live-dot { background: var(--win); box-shadow: 0 0 10px var(--win); }
.live[data-state="polling"] { color: var(--accent); }
.live[data-state="polling"] .live-dot { background: var(--accent); }
.live[data-state="offline"] { color: var(--warn); border-color: rgba(255, 184, 77, 0.4); }
.live[data-state="offline"] .live-dot { background: var(--warn); }

.banner {
  background: rgba(255, 184, 77, 0.12); border-bottom: 1px solid rgba(255, 184, 77, 0.4);
  color: var(--warn); padding: 10px var(--gutter); text-align: center; font-weight: 500;
}
.banner-detail { color: var(--muted); font-size: 13px; margin-left: 8px; }

/* Page */
.page { max-width: 1400px; margin: 0 auto; padding: 22px var(--gutter) 40px; }

/* Player selector */
.player-select { margin-bottom: 18px; }
.player-label {
  display: block; font-family: var(--display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.18em; color: var(--accent); margin-bottom: 6px;
}
.player-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.player-dropdown {
  appearance: none; -webkit-appearance: none;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10'><path d='M1 1l6 6 6-6' fill='none' stroke='%2345d5ff' stroke-width='2'/></svg>") no-repeat right 4px center;
  border: 0; border-bottom: 2px solid var(--line);
  color: var(--text); font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1.1;
  padding: 0 30px 4px 0; cursor: pointer; max-width: 100%;
}
.player-dropdown:hover { border-bottom-color: var(--accent); }
.player-dropdown option { background: var(--panel); color: var(--text); font-size: 16px; }
.player-meta { color: var(--muted); font-size: 14px; }

/* Stat strip: one band, dividers carry the structure */
.stat-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  overflow: hidden;
}
.stat { padding: 16px 18px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat-label { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.stat-value { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value.win { color: var(--win); }
.stat-value.loss { color: var(--loss); }
.stat-value .unit { font-size: 18px; color: var(--muted); margin-left: 2px; }

.detail-strip {
  display: grid; grid-template-columns: repeat(9, auto); gap: 6px 22px;
  padding: 10px 4px 0; margin-bottom: 18px; overflow-x: auto;
}
.detail { display: flex; flex-direction: column; white-space: nowrap; }
.detail-k { color: var(--muted); font-size: 12px; }
.detail-v { font-family: var(--display); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.detail-v .w { color: var(--win); }
.detail-v .l { color: var(--loss); }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  padding: 12px 14px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-custom label { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.filter-custom input {
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; color: var(--text);
  font: inherit; font-size: 13px; padding: 5px 8px; color-scheme: dark;
}
.chip {
  background: transparent; border: 1px solid var(--line); border-radius: 4px;
  padding: 5px 11px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.06em;
  color: var(--muted); cursor: pointer; transition: background 120ms, color 120ms, border-color 120ms;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.chip-win.is-active { background: var(--win-dim); border-color: var(--win); color: var(--win); }
.chip-loss.is-active { background: var(--loss-dim); border-color: var(--loss); color: var(--loss); }
.chip-apply { color: var(--text); }

/* Panels */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  margin-bottom: 18px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px 6px;
}
.panel-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: 0.04em; }
.panel-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.zoom-group { display: flex; gap: 4px; }
.chart { width: 100%; }
.chart-main { height: 460px; }
.chart-secondary { height: 300px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-grid .panel { margin-bottom: 18px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Crosshair panel (ECharts tooltip content) */
.xh { font-family: var(--body); font-size: 13px; min-width: 210px; color: var(--text); }
.xh-head { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.xh-head.win { color: var(--win); }
.xh-head.loss { color: var(--loss); }
.xh-row { display: flex; justify-content: space-between; gap: 16px; line-height: 1.55; }
.xh-row span:first-child { color: var(--muted); }
.xh-row b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Table */
.table-wrap { overflow-x: auto; }
.matches { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matches th {
  text-align: left; font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em;
  color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.matches td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.matches tr.win td:first-child { box-shadow: inset 3px 0 0 var(--win); }
.matches tr.loss td:first-child { box-shadow: inset 3px 0 0 var(--loss); }
.matches tr.win { background: var(--win-dim); }
.matches tr.loss { background: var(--loss-dim); }
.matches tr:hover td { background: rgba(255, 255, 255, 0.03); }
.result-tag { font-family: var(--display); font-weight: 700; letter-spacing: 0.1em; }
.result-tag.win { color: var(--win); }
.result-tag.loss { color: var(--loss); }
.result-tag.uncounted { color: var(--muted); }
.result-tag.uncounted s { text-decoration: none; font-family: var(--body); font-weight: 500; letter-spacing: 0; font-size: 11px; margin: 0 4px 0 2px; padding: 0 5px; border: 1px dashed var(--line); border-radius: 3px; }
.td-muted { color: var(--muted); }
.table-foot { padding: 12px 14px; }

.foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; padding-top: 6px; }
.foot-link { color: var(--muted); }

/* Admin page */
.admin { max-width: 960px; margin: 0 auto; padding: 24px var(--gutter) 40px; }
.admin h1 { font-family: var(--display); letter-spacing: 0.1em; font-size: 24px; margin: 0 0 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 12px 14px; }
.admin-card .k { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; font-family: var(--display); }
.admin-card .v { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 2px; word-break: break-word; }
.admin-card .v.ok { color: var(--win); }
.admin-card .v.bad { color: var(--loss); }
.admin-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
  background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent);
  border-radius: 4px; padding: 8px 16px; font-family: var(--display); font-weight: 700; letter-spacing: 0.1em; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.login { max-width: 360px; margin: 80px auto; }
.login input[type=password] { width: 100%; padding: 10px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; color: var(--text); font: inherit; margin: 8px 0 12px; }
.error-box { border: 1px solid rgba(255, 90, 110, 0.5); background: var(--loss-dim); color: var(--loss); padding: 10px 12px; border-radius: 4px; margin-bottom: 14px; }
.runs { width: 100%; border-collapse: collapse; font-size: 13px; }
.runs th, .runs td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.runs th { color: var(--muted); font-family: var(--display); letter-spacing: 0.1em; font-weight: 600; }
.runs td.err { white-space: normal; color: var(--loss); }
.runs .ok { color: var(--win); } .runs .error { color: var(--loss); } .runs .running { color: var(--warn); }

/* Responsive */
@media (max-width: 1100px) {
  .panel-grid { grid-template-columns: 1fr; }
  .detail-strip { grid-template-columns: repeat(5, auto); }
}
@media (max-width: 760px) {
  :root { --gutter: 12px; }
  .brand-title { font-size: 20px; }
  .brand-sub { display: none; }
  .player-dropdown { font-size: 28px; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 12px 12px; }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(4), .stat:nth-child(5) { border-top: 1px solid var(--line-soft); }
  .stat-value { font-size: 28px; }
  .detail-strip { grid-template-columns: repeat(3, auto); }
  .chart-main { height: 360px; }
  .chart-secondary { height: 260px; }
  .filters { gap: 8px 14px; }
  .filter-custom { width: 100%; }
  .filter-custom label { flex: 1 1 140px; }
  .filter-custom input { width: 100%; }
  .matches th, .matches td { padding: 8px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .chip { transition: none; }
}

/* Admin settings form */
.admin details.admin-card > summary { list-style: revert; }
.admin form label { display: block; font-size: 13px; color: var(--muted); margin: 0; }
.admin form label input, .admin form label select, .admin form label textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  background: #070c17; border: 1px solid var(--line); border-radius: 5px;
  color: var(--text); font: inherit; color-scheme: dark;
}
.admin form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.admin form label.check input { width: auto; margin-top: 0; }
.admin form textarea { resize: vertical; font-family: inherit; }

/* Leaderboard (index) */
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lb-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: .14em; line-height: 1; color: var(--text); text-shadow: 0 0 18px rgba(69,213,255,.25); }
.lb-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.lb-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-search { padding: 7px 11px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 5px; color: var(--text); font: inherit; font-size: 14px; min-width: 200px; color-scheme: dark; }
.lb-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.lb-min { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.lb-min input { width: 64px; padding: 6px 8px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; color: var(--text); font: inherit; color-scheme: dark; }

.leaderboard .col-rank { width: 44px; text-align: right; font-family: var(--display); font-weight: 700; color: var(--muted); }
.leaderboard td.col-rank.rank-1 { color: #ffd166; text-shadow: 0 0 10px rgba(255,209,102,.5); }
.leaderboard td.col-rank.rank-2 { color: #cfd8e3; }
.leaderboard td.col-rank.rank-3 { color: #d9a066; }
.leaderboard .lb-row { cursor: pointer; }
.leaderboard .lb-row:hover td { background: rgba(69,213,255,.06); }
.leaderboard .lb-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.leaderboard .lb-name a { color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.leaderboard .lb-name a:hover { color: var(--accent); }
.leaderboard td.win { color: var(--win); font-weight: 600; }
.leaderboard td.loss { color: var(--loss); font-weight: 600; }
.lb-wr { display: inline-block; min-width: 54px; font-variant-numeric: tabular-nums; font-weight: 600; }
.lb-bar { display: inline-block; vertical-align: middle; width: 90px; height: 6px; margin-left: 8px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.lb-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--loss), var(--win)); border-radius: 3px; }
.back-link { color: var(--accent); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .lb-title { font-size: 26px; }
  .lb-controls { width: 100%; }
  .lb-search { flex: 1 1 100%; min-width: 0; }
  .lb-bar { width: 50px; }
}
/* Keep the back-to-players link visible on mobile even though the rest of brand-sub hides */
@media (max-width: 760px) {
  .brand-sub { display: block; font-size: 12px; }
  .brand-sub { color: transparent; }
  .brand-sub .back-link { color: var(--accent); }
}

/* ---- loading state (player page) ---- */
.panel { position: relative; }
.chart-loader {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(11, 17, 32, 0.78); backdrop-filter: blur(2px); border-radius: inherit;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.chart-loader.is-on { opacity: 1; pointer-events: auto; }
.loader-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: loader-spin 0.85s linear infinite;
  box-shadow: 0 0 18px var(--accent-dim);
}
.loader-ring-sm { width: 26px; height: 26px; border-width: 2px; }
.loader-msg {
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); min-height: 1.3em;
}
.loader-msg.swap { animation: loader-fade 0.35s ease; }
.page.is-loading .stat-value,
.page.is-loading .detail-v { color: var(--muted); animation: loader-pulse 1.1s ease-in-out infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes loader-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) {
  .loader-ring { animation-duration: 2s; }
  .page.is-loading .stat-value, .page.is-loading .detail-v { animation: none; opacity: 0.5; }
}

/* ---- streak bars (index main table): last 7 games, oldest left -> newest right ---- */
.leaderboard td.col-streak { white-space: nowrap; }
.streak-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; vertical-align: middle; }
.streak-bars i {
  display: block; width: 5px; height: 18px; border-radius: 1.5px;
  background: var(--line-soft); opacity: .55;
}
.streak-bars i.win  { background: var(--win);  opacity: 1; box-shadow: 0 0 6px rgba(53, 208, 127, .55); }
.streak-bars i.loss { background: var(--loss); opacity: 1; box-shadow: 0 0 6px rgba(255, 90, 110, .5); }
.streak-bars i.none { height: 8px; }
.streak-bars i:last-child { outline: 1px solid rgba(255, 255, 255, .35); outline-offset: 1px; }   /* newest game */
.streak-count { display: inline-block; margin-left: 8px; font-family: var(--display); font-weight: 700; font-size: 12.5px; letter-spacing: .06em; vertical-align: middle; }
.streak-count.win { color: var(--win); } .streak-count.loss { color: var(--loss); }
@media (max-width: 760px) {
  .streak-bars { gap: 2px; height: 16px; }
  .streak-bars i { width: 4px; height: 16px; }
  .streak-count { margin-left: 5px; font-size: 11.5px; }
}

/* ---- "Recent matches" rows on the index ---- */
/* "Recent matches" rows are not tinted by result: the WIN/LOSS tag carries the result.
   Only awarded rows (gold / cold / trend) get a row effect (those rules come later and win). */
.leaderboard tr.win, .leaderboard tr.loss { background: transparent; }
.leaderboard tr.win td:first-child, .leaderboard tr.loss td:first-child { box-shadow: none; }
.leaderboard .lb-name .result-tag { font-size: 12px; margin-left: 8px; }
.leaderboard .feed-ago { color: var(--muted); font-size: 12px; margin-left: 6px; }
.leaderboard tr.is-new td { animation: feed-flash 1.6s ease-out; }
.feed-foot { padding: 10px 14px; text-align: center; }
@keyframes feed-flash { from { background: var(--accent-dim); } to { background: transparent; } }

/* =====================================================================
   Index awards: medal cards (ember), cold (snow), trend up/down (stock glow)
   All effects are painted on the <tr> (background + glow) or on one overlay
   that spans the whole row, so there are no per-cell seams.
   ===================================================================== */

/* --- badges after the username --- */
.award-set { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; vertical-align: middle; }
.award { display: inline-flex; align-items: center; gap: 4px; cursor: help; border-radius: 4px; }
.award:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.award-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--muted);
  color: var(--muted); font: 700 9px/1 var(--body); font-style: italic; opacity: .7;
}
.award:hover .award-info, .award:focus-visible .award-info { color: var(--text); border-color: var(--text); opacity: 1; }

/* word cards: GOLD / SILVER / BRONZE / COLD */
.award-card {
  display: inline-block; padding: 2px 8px 1px; border: 1px solid; border-radius: 4px;
  font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .16em; line-height: 1.3;
  background: rgba(0, 0, 0, .28); text-shadow: 0 0 6px currentColor;
}
.award-card.gold   { color: #ffd166; border-color: #ffd166; box-shadow: 0 0 8px rgba(255, 209, 102, .55), inset 0 0 8px rgba(255, 209, 102, .18); }
.award-card.silver { color: #e2e8f0; border-color: #cfd8e3; box-shadow: 0 0 8px rgba(207, 216, 227, .45), inset 0 0 8px rgba(207, 216, 227, .15); }
.award-card.bronze { color: #e6b07a; border-color: #d9a066; box-shadow: 0 0 8px rgba(217, 160, 102, .5), inset 0 0 8px rgba(217, 160, 102, .16); }
.award-card.cold   { color: #bfe6ff; border-color: #7cc8ff; box-shadow: 0 0 8px rgba(124, 200, 255, .55), inset 0 0 8px rgba(124, 200, 255, .18); }
/* plain 4TH / 5TH position cards (rows 4-5 of the pinned tables) */
.award-card.fourth, .award-card.fifth { color: var(--muted); border-color: var(--line); box-shadow: none; text-shadow: none; background: rgba(0, 0, 0, .18); }
/* ATH #1-3 (green box) and STREAK #1-3 (violet box) */
.award-card.ath    { color: #b8f5d3; border-color: var(--win); box-shadow: 0 0 8px rgba(53, 208, 127, .55), inset 0 0 8px rgba(53, 208, 127, .18); white-space: nowrap; }
.award-card.streak { color: #e2ccff; border-color: #b388ff; box-shadow: 0 0 8px rgba(179, 136, 255, .55), inset 0 0 8px rgba(179, 136, 255, .18); white-space: nowrap; }

.award-icon { width: 20px; height: 20px; display: block; }
.award-icon.trend { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.award-icon.trend.up   { stroke: var(--win);  filter: drop-shadow(0 0 4px rgba(53, 208, 127, .9)); }
.award-icon.trend.down { stroke: var(--loss); filter: drop-shadow(0 0 4px rgba(255, 90, 110, .9)); }

/* --- quick-chart peek button (left of the username) --- */
.peek {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 22px; margin-right: 8px; vertical-align: middle; padding: 0;
  background: rgba(69, 213, 255, .08); border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.peek:hover, .peek:focus-visible { border-color: var(--accent); background: var(--accent-dim); }
.peek-icon { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- floating boxes: award tooltip and chart peek --- */
#awardTip, #chartPeek {
  position: fixed; z-index: 60; background: #0d1527; border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease;
}
#awardTip.is-on, #chartPeek.is-on { opacity: 1; transform: none; }
#awardTip { max-width: 340px; padding: 9px 11px; font-size: 12.5px; line-height: 1.45; pointer-events: none; }
#awardTip b { display: block; font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-bottom: 3px; }
#awardTip[data-kind="gold"]   { border-color: rgba(255, 209, 102, .6); } #awardTip[data-kind="gold"] b   { color: #ffd166; }
#awardTip[data-kind="silver"] { border-color: rgba(215, 223, 234, .6); } #awardTip[data-kind="silver"] b { color: #d7dfea; }
#awardTip[data-kind="bronze"] { border-color: rgba(217, 160, 102, .6); } #awardTip[data-kind="bronze"] b { color: #d9a066; }
#awardTip[data-kind="cold"]   { border-color: rgba(120, 200, 255, .6); } #awardTip[data-kind="cold"] b   { color: #9fd8ff; }
#awardTip[data-kind="up"]     { border-color: rgba(53, 208, 127, .6); }  #awardTip[data-kind="up"] b     { color: var(--win); }
#awardTip[data-kind="down"]   { border-color: rgba(255, 90, 110, .6); }  #awardTip[data-kind="down"] b   { color: var(--loss); }
#awardTip[data-kind="fourth"] b, #awardTip[data-kind="fifth"] b { color: var(--muted); }
#awardTip[data-kind="ath"]    { border-color: rgba(53, 208, 127, .6); }  #awardTip[data-kind="ath"] b    { color: var(--win); }
#awardTip[data-kind="streak"] { border-color: rgba(179, 136, 255, .6); } #awardTip[data-kind="streak"] b { color: #b388ff; }

#chartPeek { width: 324px; padding: 10px 12px 12px; border-color: rgba(69, 213, 255, .45); }
.peek-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.peek-head b { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .04em; }
.peek-head .td-muted { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.peek-chart { display: block; width: 100%; height: auto; }
.peek-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.peek-stats b { color: var(--text); font-weight: 600; margin-left: 3px; }
.peek-stats b.win { color: var(--win); } .peek-stats b.loss { color: var(--loss); }
.peek-empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }
.peek-link { display: block; margin-top: 8px; font-size: 12.5px; text-decoration: none; }
.peek-link:hover { text-decoration: underline; }

/* --- LIVE badge (top-right) --- matches the MENU dropdown box exactly and sits
   beside it (never overlapping). Green "tracking" dot fades in and out. */
.top-controls { position: fixed; top: 14px; right: 16px; z-index: 300; display: flex; align-items: stretch; gap: 10px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12,18,32,.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px -8px rgba(0,0,0,.6);
  font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 12px; color: var(--muted);
}
.live-badge .live-text { font-weight: 700; letter-spacing: .16em; }
.live-badge .live-sub { font-family: var(--body); font-weight: 500; font-size: 11.5px; letter-spacing: .02em; text-transform: lowercase; color: var(--muted); }
.live-badge .live-dot { position: relative; width: 9px; height: 9px; }
.live-badge .live-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0;
  animation: live-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
.live-badge[data-state="live"] { color: var(--win); border-color: rgba(53, 208, 127, .55); }
.live-badge[data-state="live"] .live-dot { background: var(--win); box-shadow: 0 0 10px var(--win), 0 0 20px rgba(53, 208, 127, .6); animation: live-pulse 1.8s ease-in-out infinite; }
.live-badge[data-state="live"] .live-sub { color: #8fe8b0; }
.live-badge[data-state="offline"] { color: var(--warn); border-color: rgba(255, 184, 77, .45); }
.live-badge[data-state="offline"] .live-dot { background: var(--warn); animation: none; }
.live-badge[data-state="offline"] .live-dot::after { animation: none; }
@keyframes live-ping  { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .2; transform: scale(.7); } }

/* --- daily countdown banner (below the top bar) --- */
.countdown-banner {
  position: relative; overflow: hidden; text-align: center;
  margin: 0 0 4px; padding: 18px 16px 16px;
  background:
    radial-gradient(ellipse at center, rgba(255, 140, 40, .22), rgba(255, 120, 30, 0) 62%),
    linear-gradient(180deg, rgba(255, 120, 30, .06), rgba(0, 0, 0, 0));
  border-bottom: 1px solid rgba(255, 140, 40, .28);
}
.countdown-banner::before, .countdown-banner::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); height: 1px; width: min(720px, 90%);
  background: linear-gradient(90deg, transparent, rgba(255, 184, 77, .9), transparent);
}
.countdown-banner::before { top: 0; } .countdown-banner::after { bottom: -1px; }
.cd-label { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .32em; color: var(--warn); text-shadow: 0 0 12px rgba(255, 184, 77, .5); }
.cd-clock { display: inline-flex; align-items: baseline; justify-content: center; margin: 4px 0 2px; }
.cd-main {
  font-family: var(--display); font-weight: 700; font-size: clamp(44px, 8vw, 84px); line-height: 1; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; color: #fff4e0;
  text-shadow: 0 0 10px rgba(255, 184, 77, .9), 0 0 28px rgba(255, 120, 30, .7), 0 0 60px rgba(255, 90, 20, .45);
  animation: cd-breathe 2.4s ease-in-out infinite;
}
.cd-ms {
  font-family: var(--display); font-weight: 600; font-size: clamp(20px, 3vw, 34px); letter-spacing: .06em; margin-left: 2px;
  font-variant-numeric: tabular-nums; color: #ffb86b; text-shadow: 0 0 10px rgba(255, 140, 40, .8); min-width: 3.2ch; text-align: left;
}
.cd-foot { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: .2em; color: var(--muted); }
.cd-date { color: var(--text); }
@keyframes cd-breathe {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 184, 77, .9), 0 0 28px rgba(255, 120, 30, .7), 0 0 60px rgba(255, 90, 20, .45); }
  50%      { text-shadow: 0 0 14px rgba(255, 184, 77, 1), 0 0 40px rgba(255, 120, 30, .9), 0 0 90px rgba(255, 90, 20, .7); }
}
/* final hour: red; final 10 minutes: flashing */
.countdown-banner[data-urgent="1"], .countdown-banner[data-urgent="2"] {
  border-bottom-color: rgba(255, 90, 110, .5);
  background: radial-gradient(ellipse at center, rgba(255, 60, 90, .26), rgba(255, 60, 90, 0) 62%), linear-gradient(180deg, rgba(255, 60, 90, .08), rgba(0, 0, 0, 0));
}
.countdown-banner[data-urgent="1"] .cd-label, .countdown-banner[data-urgent="2"] .cd-label { color: var(--loss); text-shadow: 0 0 12px rgba(255, 90, 110, .6); }
.countdown-banner[data-urgent="1"] .cd-main, .countdown-banner[data-urgent="2"] .cd-main {
  color: #ffe4e8; animation: cd-red 1.2s ease-in-out infinite;
}
.countdown-banner[data-urgent="1"] .cd-ms, .countdown-banner[data-urgent="2"] .cd-ms { color: #ff8a9a; text-shadow: 0 0 10px rgba(255, 90, 110, .8); }
.countdown-banner[data-urgent="2"] .cd-clock { animation: cd-flash .5s steps(2) infinite; }
@keyframes cd-red {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 90, 110, .9), 0 0 30px rgba(255, 60, 90, .8), 0 0 70px rgba(255, 30, 60, .5); }
  50%      { text-shadow: 0 0 16px rgba(255, 90, 110, 1), 0 0 50px rgba(255, 60, 90, 1), 0 0 110px rgba(255, 30, 60, .8); }
}
@keyframes cd-flash { 50% { opacity: .35; } }
.panel-sub .countdown-value { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--warn); font-variant-numeric: tabular-nums; }

/* --- pinned tables (podium + all-time highs) --- */
/* King of the Hill / Ice Cold carry four columns and bigger names, so they get more room than All-time highs */
.pinned { display: grid; grid-template-columns: 1.1fr .9fr 1.05fr; gap: 18px; margin-bottom: 18px; }
.pin-panel { margin-bottom: 0; }
.pin-podium { border-color: rgba(255, 140, 40, .45); box-shadow: 0 0 0 1px rgba(255, 140, 40, .08), 0 0 28px -8px rgba(255, 120, 30, .35); }
.pin-highs  { border-color: rgba(53, 208, 127, .45); box-shadow: 0 0 0 1px rgba(53, 208, 127, .08), 0 0 28px -8px rgba(53, 208, 127, .35); }
.pin-cold   { border-color: rgba(124, 200, 255, .45); box-shadow: 0 0 0 1px rgba(124, 200, 255, .08), 0 0 28px -8px rgba(124, 200, 255, .35); }
.pin-cold .panel-title   { color: #9fd8ff; text-shadow: 0 0 12px rgba(124, 200, 255, .45); }
.pin-podium .panel-title { color: #ffd166; text-shadow: 0 0 12px rgba(255, 209, 102, .45); }
.pin-highs .panel-title  { color: var(--win); text-shadow: 0 0 12px rgba(53, 208, 127, .45); }
.pin-panel .panel-head { padding-bottom: 8px; }
/* NEW ALL-TIME HIGHS: the rows sit at the bottom of the panel so they line up with
   the neighbouring tables even when fewer than five players are at a new high */
.pin-highs { display: flex; flex-direction: column; }
.pin-highs .table-wrap { margin-top: auto; }
.pin-highs .pin-table td { vertical-align: bottom; }
.pin-highs .peek { display: none; }            /* row is clickable; keeps the ATH row within the panel */
.pin-highs .net-now { font-size: 14px; }
.chip-link { text-decoration: none; display: inline-flex; align-items: center; }
.chip-link:hover { color: var(--accent); border-color: var(--accent); }
.foot-links { white-space: nowrap; }
.pin-table th { font-size: 11px; padding-left: 6px; padding-right: 6px; }
.pin-table td { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.pin-table .col-medal { width: 1%; padding-right: 2px; }
.pin-table .col-rank { width: 1%; }
.pin-table .lb-bar { display: none; }
.pin-table .award-set { margin-left: 6px; gap: 5px; }
.pin-table .lb-name a { font-size: 18px; }
.pin-table td { padding-top: 8px; padding-bottom: 8px; }
.pin-table .peek { width: 20px; height: 20px; margin-right: 5px; }
.pin-table .peek-icon { width: 13px; height: 13px; }
.pin-table .fill-tag { margin-left: 4px; padding: 0 3px; font-size: 10px; }
.pin-table .td-muted { font-size: 13px; }
.pin-table .lb-wr { min-width: 0; }
.pin-table td:last-child, .pin-table th:last-child { padding-right: 4px; }
.pin-table .peek { margin-right: 6px; }
.pin-panel .panel-head { padding-left: 8px; padding-right: 8px; }
.pin-table .net-now { font-size: 15px; margin-right: 4px; }
.period-tabs { display: flex; gap: 3px; flex-wrap: wrap; }
.chip-sm { padding: 3px 8px; font-size: 11.5px; letter-spacing: .05em; }
.pin-panel .panel-head { align-items: flex-start; }
.fill-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px dashed var(--line); border-radius: 3px;
  font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .06em; color: var(--muted); vertical-align: middle;
}
.pin-table tr.is-filler .lb-name a { opacity: .8; }
.pin-podium .lb-wr, .pin-cold .lb-wr { font-weight: 700; }
.pin-table td.win .award { cursor: help; }
.empty-sm { padding: 18px 12px; font-size: 13px; }

/* --- row effects -------------------------------------------------- */
/* one continuous overlay per row for particles (spans the row via tr{position:relative}) */
.leaderboard .lb-row.row-gold, .leaderboard .lb-row.row-cold { position: relative; }
.leaderboard .lb-row.row-gold td:first-child::before,
.leaderboard .lb-row.row-cold td:first-child::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.leaderboard .lb-row.row-gold td, .leaderboard .lb-row.row-cold td { position: static; }

/* trend glow: stock going up (green) / down (red) */
.leaderboard .lb-row.row-trend-up {
  background: linear-gradient(90deg, rgba(53, 208, 127, .20), rgba(53, 208, 127, .05) 45%, rgba(53, 208, 127, .12));
  box-shadow: inset 0 0 22px -6px rgba(53, 208, 127, .55);
  animation: trend-pulse 2.6s ease-in-out infinite;
}
.leaderboard .lb-row.row-trend-down {
  background: linear-gradient(90deg, rgba(255, 90, 110, .20), rgba(255, 90, 110, .05) 45%, rgba(255, 90, 110, .12));
  box-shadow: inset 0 0 22px -6px rgba(255, 90, 110, .55);
  animation: trend-pulse 2.6s ease-in-out infinite;
}
.leaderboard .lb-row.row-trend-up td:first-child   { box-shadow: inset 3px 0 0 var(--win); }
.leaderboard .lb-row.row-trend-down td:first-child { box-shadow: inset 3px 0 0 var(--loss); }
.leaderboard .lb-row.row-trend-up .lb-name a   { color: #b8f5d3; text-shadow: 0 0 10px rgba(53, 208, 127, .7); }
.leaderboard .lb-row.row-trend-down .lb-name a { color: #ffc2ca; text-shadow: 0 0 10px rgba(255, 90, 110, .7); }
@keyframes trend-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }

/* medal rows: GOLD gets the fire / ember glow; SILVER and BRONZE get their own
   matching metallic glow (all declared after trend so they win). */
.leaderboard .lb-row.row-gold {
  background: linear-gradient(90deg, rgba(255, 110, 30, .30), rgba(255, 60, 20, .08) 45%, rgba(255, 140, 40, .16));
  box-shadow: inset 0 0 26px -6px rgba(255, 120, 30, .6);
  animation: ember-glow 1.8s ease-in-out infinite;
}
.leaderboard .lb-row.row-gold td:first-child::before {
  opacity: .85;
  background-image:
    radial-gradient(circle, rgba(255, 220, 120, .95) 0 1.2px, transparent 2px),
    radial-gradient(circle, rgba(255, 140, 40, .9) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 90, 30, .8) 0 .8px, transparent 1.5px);
  background-size: 90px 64px, 130px 72px, 70px 48px;
  animation: ember-rise 4.5s linear infinite, ember-flicker 1.3s ease-in-out infinite;
}
.leaderboard .lb-row.row-gold   td:first-child { box-shadow: inset 3px 0 0 #ffd166; }
.leaderboard .lb-row.row-silver td:first-child { box-shadow: inset 3px 0 0 #d7dfea; }
.leaderboard .lb-row.row-bronze td:first-child { box-shadow: inset 3px 0 0 #d9a066; }
.leaderboard .lb-row.row-gold .lb-name a { color: #fff1c2; text-shadow: 0 0 6px rgba(255, 209, 102, 1), 0 0 18px rgba(255, 120, 30, .8); }
.leaderboard .lb-row.row-gold td.col-rank { color: #ffb86b; }
@keyframes ember-glow   { 0%, 100% { filter: brightness(1) saturate(1); } 50% { filter: brightness(1.2) saturate(1.2); } }
@keyframes ember-rise   { from { background-position: 0 64px, 30px 92px, 60px 58px; } to { background-position: 14px 0, 22px 0, 70px 0; } }
@keyframes ember-flicker { 0%, 100% { opacity: .85; } 35% { opacity: .55; } 70% { opacity: 1; } }

/* silver row: cool metallic sheen */
.leaderboard .lb-row.row-silver {
  background: linear-gradient(90deg, rgba(205, 216, 230, .26), rgba(220, 228, 240, .05) 45%, rgba(190, 202, 220, .14));
  box-shadow: inset 0 0 26px -7px rgba(215, 225, 240, .6);
  animation: silver-glow 2.6s ease-in-out infinite;
}
.leaderboard .lb-row.row-silver .lb-name a { color: #f4f7fb; text-shadow: 0 0 6px rgba(220, 228, 240, .9), 0 0 16px rgba(160, 182, 214, .55); }
@keyframes silver-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }

/* bronze row: warm copper glow */
.leaderboard .lb-row.row-bronze {
  background: linear-gradient(90deg, rgba(217, 160, 102, .28), rgba(184, 115, 51, .06) 45%, rgba(200, 132, 74, .15));
  box-shadow: inset 0 0 26px -7px rgba(212, 142, 82, .55);
  animation: bronze-glow 2.6s ease-in-out infinite;
}
.leaderboard .lb-row.row-bronze .lb-name a { color: #ffe6c9; text-shadow: 0 0 6px rgba(217, 160, 102, .9), 0 0 16px rgba(184, 115, 51, .55); }
@keyframes bronze-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.16); } }

/* cold rows: blue chill with falling snow */
.leaderboard .lb-row.row-cold {
  background: linear-gradient(90deg, rgba(90, 170, 255, .26), rgba(140, 210, 255, .06) 45%, rgba(90, 170, 255, .14));
  box-shadow: inset 0 0 26px -6px rgba(120, 190, 255, .55);
  animation: none;
}
.leaderboard .lb-row.row-cold td:first-child::before {
  opacity: .9;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 1.3px, transparent 2.1px),
    radial-gradient(circle, rgba(200, 235, 255, .85) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(160, 215, 255, .7) 0 .8px, transparent 1.4px);
  background-size: 96px 70px, 140px 80px, 74px 54px;
  animation: snow-fall 6s linear infinite, snow-drift 3.2s ease-in-out infinite alternate;
}
.leaderboard .lb-row.row-cold td:first-child { box-shadow: inset 3px 0 0 #7cc8ff; }
.leaderboard .lb-row.row-cold .lb-name a { color: #d8f1ff; text-shadow: 0 0 6px rgba(140, 210, 255, .95), 0 0 16px rgba(80, 160, 255, .6); }
.leaderboard .lb-row.row-cold td.col-rank { color: #9fd8ff; }
@keyframes snow-fall  { from { background-position: 0 -70px, 40px -70px, 20px -24px; } to { background-position: 0 70px, 40px 90px, 20px 84px; } }
@keyframes snow-drift { from { background-position-x: 0, 40px, 20px; } to { background-position-x: 12px, 30px, 28px; } }

/* hover: the table's generic hover paints a flat cell background; keep the row effect instead */
.leaderboard .lb-row.row-gold:hover td, .leaderboard .lb-row.row-cold:hover td,
.leaderboard .lb-row.row-silver:hover td, .leaderboard .lb-row.row-bronze:hover td,
.leaderboard .lb-row.row-trend-up:hover td, .leaderboard .lb-row.row-trend-down:hover td { background: rgba(255, 255, 255, .04); }

/* on "Recent matches" rows the WIN/LOSS tag sits after the badges */
.leaderboard .award-set + .result-tag { margin-left: 10px; }

@media (prefers-reduced-motion: reduce) {
  .leaderboard .lb-row.row-gold, .leaderboard .lb-row.row-cold,
  .leaderboard .lb-row.row-silver, .leaderboard .lb-row.row-bronze,
  .leaderboard .lb-row.row-trend-up, .leaderboard .lb-row.row-trend-down,
  .leaderboard .lb-row.row-gold td:first-child::before, .leaderboard .lb-row.row-cold td:first-child::before { animation: none; }
  .cd-main, .cd-clock, .live-badge .live-dot, .live-badge .live-dot::after { animation: none; }
}
.pin-panel .panel-head > div:first-child { flex: 1 1 100%; }
.pin-panel .period-tabs { margin-top: -2px; margin-bottom: 4px; }
.pin-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -2px; margin-bottom: 4px; }

/* daily / monthly champion strip shown under a pinned panel's head */
.award-winners { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 8px 10px; }
.award-winners[hidden] { display: none; }
.win-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .03); font-size: 12.5px; line-height: 1.1;
}
.win-label {
  font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  font-size: 10.5px; color: var(--muted);
}
.win-name { font-weight: 600; color: var(--text); text-decoration: none; }
.win-name:hover { text-decoration: underline; }
.win-detail { color: var(--muted); font-variant-numeric: tabular-nums; }
.win-none { color: var(--muted); }
/* tint each pill to match its panel */
.win-koth   { border-color: rgba(255, 209, 102, .40); }
.win-koth   .win-label { color: #ffd166; }
.win-streak { border-color: rgba(179, 136, 255, .40); }
.win-streak .win-label { color: #d4bbff; }
.win-cold   { border-color: rgba(124, 200, 255, .40); }
.win-cold   .win-label { color: #9fd8ff; }
.win-hardcore { border-color: rgba(255, 77, 94, .40); }
.win-hardcore .win-label { color: #ff9ba4; }

/* monthly teaser: the title is still up for grabs, so it reads as a race in
   progress (animated sheen + a "decided <date>" hint), never a settled winner */
.win-teaser { position: relative; overflow: hidden; }
.win-teaser::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%);
  background-size: 220% 100%; animation: teaser-sweep 3.4s linear infinite;
}
.win-teaser > * { position: relative; z-index: 1; }
.win-hint {
  font-family: var(--display); font-weight: 600; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 1px 6px; border: 1px dashed var(--line); border-radius: 999px;
}
.win-wait {
  font-family: var(--display); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 11px;
  color: var(--accent); animation: teaser-wait 2s ease-in-out infinite;
}
@keyframes teaser-sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes teaser-wait { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .win-teaser::before, .win-wait { animation: none; }
}
@media (max-width: 1280px) {
  .pinned { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .pinned { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .countdown-banner { padding: 12px 10px 10px; }
  .cd-label { font-size: 11px; letter-spacing: .22em; }
  .cd-foot { font-size: 10px; letter-spacing: .12em; }
  .award-card { font-size: 10.5px; padding: 1px 6px 0; letter-spacing: .12em; }
  .award-set { gap: 6px; margin-left: 6px; }
  .peek { margin-right: 6px; }
  .pin-table .peek { display: none; }
  #chartPeek { width: min(324px, calc(100vw - 16px)); }
}

/* =====================================================================
   Player page: Daily / Weekly / Monthly / All-time high cards (above the main chart)
   ===================================================================== */
.highs-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.high-card {
  position: relative; padding: 12px 14px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .1)); overflow: hidden;
}
.high-label { font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: .2em; color: var(--muted); }
.high-value { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.high-value.win { color: var(--win); text-shadow: 0 0 12px rgba(53, 208, 127, .45); }
.high-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.high-sub b { font-weight: 600; color: var(--text); }
.high-sub b.win { color: var(--win); } .high-sub b.loss { color: var(--loss); }
.high-tag {
  display: inline-block; padding: 1px 6px 0; border: 1px solid var(--win); border-radius: 4px; color: var(--win);
  font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .14em; vertical-align: 1px;
  text-shadow: 0 0 6px rgba(53, 208, 127, .6); box-shadow: 0 0 8px rgba(53, 208, 127, .35);
}
.high-tag-soft { opacity: .75; box-shadow: none; }
.high-card.is-at-high { border-color: rgba(53, 208, 127, .45); }
.high-card.is-new-high { border-color: var(--win); box-shadow: inset 0 0 24px -8px rgba(53, 208, 127, .5), 0 0 18px -6px rgba(53, 208, 127, .45); }
.high-card.high-all { border-color: rgba(255, 209, 102, .35); }
.high-card.high-all .high-label { color: #ffd166; }
.high-card.high-all.is-new-high { border-color: #ffd166; box-shadow: inset 0 0 24px -8px rgba(255, 209, 102, .45), 0 0 18px -6px rgba(255, 209, 102, .45); }
@media (max-width: 760px) {
  .highs-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .high-value { font-size: 24px; }
}

/* =====================================================================
   Hit counter (efreecode.com / eXTReMe Tracker) — included on every page.
   The icon the script inserts is boxed to its exact size and covered by a
   layer in the page background colour; the visit is still counted.
   ===================================================================== */
.ext-tracker {
  position: relative; width: 41px; height: 38px; overflow: hidden;
  margin: 0 auto -38px; opacity: .001; pointer-events: none;   /* no visible footprint, no layout shift */
}
.ext-tracker a, .ext-tracker img { position: absolute; left: 0; top: 0; width: 41px; height: 38px; display: block; }
.ext-tracker-cover { position: absolute; inset: 0; z-index: 2; background: var(--bg); }

/* =====================================================================
   Player page: animated "0 VALUE" zero line over the main chart
   ===================================================================== */
.panel-main { position: relative; }
.zero-line {
  position: absolute; z-index: 3; pointer-events: none; height: 0;
  display: flex; justify-content: space-between; align-items: center; padding: 0 28px 0 150px;   /* left gap clears the THE BEGINNING chip */
}
.zero-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .85) 0 3px, transparent 3px 9px);
  animation: zero-march .6s linear infinite; opacity: .7;
}
.zero-line span {
  position: relative; transform: translateY(-50%);
  padding: 1px 7px 0; border: 1px solid rgba(255, 255, 255, .45); border-radius: 3px; background: var(--panel);
  font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .16em; color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, .5); animation: zero-blink 2.4s ease-in-out infinite;
}
@keyframes zero-march { from { background-position: 0 0; } to { background-position: 9px 0; } }
@keyframes zero-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .zero-line::before, .zero-line span { animation: none; } }

/* =====================================================================
   Player page: last-game marker on the main chart. The line uses circles
   (green = win, red = loss); the newest game is a circle that radiates.
   Positioned by charts.js on the last point, same approach as the zero line.
   ===================================================================== */
.last-game {
  position: absolute; z-index: 4; pointer-events: none; width: 0; height: 0;
}
.last-game::before, .last-game::after {
  content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid var(--lg-color, var(--win));
  animation: last-game-radiate 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
.last-game::after { animation-delay: .9s; }
.last-game .last-game-core {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--lg-color, var(--win)); border: 2px solid #fff;
  box-shadow: 0 0 10px var(--lg-color, var(--win)), 0 0 22px var(--lg-color, var(--win));
  animation: last-game-breathe 1.8s ease-in-out infinite;
}
.last-game.win  { --lg-color: var(--win); }
.last-game.loss { --lg-color: var(--loss); }
@keyframes last-game-radiate { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes last-game-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .last-game::before, .last-game::after, .last-game .last-game-core { animation: none; }
  .last-game::after { display: none; }
  .last-game::before { transform: scale(1.6); opacity: .6; }
}

/* =====================================================================
   King of the Hill — Daily Winners page (winners.php)
   ===================================================================== */
.winners-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.winners-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: .14em; line-height: 1; color: #ffd166; text-shadow: 0 0 18px rgba(255, 209, 102, .45); }
.winners-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 760px; }
.winners-panel { border-color: rgba(255, 140, 40, .45); box-shadow: 0 0 0 1px rgba(255, 140, 40, .08), 0 0 28px -8px rgba(255, 120, 30, .35); }
.winners .col-date { white-space: nowrap; }
.winners .col-date b { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .04em; }
.winners .col-date span { color: var(--muted); font-size: 12px; }
.winners .lb-name a { font-size: 20px; }
.winners td.col-runner { color: var(--muted); font-size: 13px; }
.winners td.col-runner b { color: var(--text); font-family: var(--display); font-weight: 600; font-size: 14.5px; letter-spacing: .02em; }
.winners td.col-runner .award-card { margin-right: 6px; }
.winners tr.no-winner td { color: var(--muted); }
.winners tr.no-winner .col-medal .award-card { color: var(--muted); border-color: var(--line); box-shadow: none; text-shadow: none; }
.winners-foot { padding: 12px 14px; display: flex; justify-content: center; }
.winner-count { display: inline-block; margin-left: 8px; padding: 1px 7px 0; border: 1px solid rgba(255, 209, 102, .5); border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .1em; color: #ffd166; vertical-align: middle; }
@media (max-width: 760px) {
  .winners-title { font-size: 26px; }
  .winners .lb-name a { font-size: 17px; }
  .winners td.col-runner { display: none; }
  .winners th.col-runner { display: none; }
}

/* =====================================================================
   Update 8: logo + nav, THE ONE, longest win streak, yesterday's King
   ===================================================================== */
/* logo (top left) */
.brand { min-width: 0; }
.brand-logo { display: block; width: min(420px, 60vw); line-height: 0; }
.brand-logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 14px rgba(69, 213, 255, .25)); }
.brand-title { display: none; }
/* navigation: Home | Daily Winners */
.mainnav { display: flex; align-items: center; gap: 12px; margin-left: auto; margin-right: 18px; }
.mainnav-link {
  display: inline-block; padding: 6px 2px; text-decoration: none; color: var(--muted);
  font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 2px solid transparent; transition: color 120ms, border-color 120ms;
}
.mainnav-link:hover { color: var(--text); }
.mainnav-link.is-active { color: var(--accent); border-bottom-color: var(--accent); text-shadow: 0 0 12px rgba(69, 213, 255, .45); }
.mainnav-winners.is-active { color: #ffd166; border-bottom-color: #ffd166; text-shadow: 0 0 12px rgba(255, 209, 102, .5); }
.mainnav-winners:not(.is-active):hover { color: #ffd166; }
.mainnav-sep { color: var(--line); font-family: var(--display); font-size: 20px; }
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 8px; }
  .brand-logo { width: min(320px, 70vw); }
  .mainnav { order: 3; width: 100%; margin: 0; justify-content: center; gap: 14px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
  .mainnav-link { font-size: 15px; }
}
@media (max-width: 760px) {
  .brand-sub { display: none !important; }
  .live-badge .live-sub { display: none; }
}

/* yesterday's King strip under the countdown */
.cd-king {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin: 10px auto 0; padding: 6px 16px 5px; border: 1px solid rgba(255, 209, 102, .45); border-radius: 999px;
  background: rgba(255, 209, 102, .08); text-decoration: none; color: var(--text);
  box-shadow: 0 0 18px -6px rgba(255, 209, 102, .6); transition: border-color 120ms, background 120ms;
}
.cd-king:hover { border-color: #ffd166; background: rgba(255, 209, 102, .14); }
.cd-king-label { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .22em; color: #ffd166; }
.cd-king-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .04em; color: #fff1c2; text-shadow: 0 0 8px rgba(255, 209, 102, .8); }
.cd-king-rec { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cd-king-more { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .1em; color: var(--accent); }

/* THE ONE */
.the-one {
  margin-bottom: 18px; overflow: hidden;
  border-color: rgba(255, 209, 102, .6);
  background:
    radial-gradient(900px 260px at 50% -40%, rgba(255, 209, 102, .16), transparent 70%),
    linear-gradient(180deg, rgba(255, 140, 40, .06), rgba(0, 0, 0, 0) 60%), var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, .12), 0 0 40px -10px rgba(255, 180, 60, .55);
}
.the-one::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ffd166, var(--win), #b388ff, transparent);
  background-size: 200% 100%; animation: one-sweep 4s linear infinite;
}
.the-one-inner { padding: 14px 0 14px; }
.the-one-head { text-align: left; margin-bottom: 8px; padding: 0 16px; }
.the-one-empty { padding: 0 16px; }
.the-one-table td:first-child, .the-one-table th:first-child { padding-left: 14px; }
.the-one-table td:last-child, .the-one-table th:last-child { padding-right: 14px; }
.the-one-title {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: .4em; line-height: 1; padding-left: .4em;
  color: #fff1c2; text-shadow: 0 0 10px rgba(255, 209, 102, .9), 0 0 30px rgba(255, 140, 40, .6);
}
.the-one-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.the-one-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; margin-top: 10px; }
.the-one-sub b { color: var(--text); font-weight: 600; }
.the-one-empty { text-align: center; max-width: 860px; margin: 0 auto; }
.the-one-wait {
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .3em; color: #ffd166;
  animation: one-wait 2.2s ease-in-out infinite;
}
.the-one-desc { color: var(--text); font-size: 14px; line-height: 1.6; margin: 8px 0 0; }
.the-one-desc b { color: #ffd166; font-weight: 600; }
.the-one[data-state="found"] .the-one-title { animation: one-title 1.6s ease-in-out infinite; }
.the-one-table th { font-size: 11px; }
.the-one-table .lb-name a { font-size: 26px; }
.the-one-awards { white-space: nowrap; }
.the-one-awards .award { margin-right: 10px; }
.the-one-awards .award-card { font-size: 12.5px; padding: 3px 10px 2px; }
.leaderboard .lb-row.row-the-one {
  background: transparent;
}
.leaderboard .lb-row.row-the-one td:first-child { box-shadow: none; }
.leaderboard .lb-row.row-the-one.is-the-one td:first-child { box-shadow: inset 3px 0 0 #ffcf6b; }
.leaderboard .lb-row.row-the-one .lb-name a { color: var(--text); text-shadow: none; }
.leaderboard .lb-row.row-the-one.is-the-one .lb-name a { color: #fff8e6; }
@keyframes one-sweep { from { background-position: 0 0; } to { background-position: 200% 0; } }
@keyframes one-wait { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes one-title { 0%, 100% { text-shadow: 0 0 10px rgba(255, 209, 102, .9), 0 0 30px rgba(255, 140, 40, .6); } 50% { text-shadow: 0 0 16px rgba(255, 209, 102, 1), 0 0 50px rgba(255, 140, 40, .9), 0 0 80px rgba(179, 136, 255, .5); } }

/* ICE COLD now sits at the bottom of the page (full width); LONGEST WIN STREAK is the third pinned table */
.pinned-cold { grid-template-columns: 1fr; margin-top: 0; }
.pinned-cold .pin-table .lb-name a { font-size: 19px; }
.pin-streak .streak-num { font-size: 16px; }
.pin-streak .streak-live { margin-left: 5px; padding: 0 4px; font-size: 9px; letter-spacing: .1em; }
.pin-streak .award-card { letter-spacing: .1em; padding-left: 6px; padding-right: 6px; }
.pin-streak { border-color: rgba(179, 136, 255, .5); box-shadow: 0 0 0 1px rgba(179, 136, 255, .08), 0 0 28px -8px rgba(179, 136, 255, .4); }
.pin-streak .panel-title { color: #d4bbff; text-shadow: 0 0 12px rgba(179, 136, 255, .5); }
.streak-num { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .04em; color: var(--win); font-variant-numeric: tabular-nums; }
.streak-live {
  display: inline-block; margin-left: 8px; padding: 0 6px; border: 1px solid var(--win); border-radius: 3px; vertical-align: 2px;
  font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .16em; color: var(--win);
  box-shadow: 0 0 8px rgba(53, 208, 127, .45); animation: live-blink 1.6s ease-in-out infinite;
}
.leaderboard .lb-row.row-streak {
  background: linear-gradient(90deg, rgba(179, 136, 255, .22), rgba(179, 136, 255, .05) 45%, rgba(179, 136, 255, .12));
  box-shadow: inset 0 0 22px -6px rgba(179, 136, 255, .55);
}
.leaderboard .lb-row.row-streak td:first-child { box-shadow: inset 3px 0 0 #b388ff; }
.leaderboard .lb-row.row-streak .lb-name a { color: #efe4ff; text-shadow: 0 0 10px rgba(179, 136, 255, .8); }
.leaderboard .lb-row.row-streak:hover td { background: rgba(255, 255, 255, .04); }
.leaderboard tr.is-uncounted { opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .the-one::before, .the-one-wait, .the-one[data-state="found"] .the-one-title, .streak-live, .leaderboard .lb-row.row-the-one { animation: none; }
}
@media (max-width: 760px) {
  .the-one-title { font-size: 26px; letter-spacing: .28em; }
  .the-one-desc { font-size: 13px; }
  .the-one-table .lb-name a { font-size: 20px; }
  .the-one-awards { white-space: normal; }
  .cd-king { gap: 6px; padding: 5px 12px; }
  .cd-king-name { font-size: 17px; }
}

/* ============================================================================
   Mastery Stones, the 50-games badge, the LIVE activity pill,
   the four #1 row highlights, and the Hardcore (red) / CATH (green) panels.
   Added for the stones/gems achievement update.
   ========================================================================== */

/* ---- Collectible pixel Mastery Stones ---------------------------------------------- */
.gem { position: relative; display: inline-block; width: 22px; height: 22px; vertical-align: middle; line-height: 0; }
.gem-svg { width: 100%; height: 100%; display: block; image-rendering: pixelated;
  filter: drop-shadow(0 0 4px var(--g-glow)); animation: gem-shimmer 3.2s ease-in-out infinite; }
.gf-tbl { fill: var(--g-light); }
.gf-cl  { fill: var(--g-light2); }
.gf-cr  { fill: var(--g-mid); }
.gf-pl  { fill: var(--g-mid); }
.gf-pc  { fill: var(--g-dark); }
.gf-pr  { fill: var(--g-darker); }
.gf-out { fill: none; stroke: var(--g-edge); stroke-width: 1; }
.gf-hi  { fill: #ffffff; opacity: .92; }

/* Pixel light-sweep, clipped to the gem silhouette, stepped so it reads retro */
.gem-glint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  clip-path: polygon(31.25% 6.25%, 68.75% 6.25%, 93.75% 43.75%, 50% 93.75%, 6.25% 43.75%);
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.92) 50%, transparent 58%);
  background-size: 280% 100%; background-repeat: no-repeat; background-position: 165% 0;
  animation: gem-glint 2.8s steps(9) infinite; }
/* Tiny sparkle (a crossed pixel "+") that pops after each sweep */
.gem-spark { position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; color: #fff; opacity: 0;
  pointer-events: none; transform: scale(.3);
  background: linear-gradient(currentColor,currentColor) center/2px 100% no-repeat,
              linear-gradient(currentColor,currentColor) center/100% 2px no-repeat;
  animation: gem-spark 2.8s ease-in-out infinite; }

@keyframes gem-glint  { 0% { background-position: 165% 0; } 55%, 100% { background-position: -65% 0; } }
@keyframes gem-spark  { 0%, 58%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  70% { opacity: 1; transform: scale(1) rotate(45deg); }
  82% { opacity: .55; transform: scale(.65) rotate(90deg); } }
@keyframes gem-shimmer { 0%, 100% { filter: drop-shadow(0 0 3px var(--g-glow)) brightness(1); }
  50% { filter: drop-shadow(0 0 7px var(--g-glow)) brightness(1.13); } }

/* Gem colour palettes */
.gem-violet { --g-light:#e0c4ff; --g-light2:#c9a2f7; --g-mid:#a866f0; --g-dark:#7d3fd0; --g-darker:#5a26a3; --g-edge:#3a1a6b; --g-glow:rgba(168,102,240,.75); }
.gem-orange { --g-light:#ffe0b0; --g-light2:#ffc275; --g-mid:#ff9b30; --g-dark:#e6741a; --g-darker:#b4530f; --g-edge:#743305; --g-glow:rgba(255,140,40,.78); }
.gem-red    { --g-light:#ffc0c6; --g-light2:#ff8f99; --g-mid:#ff4d5e; --g-dark:#e02233; --g-darker:#a81421; --g-edge:#6b0d15; --g-glow:rgba(255,77,94,.78); }
.gem-green  { --g-light:#c6f7d9; --g-light2:#8fe8b0; --g-mid:#35d07f; --g-dark:#1f9e5e; --g-darker:#147343; --g-edge:#0a4428; --g-glow:rgba(53,208,127,.72); }

.pin-table .col-medal .gem { margin: 1px 0; }
.the-one-awards .gem { width: 26px; height: 26px; }

/* ---- "50" games mark — its own column, sized like the stock/trend symbol -- */
.fifty-badge { display: inline-flex; vertical-align: middle; }
.fifty-badge .award-card.fifty {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; min-width: 20px; padding: 0 2px; margin: 0;
  border: 1px solid rgba(69,213,255,.28); border-radius: 4px; background: rgba(69,213,255,.10);
  color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 11px;
  letter-spacing: .02em; line-height: 1; text-shadow: none; box-shadow: none;
}
.pin-table th.col-fifty, .pin-table td.col-fifty { width: 1%; padding-left: 4px; padding-right: 4px; text-align: center; }
.the-one-table th.col-fifty, .the-one-table td.col-fifty { text-align: center; }

/* ---- LIVE pill — its own far-right column --------------------------------- */
.live-now {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  height: 19px; min-width: 30px; padding: 0 7px; margin-left: 8px;
  border: 1px solid var(--accent); border-radius: 3px; background: rgba(69,213,255,.14);
  font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .12em; line-height: 1;
  color: #bff0ff; text-shadow: none; box-shadow: 0 0 8px rgba(69,213,255,.4);
  animation: live-blink 1.6s ease-in-out infinite; vertical-align: middle;
}

/* ---- Rank squares for #2–#5 on the stone tables (#1 gets the stone) ------- */
.award-card.rank-square {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); background: rgba(0,0,0,.18); box-shadow: none; text-shadow: none;
  font-family: var(--display); font-weight: 700; font-size: 12.5px; letter-spacing: 0;
}

/* ---- #1 row highlights, one per gem colour -------------------------------- */
.leaderboard .lb-row.row-gem-violet { background: linear-gradient(90deg, rgba(168,102,240,.22), rgba(168,102,240,.05) 45%, rgba(168,102,240,.12)); box-shadow: inset 0 0 22px -6px rgba(168,102,240,.55); }
.leaderboard .lb-row.row-gem-violet td:first-child { box-shadow: inset 3px 0 0 #a866f0; }
.leaderboard .lb-row.row-gem-violet .lb-name a { color: #efe4ff; text-shadow: 0 0 10px rgba(168,102,240,.8); }
.leaderboard .lb-row.row-gem-orange { background: linear-gradient(90deg, rgba(255,140,40,.22), rgba(255,140,40,.05) 45%, rgba(255,140,40,.12)); box-shadow: inset 0 0 22px -6px rgba(255,140,40,.55); }
.leaderboard .lb-row.row-gem-orange td:first-child { box-shadow: inset 3px 0 0 #ff9b30; }
.leaderboard .lb-row.row-gem-orange .lb-name a { color: #ffe9cf; text-shadow: 0 0 10px rgba(255,140,40,.85); }
.leaderboard .lb-row.row-gem-red { background: linear-gradient(90deg, rgba(255,77,94,.22), rgba(255,77,94,.05) 45%, rgba(255,77,94,.12)); box-shadow: inset 0 0 22px -6px rgba(255,77,94,.55); }
.leaderboard .lb-row.row-gem-red td:first-child { box-shadow: inset 3px 0 0 #ff4d5e; }
.leaderboard .lb-row.row-gem-red .lb-name a { color: #ffdbdf; text-shadow: 0 0 10px rgba(255,77,94,.85); }
.leaderboard .lb-row.row-gem-green { background: linear-gradient(90deg, rgba(53,208,127,.22), rgba(53,208,127,.05) 45%, rgba(53,208,127,.12)); box-shadow: inset 0 0 22px -6px rgba(53,208,127,.55); }
.leaderboard .lb-row.row-gem-green td:first-child { box-shadow: inset 3px 0 0 #35d07f; }
.leaderboard .lb-row.row-gem-green .lb-name a { color: #d9f7e6; text-shadow: 0 0 10px rgba(53,208,127,.8); }
.leaderboard .lb-row.row-gem-violet:hover td, .leaderboard .lb-row.row-gem-orange:hover td,
.leaderboard .lb-row.row-gem-red:hover td, .leaderboard .lb-row.row-gem-green:hover td { background: rgba(255,255,255,.04); }

/* ---- Hardcore (red) + CATH (green) pinned panels -------------------------- */
.pinned-stones { grid-template-columns: 1fr 1fr; margin-top: 0; }
.pin-hardcore { border-color: rgba(255,77,94,.5); box-shadow: 0 0 0 1px rgba(255,77,94,.1), 0 0 28px -8px rgba(255,77,94,.42); }
.pin-hardcore .panel-title { color: #ff8f99; text-shadow: 0 0 12px rgba(255,77,94,.5); }
.pin-hardcore .pin-table thead th { color: #ff9ba4; border-bottom: 1px solid rgba(255,77,94,.35); }
.pin-hardcore .streak-num { color: #ff8f99; }
.pin-hardcore .lb-wr { color: #ffb3ba; }
.pin-cath { border-color: rgba(53,208,127,.45); box-shadow: 0 0 0 1px rgba(53,208,127,.08), 0 0 28px -8px rgba(53,208,127,.35); }
.pin-cath .panel-title { color: var(--win); text-shadow: 0 0 12px rgba(53,208,127,.45); }
.pin-cath .pin-table thead th { color: #8fe8b0; border-bottom: 1px solid rgba(53,208,127,.3); }

@media (max-width: 760px) { .pinned-stones { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .gem-svg, .gem-glint, .gem-spark, .live-now, .live-now::before { animation: none; }
  .gem-glint { opacity: .35; }
}

/* ---- Season tag on daily competition titles ------------------------------ */
.season-tag { display: inline-block; margin-left: 10px; padding: 1px 8px 0; vertical-align: 3px;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(0,0,0,.18);
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.pin-podium   .season-tag { border-color: rgba(255,140,40,.4); color: #ffbe86; }
.pin-streak   .season-tag { border-color: rgba(168,102,240,.4); color: #cbb2f5; }
.pin-cold     .season-tag { border-color: rgba(124,200,255,.4); color: #a9dbff; }
.pin-hardcore .season-tag { border-color: rgba(255,77,94,.45);  color: #ff9ba4; }
.pin-cath     .season-tag { border-color: rgba(53,208,127,.4);  color: #8fe8b0; }

/* ---- LIVE lives in its own far-right column now --------------------------- */
.pin-table th.col-live, .pin-table td.col-live { width: 1%; white-space: nowrap; text-align: right; padding-right: 6px; }
.the-one-table th.col-live, .the-one-table td.col-live { text-align: right; }
td.col-live:empty::after { content: "—"; color: var(--muted); opacity: .45; }
.col-live .live-now { margin-left: 0; }

/* ---- THE ONE: "Today's Contender" + champion flavor ----------------------- */
.the-one-contender { margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: 30px;
  letter-spacing: .1em; text-transform: uppercase; line-height: 1.05;
  color: #ffcf6b; text-shadow: 0 0 18px rgba(255,170,50,.45), 0 0 46px rgba(255,120,30,.3); }
@media (max-width: 760px) { .the-one-contender { font-size: 22px; letter-spacing: .06em; } }
.the-one-flavor { max-width: 720px; margin: 8px auto 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.the-one-flavor b { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .the-one-flavor { font-size: 12.5px; } .season-tag { display: block; margin: 6px 0 0; } }

/* ---- Daily pinned row is 2-up now (All-Time-Highs table removed) ---------- */
.pinned-daily { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .pinned-daily { grid-template-columns: 1fr; } }

/* ---- 5th stone (Sapphire / blue) + empty stone slots + CATH info ---------- */
.gem-blue { --g-light:#cfe6ff; --g-light2:#93c2f2; --g-mid:#378add; --g-dark:#1f63b0; --g-darker:#134a86; --g-edge:#0a2c54; --g-glow:rgba(55,138,221,.78); }

/* Black empty space standing in for a stone the contender does not hold */
.award-empty { display: inline-flex; vertical-align: middle; }
.gem-slot { display: inline-block; width: 22px; height: 22px; vertical-align: middle; border-radius: 4px;
  background: #000; border: 1px solid rgba(255,255,255,.10); box-shadow: inset 0 0 8px rgba(0,0,0,.9); }
.the-one-awards .gem-slot { width: 26px; height: 26px; }
.the-one-awards .award-empty { margin-right: 10px; }

/* CATH info icon: hover for the "you vs yourself" explanation */
.panel-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  margin-left: 8px; vertical-align: 2px; border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); background: rgba(0,0,0,.18); font-family: var(--display); font-weight: 700;
  font-size: 10px; line-height: 1; cursor: help; }
.panel-info:hover, .panel-info:focus-visible { color: var(--text); border-color: var(--text); outline: none; }

/* ---- Gem-shaped empty slots + aligned stone row + counter ----------------- */
.gem-empty .gem-svg { filter: none; animation: none; }
.gem-empty .gf-hole { fill: #000; }
.gem-empty .gf-hole-out { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
/* In THE ONE row every slot is the same gem footprint, evenly spaced; hide the
   little "i" markers so filled and empty stones line up pixel-for-pixel. */
.the-one-awards { white-space: nowrap; }
.the-one-awards .stone-row { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; }
.the-one-awards .award { margin: 0; }
.the-one-awards .award-info { display: none; }
.the-one-awards .gem, .the-one-awards .gem-empty { width: 26px; height: 26px; }
.stone-count { display: inline-block; margin-right: 14px; vertical-align: middle;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .12em; color: var(--muted); }

/* ---- THE ONE lore crawl (Star Wars style, no scroll bar) ------------------ */
.one-crawl { position: relative; height: 150px; max-width: 760px; margin: 16px auto 4px; overflow: hidden;
  perspective: 340px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%); }
.one-crawl[hidden] { display: none; }
.one-crawl-inner { position: absolute; left: 0; right: 0; top: 0; text-align: center;
  transform-origin: 50% 0%; animation: one-crawl 56s linear infinite; }
.one-crawl-inner p { margin: 0 0 13px; color: #ffe1a0; font-family: var(--display); font-weight: 600;
  font-size: 15.5px; letter-spacing: .03em; line-height: 1.6; text-shadow: 0 0 12px rgba(255,170,50,.3); }
.one-crawl-inner p.crawl-title { font-size: 20px; font-weight: 700; letter-spacing: .06em; color: #fff0cf;
  margin-bottom: 20px; text-shadow: 0 0 18px rgba(255,180,60,.5); }
.one-crawl-inner p.crawl-title b { color: #ffcf6b; }
@keyframes one-crawl {
  from { transform: rotateX(10deg) translateY(260px); }
  to   { transform: rotateX(10deg) translateY(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .one-crawl { height: auto; overflow: visible; perspective: none; -webkit-mask-image: none; mask-image: none; }
  .one-crawl-inner { position: static; transform: none; animation: none; }
  .crawl-stones .cs { opacity: 1; animation: none; }
}
@media (max-width: 760px) { .one-crawl-inner p { font-size: 12.5px; } .the-one-awards .stone-row { gap: 9px; } }

/* ---- Stones inside the crawl: each fades in/out like a memory ------------- */
.crawl-stones { display: flex; justify-content: center; align-items: flex-start; gap: 22px; margin: 4px 0 14px; }
.crawl-stones .cs { display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: .12; animation: stone-memory 5s ease-in-out infinite; }
.crawl-stones .cs .gem { width: 30px; height: 30px; }
.crawl-stones .cs small { font-family: var(--display); font-weight: 600; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: #ffcf6b; text-shadow: 0 0 10px rgba(255,170,50,.35); }
.crawl-stones .cs:nth-child(1) { animation-delay: 0s; }
.crawl-stones .cs:nth-child(2) { animation-delay: .6s; }
.crawl-stones .cs:nth-child(3) { animation-delay: 1.2s; }
.crawl-stones .cs:nth-child(4) { animation-delay: 1.8s; }
.crawl-stones .cs:nth-child(5) { animation-delay: 2.4s; }
@keyframes stone-memory { 0%, 100% { opacity: .12; } 45%, 55% { opacity: 1; } }
@media (max-width: 760px) { .crawl-stones { gap: 14px; } .crawl-stones .cs .gem { width: 26px; height: 26px; } }

/* ---- Footer contact ------------------------------------------------------- */
.foot-contact { color: var(--muted); margin-right: 14px; }
.foot-contact b { color: var(--text); font-weight: 600; }

/* ---- Improved award / stone tooltip UI ------------------------------------ */
#awardTip {
  max-width: 300px; padding: 12px 14px 13px; border-radius: 12px;
  background: rgba(10,15,27,.98); border: 1px solid var(--line);
  border-left-width: 3px; border-left-color: var(--muted);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.75);
  font-size: 12.5px; line-height: 1.55;
}
#awardTip b { display: block; font-family: var(--display); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; font-size: 12.5px; margin-bottom: 5px; color: var(--text); }
#awardTip[data-kind~="gem-violet"] { border-left-color: #a866f0; } #awardTip[data-kind~="gem-violet"] b { color: #c9a2f7; }
#awardTip[data-kind~="gem-orange"] { border-left-color: #ff9b30; } #awardTip[data-kind~="gem-orange"] b { color: #ffc275; }
#awardTip[data-kind~="gem-red"]    { border-left-color: #ff4d5e; } #awardTip[data-kind~="gem-red"] b    { color: #ff8f99; }
#awardTip[data-kind~="gem-green"]  { border-left-color: #35d07f; } #awardTip[data-kind~="gem-green"] b  { color: #8fe8b0; }
#awardTip[data-kind~="gem-blue"]   { border-left-color: #378add; } #awardTip[data-kind~="gem-blue"] b   { color: #93c2f2; }
#awardTip[data-kind~="gem-empty"]  { border-left-style: dashed; }

/* ---- 50 / LIVE tooltip wrappers + their tooltip accent -------------------- */
.fifty-wrap, .live-wrap { display: inline-flex; align-items: center; cursor: help; }
.col-live .live-wrap { justify-content: flex-end; }
#awardTip[data-kind~="fifty"], #awardTip[data-kind~="live"] { border-left-color: var(--accent); }
#awardTip[data-kind~="fifty"] b, #awardTip[data-kind~="live"] b { color: #bff0ff; }

/* ---- Rank column (main players table) ------------------------------------- */
.leaderboard th.col-rank, .leaderboard td.col-rank { width: 1%; white-space: nowrap; text-align: center; padding-left: 10px; padding-right: 10px; }
.rank-num { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--text); font-variant-numeric: tabular-nums; }
.rank-wrap { cursor: help; }
.rank-na { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 4px; padding: 1px 6px; }
#awardTip[data-kind~="rank"] { border-left-color: var(--accent); } #awardTip[data-kind~="rank"] b { color: #bff0ff; }

/* ---- THE ONE: back story + lore plot as a full-height right column -------- */
.the-one-inner { display: flex; align-items: flex-start; gap: 0; }
.the-one-primary { flex: 1 1 auto; min-width: 0; }
.the-one-body { min-width: 0; }
.the-one-split { display: block; }
.the-one-split .table-wrap { min-width: 0; }
.the-one-crawl-side { position: relative; flex: 0 0 40%; min-width: 300px; display: flex; flex-direction: column;
  align-items: stretch; justify-content: flex-start; align-self: stretch;
  border-left: 1px solid var(--line); margin-left: 18px; padding: 0 16px 0 18px; }
.the-one-crawl-side .one-crawl { margin: 8px 0 0; width: 100%; height: 150px; min-height: 150px; align-self: stretch;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 88%, transparent 100%); }
@media (max-width: 900px) {
  .the-one-inner { flex-direction: column; }
  .the-one-crawl-side { flex: none; border-left: none; border-top: 1px solid var(--line); margin: 14px 0 0; padding: 14px 0 0; }
  .the-one-crawl-side .one-crawl { height: 150px; }
}

/* THE ONE title block: left aligned, with the season race line + status */
.the-one-title { text-align: left; }
.the-one-status { display: inline-block; margin-left: 8px; font-family: var(--display); font-weight: 600;
  font-size: 14px; letter-spacing: .04em; text-transform: none; color: var(--muted);
  text-shadow: none; vertical-align: 3px; }

/* Green "WIN% (W-L)" record cell in THE ONE table */
.the-one-table .rec-pct { color: var(--win); font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(53,208,127,.25); }

/* 50 column N/A */
.fifty-na { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .06em; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 4px; padding: 1px 5px; }

/* Stone-leader gems next to a name in Most Recent Matches */
.stone-marks { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 6px; }
.stone-marks .gem { width: 20px; height: 20px; }
.stone-marks .award-info { display: none; }

/* Up / down rating arrows for rated players */
.rate-arrow { margin-left: 6px; font-size: 11px; vertical-align: 1px; }
.rate-arrow.up { color: var(--win); }
.rate-arrow.down { color: var(--loss); }

/* ---- Floating dropdown nav (above everything) ----------------------------- */
.navdrop { position: relative; }
.navdrop-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 100%;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12,18,32,.92);
  color: var(--text); font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 12px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px -8px rgba(0,0,0,.6); }
.navdrop-btn::-webkit-details-marker { display: none; }
.navdrop-btn:hover { border-color: var(--accent); color: var(--accent); }
.navdrop-bars { display: inline-flex; flex-direction: column; gap: 3px; }
.navdrop-bars i { width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.navdrop[open] .navdrop-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.navdrop[open] .navdrop-bars i:nth-child(2) { opacity: 0; }
.navdrop[open] .navdrop-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.navdrop-bars i { transition: transform .15s ease, opacity .15s ease; }
.navdrop-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 258px;
  background: rgba(10,15,27,.98); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.8); display: flex; flex-direction: column; }
.navdrop-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px;
  color: var(--text); text-decoration: none; font-size: 14px; }
.navdrop-menu a:hover { background: rgba(255,255,255,.06); color: var(--accent); }
.navdrop-ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.navdrop-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.navdrop-note { padding: 9px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.navdrop-note b { color: var(--text); }
@media (max-width: 640px) { .top-controls { top: 10px; right: 10px; gap: 8px; } .navdrop-word { display: none; } .live-badge .live-sub { display: none; } }

/* ---- Crawl pause/play button + paused state ------------------------------- */
.one-crawl.is-paused .one-crawl-inner { animation-play-state: paused; }
.crawl-toggle { position: absolute; bottom: 8px; right: 10px; z-index: 4; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(10,15,27,.92); color: var(--text);
  cursor: pointer; font-size: 11px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.crawl-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Season "days remaining" tag ------------------------------------------ */
.season-days { display: inline-block; margin-left: 8px; padding: 1px 8px 0; vertical-align: 3px;
  border: 1px solid rgba(255,209,102,.4); border-radius: 4px; background: rgba(255,209,102,.08);
  font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .1em; color: #ffd98a; }
@media (max-width: 760px) { .season-days { display: block; margin: 6px 0 0; } }

/* ---- Winners page themes: violet (streak) / red (hardcore) ----------------- */
.winners-streak .winners-title, .winners-streak .winners-panel .winners thead th { color: #cbb2f5; }
.winners-streak .winners-title { text-shadow: 0 0 14px rgba(168,102,240,.45); }
.winners-streak .winners-panel { border-color: rgba(168,102,240,.45); box-shadow: 0 0 0 1px rgba(168,102,240,.08), 0 0 30px -10px rgba(168,102,240,.4); }
.winners-streak .winners .lb-row.row-gold { background: linear-gradient(90deg, rgba(168,102,240,.2), rgba(168,102,240,.04) 60%); box-shadow: inset 0 0 24px -8px rgba(168,102,240,.5); }
.winners-streak a.back-link, .winners-streak .winners-sub a { color: #cbb2f5; }

.winners-hardcore .winners-title, .winners-hardcore .winners-panel .winners thead th { color: #ff9ba4; }
.winners-hardcore .winners-title { text-shadow: 0 0 14px rgba(255,77,94,.45); }
.winners-hardcore .winners-panel { border-color: rgba(255,77,94,.5); box-shadow: 0 0 0 1px rgba(255,77,94,.1), 0 0 30px -10px rgba(255,77,94,.42); }
.winners-hardcore .winners .lb-row.row-gold { background: linear-gradient(90deg, rgba(255,77,94,.2), rgba(255,77,94,.04) 60%); box-shadow: inset 0 0 24px -8px rgba(255,77,94,.5); }
.winners-hardcore a.back-link, .winners-hardcore .winners-sub a { color: #ff9ba4; }

/* ---- Per-table colour for the "days remaining" tag ------------------------ */
.pin-podium   .season-days { border-color: rgba(255,140,40,.4);  background: rgba(255,140,40,.08);  color: #ffbe86; }
.pin-streak   .season-days { border-color: rgba(168,102,240,.4); background: rgba(168,102,240,.08); color: #cbb2f5; }
.pin-hardcore .season-days { border-color: rgba(255,77,94,.45);  background: rgba(255,77,94,.10);  color: #ff9ba4; }
.pin-cold     .season-days { border-color: rgba(124,200,255,.4); background: rgba(124,200,255,.08); color: #a9dbff; }

/* ==========================================================================
   Star Battle Reloaded — header changes (items 1, 2, 5, 8)
   ========================================================================== */

/* ---- Item 1: game-name title (was "THE ONE"); longer, so tighter spacing --- */
.the-one-title { font-size: 30px; letter-spacing: .16em; padding-left: .16em; line-height: 1.06; }
@media (max-width: 760px) { .the-one-title { font-size: 21px; letter-spacing: .1em; } }

/* ---- Item 2: right column — back story pinned to the TOP, crawl at bottom -- */
.the-one-crawl-side { flex-direction: column; justify-content: flex-start; gap: 6px; padding-top: 2px; }
.the-one-crawl-side .the-one-backstory { align-self: stretch; }
.the-one-crawl-side .one-crawl { height: 150px; min-height: 150px; width: 100%; margin: auto 0 0; align-self: stretch; }

.the-one-backstory { width: 100%; text-align: center; padding: 0 0 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.backstory-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: .22em; text-transform: uppercase; color: #ffcf6b; text-shadow: 0 0 14px rgba(255,170,50,.35); }
.backstory-lead { margin: 6px auto 12px; max-width: 320px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.backstory-stones { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; }
.backstory-stones .bs-stone { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 56px; }
.backstory-stones .bs-stone .gem { width: 30px; height: 30px; }
.backstory-stones .bs-stone small { font-family: var(--display); font-weight: 600; font-size: 9.5px;
  letter-spacing: .06em; text-transform: uppercase; color: #ffcf6b; line-height: 1.2;
  text-shadow: 0 0 10px rgba(255,170,50,.3); }
.backstory-stones .award { cursor: help; border-radius: 6px; padding: 2px; transition: background .15s ease; }
.backstory-stones .award:hover, .backstory-stones .award:focus-visible { background: rgba(255,255,255,.05); outline: none; }
@media (max-width: 760px) { .backstory-stones { gap: 12px; } .backstory-stones .bs-stone { width: 52px; } }

/* ---- Item 5: "#1 contender" stone — a lit stone with a "?" over it --------- */
.stone-marks .award.is-contender { position: relative; }
.stone-marks .award.is-contender .gem-svg { opacity: .9; filter: saturate(.85) brightness(.95); }
.gem-q { position: absolute; top: -7px; right: -8px; z-index: 2; width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(8,12,22,.96); border: 1px solid rgba(255,255,255,.55); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 10px; line-height: 1;
  box-shadow: 0 0 8px rgba(0,0,0,.7); }

/* ---- Item 8: the "ON" pill is now hoverable (keeps its blink) -------------- */
.streak-live.award { gap: 0; }
.streak-live.award:focus-visible { outline: 2px solid var(--win); outline-offset: 2px; }

/* ---- Item 6: SC2Arcade profile link on the player page -------------------- */
.sc2-link { color: var(--accent); text-decoration: none; white-space: nowrap; font-weight: 600; }
.sc2-link:hover, .sc2-link:focus-visible { text-decoration: underline; outline: none; }
