/* Rehab: athlete app. Tokens match the approved Design canvas (Whoop-style dark). */
:root {
  --bg: #0A0E13; --card: #141A22; --inner: #10151C; --raise: #161D27;
  --line: #1B232D; --line2: #222B37; --chip: #1D2530; --edge: #2A3542; --track: #232C38;
  --text: #FFFFFF; --text2: #E6EBF1; --sec: #C5CDD8; --muted: #8E9AAB; --dim: #5A6677;
  --green: #2BD67B; --green-t: #7BEAAE; --amber: #FFB547; --red: #FF5C5C;
  --run: #4DA3FF; --run-t: #A9D2FF; --plyo: #F47FB8; --plyo-t: #FFB3D7;
  --cod: #A68BFF; --cod-t: #CDBEFF; --con: #3FD0E0; --con-t: #9DEBF3; --ball: #D9B48F; --ball-t: #F3DCC2;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --ui: 'Inter', -apple-system, system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--ui); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.disp { font-family: var(--display); font-weight: 800; font-stretch: 112%; line-height: 1; letter-spacing: -.01em; }
.h-xl { font-family: var(--display); font-size: 34px; font-weight: 900; font-stretch: 125%; line-height: 1.02; letter-spacing: -.01em; }
.h-l { font-family: var(--display); font-size: 28px; font-weight: 800; font-stretch: 112%; line-height: 1.05; }
.unit { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--muted); font-stretch: 100%; letter-spacing: 0; }
.muted { color: var(--muted); } .sec { color: var(--sec); } .dim { color: var(--dim); }
.c-green { color: var(--green); } .c-amber { color: var(--amber); } .c-red { color: var(--red); }

/* screens */
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding-top: calc(var(--safe-t) + 14px); }
.screen.with-tabs { padding-bottom: calc(84px + var(--safe-b)); }
.pad { padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.top { padding: 14px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.title-block { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 14px; }
.section-lbl { padding: 18px 20px 8px; }
.back { width: 44px; height: 44px; border-radius: 50%; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; color: var(--sec); flex: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--sec); text-decoration: none; flex: none; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* cards and tiles */
.card { background: var(--card); border-radius: 18px; }
.card.pad-in { padding: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; }
.tile .disp { font-size: 22px; }
.tile .note { font-size: 12px; color: var(--sec); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats3 > div { display: flex; flex-direction: column; gap: 3px; padding: 0 10px; border-right: 1px solid #263244; min-width: 0; }
.stats3 > div:first-child { padding-left: 0; } .stats3 > div:last-child { border-right: 0; }
.stats3 .disp { font-size: 22px; font-stretch: 110%; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--sec); white-space: nowrap; }
.chip.blue { background: rgba(77,163,255,.16); color: #8CC4FF; }
.chip.green { background: rgba(43,214,123,.14); color: var(--green-t); }
.chip.amber { background: rgba(255,181,71,.14); color: #FFCB7A; }
.chip.red { background: rgba(255,92,92,.14); color: #FF9C9C; }
.hero-today { background: linear-gradient(160deg, #16304F 0%, #141A22 62%); border: 1px solid rgba(77,163,255,.28); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.hero-today .lbl { color: #8CC4FF; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 52px; text-decoration: none; width: 100%; text-align: left; }
.row-link + .row-link { border-top: 1px solid var(--line); }
.chev { color: var(--muted); flex: none; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 16px; font-size: 16px; font-weight: 700; text-decoration: none; width: 100%; }
.btn.white { background: #FFFFFF; color: var(--bg); }
.btn.green { background: var(--green); color: #05230F; }
.btn.ghost { background: var(--chip); color: var(--text); }
.btn.text { background: none; color: var(--sec); font-weight: 600; height: 44px; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.small { height: 40px; width: auto; padding: 0 14px; font-size: 14px; border-radius: 12px; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 8px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(10,14,19,.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; min-height: 44px; }
.tabbar a[aria-current="page"] { color: #FFFFFF; font-weight: 600; }


/* session */
.daypick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 0 16px; }
.daypick a { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 9px 10px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-height: 52px; min-width: 0; }
.daypick a[aria-current="true"] { border-color: #FFFFFF; background: var(--raise); }
.daypick .d { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.daypick .n { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daypick .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.jumpbar { position: sticky; top: 0; z-index: 15; background: rgba(10,14,19,.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding: calc(var(--safe-t) + 8px) 12px 10px; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.jumpbar::-webkit-scrollbar { display: none; }
.jumpbar a { flex: 1 0 auto; text-align: center; font-size: 13px; font-weight: 600; padding: 10px 8px; border-radius: 12px; background: var(--card); color: var(--sec); text-decoration: none; border-top: 2px solid var(--bc, var(--dim)); min-height: 44px; display: flex; align-items: center; justify-content: center; }
.jumpbar a.on { background: var(--raise); color: #FFFFFF; }
.block { background: var(--inner); border-radius: 20px; overflow: hidden; border: 1px solid var(--bd, var(--line)); scroll-margin-top: calc(var(--safe-t) + 76px); }
.block-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--hb, var(--raise)); }
.block-head .num { width: 26px; height: 26px; border-radius: 50%; background: var(--nb, rgba(142,154,171,.2)); color: var(--nf, var(--sec)); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.block-head h2 { font-family: var(--display); font-size: 18px; font-weight: 800; font-stretch: 108%; flex: 1; color: var(--ht, #FFFFFF); }
.block-head .aside { font-size: 12px; font-weight: 600; color: var(--ht, var(--muted)); }
.colhead { display: grid; grid-template-columns: 72px minmax(0, 1fr) 56px; padding: 9px 18px; border-top: 1px solid var(--line); }
.colhead span:last-child { text-align: right; }
.drill { display: grid; grid-template-columns: 72px minmax(0, 1fr) 56px; padding: 13px 18px; border-top: 1px solid var(--line); align-items: start; width: 100%; text-align: left; }
.drill .dose { font-family: var(--display); font-size: 17px; font-weight: 800; font-stretch: 110%; line-height: 1.2; }
.drill .dose small { font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--muted); }
.drill .what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.drill .name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.drill .det { font-size: 13px; color: var(--muted); line-height: 1.35; }
.drill .pct { justify-self: end; font-size: 13px; font-weight: 700; padding: 4px 8px; border-radius: 8px; color: var(--pt, #FFFFFF); background: var(--pb, var(--chip)); }
.play { width: 22px; height: 22px; border-radius: 50%; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.simple { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; text-align: left; font-size: 15px; border-top: 1px solid var(--line); }
.simple span { padding: 12px 18px; }
.simple span:first-child { color: var(--text2); display: flex; align-items: center; gap: 8px; }
.simple span:last-child { font-weight: 600; text-align: right; white-space: nowrap; }
.simple em { font-style: normal; color: var(--muted); font-weight: 500; }
.con-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.con-grid > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); }
.con-grid > div:last-child { border-right: 0; }
.con-grid .disp { font-size: 22px; font-stretch: 110%; }
.con-sub { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--sec); }
.con-sub b { color: #FFFFFF; }
.con-lbl { padding: 12px 18px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.watch { border: 1px solid rgba(255,181,71,.35); background: rgba(255,181,71,.06); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.watch .lbl { color: var(--amber); display: flex; align-items: center; gap: 8px; }
.watch p { font-size: 14px; line-height: 1.45; color: var(--text2); }

/* log */
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--inner); border: 1px solid var(--line2); width: 100%; text-align: left; min-height: 56px; }
.opt[aria-checked="true"] { background: var(--ob); border-color: var(--oc); }
.opt .ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--oc); color: var(--bg); flex: none; }
.opt b { display: block; font-size: 15px; } .opt small { font-size: 12px; color: var(--muted); }
.tagset { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--edge); font-size: 14px; font-weight: 600; color: var(--sec); min-height: 40px; }
.tag[aria-pressed="true"] { background: #FFFFFF; color: var(--bg); border-color: #FFFFFF; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; background: var(--chip); font-size: 20px; }
textarea.note { width: 100%; min-height: 84px; resize: vertical; background: var(--inner); color: #FFFFFF; border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; }
.alert[hidden] { display: none; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.35); font-size: 14px; color: #FFC2C2; line-height: 1.4; }

/* plan */
.week { background: var(--card); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.week.now { background: linear-gradient(160deg, #142A44 0%, #141A22 70%); border: 1px solid rgba(77,163,255,.4); }
.week-head { display: flex; align-items: baseline; gap: 8px; }
.week-head .disp { font-size: 17px; }
.week-head .km { margin-left: auto; font-weight: 700; font-size: 14px; }
.wtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wtile { border-radius: 12px; padding: 9px 9px 10px; background: var(--inner); border: 1px solid var(--line2); border-top: 3px solid var(--ts, var(--line2)); display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-height: 84px; text-align: left; min-width: 0; }
.wtile .d { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.wtile .n { font-size: 13px; font-weight: 700; line-height: 1.2; }
.wtile .k { font-size: 12px; color: var(--muted); margin-top: auto; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 12px; height: 12px; border-radius: 3px; background: var(--track); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 4px 20px 0; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--lc); }

/* testing */
.crit { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; text-decoration: none; }
.crit:first-child { border-top: 0; }
.crit-top { display: flex; align-items: center; gap: 10px; }
.crit-top .nm { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.25; }
.crit-top .v { font-family: var(--display); font-size: 17px; font-weight: 800; font-stretch: 110%; }
.state-ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.bar b { position: absolute; top: -4px; width: 2px; height: 14px; background: #FFFFFF; border-radius: 1px; }
.subrow { display: grid; grid-template-columns: minmax(0, 1fr) 70px 48px; gap: 10px; align-items: center; font-size: 13px; color: var(--sec); }
.subrow .v { text-align: right; font-weight: 700; }

/* timeline */
.tl { position: relative; padding: 0 16px; }
.kd { display: grid; grid-template-columns: 58px 18px minmax(0, 1fr); gap: 10px; padding: 9px 0; align-items: start; }
.kd .when { font-size: 12px; font-weight: 600; color: var(--sec); line-height: 1.3; }
.kd .when small { display: block; color: var(--muted); font-weight: 500; }
.kd .mk { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--dim); margin: 3px auto 0; }
.kd .tx { font-size: 14px; line-height: 1.35; }
.kd .tx small { display: block; font-size: 12px; color: var(--muted); }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 92dvh; overflow: auto; background: var(--card); border-radius: 24px 24px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: up .22s ease-out; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--edge); margin: 0 auto 4px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + var(--safe-b)); z-index: 50; background: #FFFFFF; color: var(--bg); border-radius: 14px; padding: 14px 16px; font-weight: 600; font-size: 14px; animation: up .2s ease-out; }

/* setup and tour */
.setup { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 20px) 20px calc(24px + var(--safe-b)); gap: 18px; background: radial-gradient(120% 60% at 50% 0%, #13202E 0%, var(--bg) 60%); }
.steps { display: flex; gap: 6px; } .steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line2); } .steps i.on { background: var(--green); }
.pin-dots { display: flex; gap: 22px; justify-content: center; padding: 8px 0; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: #FFFFFF; border-color: #FFFFFF; }
.pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: auto; }
.pad-keys button { height: 62px; border-radius: 18px; background: var(--card); font-family: var(--display); font-size: 24px; font-weight: 700; }
.pad-keys button.blank { background: none; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); font-size: 14px; line-height: 1.45; color: var(--sec); text-align: left; }
.check .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted); flex: none; display: flex; align-items: center; justify-content: center; }
.check[aria-checked="true"] .box { background: var(--green); border-color: var(--green); color: #05230F; }
.numlist { display: flex; flex-direction: column; gap: 14px; }
.numlist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 16px; line-height: 1.45; color: var(--text2); align-items: start; }
.numlist li > span:first-child { width: 26px; height: 26px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.kbd { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 8px; background: var(--chip); font-weight: 700; color: #FFFFFF; }
.tour { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 16px) 20px calc(20px + var(--safe-b)); }
.tour-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.tour-art { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 0 18px; min-height: 0; }
.tour-phone { width: min(84vw, 320px); zoom: 1.08; border-radius: 26px; background: var(--card); border: 1px solid var(--line2); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.45); position: relative; }
.tour-copy { display: flex; flex-direction: column; gap: 10px; min-height: 170px; }
.tour-copy p { font-size: 16px; line-height: 1.5; color: var(--sec); }
.tour-dots { display: flex; gap: 6px; justify-content: center; padding: 14px 0; }
.tour-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--edge); transition: width .2s; }
.tour-dots i.on { width: 22px; background: #FFFFFF; }
.hl { outline: 2px solid var(--hc, var(--green)); outline-offset: 3px; border-radius: 12px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--hc, var(--green)) 18%, transparent); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
/* launch screen: the same picture as the iPhone startup image, so opening is seamless */
.splash { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.splash img { width: 96px; height: 96px; }

/* today: this week */
.daycell { background: var(--inner); border: 1px solid var(--line2); border-top: 3px solid var(--ts, var(--line2)); border-radius: 12px; padding: 8px 8px 9px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; min-height: 74px; }
.daycell b { font-size: 13px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.daycell .lbl { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.daycell .lbl svg { width: 12px; height: 12px; }

/* today: Sando updated your plan */
.changes { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; border: 1px solid rgba(77,163,255,.42); background: linear-gradient(160deg, #13263D 0%, var(--card) 72%); }
.changes-ic { width: 36px; height: 36px; border-radius: 50%; background: rgba(77,163,255,.18); color: #8CC4FF; display: flex; align-items: center; justify-content: center; flex: none; }
.changes-ic svg { width: 18px; height: 18px; }

/* monday recap */
.rbars { display: grid; gap: 8px; height: 112px; align-items: end; }
.rbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.rbar span { font-size: 11px; font-weight: 700; }
.rbar i { display: block; width: 100%; max-width: 44px; border-radius: 6px; }
.rrow { display: grid; gap: 8px; text-align: center; font-size: 11px; margin-top: 6px; }

/* drill diagram */
.diagram { margin: 0; background: var(--inner); border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px 10px; display: flex; flex-direction: column; gap: 10px; }
.diagram > svg { display: block; width: 100%; height: auto; }
.dleg { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 4px 0; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dleg span { display: inline-flex; align-items: center; gap: 6px; }

/* log: 0 to 10 rating. Starts unrated, so nothing is pre-filled */
.rate { position: relative; padding-top: 18px; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: pointer; }
.rate-track { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.rate-track i { position: absolute; left: 0; top: 0; bottom: 0; width: calc((var(--v) + .5) / 11 * 100%); border-radius: 3px; background: var(--sc); }
.rate-track b { position: absolute; top: 50%; left: calc((var(--v) + .5) / 11 * 100%); width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.rate.unset .rate-track i, .rate.unset .rate-track b { display: none; }
.rate-nums { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; margin-top: 16px; }
.rate-nums span { height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.rate.unset .rate-nums span { background: var(--inner); color: var(--sec); }
.rate-nums span.on { background: var(--sc); color: var(--bg); font-weight: 800; }
.rate-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--dim); }
.rate:focus-visible { outline-offset: 6px; }

/* pull down to refresh */
.ptr { position: fixed; top: calc(var(--safe-t) + 8px); left: 50%; z-index: 30; width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 6px 18px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50px); opacity: 0; pointer-events: none; }
.ptr-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--edge); border-top-color: var(--muted); }
.ptr.ready .ptr-spin { border-top-color: #FFFFFF; }
.ptr.spin .ptr-spin { border-top-color: var(--run); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* a new version is ready */
.update-bar { position: fixed; left: 16px; right: 16px; bottom: calc(92px + var(--safe-b)); z-index: 45; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #FFFFFF; color: var(--bg); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: up .2s ease-out; text-align: left; }
.update-bar b { font-weight: 700; } .update-bar span { font-weight: 700; color: #0B63C7; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 560px) { #app { max-width: 430px; margin: 0 auto; } .tabbar, .update-bar { max-width: 430px; margin: 0 auto; } .ptr { margin: 0; } }
