/* Cue PWA — dark-first visual approximation (Liquid Glass chrome only) */
:root {
  /* Semantic OKLCH tokens (dark-first) */
  --bg: oklch(0.145 0.005 286);
  --raised: oklch(0.22 0.005 286);
  --raised-2: oklch(0.28 0.005 286);
  --ink: oklch(0.97 0.002 286);
  --muted: oklch(0.65 0.015 286);
  --line: oklch(1 0 0 / 0.1);
  --accent-solid: oklch(0.62 0.155 45); /* Cue terracotta ≈ #c45c26 */
  --accent: var(--accent-solid);
  --accent-ink: oklch(0.98 0.01 70);
  --danger: oklch(0.58 0.18 25);
  --good: oklch(0.62 0.12 155);
  --danger-soft: oklch(0.28 0.03 40);
  --why-bg: oklch(0.26 0.03 45);
  --why-ink: oklch(0.88 0.04 50);
  /* Concentric radius: outer = inner + pad */
  --radius-control: 12px;
  --pad-card: 16px;
  --radius: calc(var(--radius-control) + var(--pad-card)); /* 28px */
  --radius-lg: var(--radius);
  --radius-sm: var(--radius-control);
  --space: 8px;
  --motion: 150ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --cta-h: 48px;
  --tab-h: 52px;
  /* Rendered tab bar: 1px border, 6px pad, tab (26px icon, 2px gap, 12px label, 8px pad), 6px pad. */
  --tab-bar-h: calc(1px + 6px + max(var(--tab-h), 8px + 26px + 2px + 12px * 1.45) + 6px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --glass-bg: oklch(0.22 0.005 286 / 0.72);
  --glass-bg-strong: oklch(0.19 0.005 286 / 0.78);
  --glass-border: oklch(1 0 0 / 0.14);
  --glass-blur: saturate(180%) blur(20px);
  --shadow: none;
  --press-scale: 0.96;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; height: auto; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  background-color: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.app {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  position: relative;
  background: var(--bg);
}
.app.has-tab-bar {
  padding-bottom: calc(28px + var(--safe-b) + var(--tab-h) + 12px);
}

/* —— Liquid Glass chrome (tab bar, topbar, sheet header, rest card) —— */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px -8px 16px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  transition: background var(--motion) var(--ease);
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius-control);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
  transition: transform var(--motion) var(--ease), opacity var(--motion) var(--ease), border-color var(--motion) var(--ease);
}
.icon-btn:active { transform: scale(var(--press-scale)); }
.icon-btn:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

.kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 10px;
  color: var(--ink);
}
h1 { font-size: 32px; text-wrap: balance; }
h2 { font-size: 22px; }
.lede { color: var(--muted); margin: 0 0 18px; text-wrap: pretty; }

.stack { display: flex; flex-direction: column; gap: 16px; }

/* Solid raised cards — NOT glass */
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-card);
  box-shadow: none;
}
.card.quiet { background: transparent; border-color: transparent; }

label.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
label.field span.rank {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
input[type="text"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--raised-2);
  color: var(--ink);
  border-radius: var(--radius-control);
  padding: 14px;
  font-size: 16px;
  outline: none;
  appearance: none;
  transition: border-color var(--motion) var(--ease);
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.preset-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.preset {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius); /* card-like: control+pad feel */
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: border-color var(--motion) var(--ease), background var(--motion) var(--ease), transform var(--motion) var(--ease);
  min-height: 44px;
}
.preset b { display: block; font-size: 16px; }
.preset small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.preset.on {
  border-color: var(--accent);
  background: var(--raised-2);
  color: var(--ink);
}
.preset.on small { color: var(--muted); }
.preset:active { transform: scale(var(--press-scale)); }
.preset:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}
.preset-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 8px;
}
.diagram img { width: 100%; height: auto; max-height: 42vh; display: block; object-fit: cover; object-position: center; }
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
  border-color: var(--accent);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--motion) var(--ease), border-color var(--motion) var(--ease), transform var(--motion) var(--ease), color var(--motion) var(--ease);
}
.chip.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip.soft.on {
  background: color-mix(in oklch, var(--accent-solid) 22%, transparent);
  color: var(--ink);
  border-color: color-mix(in oklch, var(--accent-solid) 55%, transparent);
}
.chip:active { transform: scale(var(--press-scale)); }
.chip:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gear {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  min-height: 56px;
  transition: border-color var(--motion) var(--ease), background var(--motion) var(--ease), transform var(--motion) var(--ease);
}
.gear.on {
  border-color: var(--accent);
  background: var(--raised-2);
  color: var(--ink);
}
.gear small { display: block; color: var(--muted); font-size: 12px; }
.gear.on small { color: var(--muted); }
.gear:active { transform: scale(var(--press-scale)); }
.gear:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: calc(var(--radius-control) + 4px); /* ~16 → concentric with control */
  padding: 14px 18px;
  min-height: var(--cta-h);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform var(--motion) var(--ease), opacity var(--motion) var(--ease), background var(--motion) var(--ease), border-color var(--motion) var(--ease);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn:active { transform: scale(var(--press-scale)); }
.btn:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}
.btn[disabled] { opacity: 0.45; }

.dock {
  position: sticky;
  bottom: 0;
  padding-top: 16px;
  padding-bottom: calc(4px + var(--safe-b));
  padding-inline: 0;
  background: linear-gradient(to top, var(--bg) 72%, transparent);
  z-index: 4;
}
.app.has-tab-bar .dock {
  bottom: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: 8px;
}

.hero-time {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.minutes {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.minutes span { font-size: 16px; color: var(--muted); font-weight: 500; }

.why {
  background: var(--why-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--why-ink);
  margin-bottom: 12px;
}
.why > strong { display: block; margin-bottom: 2px; color: var(--ink); }
details.why summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details.why summary::-webkit-details-marker { display: none; }
details.why p { margin: 8px 0 0; }
a { color: var(--accent); }
button.linkish {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
button.linkish:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

.preview-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.preview-item:last-child { border-bottom: 0; }
.thumb {
  width: 84px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--raised-2);
}
.thumb svg, .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-item b { display: block; font-weight: 600; font-size: 16px; }
.preview-item em {
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
}
.sec-label {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.progress {
  height: 4px;
  background: var(--raised-2);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 16px;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
}

.diagram {
  background: var(--raised-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 8px 0 14px;
  line-height: 0;
}
.diagram svg { width: 100%; height: auto; display: block; }
.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pill {
  background: var(--raised-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cue { font-size: 16px; margin: 0 0 8px; }
.swap-note { color: var(--accent); font-size: 14px; font-weight: 600; }

.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px;
}
.set-dots { display: flex; gap: 6px; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.dot.on { background: var(--accent); }
.dot.done { background: var(--good); }

.rest-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.55);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}
.rest-card {
  width: min(360px, 100%);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: none;
}
.rest-card .count {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.done-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--good) 18%, transparent);
  color: var(--good);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 12px;
}

.history { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }

.adapt-cards { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; }
.adapt-cards .card p { margin: 0; }

.upcoming-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin: 0 0 8px;
  -webkit-overflow-scrolling: touch;
}
.glance-card {
  flex: 0 0 auto;
  min-width: 112px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: calc(var(--radius-control) + 2px);
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--motion) var(--ease), background var(--motion) var(--ease), transform var(--motion) var(--ease), opacity var(--motion) var(--ease);
}
.glance-card strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.glance-card span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.glance-card.on {
  border-color: var(--accent);
  background: var(--raised-2);
}
.glance-card.done {
  opacity: 0.72;
  border-style: dashed;
}
.glance-card.easy span { color: var(--muted); font-weight: 500; }
.glance-card:active { transform: scale(var(--press-scale)); }
.glance-card:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

.more-equipment { margin: 12px 0 8px; }
.more-equipment .btn.ghost { margin-top: 12px; width: 100%; }
#show-more-equipment { width: 100%; margin: 8px 0 4px; }

/* Paywall */
.paywall-scroll {
  /* Dock (CTA + Restore) + tab bar — keep Monthly + Yearly fully above sticky dock */
  padding-bottom: calc(200px + var(--safe-b) + var(--tab-h));
}
.app.has-tab-bar .paywall-scroll {
  padding-bottom: calc(200px + var(--safe-b) + var(--tab-h));
}

.setup-scroll { padding-bottom: 120px; }
.setup-disclaimer p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted, inherit); opacity: 0.92; }
.setup-scroll .sec-label { margin-top: 18px; }
.setup-scroll #add-goal-slot { width: 100%; margin-bottom: 4px; }

.settings-scroll { padding-bottom: calc(var(--tab-bar-h) + 16px + var(--cta-h) + 40px + var(--safe-b)); }
.paywall-plans { margin-top: 14px; margin-bottom: 8px; }
.paywall-plans,
.paywall-plans .preset,
.paywall-plans .pill,
.paywall-plans b {
  font-variant-numeric: tabular-nums;
}

.paywall-plans .preset {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.paywall-plans .preset-badge {
  position: static;
  margin: 0;
}
.paywall-plans .preset b,
.paywall-plans .preset small {
  white-space: normal;
}
.settings-scroll > button.lede {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.benefit-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}
.benefit-row {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}
.benefit-row::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}
.paywall-proof {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 12px;
  text-align: center;
}
.legal-copy {
  font-size: 12px;
  line-height: 1.4;
  margin: 12px 0 8px;
}
.paywall-dock {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 8px;
  padding-top: 12px;
  padding-bottom: calc(8px + var(--safe-b));
  padding-inline: 0;
  background: linear-gradient(to top, var(--bg) 78%, transparent);
}

.stack .btn { width: 100%; }
.stack .btn + .btn { margin-top: 0; } /* gap from .stack */
.why-line { margin-top: 4px; margin-bottom: 8px; }

/* Week list */
.week-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.week-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-height: 56px;
  transition: border-color var(--motion) var(--ease), background var(--motion) var(--ease), transform var(--motion) var(--ease);
}
.week-day.on {
  border-color: var(--accent);
  background: var(--raised-2);
}
.week-day b { display: block; font-size: 16px; }
.week-day small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.week-day .tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.week-day.easy .tag { color: var(--muted); }
.week-day.train .tag { color: var(--accent); }
.week-day:active { transform: scale(var(--press-scale)); }
.week-day:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

/* Adjust sheet — top radius = body pad + control radius */
.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.48);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sheet.sheet-glass {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  max-height: min(88dvh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--pad-card) + var(--radius-control)) calc(var(--pad-card) + var(--radius-control)) 0 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  background: var(--raised);
  padding-bottom: calc(16px + var(--safe-b));
  animation: sheet-up var(--motion) var(--ease);
}
.sheet-chrome {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 16px 14px;
  flex-shrink: 0;
}
.sheet-grabber {
  width: 36px;
  height: 5px;
  border-radius: 99px;
  background: oklch(1 0 0 / 0.28);
  margin: 4px auto 12px;
}
.sheet-chrome .kicker { margin: 0; }
.sheet-chrome h1 {
  font-size: 22px;
  margin: 4px 0 0;
}
.sheet-body {
  background: var(--raised);
  padding: var(--pad-card) var(--pad-card) 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes sheet-up {
  from { transform: translateY(18px); opacity: 0.85; }
  to { transform: translateY(0); opacity: 1; }
}

/* Tab bar — UITabBar-like glass */
.tab-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 6px 8px calc(6px + var(--safe-b));
  z-index: 20;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: max(var(--tab-h), 44px);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 4px;
  transition: color var(--motion) var(--ease), opacity var(--motion) var(--ease), transform var(--motion) var(--ease);
}
.tab svg {
  width: 26px;
  height: 26px;
  display: block;
  color: currentColor;
}
.tab .tab-fill, .tab .ph-fill { display: none; }
.tab .tab-outline, .tab .ph-outline { display: block; }
.tab.on {
  color: var(--accent);
}
.tab.on .tab-fill, .tab.on .ph-fill { display: block; }
.tab.on .tab-outline, .tab.on .ph-outline { display: none; }
.tab:active { transform: scale(var(--press-scale)); }
.tab:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn, .icon-btn, .chip, .preset, .tab, .week-day, .gear, .glance-card {
    transition: opacity var(--motion) var(--ease) !important;
  }
  .btn:active, .icon-btn:active, .chip:active, .preset:active,
  .tab:active, .week-day:active, .gear:active, .glance-card:active {
    transform: none !important;
  }
  .sheet.sheet-glass {
    animation: none !important;
  }
  .toast {
    animation: none !important;
  }
}
@media (min-width: 520px) {
  body { background: oklch(0.08 0.005 286); }
  .app {
    margin-top: 24px;
    margin-bottom: 24px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: calc(100dvh - 48px);
  }
  .tab-bar {
    bottom: 24px;
    border-radius: 0 0 var(--radius) var(--radius);
    width: min(430px, calc(100% - 0px));
  }
  .sheet.sheet-glass {
    border-radius: calc(var(--pad-card) + var(--radius-control));
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
  }
}


/* Phosphor inline icons */
.ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  color: currentColor;
}
.ph svg { width: 100%; height: 100%; display: block; }
.ph .ph-fill { display: none; }
.ph .ph-outline { display: block; }
.ph.on .ph-fill { display: block; }
.ph.on .ph-outline { display: none; }
.chip.on .ph .ph-fill { display: block; }
.chip.on .ph .ph-outline { display: none; }
.preset.on .ph .ph-fill { display: block; }
.preset.on .ph .ph-outline { display: none; }

.chip-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ph-chip { width: 18px; height: 18px; }
.ph-preset { width: 22px; height: 22px; margin-top: 2px; }
.ph-inline { width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; }

.preset {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}
.preset-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Kit presets: fixed card height; blurb clamps — paywall plans stay free-height */
.preset-list:not(.paywall-plans) .preset {
  height: 76px;
  box-sizing: border-box;
  align-items: center;
  overflow: hidden;
}
.preset-list:not(.paywall-plans) .preset small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  line-height: 1.3;
}
.schedule-hint { margin: 8px 0 0; color: var(--muted); }
.custom-equipment { margin: 4px 0 12px; }


.goal-blurb {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.status-chip,
.why-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--muted);
}
.why-chip {
  color: var(--ink);
  border-color: color-mix(in oklch, var(--accent-solid) 45%, transparent);
  background: color-mix(in oklch, var(--accent-solid) 14%, transparent);
}

.soft-open {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
}
.micro {
  color: var(--muted);
  font-size: 12px;
  margin: -8px 0 16px;
}

.form-cue {
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-control) + 2px);
  background: var(--raised);
  padding: 0 14px;
  position: relative;
  z-index: 1;
}
.form-cue summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.form-cue summary::-webkit-details-marker { display: none; }
.form-cue summary:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}
.form-cue-chevron {
  display: inline-flex;
  color: var(--muted);
  transition: transform var(--motion) var(--ease);
  flex: 0 0 auto;
}
.form-cue-chevron svg {
  width: 16px;
  height: 16px;
  display: block;
}
.form-cue[open] .form-cue-chevron {
  transform: rotate(180deg);
}
.form-cue .cue {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  padding-bottom: 4px;
}
/* Keep expanded Form text clear of sticky session CTAs */
.session-cta-spacer {
  height: calc(var(--cta-h) + var(--tab-h) + 28px + var(--safe-b));
  pointer-events: none;
}
.session-list { margin: 0 0 12px; }
.session-list-ol { margin: 8px 0 0; padding-left: 18px; }
.session-list-ol li { margin: 6px 0; }
.session-list-ol .on { font-weight: 700; }
.session-list-ol .done { color: var(--muted); }
.session-dock {
  z-index: 5;
}
.session-dock-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.session-dock-row .btn.primary {
  flex: 1;
  width: auto;
}
.dock-mini {
  flex: 0 0 auto;
  width: auto;
  min-width: 64px;
  max-width: 84px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: calc(var(--radius-control) + 4px);
  padding: 6px 6px;
  min-height: var(--cta-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
}
.dock-mini svg {
  width: 20px;
  height: 20px;
  display: block;
}
.dock-mini:active { transform: scale(var(--press-scale)); }

.icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  color: currentColor;
}
.icon-btn .ph-fill { display: none; }
.icon-btn .ph-outline { display: block; }

.done-mark {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin: 8px 0 4px;
}
.done-mark svg { width: 48px; height: 48px; }
.done-mark .ph-outline { display: none; }
.done-mark .ph-fill { display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b) + var(--tab-h));
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: calc(var(--radius-control) + 2px);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 28px oklch(0 0 0 / 0.35);
  animation: toast-in var(--motion) var(--ease);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.app.has-tab-bar .settings-scroll {
  padding-bottom: calc(var(--tab-bar-h) + 16px + var(--cta-h) + 40px + var(--safe-b));
}

/* On-track / numeric counts */
.on-track,
#rest-count,
.count {
  font-variant-numeric: tabular-nums;
}


.move-timer-launch { margin: 8px 0 4px; }
.move-timer-launch .btn { width: auto; min-height: 44px; padding: 10px 16px; display: inline-flex; }
.move-timer-host:empty { display: none; }
.move-timer-card {
  margin: 8px 0 12px;
  padding: 14px 16px;
  border-radius: calc(var(--radius-control) + 2px);
  border: 1px solid var(--line);
  background: var(--raised);
  text-align: center;
}
.move-timer-count {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 10px;
}
.move-timer-card .btn { width: auto; min-height: 40px; padding: 8px 14px; display: inline-flex; margin: 0 auto; }


.session-icon-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 4px 0 8px;
}
.session-icon-action {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink);
}
.session-icon-action:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 2px;
}
.swap-confirm-inline {
  margin: 4px 0 0;
}
.swap-confirm-label {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.btn.ghost.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}


/* Swap UX — readable offer + worded confirm */
.session-swap-offer {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 10px;
}
.swap-offer-btn {
  width: auto;
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.swap-offer-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
}
.swap-offer-icon svg { width: 20px; height: 20px; display: block; }
.swap-confirm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control, 12px);
  background: var(--raised);
}
.swap-confirm-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}
.swap-confirm-still {
  border-radius: 12px;
  overflow: hidden;
  background: var(--raised-2);
  line-height: 0;
}
.swap-confirm-still img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
}
.swap-confirm-meta strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.swap-confirm-card .btn { width: 100%; }

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.weekday-row .chip {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  text-align: center;
  font-size: 12px;
  border-radius: 12px;
}
.train-actions {
  background: transparent;
  margin-top: 12px;
}
.app.has-tab-bar .dock.you-save {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  box-sizing: border-box;
  bottom: calc(var(--tab-bar-h) + var(--safe-b));
  padding: 28px 16px 16px;
  background: linear-gradient(to top, var(--bg) 16px, transparent);
  z-index: 8;
}
.app.has-tab-bar .dock.you-save .btn {
  width: 100%;
  border-radius: calc(var(--radius-control) + 4px);
}
@media (min-width: 520px) {
  .app.has-tab-bar .dock.you-save {
    bottom: calc(24px + var(--tab-bar-h) + var(--safe-b));
  }
}
.app.has-tab-bar .kit-change-scroll {
  padding-bottom: calc(var(--tab-bar-h) + 16px + var(--cta-h) + 8px + var(--cta-h) + 40px + var(--safe-b));
}


.setup-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100dvh - 16px - var(--safe-t) - 28px - var(--safe-b));
  padding-top: 32px;
}
.setup-intro h1 {
  font-size: 40px;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.setup-intro-copy > * {
  opacity: 0;
  animation: intro-in 120ms var(--ease) forwards;
}
.setup-intro-copy > *:nth-child(1) { animation-delay: 0ms; }
.setup-intro-copy > *:nth-child(2) { animation-delay: 60ms; }
.setup-intro-copy > *:nth-child(3) { animation-delay: 120ms; }
.setup-intro-copy > *:nth-child(4) { animation-delay: 180ms; }
.setup-intro-copy > *:nth-child(5) { animation-delay: 240ms; }
.setup-intro-copy > *:nth-child(6) { animation-delay: 300ms; }
.setup-intro-copy > *:nth-child(7) { animation-delay: 360ms; }
.setup-intro-copy > *:nth-child(8) { animation-delay: 420ms; }
.setup-intro-copy > *:nth-child(9) { animation-delay: 480ms; }
@keyframes intro-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.setup-intro-copy > * + * { margin-top: 16px; }
.setup-intro-copy > h1 + * { margin-top: 24px; }
.setup-intro-copy > .setup-intro-feel { margin-top: 32px; }
.setup-intro-copy > .setup-intro-open + .setup-intro-label { margin-top: 32px; }
.setup-intro-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}
.ph-intro {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--muted);
}
.setup-intro-label {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.setup-intro-quiet {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.setup-intro-note {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}
.setup-intro-foot { margin-top: 48px; }
.setup-intro-legal {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .setup-intro-copy > *,
  .setup-intro-copy > *:nth-child(n) {
    opacity: 1 !important;
    animation: none !important;
    animation-delay: 0s !important;
  }
}
