/* Form Coach — iOS 26 Liquid Glass design system
   Dark-first gym-native · SF Pro stack · Dynamic Type–friendly rem · no build step */

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --bg-secondary: #2c2c2e;
  --bg-tertiary: #3a3a3c;
  --label: #ffffff;
  /* WCAG AA: secondary ≥4.5:1 on black (~7.3:1 at 0.68) */
  --label-secondary: rgba(235, 235, 245, 0.68);
  /* Readable caption floor (~4.6:1). Reserve true decoration via --label-quaternary */
  --label-tertiary: rgba(235, 235, 245, 0.48);
  --label-quaternary: rgba(235, 235, 245, 0.28);
  --separator: rgba(84, 84, 88, 0.65);
  --accent: #0a84ff;
  --accent-fill: #0a84ff;
  --ready: #30d158;
  --caution: #ff9f0a;
  --fault: #ff453a;
  --depth: #64d2ff;
  --purple: #bf5af2;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --glass-stroke: rgba(255, 255, 255, 0.22);
  --glass-specular: rgba(255, 255, 255, 0.38);
  --scrim: rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", system-ui, sans-serif;
  --radius-device: 55px;
  --radius-sheet: 28px;
  --radius-card: 18px;
  --radius-control: 14px;
  --radius-pill: 100px;
  --safe-top: 54px;
  --safe-bottom: 34px;
  --iphone-w: 393px;
  --iphone-h: 852px;
  --watch-w: 198px;
  --watch-h: 242px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Dynamic Type base — 1rem = 16px default; large/AX bump html font-size */
  --text-caption2: 0.6875rem; /* 11 */
  --text-caption1: 0.75rem; /* 12 */
  --text-footnote: 0.8125rem; /* 13 */
  --text-subhead: 0.9375rem; /* 15 */
  --text-body: 1.0625rem; /* 17 */
  --text-headline: 1.0625rem;
  --text-title3: 1.25rem; /* 20 */
  --text-title2: 1.375rem; /* 22 */
  --text-title1: 1.75rem; /* 28 */
  --text-large-title: 2.125rem; /* 34 */
  --touch: 44px;
}

html[data-theme="light"] {
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --bg-secondary: #e5e5ea;
  --bg-tertiary: #d1d1d6;
  --label: #000000;
  --label-secondary: rgba(60, 60, 67, 0.68);
  --label-tertiary: rgba(60, 60, 67, 0.5);
  --label-quaternary: rgba(60, 60, 67, 0.3);
  --separator: rgba(60, 60, 67, 0.29);
  --accent: #007aff;
  --accent-fill: #007aff;
  --ready: #34c759;
  --caution: #ff9500;
  --fault: #ff3b30;
  --depth: #5ac8fa;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-stroke: rgba(255, 255, 255, 0.55);
  --glass-specular: rgba(255, 255, 255, 0.9);
  --scrim: rgba(0, 0, 0, 0.25);
}

/* Dynamic Type demo: ~130% default body scale (review after set) */
html[data-text-size="large"] {
  font-size: 20px;
}

/* Increase Contrast / Reduce Transparency (HIG Materials variants) */
html[data-a11y-contrast="high"] {
  --label-secondary: rgba(235, 235, 245, 0.85);
  --label-tertiary: rgba(235, 235, 245, 0.7);
  --glass: rgba(28, 28, 30, 0.92);
  --glass-strong: rgba(44, 44, 46, 0.95);
  --glass-stroke: rgba(255, 255, 255, 0.4);
}

html[data-theme="light"][data-a11y-contrast="high"] {
  --label-secondary: rgba(60, 60, 67, 0.85);
  --label-tertiary: rgba(60, 60, 67, 0.7);
  --glass: rgba(255, 255, 255, 0.96);
  --glass-strong: rgba(255, 255, 255, 0.98);
}

/* ── Reset & page chrome ────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: #0a0a0c;
  color: #f5f5f7;
  min-height: 100vh;
  line-height: 1.35;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

/* Gallery shell — neutral (presentation only; not product chrome) */
.site {
  min-height: 100vh;
  background: #0a0a0c;
}

.site-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-brand h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f5f5f7;
}

.site-brand p {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.6);
  max-width: 540px;
  line-height: 1.45;
}

.site-brand .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.5);
  margin-bottom: 4px;
}

.site-brand .tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ready);
  box-shadow: 0 0 8px var(--ready);
}

.site-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ctrl-btn {
  appearance: none;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  color: #f5f5f7;
  font: 600 13px/1 var(--font);
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.ctrl-btn:active {
  transform: scale(0.97);
}

.ctrl-btn.active {
  background: rgba(10, 132, 255, 0.28);
  border-color: rgba(10, 132, 255, 0.55);
  color: #7ec8ff;
}

.ctrl-select {
  appearance: none;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23aaa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  backdrop-filter: blur(20px);
  color: #f5f5f7;
  font: 600 13px/1 var(--font);
  padding: 10px 36px 10px 16px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-width: 220px;
}

.section-label {
  max-width: 1400px;
  margin: 8px auto 0;
  padding: 0 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.45);
}

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 40px;
  align-items: flex-start;
}

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

.gallery-col h2 {
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.5);
  letter-spacing: 0.02em;
}

.device-caption {
  text-align: center;
  font-size: 12px;
  color: rgba(235, 235, 245, 0.48);
  margin-top: 4px;
}

.watch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.legend-card {
  max-width: 260px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.legend-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.legend-card ul {
  font-size: 13px;
  color: rgba(235, 235, 245, 0.6);
  line-height: 1.55;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-card strong {
  color: #f5f5f7;
}

.legend-card .future {
  color: var(--purple);
}

.legend-card .foot {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(235, 235, 245, 0.45);
  line-height: 1.4;
}

/* ── Liquid Glass utility (chrome only — HIG Materials) ─ */
.glass {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.07) 42%,
    rgba(255, 255, 255, 0.04) 100%
  );
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 0.5px solid var(--glass-stroke);
  box-shadow:
    inset 0 0.5px 0 var(--glass-specular),
    0 8px 28px rgba(0, 0, 0, 0.28);
}

/* Clear glass over camera: darker fill for legibility (HIG clear vs regular) */
.glass-clear {
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .glass {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.68) 100%
  );
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 1),
    0 8px 28px rgba(0, 0, 0, 0.08);
}

html[data-a11y-contrast="high"] .glass,
html[data-a11y-contrast="high"] .glass-clear,
html[data-a11y-contrast="high"] .tab-bar,
html[data-a11y-contrast="high"] .ready-pill,
html[data-a11y-contrast="high"] .watch-strip,
html[data-a11y-contrast="high"] .angle-banner,
html[data-a11y-contrast="high"] .rec-badge {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── iPhone frame ───────────────────────────────────── */
.iphone {
  width: calc(var(--iphone-w) + 24px);
  height: calc(var(--iphone-h) + 24px);
  background: linear-gradient(145deg, #3a3a3c 0%, #1a1a1c 40%, #0d0d0f 100%);
  border-radius: 62px;
  padding: 12px;
  box-shadow:
    0 0 0 1px #2a2a2c,
    0 0 0 3px #0a0a0a,
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 12px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  flex-shrink: 0;
}

.iphone::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 120px;
  width: 3px;
  height: 32px;
  background: #2a2a2c;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 48px 0 #2a2a2c, 0 100px 0 #2a2a2c, 0 140px 0 0 #2a2a2c;
}

.iphone::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 180px;
  width: 3px;
  height: 80px;
  background: #2a2a2c;
  border-radius: 0 2px 2px 0;
}

.iphone-screen {
  width: var(--iphone-w);
  height: var(--iphone-h);
  border-radius: var(--radius-device);
  overflow: hidden;
  position: relative;
  background: var(--bg);
  color: var(--label);
  isolation: isolate;
}

.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 24px;
  z-index: 100;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5);
}

.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 10px;
  pointer-events: none;
  font-size: var(--text-subhead);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--label);
}

.status-bar .time {
  width: 54px;
}

.status-bar .status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 70px;
  justify-content: flex-end;
}

.status-bar svg {
  display: block;
}

.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: var(--label);
  opacity: 0.28;
  border-radius: 3px;
  z-index: 100;
  pointer-events: none;
}

/* App screen layers */
.app-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-out);
}

.app-screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  z-index: 1;
}

.app-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--safe-bottom) + 72px);
  scrollbar-width: none;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}

.app-scroll.no-tab {
  padding-bottom: calc(var(--safe-bottom) + 16px);
}

.app-scroll.full-bleed {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* ── Nav ────────────────────────────────────────────── */
.nav-large {
  padding: 8px 20px 12px;
}

.nav-large h1 {
  font-size: var(--text-large-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.nav-large .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.nav-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 10px;
  min-height: var(--touch);
  gap: 8px;
}

.nav-inline .title {
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.nav-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent);
  font: 400 var(--text-body)/1 var(--font);
  padding: 8px 10px;
  min-width: var(--touch);
  min-height: var(--touch);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
}

.nav-btn.icon {
  width: var(--touch);
  color: var(--accent);
}

/* ≥44×44 hit target; visual circle can sit inset (HIG Accessibility control sizes) */
.nav-btn.glass-icon {
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  min-height: var(--touch);
  border-radius: 50%;
  color: var(--label);
  position: relative;
  background: transparent;
  border: none;
  backdrop-filter: none;
}

.nav-btn.glass-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--glass);
  border: 0.5px solid var(--glass-stroke);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0.5px 0 var(--glass-specular);
  z-index: 0;
}

.nav-btn.glass-icon svg,
.nav-btn.glass-icon span {
  position: relative;
  z-index: 1;
}

.nav-spacer {
  width: var(--touch);
  min-width: var(--touch);
  flex-shrink: 0;
}

/* Floating tab bar — Liquid Glass chrome (HIG Tab bars + Materials) */
.tab-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  height: 56px;
  border-radius: 28px;
  display: none;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 50;
  background: linear-gradient(
    165deg,
    rgba(44, 44, 46, 0.82) 0%,
    rgba(28, 28, 30, 0.78) 100%
  );
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 0.5px solid var(--glass-stroke);
  box-shadow:
    inset 0 0.5px 0 var(--glass-specular),
    0 12px 40px rgba(0, 0, 0, 0.4);
}

.tab-bar.visible {
  display: flex;
}

html[data-theme="light"] .tab-bar {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(245, 245, 247, 0.82) 100%
  );
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--label-tertiary);
  font: 500 var(--text-caption2)/1.1 var(--font);
  cursor: pointer;
  min-height: var(--touch);
  padding: 6px;
  border-radius: 16px;
  transition: color 0.2s;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-item.active svg {
  fill: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  appearance: none;
  border: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--text-body);
  letter-spacing: -0.02em;
  border-radius: var(--radius-pill);
  min-height: 50px;
  padding: 14px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s var(--spring), opacity 0.15s, filter 0.15s;
  width: 100%;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-fill);
  color: #fff;
}

.btn-ready {
  background: var(--ready);
  color: #00330f;
}

.btn-destructive {
  background: var(--fault);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--label);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  min-height: var(--touch);
}

.btn-glass {
  background: var(--glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid var(--glass-stroke);
  color: var(--label);
  box-shadow: inset 0 0.5px 0 var(--glass-specular);
  min-height: var(--touch);
  font-size: var(--text-subhead);
}

.btn-compact {
  max-width: 200px;
}

.btn-row {
  display: flex;
  gap: 10px;
  padding: 0 20px;
}

.btn-row .btn {
  flex: 1;
}

.pad-x {
  padding-left: 16px;
  padding-right: 16px;
}

.pad-block {
  padding: 8px 16px 24px;
}

/* ── Cards & lists ──────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-card);
  border: 0.5px solid color-mix(in srgb, var(--separator) 50%, transparent);
  overflow: hidden;
}

.inset-group {
  margin: 0 16px 20px;
  background: var(--bg-elevated);
  border-radius: 14px;
  overflow: hidden;
}

.inset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--separator);
  font-size: var(--text-body);
}

.inset-row:last-child {
  border-bottom: none;
}

.inset-row.multi {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 16px;
}

.inset-row.multi .row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inset-row.note {
  align-items: flex-start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.inset-row .label {
  flex: 1;
  color: var(--label);
}

.inset-row .value {
  color: var(--label-secondary);
  font-size: var(--text-body);
  display: flex;
  align-items: center;
  gap: 6px;
}

.inset-row .value.ready {
  color: var(--ready);
}

.inset-row .value.depth {
  color: var(--depth);
}

.inset-row .chevron {
  color: var(--label-tertiary);
  font-size: 14px;
}

.inset-note {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
  line-height: 1.35;
}

.section-header {
  font-size: var(--text-footnote);
  font-weight: 400;
  color: var(--label-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0 32px 8px;
  margin-top: 8px;
}

/* Toggle — visual 51×31, expanded hit ≥44 (HIG Accessibility) */
.toggle {
  width: 51px;
  min-width: 51px;
  min-height: var(--touch);
  height: var(--touch);
  border-radius: 16px;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  padding: 0;
}

.toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 51px;
  height: 31px;
  margin-top: -15.5px;
  border-radius: 16px;
  background: var(--bg-tertiary);
  transition: background 0.25s;
  z-index: 0;
}

.toggle.on::before {
  background: var(--ready);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 27px;
  height: 27px;
  margin-top: -13.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--spring);
  z-index: 1;
}

.toggle.on::after {
  transform: translateX(20px);
}

/* ── Chips & badges (dual-encoded: icon + text) ──────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-caption1);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 5px 9px 5px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
  white-space: nowrap;
}

.chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-f1 {
  background: rgba(255, 159, 10, 0.18);
  color: var(--caution);
}

.chip-f2 {
  background: rgba(255, 69, 58, 0.16);
  color: #ff6961;
}

.chip-f3 {
  background: rgba(255, 69, 58, 0.14);
  color: #ff7b73;
}

.chip-na {
  background: rgba(142, 142, 147, 0.22);
  color: var(--label-secondary);
}

.chip-depth {
  background: rgba(100, 210, 255, 0.16);
  color: var(--depth);
}

.chip-ok {
  background: rgba(48, 209, 88, 0.16);
  color: var(--ready);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-caption1);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--label-secondary);
}

.badge-medium {
  background: rgba(255, 159, 10, 0.16);
  color: var(--caution);
}

.badge-high {
  background: rgba(48, 209, 88, 0.16);
  color: var(--ready);
}

.badge-low {
  background: rgba(255, 69, 58, 0.14);
  color: var(--fault);
}

.badge-locked {
  background: rgba(48, 209, 88, 0.16);
  color: var(--ready);
}

.badge-skipped {
  background: rgba(142, 142, 147, 0.22);
  color: var(--label-secondary);
}

/* ── Home ───────────────────────────────────────────── */
.cta-hero {
  margin: 8px 16px 24px;
  padding: 22px 20px;
  border-radius: 22px;
  background: var(--bg-elevated);
  border: 0.5px solid color-mix(in srgb, var(--accent) 35%, var(--separator));
  position: relative;
  overflow: hidden;
}

/* Subtle system-blue tint only — not marketing gradient */
.cta-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10, 132, 255, 0.12) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.cta-hero h2 {
  font-size: var(--text-title2);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  position: relative;
}

.cta-hero p {
  font-size: 0.875rem;
  color: var(--label-secondary);
  margin-bottom: 16px;
  max-width: 260px;
  position: relative;
}

.cta-hero .btn {
  position: relative;
}

.session-card {
  margin: 0 16px 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border: 0.5px solid transparent;
  transition: border-color 0.2s;
  text-align: left;
  width: calc(100% - 32px);
  font: inherit;
  color: inherit;
}

.session-card:focus-visible,
.rep-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.session-card:active {
  border-color: var(--accent);
}

.session-card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.session-card .title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.session-card .meta {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
  margin-top: 2px;
}

.session-card .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-card.incomplete {
  border: 0.5px dashed rgba(255, 159, 10, 0.45);
}

.empty-hint {
  text-align: center;
  padding: 28px 32px;
  color: var(--label-tertiary);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ── Live camera setup ──────────────────────────────── */
.camera-view {
  position: relative;
  flex: 1;
  min-height: 100%;
  background: radial-gradient(
    ellipse 70% 55% at 50% 42%,
    #2a241c 0%,
    #12100e 55%,
    #0a0908 100%
  );
  overflow: hidden;
}

.camera-view::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(20, 18, 16, 0.95), transparent);
  pointer-events: none;
}

.silhouette {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 168px;
  height: 340px;
  opacity: 0.55;
}

.silhouette svg {
  width: 100%;
  height: 100%;
}

.silhouette.clipped {
  opacity: 0.4;
  transform: translate(-50%, -42%) scale(1.15);
}

.silhouette.dim {
  opacity: 0.25;
}

.guide-frame {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: 72%;
  height: 68%;
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  pointer-events: none;
}

.guide-frame.ready {
  border-color: rgba(48, 209, 88, 0.55);
  box-shadow:
    0 0 0 1px rgba(48, 209, 88, 0.15),
    inset 0 0 40px rgba(48, 209, 88, 0.06);
}

.camera-top {
  position: absolute;
  top: calc(var(--safe-top) + 4px);
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camera-top .nav-inline {
  padding: 0 4px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.ready-pill {
  font-size: var(--text-caption2);
  font-weight: 600;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: var(--label-secondary);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
}

.ready-pill.pass {
  color: var(--ready);
  border-color: rgba(48, 209, 88, 0.35);
  background: rgba(20, 40, 28, 0.75);
}

.ready-pill.fail {
  color: var(--caution);
  border-color: rgba(255, 159, 10, 0.35);
}

.ready-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ready-pill.pass .dot {
  box-shadow: 0 0 6px currentColor;
}

.pill-caption {
  text-align: center;
  font-size: var(--text-caption2);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-top: -2px;
}

.angle-banner {
  align-self: center;
  font-size: var(--text-caption1);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(28, 28, 30, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: var(--depth);
}

.angle-banner.warn {
  color: var(--caution);
}

.watch-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 118px;
  z-index: 10;
  padding: 12px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(
    165deg,
    rgba(44, 44, 46, 0.78) 0%,
    rgba(28, 28, 30, 0.72) 100%
  );
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 0.5px solid var(--glass-stroke);
  box-shadow: inset 0 0.5px 0 var(--glass-specular);
}

.watch-strip.ready-state {
  border-color: rgba(48, 209, 88, 0.4);
}

.watch-strip.warn-state {
  border-color: rgba(255, 159, 10, 0.35);
}

.watch-strip .watch-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.watch-strip .ws-text {
  flex: 1;
  min-width: 0;
}

.watch-strip .ws-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.watch-strip .ws-title.ready {
  color: var(--ready);
}

.watch-strip .ws-title.warn {
  color: var(--caution);
}

.watch-strip .ws-sub {
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  margin-top: 1px;
}

.camera-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px calc(var(--safe-bottom) + 12px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 30%, transparent);
}

/* Recording */
.rec-badge {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid rgba(255, 69, 58, 0.4);
  font-size: var(--text-subhead);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  z-index: 12;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fault);
  animation: rec-pulse 1.2s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.5);
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 6px rgba(255, 69, 58, 0);
  }
}

.rec-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 6;
  pointer-events: none;
}

.rec-count .num {
  font-size: 5.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.rec-count .lbl {
  font-size: var(--text-subhead);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-ghost.on-camera {
  color: rgba(255, 255, 255, 0.72);
}

/* Analyzing */
.analyzing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  gap: 16px;
  text-align: center;
}

.spinner-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.analyzing h2 {
  font-size: var(--text-title2);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.analyzing p {
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 240px;
  margin-top: 8px;
  text-align: left;
}

.progress-steps .step {
  font-size: 0.875rem;
  color: var(--label-tertiary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-steps .step.done {
  color: var(--ready);
}

.progress-steps .step.active {
  color: var(--label);
}

.analyzing-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  margin-top: 20px;
}

/* Summary */
.summary-hero {
  padding: 8px 20px 16px;
}

.summary-hero .exercise {
  font-size: var(--text-title1);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.summary-hero .sub {
  font-size: var(--text-subhead);
  color: var(--label-secondary);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.summary-stats {
  margin: 0 16px 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
}

.stat-icon.warn {
  background: rgba(255, 159, 10, 0.18);
  color: var(--caution);
}

.stat-icon.heel {
  background: rgba(255, 69, 58, 0.14);
  color: #ff6961;
}

.stat-icon.depth {
  background: rgba(100, 210, 255, 0.16);
  color: var(--depth);
}

.stat-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding-top: 5px;
}

.disclaimer {
  margin: 8px 20px 16px;
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  line-height: 1.4;
}

.disclaimer summary {
  cursor: pointer;
  color: var(--label-secondary);
  font-weight: 500;
  list-style: none;
  min-height: var(--touch);
  display: flex;
  align-items: center;
}

.disclaimer summary::-webkit-details-marker {
  display: none;
}

.disclaimer p {
  margin-top: 8px;
  color: var(--label-secondary);
}

/* Rep cards */
.rep-card {
  margin: 0 16px 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  width: calc(100% - 32px);
  text-align: left;
  font: inherit;
  color: inherit;
  display: block;
}

.rep-card:active {
  transform: scale(0.985);
}

.rep-card .rep-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rep-card .rep-n {
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rep-card .tempo {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
  font-variant-numeric: tabular-nums;
}

.rep-card .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Rep detail */
.media-stage {
  margin: 0 16px;
  border-radius: 18px;
  overflow: hidden;
  background: #0e0e10;
  aspect-ratio: 4 / 3;
  position: relative;
}

.media-stage .frame-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 55%, #2c261e 0%, #141210 70%);
}

.skeleton-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fault-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 159, 10, 0.35);
  font-size: var(--text-caption1);
  font-weight: 600;
  color: var(--caution);
  line-height: 1.3;
}

.timeline {
  margin: 14px 20px 8px;
}

.timeline-track {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.timeline-band {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
}

.timeline-band.f1 {
  background: rgba(255, 159, 10, 0.75);
}

.timeline-band.ok {
  background: rgba(48, 209, 88, 0.35);
}

.timeline-playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  font-variant-numeric: tabular-nums;
}

.keyframe-row {
  display: flex;
  gap: 8px;
  padding: 8px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.keyframe {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--label-secondary);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font);
}

.keyframe.active {
  border-color: var(--accent);
}

.keyframe .kf-bg {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background: radial-gradient(ellipse at 50% 60%, #3a3228, #1a1816);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 16px 12px;
}

.metric-cell {
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 12px;
}

.metric-cell .m-label {
  font-size: var(--text-caption1);
  font-weight: 500;
  color: var(--label-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-cell .m-label svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.metric-cell .m-value {
  font-size: var(--text-title2);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.metric-cell .m-value.warn {
  color: var(--caution);
}

.metric-cell .m-value.fault {
  color: #ff6961;
}

.metric-cell .m-value.compact {
  font-size: 1.125rem;
}

.metric-cell .m-sub {
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  margin-top: 2px;
}

.why-block {
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
}

.why-block h3 {
  font-size: var(--text-footnote);
  font-weight: 600;
  color: var(--caution);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.why-block p {
  font-size: 0.875rem;
  color: var(--label-secondary);
  line-height: 1.4;
}

.watch-fusion {
  margin: 0 16px 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.1);
  border: 0.5px solid rgba(10, 132, 255, 0.22);
  font-size: var(--text-footnote);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Settings ───────────────────────────────────────── */
.settings-footer {
  margin: 8px 32px 24px;
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  line-height: 1.4;
}

.destructive-row {
  color: var(--fault);
  cursor: pointer;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  min-height: 48px;
  padding: 10px 16px;
}

/* ── Raw Session ────────────────────────────────────── */
.raw-banner {
  margin: 0 16px 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 159, 10, 0.12);
  border: 0.5px solid rgba(255, 159, 10, 0.35);
  font-size: var(--text-footnote);
  color: var(--caution);
  line-height: 1.35;
}

.raw-banner strong {
  display: block;
  font-size: var(--text-subhead);
  margin-bottom: 4px;
  color: var(--label);
}

.chart-card {
  margin: 0 16px 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
}

.chart-card h3 {
  font-size: var(--text-footnote);
  font-weight: 600;
  color: var(--label-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hip-chart {
  width: 100%;
  height: 120px;
  display: block;
}

.filmstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.film-cell {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 55%, #3a3228, #1a1816);
  border: 0.5px solid var(--separator);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  font-size: 9px;
  font-weight: 600;
  color: var(--label-secondary);
  position: relative;
}

.film-cell .mark {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--depth);
}

.raw-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px 24px;
}

/* ── Bottom sheets (evidence / export) ──────────────── */
.sheet-root {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
}

.sheet-root.open {
  display: flex;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  border: none;
  cursor: pointer;
  animation: fade-in 0.25s var(--ease-out);
}

.sheet-panel {
  position: relative;
  max-height: 78%;
  background: var(--bg-elevated);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 8px 0 calc(var(--safe-bottom) + 12px);
  overflow-y: auto;
  animation: sheet-up 0.32s var(--spring);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
  border: 0.5px solid var(--separator);
  border-bottom: none;
}

.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  margin: 4px auto 12px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  min-height: var(--touch);
}

.sheet-header h2 {
  font-size: var(--text-title3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet-body {
  padding: 0 16px;
}

.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: var(--text-footnote);
}

.evidence-table th,
.evidence-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 0.5px solid var(--separator);
}

.evidence-table th {
  color: var(--label-secondary);
  font-weight: 500;
}

.evidence-table td {
  font-variant-numeric: tabular-nums;
}

.joint-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.joint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-footnote);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-secondary);
}

.joint-row .conf {
  font-variant-numeric: tabular-nums;
  color: var(--label-secondary);
}

.honesty-link {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--accent);
  font: 500 var(--text-body)/1.3 var(--font);
  padding: 12px 0;
  min-height: var(--touch);
  cursor: pointer;
}

.export-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  background: var(--bg-secondary);
  color: var(--label);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font: inherit;
  min-height: var(--touch);
}

.export-option .eo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.export-option h3 {
  font-size: var(--text-subhead);
  font-weight: 600;
  margin-bottom: 2px;
}

.export-option p {
  font-size: var(--text-caption1);
  color: var(--label-secondary);
  line-height: 1.35;
}

.export-option.danger .eo-icon {
  background: rgba(255, 69, 58, 0.14);
  color: var(--fault);
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Angle hint diagram */
.angle-diagram {
  height: 72px;
  border-radius: 12px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Onboarding */
.onboard {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.onboard-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 20px 8px 32px;
}

.app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  /* Solid system-blue mark — not multi-hue brand glow */
  background: var(--accent-fill);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(10, 132, 255, 0.28),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.onboard-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.onboard-hero p {
  font-size: 1rem;
  color: var(--label-secondary);
  line-height: 1.4;
  max-width: 300px;
}

.perm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.perm-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-elevated);
}

.perm-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perm-item h3 {
  font-size: var(--text-subhead);
  font-weight: 600;
  margin-bottom: 2px;
}

.perm-item p {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
  line-height: 1.35;
}

/* ── Watch frame ────────────────────────────────────── */
.watch {
  width: calc(var(--watch-w) + 36px);
  position: relative;
  flex-shrink: 0;
}

.watch-case {
  width: calc(var(--watch-w) + 36px);
  height: calc(var(--watch-h) + 36px);
  background: linear-gradient(160deg, #3d3d40 0%, #1c1c1e 45%, #0e0e10 100%);
  border-radius: 48px;
  padding: 18px;
  box-shadow:
    0 0 0 1px #2c2c2e,
    0 0 0 2px #111,
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 48px rgba(0, 0, 0, 0.5);
  position: relative;
}

.watch-case::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 72px;
  width: 10px;
  height: 36px;
  background: linear-gradient(90deg, #2a2a2c, #4a4a4c);
  border-radius: 0 4px 4px 0;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}

.watch-case::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 124px;
  width: 6px;
  height: 28px;
  background: linear-gradient(90deg, #1a1a1c, #333);
  border-radius: 0 3px 3px 0;
}

.watch-screen {
  width: var(--watch-w);
  height: var(--watch-h);
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  position: relative;
  color: #fff;
}

.watch-app {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 14px 12px 12px;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}

.watch-app.active {
  display: flex;
  opacity: 1;
}

.watch-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.68);
  margin-bottom: 4px;
}

.watch-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 4px;
}

.watch-title.ready {
  color: var(--ready);
  text-shadow: 0 0 24px rgba(48, 209, 88, 0.35);
}

.watch-title.adjust {
  color: var(--caution);
}

.watch-reason {
  font-size: 13px;
  color: rgba(235, 235, 245, 0.68);
  line-height: 1.3;
  margin-bottom: auto;
}

.watch-btn {
  appearance: none;
  border: none;
  border-radius: 22px;
  min-height: 48px;
  font: 700 17px/1 var(--font);
  letter-spacing: -0.02em;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s;
}

.watch-btn:active {
  transform: scale(0.96);
}

.watch-btn.start {
  background: var(--ready);
  color: #00330f;
  box-shadow: 0 0 24px rgba(48, 209, 88, 0.35);
}

.watch-btn.stop {
  background: var(--fault);
  color: #fff;
}

.watch-btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.watch-countdown {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
  animation: count-in 0.4s var(--spring);
}

@keyframes count-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.watch-rec-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 auto;
}

.watch-rec-meta .rep {
  font-size: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.watch-rec-meta .unit {
  font-size: 15px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.68);
}

.watch-rec-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fault);
}

.watch-rec-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fault);
  display: block;
  animation: rec-pulse 1.2s ease-in-out infinite;
}

.watch-done {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.watch-done .check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(48, 209, 88, 0.18);
  color: var(--ready);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.watch-done h2 {
  font-size: 20px;
  font-weight: 700;
}

.watch-done p {
  font-size: 13px;
  color: rgba(235, 235, 245, 0.68);
}

.haptic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  margin-top: 4px;
}

.haptic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.haptic-row .name {
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.haptic-pattern {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.haptic-pattern span {
  display: block;
  height: 6px;
  border-radius: 2px;
  background: rgba(235, 235, 245, 0.55);
}

.haptic-pattern .long {
  width: 14px;
  background: var(--caution);
}

.haptic-pattern .short {
  width: 5px;
  background: var(--depth);
}

.haptic-pattern .firm {
  width: 10px;
  height: 8px;
  background: var(--fault);
}

.watch-future-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 2px;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 48px;
  font-size: 12px;
  color: rgba(235, 235, 245, 0.45);
  line-height: 1.5;
}

.site-footer a {
  color: rgba(235, 235, 245, 0.65);
}

.site-footer code {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .gallery {
    padding: 16px 16px 60px;
    gap: 32px;
  }

  .site-header {
    padding: 28px 16px 16px;
  }

  .section-label {
    padding: 0 16px;
  }
}
