/* Device stage */
.stage { position: relative; height: 700px; animation-delay: .2s; }
.phone {
  position: absolute; left: 50%; top: 0; margin-left: -160px; width: 320px; height: 670px;
  border-radius: 50px; border: 9px solid #23292A; background: var(--ground);
  box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px #2E3634 inset; overflow: hidden; padding: 40px 16px 0;
}
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.title-row .disp { font-size: 34px; line-height: 1.1; }
.streak { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border-radius: 999px; background: var(--wash); }
.streak .minute { color: var(--signal); }
.streak.lg { min-height: 44px; padding: 0 12px; }

/* Rings, as src/ui/home/Ring.tsx: track, ink arc, the signal second lap past usual, a 1.04 pulse.
   ringReveal.ts timing: 700 ms fill, 80 ms stagger, 400 ms lap, here on a 7 s loop. */
.ring-card { background: var(--surface); border-radius: 6px; }
.ring-card.sm { margin-top: 16px; padding: 16px 10px 14px; }
.ring-card.lg { padding: 28px 16px 22px; }
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
.rings > div { padding: 0 4px; }
.rings > div + div { border-left: 1px solid var(--rule); }
.ring-card.lg .rings > div { padding: 0 10px; }
.ring-wrap { position: relative; width: 76px; height: 76px; margin: 0 auto; }
.ring-card.lg .ring-wrap { width: min(150px, 24vw); height: auto; aspect-ratio: 1; }
.ring { display: block; width: 100%; height: 100%; }
.ring .track { fill: none; stroke: var(--track); stroke-width: 10; }
.ring .arc { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: var(--o); }
.ring .ink { stroke: var(--ink); animation: ink 7s var(--ease-out) infinite both; }
.ring .lap { stroke: var(--signal); animation: lap 7s var(--ease-out) infinite both; }
.rings > div:nth-child(2) .ink { animation-delay: .08s; }
.rings > div:nth-child(3) .ink { animation-delay: .16s; }
.ring-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-value .num6 { font-size: 21px; line-height: 1; }
.ring-value .u { font-size: 11px; color: var(--muted); }
.ring-card.lg .ring-value .num6 { font-size: clamp(26px, 3.4vw, 40px); }
.ring-card.lg .ring-value .u { font-size: 13px; }
.best {
  position: absolute; top: -5px; right: -7px; font: 9px/1.4 var(--mono); letter-spacing: .2px; text-transform: uppercase;
  color: var(--ink); background: var(--wash); border: 1px solid var(--rule); border-radius: 999px; padding: 0 5px;
}
.ring-card.lg .best { top: -2px; right: -6px; font-size: 11px; padding: 1px 7px; }
.ring-label { font-size: 11px; color: var(--muted); }
.ring-label.first { margin-top: 7px; }
.ring-card.lg .ring-label { font-size: 14px; }
.ring-card.lg .ring-label.first { margin-top: 10px; }
.pulse { animation: ringpulse 7s ease-in-out infinite both; }
@keyframes ink { 0% { stroke-dashoffset: 100; opacity: 0; } 1% { opacity: 1; } 10% { stroke-dashoffset: var(--o); } 90% { stroke-dashoffset: var(--o); opacity: 1; } 96% { stroke-dashoffset: var(--o); opacity: 0; } 100% { stroke-dashoffset: 100; opacity: 0; } }
@keyframes lap { 0%, 10% { stroke-dashoffset: 100; opacity: 0; } 10.5% { opacity: 1; } 15.7% { stroke-dashoffset: var(--o); } 90% { stroke-dashoffset: var(--o); opacity: 1; } 96% { stroke-dashoffset: var(--o); opacity: 0; } 100% { stroke-dashoffset: 100; opacity: 0; } }
@keyframes ringpulse { 0%, 11% { transform: scale(1); } 13.4% { transform: scale(1.04); } 15.7%, 100% { transform: scale(1); } }

/* Results line under the rings */
.results { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 12px 6px 0; border-top: 1px solid var(--rule); }
.ring-card.lg .results { margin-top: 22px; padding: 16px 10px 0; }
.ring-card.lg .results .minute { font-size: 17px; }
.outcomes { display: flex; gap: 7px; }
.outcomes i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.ring-card.lg .outcomes { gap: 8px; }
.ring-card.lg .outcomes i { width: 10px; height: 10px; }
.outcomes .w { background: var(--ink); }
.outcomes .l { background: var(--rank1); }
.outcomes .d { border: 1.5px solid var(--ink); }

/* StampSwitch: labels with an underline on the selected one */
.switch { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0 14px; }
.switch span { font-size: 13px; padding: 10px 8px; border-bottom: 2px solid transparent; }
.switch .on { color: var(--ink); border-bottom-color: var(--ink); }
.light .switch span { color: var(--light-muted); padding: 12px 8px; }
.light .switch .on { color: var(--light-ink); border-bottom-color: var(--light-ink); }

/* GutterRow: a mark in the 46 px gutter, the touchline rule, the content */
.gutter-row { display: flex; }
.gutter-row .mark { width: 46px; padding: 3px 8px 0 0; text-align: right; color: var(--muted); }
.gutter-row .mark .sub { font-size: 11px; }
.gutter-row .mark.signal { color: var(--signal); }
.gutter-row .body { flex: 1; min-width: 0; border-left: 1px solid var(--rule); padding: 0 0 22px 14px; position: relative; }
.gutter-row .body.split { display: flex; justify-content: space-between; gap: 12px; padding-left: 16px; }
.gutter-row:last-child .body { padding-bottom: 4px; }
.gutter-row .title { font-size: 20px; line-height: 1.2; }
.gutter-row .more { position: absolute; top: 0; right: 0; font-size: 18px; line-height: 1; letter-spacing: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; border: 1px solid transparent; font: 11px/1.2 var(--mono); letter-spacing: .8px; text-transform: uppercase; background: var(--wash); color: var(--ink); }
.chip.solid { background: var(--ink); color: var(--ground); }
.chip.outline { background: transparent; border-color: var(--ink); }
.chip.dashed { background: transparent; border: 1px dashed var(--rank1); color: var(--muted); }

/* iOS 26 floating glass tab bar */
.tabbar {
  position: absolute; left: 12px; right: 12px; bottom: 14px; height: 62px; border-radius: 31px;
  background: rgba(38,44,42,.78); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; padding: 0 5px;
  font-size: 10px; font-weight: 500; text-align: center;
}
.tabbar span { padding: 6px 0 5px; }
.tabbar svg { display: block; margin: 0 auto 1px; }
.tabbar .on { color: var(--signal); background: rgba(255,255,255,.08); border-radius: 26px; }

/* Apple Watch */
.watch { background: #000; border: 8px solid #23292A; box-shadow: 0 30px 60px rgba(0,0,0,.65); font-family: var(--prose); color: #fff; }
.watch .status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--watch-grey); }
.watch .clock { font-size: 44px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.watch .metric { display: flex; align-items: baseline; gap: 6px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.watch .metric small { font-size: 13px; font-weight: 400; color: var(--watch-grey); }
.watch .nav-title { font-size: 17px; font-weight: 600; }
/* Sits over the match rows, clear of the tab bar so the selected Matches tab shows. */
.watch-sm { position: absolute; bottom: 104px;left: max(0px, calc(50% - 280px)); width: 184px; height: 222px; border-radius: 46px; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.watch-lg { position: relative; width: 236px; height: 288px; border-radius: 58px; border-width: 9px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.6); }
.watch-lg .clock { font-size: 52px; }
.watch-lg .metric { font-size: 22px; gap: 7px; }
.watch-lg .metric small { font-size: 14px; }
.watch-lg .status { font-size: 14px; }
.pitch-card { display: flex; align-items: center; gap: 8px; padding: 10px; background: #1C1C1E; border-radius: 14px; margin-top: 2px; font-size: 16px; font-weight: 600; }
.wbtn { display: block; text-align: center; border-radius: 999px; padding: 11px; font: 600 16px/1.1 var(--prose); background: #2C2C2E; color: #fff; }
.wbtn.primary { background: var(--signal); color: var(--on-signal); margin-top: 4px; }
/* Start, recording, full time: three seconds each */
.face { position: absolute; inset: 0; padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 9px; opacity: 0; animation: face 9s ease-in-out infinite both; }
.face:nth-child(1) { opacity: 1; }
.face:nth-child(2) { animation-delay: 3s; gap: 6px; padding-top: 26px; }
.face:nth-child(3) { animation-delay: 6s; gap: 6px; }
.face .final-clock { font-size: 38px; line-height: 1.05; }
.face .sent { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--watch-grey); }
@keyframes face { 0% { opacity: 0; transform: scale(.97); } 3% { opacity: 1; transform: none; } 30% { opacity: 1; transform: none; } 33.3%, 100% { opacity: 0; transform: scale(.97); } }
.watch-stage { flex: 0 1 360px !important; display: flex; justify-content: center; }
.steps { list-style: none; margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 18px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 6px; animation: stepon 9s ease-in-out infinite both; }
.steps li:nth-child(2) { animation-delay: 3s; }
.steps li:nth-child(3) { animation-delay: 6s; }
.steps .num { font-size: 32px; line-height: 1; color: var(--signal); }
.steps h3 { font-size: 22px; }
.steps p { color: var(--soft); font-size: 15px; }
@keyframes stepon { 0% { opacity: .4; border-color: var(--rule); } 3% { opacity: 1; border-color: var(--signal); } 30% { opacity: 1; border-color: var(--signal); } 33.3%, 100% { opacity: .4; border-color: var(--rule); } }

