/* Same Lap brand. Heavy italic condensed display type, calm system text.
   The logo is always a red lane and a blue lane.
   Default look is light ([data-theme="light"], set on <html>): white, black type, blue for you, red for the rival.
   Also kept: "volt" (black and volt) and the navy look, whose tokens are the ones directly below. */
:root {
  --bg: #050b1a;
  --card: #0d1730;
  --card-2: #172450;
  --line: #26376e;
  --text: #fff;
  --muted: #93a3cc;
  --accent: #0a4dff; /* fills: buttons, your lane, the ring */
  --accent-text: #7aa5ff; /* the same blue, lightened to stay readable as text on navy */
  --accent-ink: #fff; /* text on an accent fill */
  --rival: #ff2d3d;
  --danger: #ff7480;
  --mark-1: #ff2d3d;
  --mark-2: #1a4dff;
  --ring-bg: #14224d;
  --confetti-1: #fff;
  --confetti-2: #ff2d3d;
  --chip-ink: #050b1a; /* text on white pills */
  --radius: 24px;
  --display: 'Avenir Next Condensed', 'Futura', 'sans-serif-condensed', 'Arial Narrow', 'Helvetica Neue', Impact, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

:root[data-theme='light'] {
  --bg: #f5f5f7;
  --card: #fff;
  --card-2: #e9e9ee;
  --line: #d8d8df;
  --text: #0b0b0f;
  --muted: #6e6e73;
  --accent: #1a4dff;
  --accent-text: #1a4dff;
  --accent-ink: #fff;
  --rival: #ff2d3d;
  --danger: #d70015;
  --mark-2: #1a4dff;
  --ring-bg: #dde4fb;
  --confetti-1: #fff;
  --confetti-2: #ff2d3d;
  --chip-ink: #fff;
}

:root[data-theme='volt'] {
  --bg: #000;
  --card: #131315;
  --card-2: #1c1c1e;
  --line: #2c2c2e;
  --muted: #8e8e93;
  --accent: #d4ff00;
  --accent-text: #d4ff00;
  --accent-ink: #000;
  --rival: #ff453a;
  --danger: #ff6961;
  --ring-bg: #1f2600;
  --confetti-1: #000;
  --confetti-2: #fff;
  --chip-ink: #000;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(112px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#app > * { animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Display type */
h1, h2, .wordmark, .btn, .big-num, .level, .stats strong, .countdown, .watch-clock, .vs-mark, .pill,
.points strong, .dash-row strong, .xp-gain, .tagline, .rank-title, .chip, .summary strong, .prize, .live {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
}
h1 { font-size: 44px; line-height: 0.95; margin: 6px 0 2px; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1; margin: 14px 0 -4px; letter-spacing: 0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.eyebrow { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.meta, .hint { color: var(--muted); font-size: 13px; }
.lead { color: var(--muted); font-size: 17px; }
.center { text-align: center; }
.empty { color: var(--muted); text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.ok { color: var(--accent-text); font-weight: 600; }
.grow { flex: 1; min-width: 0; }

/* Brand */
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; letter-spacing: -0.01em; line-height: 1; }
.mark { height: 0.72em; width: auto; fill: var(--mark-1); }
.mark-2 { fill: var(--mark-2); }
.wordmark.xl { font-size: 64px; margin: 0; }
.tagline { font-size: 46px; line-height: 0.92; color: var(--text); }
.tagline em { color: var(--accent-text); }

/* Avatars */
.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font: italic 800 18px var(--display);
  color: #000;
  background: #8e8e93;
}
.avatar.lg { width: 52px; height: 52px; font-size: 24px; }
.avatar.xl { width: 84px; height: 84px; font-size: 38px; }
.av-0 { background: #0a4dff; color: #fff; }
.av-1 { background: #ff2d3d; color: #fff; }
.av-2 { background: #fff; color: #050b1a; }
.av-3 { background: #7aa5ff; color: #050b1a; }
.av-4 { background: #ff8a94; color: #050b1a; }
.av-5 { background: #b9c8f2; color: #050b1a; }
[data-theme='volt'] .av-0 { background: #d4ff00; color: #000; }
[data-theme='volt'] .av-1 { background: #ff453a; color: #fff; }
[data-theme='volt'] .av-2 { background: #64d2ff; color: #000; }
[data-theme='volt'] .av-3 { background: #ffd60a; color: #000; }
[data-theme='volt'] .av-4 { background: #bf5af2; color: #fff; }
[data-theme='volt'] .av-5 { background: #30d158; color: #000; }
.av-none { background: transparent; color: var(--muted); border: 2px dashed var(--line); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who strong { display: block; }

.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.points { text-align: right; line-height: 1; }
.points strong { color: var(--accent-text); font-size: 30px; display: block; font-variant-numeric: tabular-nums; }
.back { color: var(--muted); padding: 8px 8px 8px 0; font-weight: 600; }

/* Player card: level, XP, record */
.player { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.player-top { display: flex; align-items: center; gap: 14px; }
.player-name { display: block; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-title { color: var(--accent-text); font-size: 15px; letter-spacing: 0.06em; }
.level { font-size: 46px; line-height: 0.9; text-align: right; }
.level span { font-size: 15px; color: var(--muted); margin-right: 4px; letter-spacing: 0.06em; }
.xp-bar { appearance: none; -webkit-appearance: none; width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--card-2); }
.xp-bar::-webkit-progress-bar { background: var(--card-2); }
.xp-bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
.xp-bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.xp-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -6px; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.stats strong { display: block; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.notice { box-shadow: inset 0 0 0 2px var(--accent); }

.race-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; transition: transform 0.12s, background 0.12s; }
.race-card:hover { background: var(--card-2); }
.race-card:active { transform: scale(0.98); }
.race-card strong { display: block; font-size: 17px; }
.race-card .meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 13px; letter-spacing: 0.04em; padding: 6px 12px; border-radius: 99px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.win { background: var(--accent); color: var(--accent-ink); }
.pill.loss { color: var(--danger); }
.pill.action { background: var(--text); color: var(--chip-ink); }

.btn {
  appearance: none;
  display: block;
  border: 0;
  background: var(--card-2);
  color: var(--text);
  font-size: 17px;
  letter-spacing: 0.04em;
  padding: 15px 20px;
  border-radius: 99px;
  text-align: center;
  cursor: pointer;
  width: 100%;
  transition: transform 0.1s, filter 0.15s;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.big { padding: 20px; font-size: 24px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { color: var(--danger); }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

.stack { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
input:not([type]), input[type='text'] {
  width: 100%;
  background: var(--card);
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--line);
  border-radius: 16px;
  color: var(--text);
  font: 17px var(--body);
  padding: 16px;
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  border: 0;
  background: var(--card-2);
  color: var(--text);
  font-size: 17px;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: transform 0.1s;
}
.chip:active { transform: scale(0.94); }
.chip.on { background: var(--text); color: var(--chip-ink); }

.hero { min-height: 82vh; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.hero > p:not(.tagline) { color: var(--muted); }
.hero form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* Head to head */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; padding: 10px 0 2px; }
.vs > div { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.vs strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.vs-mark { font-size: 40px; line-height: 1; color: var(--accent-text); }

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.summary .wide { grid-column: 1 / -1; }
.summary strong { font-size: 26px; line-height: 1.05; overflow-wrap: anywhere; }

.link { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.code { font: 600 22px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; color: var(--accent-text); overflow-wrap: anywhere; }

.result-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.result-row + .result-row { border-top: 1px solid var(--line); padding-top: 14px; }
.result-row > strong { font-size: 17px; }
.result-row.winner > span, .result-row.winner > strong { color: var(--accent-text); }
.rank { flex: none; width: 24px; text-align: center; color: var(--muted); font: italic 800 20px var(--display); }
.rank.r1 { color: #ffd60a; }
.rank.r2 { color: #d1d1d6; }
.rank.r3 { color: #e0965a; }

/* Result */
.banner { position: relative; overflow: hidden; border-radius: 32px; padding: 40px 18px 30px; text-align: center; }
.banner h1 { font-size: 84px; margin: 4px 0; letter-spacing: -0.02em; }
.banner.win { background: var(--accent); color: var(--accent-ink); }
.banner.win .eyebrow { color: var(--accent-ink); opacity: 0.7; }
.banner.loss { background: var(--card); }
.banner.loss h1 { color: transparent; -webkit-text-stroke: 2px var(--text); }
.xp-gain { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 99px; font-size: 18px; background: var(--bg); color: var(--accent-text); }
.banner.loss .xp-gain { background: var(--card-2); color: var(--text); }
.prize { font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }

.confetti i { position: absolute; top: -16px; width: 8px; height: 16px; animation: fall 2.6s linear infinite; }
.confetti i:nth-child(odd) { background: var(--confetti-1); }
.confetti i:nth-child(even) { background: var(--confetti-2); }
.confetti i:nth-child(1) { left: 5%; animation-delay: 0s; }
.confetti i:nth-child(2) { left: 13%; animation-delay: 0.9s; }
.confetti i:nth-child(3) { left: 22%; animation-delay: 0.3s; }
.confetti i:nth-child(4) { left: 31%; animation-delay: 1.6s; }
.confetti i:nth-child(5) { left: 40%; animation-delay: 0.6s; }
.confetti i:nth-child(6) { left: 49%; animation-delay: 2s; }
.confetti i:nth-child(7) { left: 58%; animation-delay: 0.2s; }
.confetti i:nth-child(8) { left: 66%; animation-delay: 1.2s; }
.confetti i:nth-child(9) { left: 74%; animation-delay: 0.5s; }
.confetti i:nth-child(10) { left: 82%; animation-delay: 1.8s; }
.confetti i:nth-child(11) { left: 89%; animation-delay: 0.8s; }
.confetti i:nth-child(12) { left: 95%; animation-delay: 1.4s; }

/* Run dashboard */
.dash { text-align: center; padding: 4px 0; }
.ring { position: relative; width: min(76vw, 300px); aspect-ratio: 1; margin: 0 auto; }
.ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 16; }
.ring-bg { stroke: var(--ring-bg); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 552.92; stroke-dashoffset: 552.92; transition: stroke-dashoffset 0.3s linear; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.big-num { font-size: 68px; line-height: 0.95; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gap { display: inline-block; margin-top: 14px; padding: 8px 20px; border-radius: 99px; font: italic 800 24px var(--display); text-transform: uppercase; background: var(--accent); color: var(--accent-ink); min-height: 30px; }
.gap:empty { visibility: hidden; }
.gap.behind { background: var(--rival); color: #fff; }
.gap.center { display: block; width: fit-content; margin-inline: auto; }
.dash-row { display: flex; justify-content: space-around; margin-top: 10px; }
.dash-row strong { display: block; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }

.lane { display: flex; flex-direction: column; gap: 6px; }
.lane-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.track { height: 12px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.fill { height: 100%; width: 0; border-radius: 99px; transition: width 0.4s linear; }
.fill.me { background: var(--accent); }
.fill.rival { background: var(--rival); }
.fill.shadow { background: var(--muted); }

.countdown {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent-text);
  font-size: 300px;
  line-height: 1;
}
.countdown[hidden] { display: none; }
.countdown span { display: inline-block; }
.countdown span.pop { animation: pop 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
#app > .countdown { animation: none; } /* the backdrop must be solid from the first frame */

.gps { color: var(--muted); font-size: 13px; text-align: center; min-height: 18px; }
.sim { font-size: 14px; }
.check, .simspeed { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; }
.simspeed input { flex: 1; accent-color: var(--accent); }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }

.trophies { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trophy { background: var(--card); border-radius: 20px; padding: 16px; opacity: 0.4; }
.trophy.earned { opacity: 1; background: var(--accent); color: var(--accent-ink); }
.trophy strong { display: block; font: italic 800 20px var(--display); text-transform: uppercase; }
.trophy span { color: var(--muted); font-size: 13px; }
.trophy.earned span { color: var(--accent-ink); opacity: 0.75; }

/* Spectators */
.live { font-size: 18px; letter-spacing: 0.08em; color: var(--muted); }
.live.on { color: var(--rival); }
.live.on::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--rival); animation: blink 1.2s ease-in-out infinite; }
.watch-clock { text-align: center; font-size: 84px; line-height: 1; font-variant-numeric: tabular-nums; }

#tabs {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  max-width: 452px;
  margin: 0 auto;
  display: flex;
  background: color-mix(in srgb, var(--card-2) 82%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 99px;
  padding: 6px;
}
#tabs[hidden] { display: none; }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 99px; color: var(--muted); font-size: 11px; font-weight: 600; }
#tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#tabs a.on { color: var(--accent-ink); background: var(--accent); }

#toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  max-width: 448px;
  margin: 0 auto;
  z-index: 10;
  background: var(--text);
  color: var(--bg);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: scale(1.8) skewX(-8deg); } 35% { opacity: 1; transform: scale(1); } }
@keyframes fall { to { transform: translateY(320px) rotate(540deg); opacity: 0; } }
@keyframes blink { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* Leagues */
.mini { appearance: none; border: 0; cursor: pointer; background: var(--text); color: var(--chip-ink); border-radius: 99px; padding: 6px 14px; font: italic 800 14px var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.mini:active { transform: scale(0.94); }
.pts { min-width: 28px; text-align: right; font: italic 800 26px var(--display); }

/* One-tap racing */
.quiet { text-align: center; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.searching { display: flex; justify-content: center; gap: 12px; padding: 14vh 0 8px; }
.searching span { width: 18px; height: 54px; background: var(--accent); transform: skewX(-22deg); animation: scan 1s ease-in-out infinite; }
.searching span:nth-child(2) { animation-delay: 0.15s; background: var(--text); }
.searching span:nth-child(3) { animation-delay: 0.3s; }
@keyframes scan { 50% { opacity: 0.2; transform: skewX(-22deg) scaleY(0.6); } }

.board .meta, .result-row .meta { white-space: nowrap; }

/* Nickname a winner pinned on a runner */
.tag { display: inline-block; vertical-align: middle; padding: 2px 8px; border-radius: 99px; background: var(--rival); color: #fff; font: italic 800 12px var(--display); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }

/* Mid-race messages */
.reactions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.react { appearance: none; border: 0; cursor: pointer; background: var(--card); border-radius: 18px; padding: 12px 0; font-size: 26px; line-height: 1; transition: transform 0.12s; }
.react:active, .react.sent { transform: scale(1.25); }
.as-button { appearance: none; background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; }
.reaction-pop { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; font-size: 180px; pointer-events: none; animation: react-pop 2.6s ease-out both; }
@keyframes react-pop { 0% { opacity: 0; transform: scale(0.3); } 15% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-60px); } }
.mini.plain { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.race-card .who { color: inherit; }

/* Running mode: always black, whatever the look, so it is dim in a pocket and easy on the battery */
.runmode { position: fixed; inset: 0; z-index: 8; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.runmode[hidden] { display: none; }
#app > .runmode { animation: none; } /* appear at once, fully opaque */
.runmode .eyebrow { color: #6e6e73; }
.rm-left strong { display: block; font: italic 800 96px/0.95 var(--display); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.rm-left span { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: #8e8e93; }
.runmode .gap { margin: 0; font-size: 30px; }
.rm-clock { font: italic 800 44px var(--display); color: #c7c7cc; font-variant-numeric: tabular-nums; }
.rm-hold { position: absolute; left: 24px; right: 24px; bottom: calc(28px + env(safe-area-inset-bottom)); color: #6e6e73; font-size: 13px; }
.rm-hold i { display: block; height: 4px; margin-top: 10px; border-radius: 99px; background: #fff; transform: scaleX(0); transform-origin: left; }
.runmode.holding .rm-hold i { transform: scaleX(1); transition: transform 1s linear; }

/* Feuds: the running score between two friends */
.feud-score { font: italic 800 44px/1 var(--display); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.feud-line { text-align: center; font: italic 800 24px var(--display); text-transform: uppercase; }
.eyebrow.center { text-align: center; }

/* Friends */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin-bottom: 0; }
.section-head .mini { text-decoration: none; }
.qr { width: min(64vw, 260px); height: auto; margin: 0 auto; border-radius: 12px; }
.card.center { align-items: center; text-align: center; }

/* In the light look a white avatar vanished on a white card */
[data-theme='light'] .av-2 { background: #0b0b0f; color: #fff; }

/* The feud at the top of the home screen */
.feud-hero { background: var(--card); border-radius: 28px; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.feud-hero .vs { padding: 0; }
.feud-hero .feud-line { margin: 0; font-size: 28px; line-height: 1.05; }
.feud-hero .feud-score { font-size: 64px; }
.top .mini { text-decoration: none; }

/* Text that shrinks to fit (see fitText in app.js) stays on one line while it is measured */
[data-fit] { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* the ellipsis only shows if the smallest size still does not fit */
.vs [data-fit] { width: 100%; }
.btn.one-line { padding-inline: 14px; }

/* Me tab: folded sections */
.fold { background: var(--card); border-radius: 20px; }
.fold summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; cursor: pointer; list-style: none; font: italic 800 20px var(--display); text-transform: uppercase; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary .meta { font: 400 14px var(--body); text-transform: none; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold summary .meta::after { content: '›'; display: inline-block; margin-left: 10px; font-size: 18px; transition: transform 0.15s; }
.fold[open] summary .meta::after { transform: rotate(90deg); }
.fold-body { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.fold .sim { background: var(--card-2); }

/* Voice notes and roast packs */
.btn.talk { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.btn.talk.recording { background: var(--rival); color: #fff; }
.pack { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.pack strong { display: block; }
.pack .meta { display: block; }
.pack-lines { display: block; margin-top: 4px; font-size: 20px; letter-spacing: 2px; }

/* points in the home header */
.top-right { display: flex; align-items: center; gap: 10px; }
.points { font: italic 800 15px var(--display); color: var(--accent); text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
