:root {
  --bg: #111214; --card: #1a1b1f; --card2: #202127; --line: #2a2b32;
  --text: #ecebe8; --dim: #9a9aa3; --faint: #6c6c75;
  --accent: #d2b25c; --accent-ink: #1a1608; --ok: #5fb37b; --err: #e07a6a;
  --radius: 14px; --tabbar: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--dim); }
.small { font-size: .85rem; }
.center { text-align: center; display: block; margin-left: auto; margin-right: auto; }
.err { color: var(--err); font-size: .9rem; min-height: 1.2em; }
.err:empty { min-height: 0; }
.ok-text { color: var(--ok); }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }

/* Layout */
#root { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + .7rem) 1.15rem .4rem;
}
.view { padding: .4rem 1.15rem calc(var(--tabbar) + env(safe-area-inset-bottom) + 1.6rem); display: flex; flex-direction: column; gap: .85rem; }
.page-title { font-size: 1.6rem; margin: .2rem 0 .1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; font-size: 1.05rem; }
.brand.small { font-size: .95rem; color: var(--dim); }
.brand-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); display: inline-block; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card2); font-weight: 650; font-size: .95rem;
}
.avatar-btn.on { border-color: var(--accent); color: var(--accent); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: rgba(17, 18, 20, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; max-width: 140px; height: var(--tabbar); background: none; border: 0; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .72rem; font-weight: 550;
}
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--accent); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.05rem; display: flex; flex-direction: column; gap: .6rem; text-align: left; width: 100%;
}
.card-title { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.card-title h3 { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); font-weight: 650; }
h3.sub { font-size: .95rem; margin-top: .4rem; }

.hero { padding: .6rem 0 .3rem; display: flex; flex-direction: column; gap: .35rem; }
.hero h1 { font-size: 1.55rem; line-height: 1.25; }
.hero-sub { color: var(--dim); }
.session-name { font-size: 1.35rem; font-weight: 650; }
.pill { font-size: .72rem; padding: .15rem .55rem; border-radius: 999px; background: var(--card2); color: var(--dim); font-weight: 600; }
.pill.ok { background: rgba(95, 179, 123, .15); color: var(--ok); }
.nudge { padding: .5rem .7rem; background: var(--card2); border-radius: 10px; }

.streak { display: flex; align-items: center; gap: 1rem; }
.streak-n { font-size: 2.4rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: center; }
.streak-l { font-weight: 600; }

.motd { cursor: pointer; color: inherit; font: inherit; border-color: #3a3424; background: linear-gradient(180deg, #1d1c18, var(--card)); }
.motd-name { font-size: 1.2rem; font-weight: 650; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.1rem; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: .98rem;
  text-decoration: none; text-align: center; min-height: 44px;
}
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 1.05rem; }
.btn.small { min-height: 36px; padding: .4rem .85rem; font-size: .88rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--card2); border-color: var(--line); color: var(--text); }
.btn.danger { background: rgba(224, 122, 106, .12); color: var(--err); border-color: rgba(224, 122, 106, .3); }
.btn:disabled, .btn.busy { opacity: .6; }
.link { background: none; border: 0; color: var(--accent); padding: .4rem 0; font-weight: 550; }
.link.danger { color: var(--err); }
.icon-btn { background: none; border: 0; color: var(--dim); padding: .35rem; display: inline-flex; font-size: .85rem; }
.tool-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.tool-row .btn { flex: 1; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field-label { font-size: .8rem; color: var(--dim); font-weight: 550; }
.field-hint { font-size: .78rem; color: var(--faint); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select {
  width: 100%; padding: .7rem .8rem; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; min-height: 44px; min-width: 0;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.inline-form { display: flex; gap: .5rem; }
.inline-form input { flex: 1; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--dim); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }

.seg { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg.wrap { flex-wrap: wrap; overflow: visible; }
.seg button {
  flex: none; padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card2); color: var(--dim); font-size: .9rem; min-height: 40px;
}
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.days button {
  aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--card2);
  color: var(--dim); font-size: .85rem; font-weight: 600; min-width: 0; padding: 0;
}
.days button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choices { display: flex; flex-direction: column; gap: .5rem; }
.choice {
  display: flex; flex-direction: column; gap: .1rem; text-align: left; padding: .85rem 1rem;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card2);
}
.choice span { color: var(--dim); font-size: .88rem; }
.choice.on { border-color: var(--accent); background: #24221a; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.switch-row > span { display: flex; flex-direction: column; }
.switch-row input {
  appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px;
  background: var(--line); position: relative; transition: background .15s;
}
.switch-row input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); transition: transform .15s;
}
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(20px); background: var(--accent-ink); }

/* Auth and onboarding */
.auth, .onboard {
  padding: calc(env(safe-area-inset-top) + 9vh) 1.4rem 2rem; display: flex; flex-direction: column; gap: .9rem; max-width: 440px; margin: 0 auto;
}
.auth h1, .onboard h1 { font-size: 1.75rem; line-height: 1.2; }
.lead { margin-top: -.3rem; }
.auth-form { display: flex; flex-direction: column; gap: .8rem; margin-top: .4rem; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: .2rem; margin-top: .4rem; }
.onboard { padding-top: calc(env(safe-area-inset-top) + 5vh); }
.progress-dots { display: flex; gap: .35rem; margin-bottom: .6rem; }
.progress-dots span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.progress-dots span.on { background: var(--accent); }
.onboard-nav { display: grid; grid-template-columns: auto 1fr; gap: .6rem; margin-top: .6rem; }

/* Lists */
.list { display: flex; flex-direction: column; }
.list-btn {
  display: flex; flex-direction: column; gap: .1rem; text-align: left; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: .75rem 0; color: inherit;
}
.list-btn:last-child { border-bottom: 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.row-actions { display: flex; gap: .7rem; align-items: center; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: .85rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { font-size: .78rem; padding: .2rem .6rem; border-radius: 999px; background: var(--card2); color: var(--dim); border: 1px solid var(--line); }
.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.recs { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.variants { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.note { border-left: 2px solid var(--line); padding-left: .7rem; }
.week { display: flex; flex-direction: column; gap: .4rem; }
.week-row { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: .6rem; font-size: .92rem; }
.week-row select { min-height: 40px; padding: .45rem .6rem; }
.invite-link { word-break: break-all; padding: .55rem .7rem; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; color: var(--dim); }

/* Stats and charts */
.stats { display: flex; gap: 1.4rem; }
.stat .n { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.goal-title { font-size: 1.1rem; font-weight: 600; }
.goal-nums { display: flex; align-items: baseline; }
.big-num { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
svg.chart .dot { fill: var(--accent); }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--faint); font-size: 10px; }
svg.chart .planned { fill: var(--card2); }
svg.chart .done { fill: #8a7a48; }
svg.chart .done.full { fill: var(--accent); }

/* Logger */
.ex-card { gap: .45rem; }
.ex-name { background: none; border: 0; padding: 0; font-weight: 650; font-size: 1.05rem; text-align: left; color: var(--text); }
.tip { font-size: .88rem; color: var(--accent); }
.sets { display: flex; flex-direction: column; gap: .35rem; margin-top: .2rem; }
.set-head, .set-row { display: grid; grid-template-columns: 2rem 1fr 1fr 44px; gap: .45rem; align-items: center; }
.set-head span { font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.set-n { color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.set-row input { text-align: center; padding: .55rem .4rem; }
.set-row.done input { border-color: rgba(95, 179, 123, .5); }
.tick {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); position: relative;
}
.tick::after { content: ''; position: absolute; left: 16px; top: 11px; width: 8px; height: 15px; border: solid var(--faint); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tick.on { background: var(--ok); border-color: var(--ok); }
.tick.on::after { border-color: #0d1a11; }
.ex-edit { gap: .5rem; }
.ex-edit-top { display: flex; gap: .4rem; align-items: center; }
.sticky-foot {
  position: sticky; bottom: 0; margin: .4rem -1.15rem 0; padding: .8rem 1.15rem calc(env(safe-area-inset-bottom) + .8rem);
  background: linear-gradient(180deg, rgba(17, 18, 20, 0), var(--bg) 30%); display: flex; flex-direction: column; gap: .2rem;
}

/* Friends */
.friend { display: flex; align-items: center; gap: .8rem; }
.friend-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 650; color: var(--accent); flex: none; }

/* Photos */
.photos { display: flex; flex-direction: column; gap: .8rem; }
.photo { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; background: var(--card2); }
.photo figcaption { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.disclaimer { padding: .5rem .7rem; background: var(--card2); border-radius: 10px; }
.result-title { font-size: 1.3rem; }

/* Sheets */
#sheets .sheet {
  position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: calc(env(safe-area-inset-top) + .5rem) .7rem .5rem; background: rgba(17, 18, 20, .96); border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 1.02rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { max-width: 560px; margin: 0 auto; padding: 1rem 1.15rem 2rem; display: flex; flex-direction: column; gap: .8rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px);
  max-width: min(92vw, 480px); padding: .7rem 1rem; border-radius: 12px; background: #2a2b31; color: var(--text);
  font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #3a2422; }
.toast.ok { background: #1f3326; }

.loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Long unbroken user text (names, exercise names, notes) must wrap, never
   push the layout wider than the screen. */
.card, .list-btn, .list-row, .friend-main, .session-name, .goal-title, .hero h1, .ex-name,
.motd-name, .sheet-head h2, .choice, .nudge, .tag, .chip, p, li, strong, figcaption {
  overflow-wrap: anywhere; min-width: 0;
}
.list-row > span:first-child { flex: 1; min-width: 0; }
.card-title > * { min-width: 0; }
.card-title h3, .ex-name { flex: 1; }
.field-err { color: var(--err); font-size: .82rem; }
.resume { border-color: var(--accent); }
.set-edit { display: grid; grid-template-columns: 1fr 4.2rem 4.8rem; gap: .4rem; align-items: center; }
.set-edit span { overflow-wrap: anywhere; font-size: .9rem; }
.row-errors { margin: 0; padding-left: 1.1rem; color: var(--err); font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }

/* Movement figures (public/js/figure.js) */
.figure { width: 100%; height: 100%; display: block; overflow: visible; }
.fig-ground { stroke: #34343c; stroke-width: 1; }
.fig-limb { fill: none; stroke: var(--accent); stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round; }
.fig-torso { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.fig-torso-front { fill: var(--accent); stroke: var(--accent); stroke-width: 5; stroke-linejoin: round; }
.fig-head { fill: var(--accent); }
.fig-far { opacity: .36; }
.fig-prop { fill: none; stroke: #8a7a48; stroke-width: 2.2; stroke-linecap: round; }
.fig-prop-fill { fill: #8a7a48; }
.fig-club { stroke: #8a7a48; stroke-width: 4; stroke-linecap: round; }
.fig-bar { stroke: #6c6c75; stroke-width: 2.5; stroke-linecap: round; }
.fig-wrap { position: relative; }
.fig-caption { font-size: .82rem; color: var(--dim); text-align: center; min-height: 1.2em; }
.fig-big { height: 220px; padding: .4rem 0; }
.fig-card { width: 104px; height: 104px; flex: none; }
.fig-thumb { width: 52px; height: 44px; flex: none; }
.motd-row { display: flex; align-items: center; gap: .8rem; }
.motd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.list-btn.with-fig { flex-direction: row; align-items: center; gap: .8rem; }
.list-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }

/* ── Motion: quick, ease-out, transform and opacity only ── */
.btn, .list-btn, .chip, .set, .step-btn, .tick, .avatar-btn, .tabbar button, .seg button, .days button, .choice, .motd {
  transition: transform .12s ease-out, background-color .15s ease-out, border-color .15s ease-out;
}
.btn:active, .list-btn:active, .chip:active, .set:active, .step-btn:active, .tick:active, .avatar-btn:active,
.tabbar button:active, .seg button:active, .days button:active, .choice:active, .motd:active { transform: scale(.97); }
.bar span { width: 100%; transform-origin: left center; animation: grow-x .5s cubic-bezier(.2,.7,.3,1) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
svg.bars rect.done { transform-box: fill-box; transform-origin: center bottom; animation: grow-y .45s cubic-bezier(.2,.7,.3,1) both; }
@keyframes grow-y { from { transform: scaleY(0); } }
.toast { transition: opacity .2s ease-out, transform .22s cubic-bezier(.2,.7,.3,1); }
.burst-layer { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 90; }
.burst-dot { position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pop { animation: pop .32s cubic-bezier(.2,.8,.3,1); }
@keyframes pop { 50% { transform: scale(1.18); } }

/* ── Workout focus mode ── */
.sheet.focus { display: flex; flex-direction: column; overflow: hidden; height: 100dvh; }
.focus-progress { height: 3px; background: var(--line); flex: none; margin-top: env(safe-area-inset-top); }
.focus-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left center; transition: transform .3s ease-out; }
.focus-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: .4rem .7rem; flex: none; }
.focus-title { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.focus-title strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.focus-count { font-size: .75rem; color: var(--dim); }
.focus-body { flex: 1; overflow-y: auto; padding: .6rem 1.15rem 1rem; touch-action: pan-y; }
.focus-ex, .focus-empty { display: flex; flex-direction: column; gap: .8rem; max-width: 520px; margin: 0 auto; }
.focus-name { font-size: 1.85rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.focus-fig { height: 140px; }
.focus-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .92rem; }
.set-list { display: flex; flex-direction: column; gap: .6rem; }
.set {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .85rem 1rem;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.set.active { border-color: rgba(210, 178, 92, .55); background: #1d1c18; }
.set.done { border-color: rgba(95, 179, 123, .35); }
.set.has-err { border-color: rgba(224, 122, 106, .6); }
.set-main { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 44px; }
.set-summary { display: flex; flex-direction: column; min-width: 0; }
.set-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; }
.set-nums { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.set.done .set-nums { color: var(--dim); }
.set-check {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.set.done .set-check { background: var(--ok); border-color: var(--ok); color: #0d1a11; }
.set-steppers { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: .75rem; }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; min-height: 56px; }
.step-btn { height: 54px; background: none; border: 0; color: var(--text); display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.step-value { background: none; border: 0; display: flex; flex-direction: column; align-items: center; padding: 0; min-width: 0; }
.step-num { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.step-unit { font-size: .68rem; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
input.step-input { text-align: center; font-size: 1.2rem; padding: .3rem; min-height: 44px; border-radius: 8px; }
.set-err { color: var(--err); font-size: .85rem; margin-top: .45rem; }
.add-set { align-self: flex-start; }
.focus-foot { flex: none; padding: .5rem 1.15rem calc(env(safe-area-inset-bottom) + .7rem); border-top: 1px solid var(--line); background: var(--bg); }
.focus-nav { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; max-width: 520px; margin: 0 auto; }
.focus-nav .btn { min-height: 52px; }
.rest-slot { max-width: 520px; margin: 0 auto; }
.rest { display: flex; align-items: center; gap: .8rem; background: var(--card2); border: 1px solid var(--line); border-radius: 16px; padding: .45rem .8rem; margin-bottom: .55rem; }
.rest-ring-btn { position: relative; width: 48px; height: 48px; background: none; border: 0; padding: 0; flex: none; }
.rest-ring-btn svg { display: block; transform: rotate(-90deg); }
.rest-time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.rest-track { fill: none; stroke: var(--line); stroke-width: 4; }
.rest-ring { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.rest.over .rest-ring { stroke: var(--ok); }
.rest-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rest-label { font-weight: 600; }
.overview-row.current strong { color: var(--accent); }
.finish {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 1.1rem; padding: calc(env(safe-area-inset-top) + 2rem) 1.6rem calc(env(safe-area-inset-bottom) + 1.6rem); max-width: 480px; margin: 0 auto; width: 100%;
}
.finish-mark { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); color: #0d1a11; display: flex; align-items: center; justify-content: center; }
.finish-title { font-size: 1.5rem; line-height: 1.25; }
.finish-stats { display: flex; gap: 1.6rem; justify-content: center; }
.pr-list { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.pr { display: flex; align-items: center; gap: .7rem; background: var(--card); border: 1px solid #3a3424; border-radius: 12px; padding: .6rem .8rem; text-align: left; }
.pr-badge { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .75rem; padding: .2rem .5rem; border-radius: 6px; letter-spacing: .06em; flex: none; }
.pr-text { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.set-err:empty { display: none; }
