/* Tom Pearl Games site pages: the leaderboards (TomGames/leaderboards.html), sign-in and the player pages (/player/).
   Layout and components here; body.ts-arcade (at the end) is the arcade look they all wear. Everything is scoped to body.ts. */
.ts {
  --ts-bg: #0b0c0f;
  --ts-surface: #131419;
  --ts-raised: #1a1c22;
  --ts-hover: #22252c;
  --ts-line: rgba(255, 255, 255, .075);
  --ts-line-2: rgba(255, 255, 255, .14);
  --ts-text: #f3f4f6;
  --ts-muted: #a2a6b0;
  --ts-faint: #6d717c;
  --ts-accent: #f5c542;
  --ts-accent-soft: rgba(245, 197, 66, .1);
  --ts-good: #4ade80;
  --ts-bad: #f87171;
  --ts-gold: #f5c542;
  --ts-silver: #c8ced8;
  --ts-bronze: #d39058;
  --ts-r: 16px;
  --ts-r-sm: 10px;
  --ts-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ts-bg);
  color: var(--ts-text);
  font: 15px/1.55 var(--ts-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
.ts *, .ts *::before, .ts *::after { box-sizing: border-box; }
.ts :where(a) { color: inherit; }
.ts :focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
.ts h1, .ts h2, .ts h3, .ts p { margin: 0; }
.ts main { flex: 1 0 auto; }
.ts-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ts-num { font-variant-numeric: tabular-nums; }

/* top bar */
.ts-bar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--ts-line); background: rgba(11, 12, 15, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.ts-bar-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.ts-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.ts-brand img { width: 24px; height: 24px; border-radius: 6px; }
.ts-nav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ts-nav::-webkit-scrollbar { display: none; }
.ts-nav a { padding: 7px 12px; border-radius: 8px; color: var(--ts-muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.ts-nav a:hover { color: var(--ts-text); background: var(--ts-raised); }
.ts-nav a[aria-current="page"] { color: var(--ts-text); background: var(--ts-raised); }
.ts-bar-end { margin-left: auto; color: var(--ts-muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ts-bar-end:hover { color: var(--ts-text); }

/* page head */
.ts-head { padding: 48px 0 28px; }
.ts-crumbs { display: flex; gap: 8px; margin-bottom: 14px; color: var(--ts-faint); font-size: 14px; }
.ts-crumbs a { color: var(--ts-muted); text-decoration: none; }
.ts-crumbs a:hover { color: var(--ts-text); }
.ts-h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; font-weight: 750; letter-spacing: -.025em; }
.ts-h2 { font-size: 20px; line-height: 1.3; font-weight: 650; letter-spacing: -.012em; }
.ts-lede { margin-top: 12px; max-width: 62ch; color: var(--ts-muted); font-size: 17px; line-height: 1.55; }
.ts-note { color: var(--ts-faint); font-size: 13px; }
.ts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ts-split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }

/* controls */
.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid var(--ts-line-2); border-radius: var(--ts-r-sm); background: var(--ts-raised); color: var(--ts-text);
  font: 600 14px/1 var(--ts-font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.ts-btn:hover { background: var(--ts-hover); border-color: rgba(255, 255, 255, .22); }
.ts-btn:active { transform: translateY(1px); }
.ts-btn--primary { border-color: transparent; background: var(--ts-text); color: #0b0c0f; }
.ts-btn--primary:hover { background: #fff; border-color: transparent; }
.ts-btn--ghost { border-color: transparent; background: transparent; color: var(--ts-muted); }
.ts-btn--ghost:hover { background: var(--ts-raised); color: var(--ts-text); border-color: transparent; }
.ts-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.ts-btn[disabled] { opacity: .5; cursor: default; }

.ts-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--ts-line); border-radius: 12px; background: var(--ts-surface); }
.ts-seg button {
  height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ts-muted);
  font: 500 14px/1 var(--ts-font); cursor: pointer; white-space: nowrap; transition: color .15s, background .15s;
}
.ts-seg button:hover { color: var(--ts-text); }
.ts-seg button[aria-selected="true"], .ts-seg button[aria-pressed="true"] { background: var(--ts-hover); color: var(--ts-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--ts-line); }

.ts-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--ts-line); overflow-x: auto; scrollbar-width: none; }
.ts-tabs::-webkit-scrollbar { display: none; }
.ts-tabs button {
  position: relative; padding: 12px 0 13px; border: 0; background: none; color: var(--ts-muted); font: 500 14px/1 var(--ts-font);
  cursor: pointer; white-space: nowrap; transition: color .15s;
}
.ts-tabs button:hover { color: var(--ts-text); }
.ts-tabs button[aria-selected="true"] { color: var(--ts-text); }
.ts-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ts-accent); }

/* surfaces */
.ts-card { border: 1px solid var(--ts-line); border-radius: var(--ts-r); background: var(--ts-surface); }
.ts-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.ts-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ts-stat { padding: 14px 16px; border: 1px solid var(--ts-line); border-radius: 12px; background: var(--ts-surface); }
.ts-stat span { display: block; color: var(--ts-muted); font-size: 13px; }
.ts-stat b { display: block; margin-top: 4px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ts-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid var(--ts-line-2); border-radius: 99px; color: var(--ts-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ts-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ts-accent)); flex: 0 0 auto; }

/* ranked tables */
.ts-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ts-table th { padding: 10px 16px; border-bottom: 1px solid var(--ts-line); color: var(--ts-faint); font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
.ts-table td { height: 52px; padding: 0 16px; border-bottom: 1px solid var(--ts-line); text-align: right; white-space: nowrap; font-size: 14px; }
.ts-table tbody tr:last-child td { border-bottom: 0; }
.ts-table th:first-child, .ts-table td:first-child { width: 56px; padding-right: 0; text-align: left; }
.ts-table th:nth-child(2), .ts-table td:nth-child(2) { width: 100%; text-align: left; }
.ts-table td.is-key { font-weight: 650; }
.ts-table th.is-key { color: var(--ts-text); }
.ts-table tbody tr { transition: background .15s; }
.ts-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.ts-table tr.is-me { background: var(--ts-accent-soft); }
.ts-table tr.is-me:hover { background: rgba(245, 197, 66, .14); }
.ts-table tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--ts-accent); }
.ts-table tr.is-gap td { height: 28px; color: var(--ts-faint); text-align: center !important; font-size: 13px; }
.ts-rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; color: var(--ts-muted); font-size: 13px; font-weight: 600; }
.ts-rank.r1 { background: rgba(245, 197, 66, .16); color: var(--ts-gold); }
.ts-rank.r2 { background: rgba(200, 206, 216, .13); color: var(--ts-silver); }
.ts-rank.r3 { background: rgba(211, 144, 88, .15); color: var(--ts-bronze); }
.ts-who { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; text-decoration: none; }
.ts-who > span { overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.ts-ava { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--ts-hover); display: inline-grid; place-items: center; color: var(--ts-muted); font-size: 12px; font-weight: 600; }
.ts-tag { flex: 0 0 auto; padding: 1px 6px; border-radius: 5px; background: var(--ts-raised); color: var(--ts-muted); font-size: 11px; font-weight: 500; }
.ts-tag.is-you { background: var(--ts-accent); color: #1b1503; }
.ts-flag { flex: 0 0 auto; font-size: 13px; color: var(--ts-faint); }
.ts-empty { padding: 28px 18px; color: var(--ts-muted); font-size: 14px; text-align: center; }
.ts-skel { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--ts-raised), var(--ts-hover), var(--ts-raised)); background-size: 200% 100%; animation: ts-skel 1.2s linear infinite; }
@keyframes ts-skel { to { background-position: -200% 0; } }

/* footer */
.ts-foot { margin-top: 64px; border-top: 1px solid var(--ts-line); color: var(--ts-faint); font-size: 13px; }
.ts-foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 22px 24px 34px; }
.ts-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ts-foot a { color: var(--ts-muted); text-decoration: none; }
.ts-foot a:hover { color: var(--ts-text); }

/* the level card tg-progress.js mounts on site pages (the games keep their own chip look) */
.ts .tgp-card {
  display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px 18px; width: auto; border: 1px solid var(--ts-line); border-radius: var(--ts-r);
  background: var(--ts-surface); box-shadow: none; color: var(--ts-text); font: 14px/1.45 var(--ts-font);
}
.ts .tgp-card .tgp-face { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ts-hover); color: var(--ts-text); font: 600 18px var(--ts-font); }
.ts .tgp-card .tgp-name { font: 650 16px/1.3 var(--ts-font); color: var(--ts-text); }
.ts .tgp-card .tgp-lv { padding: 2px 8px; border-radius: 99px; background: var(--ts-accent-soft); color: var(--ts-accent); font: 600 12px/1.4 var(--ts-font); }
.ts .tgp-card .tgp-row { display: flex; align-items: center; gap: 10px; }
.ts .tgp-card .tgp-title { color: var(--ts-muted); font: 500 12px var(--ts-font); }
.ts .tgp-card .tgp-sub { color: var(--ts-muted); font: 13px/1.5 var(--ts-font); }
.ts .tgp-card .tgp-bar { height: 6px; border-radius: 99px; background: var(--ts-hover); box-shadow: none; overflow: hidden; }
.ts .tgp-card .tgp-bar i { border-radius: 99px; background: var(--ts-accent); }
.ts .tgp-card .tgp-side { gap: 8px; }
.ts .tgp-card .tgp-pid { padding: 5px 9px; border: 1px solid var(--ts-line-2); border-radius: 8px; background: transparent; color: var(--ts-muted); font: 500 12px ui-monospace, Menlo, monospace; cursor: pointer; }
.ts .tgp-card .tgp-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--ts-text); color: #0b0c0f; font: 600 13px/1 var(--ts-font); text-decoration: none; box-shadow: none; transform: none; }
.ts .tgp-card .tgp-btn:hover { background: #fff; }
.ts .tgp-card .tgp-link { color: var(--ts-muted); font: 500 13px var(--ts-font); }
.ts .tgp-card.is-guest { flex-wrap: wrap; align-items: center; }
.ts .tgp-card.is-guest .tgp-kicker { flex-basis: 100%; color: var(--ts-text); font: 650 15px/1.3 var(--ts-font); letter-spacing: 0; text-transform: lowercase; }
.ts .tgp-card.is-guest .tgp-kicker::first-letter { text-transform: uppercase; }
.ts .tgp-card.is-guest .tgp-sub { flex: 1 1 100%; font-size: 13px; }

@media (max-width: 720px) {
  .ts-wrap { padding: 0 16px; }
  .ts-bar-in { gap: 14px; height: 56px; }
  .ts-brand span { display: none; }
  .ts-bar-end { display: none; }
  .ts-nav { margin-right: -16px; padding-right: 16px; }
  .ts-nav a { padding: 7px 10px; }
  .ts-head { padding: 30px 0 20px; }
  .ts-lede { font-size: 15px; }
  .ts-table th, .ts-table td { padding: 0 10px; }
  .ts-table th { padding-top: 10px; padding-bottom: 10px; }
  .ts-table th:first-child, .ts-table td:first-child { width: 44px; }
  .ts-foot-in { padding: 20px 16px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .ts *, .ts *::before, .ts *::after { transition: none !important; animation: none !important; }
}

/* ---------- leaderboards (TomGames/leaderboards.html) ---------- */
.lb-period { display: grid; justify-items: end; gap: 8px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.lb-panel { display: flex; flex-direction: column; overflow: hidden; }
.lb-panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--ts-line); }
.lb-panel-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-decoration: none; }
.lb-panel-title > span { display: grid; min-width: 0; }
.lb-panel-title b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-panel-title:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ts-line-2); }
.lb-sub { color: var(--ts-faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lb-panel-body { flex: 1; min-height: 120px; }
.lb-panel .ts-table td { height: 44px; padding: 0 14px; font-size: 14px; }
.lb-panel .ts-table th { padding: 8px 14px; }
.lb-panel .ts-table th:first-child, .lb-panel .ts-table td:first-child { width: 48px; padding-right: 0; }
.lb-panel .ts-table th { white-space: nowrap; }
.lb-panel .ts-table td:nth-child(2) { max-width: 0; }   /* the name gives way first: numbers never clip */
.lb-more { display: block; padding: 12px 16px; border-top: 1px solid var(--ts-line); color: var(--ts-muted); font-size: 13px; font-weight: 550; text-decoration: none; }
.lb-more::after { content: ' →'; }
.lb-more:hover { color: var(--ts-text); background: var(--ts-raised); }
.lb-skel { display: grid; gap: 18px; padding: 20px 16px; }
.lb-skel .ts-skel:nth-child(odd) { width: 86%; }
.lb-scroll { overflow-x: auto; }

.lb-game-row { display: flex; align-items: center; gap: 24px; }
.lb-cover { flex: 0 0 auto; width: 240px; aspect-ratio: 2 / 1; border-radius: 12px; object-fit: cover; background: var(--ts-raised); box-shadow: inset 0 0 0 1px var(--ts-line); }
.lb-game-text { display: grid; gap: 10px; min-width: 0; }
.lb-game-sub { color: var(--ts-muted); font-size: 15px; }
.lb-game-text .ts-row { margin-top: 6px; }
.lb-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; border-bottom: 1px solid var(--ts-line); }
.lb-tabs-box { min-width: 0; flex: 1 1 auto; }
.lb-bar .ts-tabs { border-bottom: 0; }
.lb-bar .ts-seg { margin-bottom: 10px; }
.lb-totals { margin-bottom: 14px; }
.lb-qual:empty, .lb-reset:empty { display: none; }
.lb-qual { margin-bottom: 12px; }
.lb-detail { overflow: hidden; }
.lb-detail .ts-empty { display: grid; justify-items: center; gap: 14px; padding: 48px 18px; }
.lb-count { padding: 12px 16px; border-top: 1px solid var(--ts-line); color: var(--ts-faint); font-size: 13px; }
.lb-reset { margin-top: 12px; }

@media (max-width: 720px) {
  .lb-period { justify-items: start; }
  .lb-grid { grid-template-columns: 1fr; }
  .lb-game-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .lb-cover { width: 100%; }
  .lb-bar { flex-direction: column-reverse; align-items: stretch; }
  .lb-bar .ts-seg { margin: 0; align-self: flex-start; }
  .lb-hide-sm { display: none; }
  .lb-totals { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .lb-totals .ts-stat { padding: 10px 12px; }
  .lb-totals .ts-stat b { font-size: 18px; }
}

/* ---------- Tom Pearl Games skin (body.ts.ts-arcade) ----------
   The hub's neon night (TomGames/arcade-home.css): Bungee for titles, Chakra Petch for every label and number,
   Inter for reading. Game art, podiums and medal ranks carry the game feel; no pixel fonts. */
@font-face { font-family: 'TPA Display'; src: url('fonts/Bungee-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TPA HUD'; src: url('fonts/ChakraPetch-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'TPA HUD'; src: url('fonts/ChakraPetch-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'TPA HUD'; src: url('fonts/ChakraPetch-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
.ts-arcade {
  --ts-bg: #0a0614; --ts-surface: #150c26; --ts-raised: #22143c; --ts-hover: #2c1a4b;
  --ts-line: rgba(196, 150, 255, .13); --ts-line-2: rgba(196, 150, 255, .27);
  --ts-text: #fbf3ff; --ts-muted: #c3b1dd; --ts-faint: #8f7cae;
  --ts-accent: #ff5fcf; --ts-accent-soft: rgba(255, 95, 207, .12); --ts-cyan: #67f4ff;
  --ts-gold: #ffd25b; --ts-silver: #dfe5f2; --ts-bronze: #f0a066; --ts-good: #5ef0a0;
  --ts-hud: 'TPA HUD', 'Chakra Petch', var(--ts-font);
  --ts-display: 'TPA Display', Impact, 'Arial Black', sans-serif;
  --ts-panel: linear-gradient(180deg, rgba(38, 21, 66, .86), rgba(17, 9, 31, .92));
  --ts-cut: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse at 0 8%, rgba(110, 28, 122, .34), transparent 46%), radial-gradient(ellipse at 100% 55%, rgba(44, 36, 140, .34), transparent 52%), #0a0614;
}
.ts-arcade::before {
  content: ''; position: fixed; z-index: -1; inset: 38% -30% -35%; pointer-events: none;
  background: linear-gradient(rgba(166, 79, 249, .17) 1px, transparent 1px), linear-gradient(90deg, rgba(166, 79, 249, .17) 1px, transparent 1px);
  background-size: 65px 65px; transform: perspective(450px) rotateX(38deg);
  -webkit-mask-image: linear-gradient(transparent, #000 75%); mask-image: linear-gradient(transparent, #000 75%);
}
.ts-arcade :focus-visible { outline-color: var(--ts-cyan); }
.ts-arcade ::selection { background: rgba(255, 95, 207, .4); }

/* bar */
.ts-arcade .ts-bar { background: rgba(10, 6, 20, .8); border-bottom-color: #3a2152; }
.ts-arcade .ts-brand span { font: 17px/1 var(--ts-display); letter-spacing: .01em; color: #fff2ff; }
.ts-arcade .ts-brand b { font-weight: 400; color: var(--ts-accent); }
.ts-arcade .ts-nav a { border-radius: 4px; font: 600 13px/1 var(--ts-hud); letter-spacing: .09em; text-transform: uppercase; }
.ts-arcade .ts-nav a[aria-current="page"] { color: #fff; background: rgba(255, 95, 207, .13); box-shadow: inset 0 -2px 0 var(--ts-accent); }
.ts-arcade .ts-bar-end { font: 600 12px/1 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }

/* head */
.ts-arcade .ts-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--ts-cyan); font: 600 12px/1 var(--ts-hud); letter-spacing: .22em; text-transform: uppercase; }
.ts-arcade .ts-kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.ts-arcade .ts-h1 { font: clamp(34px, 5.4vw, 58px)/1.04 var(--ts-display); letter-spacing: .01em; color: #fff2ff; text-shadow: 0 3px 0 #b652e2, 0 7px 0 #43166a, 0 0 28px rgba(194, 97, 254, .35); }
.ts-arcade .ts-h2 { font: 17px/1.2 var(--ts-display); letter-spacing: .02em; }
.ts-arcade .ts-crumbs { font: 600 12px/1 var(--ts-hud); letter-spacing: .12em; text-transform: uppercase; }
.ts-arcade .ts-note { font-size: 13px; }

/* controls: cut-corner buttons */
.ts-arcade .ts-btn { height: 40px; padding: 0 18px; border: 0; border-radius: 0; clip-path: var(--ts-cut); background: #2e1b4f; color: var(--ts-text); font: 700 13px/1 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }
.ts-arcade .ts-btn:hover { background: #3a2363; }
.ts-arcade .ts-btn--primary { background: linear-gradient(180deg, #8ef8ff, #3fd6ea); color: #0c0720; box-shadow: inset 0 -3px 0 rgba(0, 40, 60, .25); }
.ts-arcade .ts-btn--primary:hover { background: linear-gradient(180deg, #b4fbff, #5ee2f2); }
.ts-arcade .ts-btn--sm { height: 32px; padding: 0 13px; font-size: 12px; }
.ts-arcade .ts-seg { padding: 3px; border-radius: 0; clip-path: var(--ts-cut); border: 0; background: rgba(34, 20, 60, .9); }
.ts-arcade .ts-seg button { border-radius: 0; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); font: 700 12.5px/1 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }
.ts-arcade .ts-seg button[aria-selected="true"], .ts-arcade .ts-seg button[aria-pressed="true"] { background: var(--ts-accent); color: #1d0626; box-shadow: none; }
.ts-arcade .ts-tabs { gap: 26px; }
.ts-arcade .ts-tabs button { font: 700 13px/1 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; padding: 14px 0 15px; }
.ts-arcade .ts-tabs button[aria-selected="true"] { color: #fff; }
.ts-arcade .ts-tabs button[aria-selected="true"]::after { height: 3px; border-radius: 0; background: var(--ts-accent); box-shadow: 0 0 14px rgba(255, 95, 207, .8); }

/* surfaces */
.ts-arcade .ts-card { border-color: var(--ts-line); background: var(--ts-panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 48px -30px #000; }
.ts-arcade .ts-stat { position: relative; overflow: hidden; border-color: var(--ts-line); border-radius: 12px; background: var(--ts-panel); }
.ts-arcade .ts-stat::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--c, var(--ts-accent)); box-shadow: 0 0 10px var(--c, var(--ts-accent)); }
.ts-arcade .ts-stat span { color: var(--ts-faint); font: 600 11.5px/1.2 var(--ts-hud); letter-spacing: .14em; text-transform: uppercase; }
.ts-arcade .ts-stat b { margin-top: 6px; font: 700 26px/1.05 var(--ts-hud); letter-spacing: .01em; }

/* ranked tables */
.ts-arcade .ts-table th { color: var(--ts-faint); font: 600 11px/1 var(--ts-hud); letter-spacing: .14em; text-transform: uppercase; }
.ts-arcade .ts-table th.is-key { color: var(--ts-accent); }
.ts-arcade .ts-table td { font: 600 15px/1.2 var(--ts-hud); color: #e9def8; }
.ts-arcade .ts-table td.is-key { color: #fff; font-weight: 700; }
.ts-arcade .ts-table tbody tr:hover { background: rgba(196, 150, 255, .05); }
.ts-arcade .ts-table tr.is-me { background: linear-gradient(90deg, rgba(255, 95, 207, .2), rgba(255, 95, 207, .04) 70%); }
.ts-arcade .ts-table tr.is-me:hover { background: linear-gradient(90deg, rgba(255, 95, 207, .26), rgba(255, 95, 207, .06) 70%); }
.ts-arcade .ts-table tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--ts-accent); }
.ts-arcade .ts-rank { min-width: 32px; height: 28px; border-radius: 0; color: var(--ts-faint); font: 700 15px/1 var(--ts-hud); }
.ts-arcade .ts-rank.r1, .ts-arcade .ts-rank.r2, .ts-arcade .ts-rank.r3 { width: 34px; min-width: 34px; height: 30px; padding: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); color: #1c1006; font-size: 14px; }
.ts-arcade .ts-rank.r1 { background: linear-gradient(160deg, #fff3b0, #ffcd3f 55%, #d8921a); }
.ts-arcade .ts-rank.r2 { background: linear-gradient(160deg, #fff, #cdd5e6 55%, #8f9bb6); }
.ts-arcade .ts-rank.r3 { background: linear-gradient(160deg, #ffd6b0, #eb9a5c 55%, #a95b28); }
.ts-arcade .ts-who > span { font-weight: 600; }
.ts-arcade .ts-ava { width: 30px; height: 30px; background: #2c1a4b; box-shadow: 0 0 0 2px rgba(196, 150, 255, .22); font: 700 13px var(--ts-hud); }
.ts-arcade .ts-tag { border-radius: 3px; font: 700 10.5px/1.5 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }
.ts-arcade .ts-tag.is-you { background: var(--ts-accent); color: #1d0626; }
.ts-arcade .ts-table tr.is-gap td { color: var(--ts-faint); letter-spacing: .3em; }
.ts-arcade .ts-empty { color: var(--ts-muted); }
.ts-arcade .ts-skel { background: linear-gradient(90deg, #22143c, #33205a, #22143c); background-size: 200% 100%; }

/* podium: the top three above a ranked table (leaderboards.html detail boards, global ranks) */
.tpa-podium { list-style: none; display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 14px; max-width: 760px; margin: 8px auto 22px; padding: 0 4px; }
.tpa-pod { --m: var(--ts-silver); position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; color: inherit; text-decoration: none; text-align: center; }
.tpa-pod.p1 { --m: var(--ts-gold); order: 2; }
.tpa-pod.p2 { order: 1; }
.tpa-pod.p3 { --m: var(--ts-bronze); order: 3; }
.tpa-pod-ava { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #2c1a4b; color: #fff; font: 700 28px var(--ts-hud);
  box-shadow: 0 0 0 3px var(--ts-bg), 0 0 0 6px var(--m), 0 0 30px color-mix(in srgb, var(--m) 45%, transparent); }
.tpa-pod-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.p1 .tpa-pod-ava { width: 96px; height: 96px; font-size: 36px; }
.tpa-crown { position: absolute; top: -30px; left: 50%; width: 38px; height: 26px; transform: translateX(-50%); color: var(--ts-gold); filter: drop-shadow(0 0 8px rgba(255, 210, 91, .7)); }
.tpa-pod-name { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; margin-top: 16px; font: 700 16px/1.2 var(--ts-hud); }
.tpa-pod-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpa-pod-val { margin-top: 4px; color: var(--m); font: 700 22px/1.1 var(--ts-hud); text-shadow: 0 0 18px color-mix(in srgb, var(--m) 40%, transparent); }
.p1 .tpa-pod-val { font-size: 27px; }
.tpa-pod-sub { margin-top: 3px; color: var(--ts-faint); font: 600 11px/1.3 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }
.tpa-pod-step { display: grid; place-items: center; align-self: stretch; height: 64px; margin-top: 14px; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 34%, #1a0e2e), rgba(22, 12, 40, .6)); border-top: 2px solid var(--m);
  color: var(--m); font: 34px/1 var(--ts-display); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.p1 .tpa-pod-step { height: 92px; font-size: 44px; }
.p3 .tpa-pod-step { height: 48px; font-size: 28px; }
a.tpa-pod:hover .tpa-pod-name span { text-decoration: underline; text-underline-offset: 3px; }
.tpa-pod.is-me .tpa-pod-name::after { content: 'You'; padding: 1px 6px; border-radius: 3px; background: var(--ts-accent); color: #1d0626; font: 700 10px/1.5 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }

/* leaderboards overview: each game a cabinet with its real cover art */
.ts-arcade .lb-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ts-arcade .lb-panel { --c: var(--ts-accent); border-radius: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ts-arcade .lb-panel:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 48px -26px #000, 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.ts-arcade .lb-art { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; background: #1a0f2c; }
.ts-arcade .lb-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ts-arcade .lb-panel:hover .lb-art img { transform: scale(1.04); }
.ts-arcade .lb-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.ts-arcade .lb-panel-head { padding: 12px 14px 12px 16px; }
.ts-arcade .lb-panel-title b { font: 16px/1.15 var(--ts-display); letter-spacing: .02em; color: #fff; }
.ts-arcade .lb-panel-title:hover b { text-decoration: none; color: var(--c); }
.ts-arcade .lb-sub { margin-top: 3px; color: var(--ts-faint); font: 600 11px/1.3 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }
.ts-arcade .lb-panel .ts-table td { height: 44px; }
.ts-arcade .lb-more { color: var(--c); font: 700 12px/1 var(--ts-hud); letter-spacing: .14em; text-transform: uppercase; }
.ts-arcade .lb-more:hover { color: #fff; background: rgba(255, 255, 255, .03); }

/* leaderboards detail: game hero */
.ts-arcade .lb-hero { position: relative; display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: center; gap: 30px; padding: 22px; overflow: hidden; border-radius: 18px; }
.ts-arcade .lb-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 15% 50%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%); }
.ts-arcade .lb-cover { width: 100%; border-radius: 10px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent), 0 0 34px color-mix(in srgb, var(--c) 30%, transparent); }
.ts-arcade .lb-game .ts-kicker { color: var(--c); }
.ts-arcade .lb-game .ts-h1 { font-size: clamp(32px, 4.4vw, 50px); text-shadow: 0 3px 0 color-mix(in srgb, var(--c) 75%, #000), 0 7px 0 rgba(0, 0, 0, .45), 0 0 28px color-mix(in srgb, var(--c) 35%, transparent); }
.ts-arcade .lb-game-sub { color: var(--ts-muted); }
.ts-arcade .lb-bar { border-bottom-color: var(--ts-line-2); }
.ts-arcade .lb-totals .ts-stat:nth-child(1) { --c: var(--ts-cyan); }
.ts-arcade .lb-totals .ts-stat:nth-child(2) { --c: #a879ff; }
.ts-arcade .lb-totals .ts-stat:nth-child(3) { --c: var(--ts-gold); }
.ts-arcade .lb-totals .ts-stat:nth-child(4) { --c: var(--ts-accent); }
.ts-arcade .lb-count { font: 600 12px/1 var(--ts-hud); letter-spacing: .1em; text-transform: uppercase; }

/* footer */
.ts-arcade .ts-foot { border-top-color: #3a2152; font: 500 13px/1.5 var(--ts-hud); letter-spacing: .02em; }
.ts-arcade .ts-foot a { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }

@media (max-width: 720px) {
  .ts-arcade .ts-h1 { font-size: clamp(30px, 9vw, 40px); }
  .ts-arcade .ts-nav a { padding: 8px 9px; font-size: 12px; letter-spacing: .06em; }
  .ts-arcade .ts-tabs { gap: 20px; }
  .ts-arcade .ts-stat b { font-size: 20px; }
  .ts-arcade .lb-hero { grid-template-columns: 1fr; gap: 18px; padding: 14px; }
  .tpa-podium { gap: 8px; margin-top: 30px; }
  .tpa-pod-ava { width: 56px; height: 56px; font-size: 22px; }
  .p1 .tpa-pod-ava { width: 72px; height: 72px; font-size: 28px; }
  .tpa-crown { top: -26px; width: 32px; height: 22px; }
  .tpa-pod-name { font-size: 13.5px; margin-top: 12px; }
  .tpa-pod-val { font-size: 17px; }
  .p1 .tpa-pod-val { font-size: 20px; }
  .tpa-pod-step { height: 50px; font-size: 26px; }
  .p1 .tpa-pod-step { height: 70px; font-size: 34px; }
  .p3 .tpa-pod-step { height: 38px; font-size: 22px; }
  .tpa-pod.is-me .tpa-pod-name::after { display: none; }
}
