/* =============================================================================
   typequest.css — TypeQuest MVP styling layer
   Sibling to style.css (loaded second; reuses tokens, never overrides core).
   Phosphor green-on-near-black to match TypeSnake. Selectors are namespaced
   under .tq-* so this file cannot leak into the snake page even if loaded
   together. Designed for desktop first; mobile + prefers-reduced-motion are
   deliberately deferred per the design brief.
   ============================================================================= */

/* ---- Layout ----------------------------------------------------------------
   .tq-main is a single column (no HUD sidebar like TypeSnake) so the run UI
   can stretch to a comfortable reading width. .tq-screen is a flex column;
   the run screen stacks: floor strip -> boss card -> phrase stage -> player
   row. .tq-overlay is the dark backdrop for the card-pick / boss-down / end
   screens, identical pattern to TypeSnake's #room-lobby. */
.tq-body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
.tq-main {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 24px 32px;
}
.tq-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tq-screen[hidden] { display: none; }
.tq-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 10, 0.92);
  z-index: 30;
  padding: 24px;
  animation: tq-overlay-in 220ms ease-out;
}
.tq-overlay[hidden] { display: none; }

/* ---- Title screen ---------------------------------------------------------- */
.tq-title-card {
  background: var(--panel);
  border: 1px solid var(--cell-border);
  border-radius: 12px;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tq-title-h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.tq-rules {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
.tq-rules li { margin-bottom: 4px; }
.tq-rules b { color: var(--accent); font-weight: 700; }

.tq-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.tq-meta-cell {
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tq-meta-cell b {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.tq-meta-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.tq-unlocks {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--food);
  background: rgba(242, 215, 76, 0.10);
  border: 1px solid rgba(242, 215, 76, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
}
.tq-unlocks[hidden] { display: none; }
.tq-title-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* Tiny "PROTOTYPE" pill next to the H1 title — borrows the rg-beta-badge feel. */
.tq-pre-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--food);
  border: 1px solid var(--food);
  border-radius: 999px;
  vertical-align: middle;
}

/* ---- Run screen ----------------------------------------------------------- */
/* Floor strip: three small pills showing floor 1/2/3 progression. JS adds
   .is-active and .is-done classes per pip. */
.tq-floor-strip {
  display: flex;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tq-floor-strip .tq-floor-pip {
  flex: 1;
  text-align: center;
  padding: 4px 6px;
  border: 1px solid var(--cell-border);
  border-radius: 4px;
  background: var(--panel-2);
}
.tq-floor-strip .tq-floor-pip.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(155, 242, 76, 0.10);
}
.tq-floor-strip .tq-floor-pip.is-done {
  color: var(--muted);
  border-style: dashed;
  opacity: 0.7;
}

.tq-boss-card {
  background: var(--panel);
  border: 1px solid var(--cell-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tq-boss-card.is-hit { animation: tq-boss-hit 220ms ease-out; }
.tq-boss-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tq-boss-id {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tq-boss-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.tq-boss-tag {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}
.tq-boss-hp {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Generic bar + boss / strike variants. .tq-bar is the track; the inner
   <span> is the fill, scaled via inline width by JS. */
.tq-bar {
  height: 10px;
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.tq-bar > span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 5px;
  transition: width 200ms ease-out;
}
.tq-bar-boss > span {
  background: linear-gradient(90deg, var(--food) 0%, #F2A04C 100%);
}
.tq-bar-strike > span {
  background: linear-gradient(90deg, var(--accent) 0%, #4CF2B0 100%);
}
.tq-bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tq-strike-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tq-strike-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex: 0 0 auto;
}
.tq-strike-row .tq-bar { flex: 1; }

/* ---- Phrase rendering ----------------------------------------------------- */
/* Phrase chars are individual <span class="ch-*"> tokens emitted by JS.
   Three states: pending (default), correct (faded green), wrong (red flash).
   ch-cursor adds a soft underline + caret to the next-to-type char. The
   container honors `opacity: inherit` so the floor-2 Ghostwriter inline
   `style="opacity: 0.25"` works without extra rules. */
.tq-phrase-stage {
  background: var(--panel);
  border: 1px solid var(--cell-border);
  border-radius: 12px;
  padding: 24px 28px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  outline: none;
}
.tq-phrase-stage:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 242, 76, 0.18);
}
.tq-phrase {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
  word-spacing: 0.05em;
  white-space: pre-wrap;
  user-select: none;
}
.tq-phrase .ch-pending { color: var(--muted); opacity: 0.85; }
.tq-phrase .ch-correct { color: var(--accent); }
.tq-phrase .ch-wrong   {
  color: #ff6b6b;
  background: rgba(242, 76, 76, 0.18);
  border-radius: 2px;
}
.tq-phrase .ch-cursor {
  border-bottom: 2px solid var(--accent);
  animation: tq-cursor-blink 1.05s steps(2, jump-none) infinite;
}
.tq-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---- Player HUD ----------------------------------------------------------- */
.tq-player-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--cell-border);
  border-radius: 10px;
  padding: 10px 14px;
}
.tq-focus { display: flex; align-items: center; gap: 8px; }
.tq-focus-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.tq-focus-pips { display: inline-flex; gap: 4px; }
.tq-focus-pips .tq-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(155, 242, 76, 0.45);
  transition: background 160ms, opacity 160ms;
}
.tq-focus-pips .tq-pip.spent {
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  box-shadow: none;
  opacity: 0.55;
}
.tq-focus-pips .tq-pip.losing {
  animation: tq-pip-shake 380ms ease-out;
  background: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.7);
}

/* Active modifier list — small monospace pills. JS injects each as a span. */
.tq-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.tq-mods .tq-mod {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.tq-livestats { display: flex; gap: 12px; }
.tq-live {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  line-height: 1;
}
.tq-live b {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.tq-live-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 3px;
}

/* ---- Card-pick overlay ---------------------------------------------------- */
.tq-card-box {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 28px 28px 24px;
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), 0 0 22px rgba(155, 242, 76, 0.18);
  animation: tq-card-fade-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tq-card-h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
.tq-card-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.tq-card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.tq-card {
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  border-radius: 10px;
  padding: 14px 12px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: border-color 140ms, transform 140ms, background 140ms;
}
.tq-card:hover {
  border-color: var(--accent);
  background: rgba(155, 242, 76, 0.06);
  transform: translateY(-2px);
}
.tq-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tq-card-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.tq-card-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---- Boss-down splash ----------------------------------------------------- */
.tq-bossdown-box { text-align: center; max-width: 460px; }
.tq-bossdown-h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--food);
  text-shadow: 0 0 24px rgba(242, 215, 76, 0.55);
}
.tq-bossdown-stats {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.65;
}
.tq-bossdown-stats b { color: var(--accent); font-weight: 700; }

/* ---- End-of-run screen ---------------------------------------------------- */
.tq-end-box { text-align: center; max-width: 480px; }
.tq-end-h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}
.tq-end-h3.win  { color: #6dd6a3; text-shadow: 0 0 32px rgba(109, 214, 163, 0.55); }
.tq-end-h3.loss { color: #ff6b6b; text-shadow: 0 0 32px rgba(255, 107, 107, 0.55); }
.tq-end-detail {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.tq-end-detail b { color: var(--text); font-variant-numeric: tabular-nums; }
.tq-end-newbest {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--food);
  background: rgba(242, 215, 76, 0.10);
  border: 1px solid rgba(242, 215, 76, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  letter-spacing: 0.04em;
}
.tq-end-newbest[hidden] { display: none; }
.tq-end-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* ---- Themes ---------------------------------------------------------------
   .theme-default = no class needed (inherits style.css palette).
   .theme-amber recolors --accent to amber so the green-on-black palette
   shifts toward an old terminal CRT vibe. .theme-synthwave layers a soft
   magenta+cyan radial behind the body and swaps --accent to magenta so the
   bars / cards adopt that palette automatically. */
.tq-body.theme-amber {
  --accent: #F2C84C;
  --hint: rgba(242, 200, 76, 0.18);
}
.tq-body.theme-amber .tq-bar-strike > span {
  background: linear-gradient(90deg, #F2C84C 0%, #F2A04C 100%);
}
.tq-body.theme-synthwave {
  --accent: #F24CC9;
  --hint: rgba(242, 76, 201, 0.18);
  background:
    radial-gradient(ellipse at top,    rgba(242, 76, 201, 0.18), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(92, 212, 242, 0.14), transparent 60%),
    var(--bg);
}
.tq-body.theme-synthwave .tq-bar-strike > span {
  background: linear-gradient(90deg, #F24CC9 0%, #5CD4F2 100%);
}
.tq-body.theme-synthwave .tq-end-h3.win,
.tq-body.theme-synthwave .tq-bossdown-h3 {
  color: #5CD4F2;
  text-shadow: 0 0 32px rgba(92, 212, 242, 0.55);
}

/* ---- Floating damage popups (#tq-popups gets absolutely-positioned children)
   Kept lightweight: monospace, accent colored, fade-and-rise. JS spawns and
   removes the elements; this just gives them their look + motion. */
#tq-popups {
  position: relative;
  height: 0;
  pointer-events: none;
}
#tq-popups .tq-popup {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--food);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: tq-popup-rise 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#tq-popups .tq-popup.miss { color: #ff6b6b; font-size: 16px; }

/* ---- Animations ----------------------------------------------------------- */
@keyframes tq-overlay-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes tq-card-fade-in {
  0%   { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes tq-cursor-blink {
  50% { border-bottom-color: transparent; }
}
@keyframes tq-pip-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-3px); }
  40%  { transform: translateX(3px); }
  60%  { transform: translateX(-2px); }
  80%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
@keyframes tq-boss-hit {
  0%   { background: var(--panel); transform: translateX(0); }
  20%  { background: rgba(155, 242, 76, 0.18); transform: translateX(-2px); }
  60%  { background: rgba(155, 242, 76, 0.10); transform: translateX(2px); }
  100% { background: var(--panel); transform: translateX(0); }
}
/* Strike-bar drain — JS sets `animation: tq-strike-drain <ms> linear forwards`
   inline to start the run; the keyframe just supplies the width transition. */
@keyframes tq-strike-drain {
  0%   { width: 100%; }
  100% { width: 0%; }
}
@keyframes tq-popup-rise {
  0%   { opacity: 0; transform: translate(-50%, -10%) scale(0.9); }
  20%  { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  60%  { opacity: 1; transform: translate(-50%, -120%) scale(0.95); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(0.9); }
}

/* =============================================================================
   Phase 2 additions — Polyglot gimmick decoration, Daily-run badge, name
   input row, leaderboard panel, end-screen daily chip.
   ============================================================================= */

/* ---- Polyglot gimmick (Floor 4) -------------------------------------------
   Every 5th pending char gets a strikethrough "twin" letter rendered next to
   it via ::after. The actual character is still what you type — the twin is
   pure decoration that punishes look-and-type. We use CSS rather than
   manipulating the inline content so the live cursor underline keeps lining
   up with the truth char. */
.tq-phrase .ch-polyglot {
  position: relative;
}
.tq-phrase .ch-polyglot::before {
  content: attr(data-twin);
  position: absolute;
  left: -0.55em;
  top: 0;
  color: #ff8a8a;
  opacity: 0.75;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 138, 138, 0.85);
  font-size: 0.86em;
  letter-spacing: -0.02em;
  pointer-events: none;
}
/* Remove the twin once the player has typed past the position — clean view. */
.tq-phrase .ch-polyglot.ch-correct::before { content: ""; display: none; }

/* ---- Phase-2 H1 badge (sits next to BETA) --------------------------------- */
.tq-phase-badge {
  margin-left: 4px;
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(155, 242, 76, 0.10);
}

/* ---- Display-name input row ----------------------------------------------- */
.tq-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.tq-name-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex: 0 0 auto;
}
.tq-name-input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 140ms;
}
.tq-name-input::placeholder { color: var(--muted); opacity: 0.7; }
.tq-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 242, 76, 0.18);
}

/* ---- Daily run badge (run header) ----------------------------------------- */
/* The run section gets data-daily="true" while a Daily run is active. This
   layers a tiny pinned chip in the upper-right of the floor strip so the
   player never forgets they're on the daily clock. */
.tq-screen[data-daily="true"] .tq-floor-strip::after {
  content: "🗓 DAILY";
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--food);
  border: 1px solid var(--food);
  background: rgba(242, 215, 76, 0.10);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
  align-self: center;
}

/* ---- End-of-run daily chip ------------------------------------------------ */
.tq-end-dailychip {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--food);
  border: 1px solid var(--food);
  background: rgba(242, 215, 76, 0.10);
  border-radius: 999px;
}

/* ---- Leaderboard panel (title screen) -------------------------------------
   Sibling card to the title-card. Lists top-50 runs of the current period
   (24h default, all-time toggle). The .is-me row gets a soft accent
   highlight so the player can spot themselves quickly. */
.tq-lb-card {
  background: var(--panel);
  border: 1px solid var(--cell-border);
  border-radius: 12px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tq-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tq-lb-h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}
.tq-lb-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid var(--cell-border);
  border-radius: 999px;
  padding: 2px;
}
.tq-lb-tab {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 140ms, background 140ms;
}
.tq-lb-tab:hover { color: var(--text); }
.tq-lb-tab[aria-selected="true"] {
  background: var(--accent);
  color: #0A0F0A;
}
.tq-lb-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-height: 16px;
}
.tq-lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 380px;
  overflow-y: auto;
  font-variant-numeric: tabular-nums;
}
.tq-lb-row {
  display: grid;
  grid-template-columns: 32px 1fr 22px repeat(4, auto);
  align-items: baseline;
  gap: 8px;
  padding: 5px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: 4px;
  color: var(--text);
}
.tq-lb-row:nth-child(odd)  { background: rgba(255,255,255,0.02); }
.tq-lb-row:hover           { background: rgba(155, 242, 76, 0.04); }
.tq-lb-row.is-me {
  background: rgba(155, 242, 76, 0.12);
  border: 1px solid rgba(155, 242, 76, 0.45);
  padding: 4px 5px; /* compensate for the 1px border so rows stay aligned */
}
.tq-lb-rank {
  color: var(--accent);
  font-weight: 700;
  text-align: right;
}
.tq-lb-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tq-lb-flag {
  font-family: -apple-system, "Segoe UI Emoji", sans-serif;
  font-size: 13px;
  line-height: 1;
}
.tq-lb-stat {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.tq-lb-row.is-me .tq-lb-stat { color: var(--text); }

/* ---- Theme cascade — leaderboard tabs + accents pick up amber/synthwave -- */
.tq-body.theme-amber .tq-lb-tab[aria-selected="true"]      { color: #1A1208; }
.tq-body.theme-synthwave .tq-lb-tab[aria-selected="true"]  { color: #14081A; }
