:root {
  --bg: #000000;
  --surface-1: #0A0A0C;
  --surface-2: #121216;
  --surface-tint: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.28);
  --ink: #FFFFFF;
  --muted: #A1A1AA;
  --dim: #7A7A84;
  --good: #34D399;
  --warn: #FBBF24;
  --bad: #FF453A;
  --font-brand: "Exo 2", sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --text-lg: 1.0625rem;
  --text-body: 0.9375rem;
  --text-sm: 0.8125rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-size: var(--text-body);
}

#app {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

#camera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
  visibility: hidden;
}

#camera.active {
  visibility: visible;
}

#camera.mirrored {
  transform: scaleX(-1);
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.svg-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.svg-slot svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tabular,
.g-count,
.progress-meta,
.cue-score,
.telemetry-pill,
.complete-stat strong {
  font-variant-numeric: tabular-nums;
}

/* ── STUDIO START SHELL (PITCH-BLACK LAYERED GALLERY + WORKBENCH) ────────── */
.studio-shell {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #000000;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) calc(env(safe-area-inset-right, 0px) + 40px) calc(env(safe-area-inset-bottom, 0px) + 24px) calc(env(safe-area-inset-left, 0px) + 40px);
  overflow: hidden;
}

/* Borderless Single-Line Top Bar */
.studio-topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: none;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.app-squircle {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(160deg, #27272C 0%, #101014 50%, #050507 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.92;
  flex: none;
}

.app-squircle span {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: 7.5px;
  letter-spacing: 0.04em;
  color: #FFFFFF;
}

.brand-wordmark {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #FFFFFF;
}

.studio-top-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: none;
}

.audio-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.text-link-btn {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms var(--ease-out);
}

.text-link-btn:hover {
  color: var(--ink);
}

.pricing-link-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.pricing-link-btn:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.10);
}

.lang-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 160ms var(--ease-out);
}

.lang-control:hover {
  border-color: var(--border-strong);
}

.lang-control .svg-slot svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.lang-select {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  height: 100%;
  line-height: 1;
  padding: 0;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  outline: none;
}

.lang-select option,
.hud-select option,
.config-select option {
  background: #0A0A0C;
  color: #FFFFFF;
}

/* Monumental Layered Depth Hero Stage */
.hero-stage {
  position: relative;
  flex: 1;
  min-height: 148px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 0 12px;
}

.hero-stage h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  max-width: 68%;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.25rem, 6.4vw, 5.5rem);
  line-height: 0.90;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #FFFFFF;
  animation: heroReveal 520ms var(--ease-out) both;
}

.studio-subtitle {
  position: relative;
  z-index: 3;
  margin: 0;
  max-width: 44ch;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  animation: heroReveal 620ms var(--ease-out) both;
}

.hero-figure-img {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: min(94%, 400px);
  max-height: calc(100% - 8px);
  width: auto;
  max-width: 48%;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  animation: heroFigureIn 680ms var(--ease-out) both;
}

@keyframes heroReveal {
  from {
    opacity: 0.35;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFigureIn {
  from {
    opacity: 0.45;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.studio-shell[data-step="group"] .brand-lockup,
.studio-shell[data-step="workbench"] .brand-lockup {
  cursor: pointer;
}

/* ── STEP 1: TWO-CARD FITNESS / YOGA DECISION GATE ─────────────────────── */
.mode-gate {
  position: relative;
  z-index: 4;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  animation: heroReveal 360ms var(--ease-out) both;
}

.gate-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 148px;
  padding: 12px 0 4px;
}

.gate-hero h1 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  max-width: 66%;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.05rem, 4.8vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.gate-figure-img {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: min(96%, 184px);
  max-height: calc(100% - 4px);
  width: auto;
  max-width: 40%;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  animation: heroFigureIn 620ms var(--ease-out) both;
}

.mode-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 158px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.065) 0%, rgba(12, 12, 16, 0.92) 100%);
  color: #FFFFFF;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.52);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.11) 0%, rgba(16, 16, 22, 0.96) 100%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
}

.mode-card-yoga:hover {
  border-color: rgba(52, 211, 153, 0.65);
  background: linear-gradient(155deg, rgba(52, 211, 153, 0.11) 0%, rgba(12, 18, 16, 0.96) 100%);
}

.mode-card-mobility:hover {
  border-color: rgba(56, 189, 248, 0.65);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.11) 0%, rgba(10, 16, 22, 0.96) 100%);
}

.mode-card-sports:hover {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(155deg, rgba(251, 191, 36, 0.11) 0%, rgba(20, 16, 10, 0.96) 100%);
}

.mode-card:active {
  transform: scale(0.99);
}

.mode-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.mode-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex: none;
}

.mode-card-icon .svg-slot svg {
  width: 20px;
  height: 20px;
}

.mode-card-yoga .mode-card-icon {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.32);
  color: var(--good);
}

.mode-card-mobility .mode-card-icon {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.32);
  color: #38BDF8;
}

.mode-card-sports .mode-card-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.32);
  color: var(--warn);
}

.mode-card-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mode-card-arrow {
  margin-left: auto;
  color: var(--muted);
  transition: transform 180ms var(--ease-out), color 180ms var(--ease-out);
}

.mode-card-arrow svg {
  width: 20px;
  height: 20px;
}

.mode-card:hover .mode-card-arrow {
  transform: translateX(4px);
  color: #FFFFFF;
}

.mode-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-card-title {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.45rem, 2.35vw, 2.05rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.mode-card-desc {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--muted);
}

.studio-footer {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1320px;
  margin: 10px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
}

.studio-footer-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.studio-footer-legal {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  flex: none;
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--dim);
  white-space: nowrap;
}

.footer-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms var(--ease-out);
}

.footer-link:hover {
  color: #FFFFFF;
}

.gate-ai-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.section-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.back-gate-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.back-gate-btn:hover {
  border-color: var(--border-strong);
  color: #FFFFFF;
  background: var(--surface-2);
}

/* ── STEP 2: BIG-BUTTON CATEGORY FILTER GATE ─────────────────────────────── */
.group-gate {
  position: relative;
  z-index: 4;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
  animation: heroReveal 320ms var(--ease-out) both;
}

.group-gate-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: none;
}

.group-gate-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group-gate-kicker-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.group-gate-sec-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.group-gate-sec-icon .svg-slot svg {
  width: 16px;
  height: 16px;
}

#group-gate[data-section="yoga"] .group-gate-sec-icon {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.34);
  color: var(--good);
}

#group-gate[data-section="mobility"] .group-gate-sec-icon {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.34);
  color: #38BDF8;
}

#group-gate[data-section="sports"] .group-gate-sec-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.34);
  color: var(--warn);
}

.group-gate-heading h2 {
  margin: 4px 0 2px;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.85rem, 4.2vw, 3.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.group-gate-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  flex: 1;
  min-height: 0;
  align-content: center;
  overflow-y: auto;
  padding: 2px 0;
}

.group-gate-cards[data-count="2"],
.group-gate-cards[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.group-gate-cards[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.group-gate-card {
  min-height: 152px;
  padding: 18px 20px;
}

.group-gate-cards[data-count="2"] .group-gate-card,
.group-gate-cards[data-count="3"] .group-gate-card {
  min-height: 196px;
}

.group-gate-cards[data-count="4"] .group-gate-card {
  min-height: 172px;
}

#group-gate[data-section="yoga"] .group-gate-card:hover {
  border-color: rgba(52, 211, 153, 0.65);
  background: linear-gradient(155deg, rgba(52, 211, 153, 0.11) 0%, rgba(12, 18, 16, 0.96) 100%);
}

#group-gate[data-section="yoga"] .group-gate-card .mode-card-icon {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.32);
  color: var(--good);
}

#group-gate[data-section="mobility"] .group-gate-card:hover {
  border-color: rgba(56, 189, 248, 0.65);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.11) 0%, rgba(10, 16, 22, 0.96) 100%);
}

#group-gate[data-section="mobility"] .group-gate-card .mode-card-icon {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.32);
  color: #38BDF8;
}

#group-gate[data-section="sports"] .group-gate-card:hover {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(155deg, rgba(251, 191, 36, 0.11) 0%, rgba(20, 16, 10, 0.96) 100%);
}

#group-gate[data-section="sports"] .group-gate-card .mode-card-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.32);
  color: var(--warn);
}

.group-gate-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.4;
}

@media (max-height: 820px) and (min-width: 960px) {
  .group-gate {
    gap: 14px;
    padding-top: 4px;
  }

  .group-gate-cards {
    gap: 12px;
  }

  .group-gate-card {
    min-height: 126px;
    padding: 14px 16px;
    gap: 8px;
  }
}

/* Workbench Selected Focus Breadcrumb Bar */
.workbench-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  flex: none;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.workbench-breadcrumb::-webkit-scrollbar {
  display: none;
}

.crumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.crumb-btn .svg-slot svg {
  width: 15px;
  height: 15px;
}

.crumb-btn:hover {
  color: #FFFFFF;
}

.crumb-btn.active {
  background: #FFFFFF;
  color: #000000;
}

.crumb-count {
  font-size: var(--text-sm);
  opacity: 0.62;
}

.crumb-sep {
  color: var(--dim);
  font-size: var(--text-sm);
  user-select: none;
}

/* Full-Width Architectural Workout Workbench (Flat Hairline Structure, Zero Nested Cages) */
.workbench {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: none;
}

.workbench-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.workbench-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.section-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  flex: none;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-picker::-webkit-scrollbar {
  display: none;
}

.sec-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.sec-tab .svg-slot svg {
  width: 15px;
  height: 15px;
}

.sec-tab .sec-count {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}

.sec-tab:hover {
  color: var(--ink);
}

.sec-tab.active {
  background: #FFFFFF;
  color: #000000;
}

.sec-tab.active .sec-count {
  opacity: 0.62;
}

.drawer-sections {
  width: 100%;
  display: flex;
}

.drawer-sections .sec-tab {
  flex: 1 0 auto;
}

.group-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  scrollbar-width: none;
}

.group-picker::-webkit-scrollbar {
  display: none;
}

.g-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.g-tab:hover {
  color: var(--ink);
}

.g-tab .svg-slot svg {
  width: 15px;
  height: 15px;
}

.g-tab .g-count {
  font-size: var(--text-sm);
  color: var(--dim);
}

.g-tab.active {
  color: #FFFFFF;
  font-weight: 600;
  border-bottom-color: #FFFFFF;
}

.g-tab.active .g-count {
  color: var(--muted);
}

.set-config-inline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.config-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.config-item label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.config-select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 4px 2px;
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  outline: none;
  transition: border-color 160ms var(--ease-out);
}

.config-select:hover {
  border-bottom-color: #FFFFFF;
}

.config-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}

/* Flat Hairline-Divided Exercise Grid */
.workout-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: min(32dvh, 232px);
  overflow-y: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.w-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-top: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.w-card:last-child {
  border-right: 0;
}

.w-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.w-card.active {
  background: var(--surface-tint);
  border-top-color: #FFFFFF;
}

.w-card-top {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.w-card-title {
  font-size: var(--text-body);
  font-weight: 600;
  color: #FFFFFF;
}

.w-card-meta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.w-card.active .w-card-meta {
  color: #FFFFFF;
}

.w-card-desc {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--muted);
}

/* Bottom Launch Dock */
.launch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.launch-status {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-inline {
  width: 100%;
  max-width: 480px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: var(--text-sm);
}

.progress-stage {
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-meta {
  flex: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.progress-inline.ready .progress-meta {
  color: var(--ink);
}

.progress-inline.error .progress-stage,
.progress-inline.error .progress-meta {
  color: #FFB4AE;
}

.progress-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: #FFFFFF;
  transition: width 140ms linear;
}

.progress-fill.compiling {
  background: linear-gradient(90deg, #777777, #FFFFFF, #777777);
  background-size: 200% 100%;
  animation: progressShimmer 1.1s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

.start-note {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--dim);
}

.history-summary {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.error-box {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.45);
  color: #FFD5D2;
  font-size: var(--text-sm);
}

.start-btn {
  flex: none;
  min-width: 240px;
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #000000;
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.start-btn:hover {
  background: #EAEAEA;
}

.start-btn:active {
  transform: scale(0.985);
}

.start-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.start-btn .arrow svg {
  width: 16px;
  height: 16px;
}

/* ── LIVE CAMERA BROADCAST HUD (SINGLE-ROW + POPOVER OPTIONS) ──────────── */
.hud {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  pointer-events: none;
  z-index: 20;
}

.hud-exercise-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  min-width: 0;
  max-width: min(360px, 58vw);
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.hud-exercise-btn:hover {
  background: rgba(16, 16, 20, 0.88);
  border-color: rgba(255, 255, 255, 0.42);
}

.hud-exercise-btn .svg-slot svg {
  width: 14px;
  height: 14px;
  color: #FFFFFF;
}

.hud-group-tag {
  color: var(--muted);
  font-weight: 500;
  flex: none;
}

.hud-slash {
  opacity: 0.35;
  flex: none;
}

.hud-ex-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666666;
}

.dot.good { background: var(--good); box-shadow: 0 0 8px var(--good); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.dot.busy { background: #FFFFFF; }

.trial-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.trial-pill:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(16, 16, 20, 0.88);
}

.trial-pill strong {
  color: #FFFFFF;
  font-weight: 700;
}

.trial-pill.urgent {
  border-color: rgba(251, 191, 36, 0.72);
  background: rgba(34, 24, 6, 0.88);
  color: #FDE68A;
}

.trial-pill.urgent strong {
  color: #FBBF24;
}

.hud-actions {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  height: 38px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  flex: none;
}

.hud-action-btn {
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.hud-action-btn:last-child {
  border-right: 0;
}

.hud-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.hud-action-btn.icon-only {
  width: 38px;
  padding: 0;
}

.hud-action-btn .svg-slot svg {
  width: 15px;
  height: 15px;
}

.hud-action-btn.options-trigger.active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.rec-btn .rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  flex: none;
}

.rec-btn.recording {
  background: rgba(255, 69, 58, 0.24);
  color: #FFFFFF;
}

/* Anchored Session Options Popover */
.options-popover {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  width: min(296px, calc(100vw - 24px));
  padding: 8px 0;
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.94);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.opt-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 14px;
}

.opt-select-row label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
}

.opt-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 32px;
  padding: 0 10px;
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  max-width: 170px;
  cursor: pointer;
  outline: none;
}

.opt-select option {
  background: #0A0A0C;
  color: #FFFFFF;
}

.opt-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.opt-switch-row,
.opt-action-row {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.opt-switch-row:hover,
.opt-action-row:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.opt-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.opt-label .svg-slot svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.opt-switch-row.active {
  color: #FFFFFF;
}

.opt-switch-row.active .opt-label .svg-slot svg {
  color: #FFFFFF;
}

.switch-track {
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  transition: background-color 160ms var(--ease-out);
}

.switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(0);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.opt-switch-row.active .switch-track {
  background: #FFFFFF;
}

.opt-switch-row.active .switch-thumb {
  background: #000000;
  transform: translateX(16px);
}

.opt-meta {
  font-size: var(--text-sm);
  color: var(--muted);
}

.cue-banner {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.80);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: var(--text-body);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 12;
}

.cue-banner.good { border-left-color: var(--good); color: #FFFFFF; }
.cue-banner.warn { border-left-color: var(--warn); color: #FEF3C7; }
.cue-banner.bad { border-left-color: var(--bad); color: #FFD7D4; background: rgba(34, 8, 8, 0.88); }

.cue-score {
  font-size: var(--text-sm);
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.10);
}

.ai-loader-pill {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 108px);
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(10, 10, 12, 0.90);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 15;
}

.retry-ai-btn {
  margin-top: 8px;
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 69, 58, 0.5);
  background: rgba(255, 69, 58, 0.16);
  color: #FFD5D2;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.toast {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 64px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 9px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  color: #FFFFFF;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  z-index: 25;
}

/* Live Exercise Drawer & Set Complete Modal */
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
}

.drawer-sheet {
  width: 100%;
  max-width: 720px;
  max-height: min(84dvh, 620px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-close svg { width: 16px; height: 16px; }

.drawer-groups {
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.drawer-workout-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.drawer-workout-list .w-card {
  border-bottom: 1px solid var(--border);
}

.complete-sheet {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
}

.complete-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--good);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.complete-badge .svg-slot svg { width: 22px; height: 22px; }

.complete-sheet h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: #FFFFFF;
}

.complete-sub {
  margin: -4px 0 2px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
}

.complete-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.complete-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-right: 1px solid var(--border);
}

.complete-stat:last-child { border-right: 0; }

.complete-stat strong {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #FFFFFF;
}

.complete-stat span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.complete-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.complete-insight {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.complete-gesture-hint {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.complete-gesture-hint span {
  font-size: var(--text-sm);
  color: var(--dim);
}

.complete-gesture-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.complete-gesture-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: #FFFFFF;
  transition: width 90ms linear;
}

.complete-actions .start-btn {
  width: 100%;
}

.complete-secondary-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.complete-secondary-btn:hover {
  background: var(--surface-2);
  border-color: #FFFFFF;
}

/* ── PAYWALL MODAL (HARD LOCK) ──────────────────────────────────────────── */
#paywall-modal {
  z-index: 60;
}

.paywall-sheet {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 22px 20px;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.72);
}

.paywall-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.paywall-badge .svg-slot svg {
  width: 21px;
  height: 21px;
}

.paywall-sheet h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.paywall-sub {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--muted);
  max-width: 38ch;
}

.paywall-price-row {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.paywall-price {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.paywall-period {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.paywall-bullets {
  margin: 2px 0 4px;
  padding: 0;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.paywall-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: var(--text-sm);
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.88);
}

.paywall-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--good);
  font-weight: 700;
}

.paywall-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.paywall-actions .start-btn {
  width: 100%;
}

.paywall-footnote {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--dim);
}

/* ── PRICING & FUNCTIONS EXPLANATION MODAL ──────────────────────────────── */
#pricing-modal {
  z-index: 55;
}

.pricing-sheet {
  width: 100%;
  max-width: 820px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.97);
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.78);
}

.pricing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pricing-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pricing-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: var(--good);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.pricing-badge .svg-slot svg {
  width: 20px;
  height: 20px;
}

.pricing-head h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.pricing-sub {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--muted);
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.plan-pro {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.09) 0%, rgba(14, 14, 18, 0.96) 65%);
}

.plan-tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.plan-tag-pro {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.40);
  color: var(--good);
}

.plan-name {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
}

.plan-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.plan-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--good);
  font-weight: 700;
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.plan-actions .start-btn {
  width: 100%;
  min-width: 0;
  height: 46px;
}

.plan-pro .paywall-footnote {
  text-align: center;
}

.pricing-functions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.pricing-section-title {
  margin: 4px 0 0;
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.func-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.func-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.func-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.func-icon .svg-slot svg {
  width: 15px;
  height: 15px;
}

.func-item h4 {
  margin: 0 0 3px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #FFFFFF;
}

.func-item p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.38;
  color: var(--muted);
}

.pricing-timer-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--muted);
}

.pricing-timer-note .svg-slot svg {
  width: 16px;
  height: 16px;
  color: var(--warn);
  margin-top: 2px;
}

.pricing-timer-note p {
  margin: 0;
}

.modal-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--dim);
}

/* ── LEGAL & PRIVACY MODAL ──────────────────────────────────────────────── */
#legal-modal {
  z-index: 60;
}

.legal-sheet {
  width: 100%;
  max-width: 680px;
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.98);
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.8);
}

.legal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.legal-head h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.legal-sub {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.legal-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  overflow-x: auto;
  flex: none;
}

.legal-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.legal-tab:hover {
  color: #FFFFFF;
}

.legal-tab.active {
  background: #FFFFFF;
  color: #000000;
}

.legal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.legal-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.legal-panel h4 {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}

.legal-panel p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.legal-panel a {
  color: var(--good);
}

.legal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex: none;
}

/* ── ACCOUNT & CLOUD PROFILE MODAL ──────────────────────────────────────── */
#account-modal {
  z-index: 58;
}

.account-sheet {
  width: 100%;
  max-width: 540px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(10, 10, 14, 0.98);
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.8);
}

.account-link-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 600;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-link-btn.signed-in {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(52, 211, 153, 0.12);
  color: var(--good);
}

.account-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.account-form.compact {
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.form-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
  transition: border-color 150ms var(--ease-out);
}

.form-input:focus {
  border-color: var(--border-strong);
}

.account-form .start-btn {
  width: 100%;
  min-width: 0;
  height: 46px;
}

.account-privacy-note {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.member-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #000000;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.member-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-name {
  font-size: 15px;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-email {
  font-size: var(--text-sm);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.member-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.member-stat strong {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
}

.member-stat span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.profile-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-actions-row .complete-secondary-btn {
  flex: 1;
  min-width: 110px;
  height: 40px;
}

.profile-status {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--good);
}

.member-history h3 {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--muted);
}

.member-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
}

.danger-zone {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.danger-link-btn,
.complete-save-link {
  align-self: center;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.complete-save-link:hover {
  color: #FFFFFF;
}

.danger-link-btn:hover {
  color: #f87171;
}

.account-delete-box,
.account-pwd-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-security-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.danger-confirm-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 720px) {
  .pricing-sheet,
  .account-sheet {
    padding: 16px;
    gap: 12px;
  }

  .pricing-plans,
  .func-grid,
  .profile-row {
    grid-template-columns: 1fr;
  }
}

/* ── MOBILE PORTRAIT (< 960px) ──────────────────────────────────────────── */
@media (max-width: 959px) {
  .studio-shell {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
    overflow: hidden;
  }

  .mode-gate {
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
  }

  .gate-hero {
    min-height: 98px;
    justify-content: flex-start;
    padding: 6px 0 2px;
  }

  .gate-hero h1 {
    font-size: 27px;
    max-width: 62%;
    margin: 0 0 6px;
  }

  .gate-figure-img {
    height: calc(100% - 6px);
    max-height: 106px;
    max-width: 42%;
    right: 0;
    bottom: 0;
  }

  .mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    flex: 1;
    align-content: center;
  }

  .mode-card {
    min-height: 126px;
    padding: 12px 14px;
    border-radius: 15px;
    gap: 8px;
  }

  .mode-card-top {
    gap: 8px;
  }

  .mode-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .mode-card-icon .svg-slot svg {
    width: 16px;
    height: 16px;
  }

  .mode-card-pill {
    padding: 3px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mode-card-arrow {
    display: none;
  }

  .mode-card-title {
    font-size: 19px;
  }

  .mode-card-desc {
    font-size: var(--text-sm);
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .studio-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
  }

  .studio-footer-legal {
    justify-content: flex-start;
    gap: 6px 10px;
  }

  .group-gate {
    gap: 12px;
    padding-top: 4px;
  }

  .group-gate-heading h2 {
    font-size: 26px;
  }

  .group-gate-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
  }

  .group-gate-cards[data-count="2"] {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .group-gate-cards[data-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-gate-card {
    min-height: 124px;
    padding: 14px;
    border-radius: 15px;
    gap: 8px;
  }

  .group-gate-cards[data-count="2"] .group-gate-card {
    min-height: 156px;
  }

  .group-gate-card .mode-card-arrow {
    display: none;
  }

  .group-gate-card .mode-card-title {
    font-size: 18px;
  }

  .section-nav-group {
    display: flex;
    width: 100%;
    min-width: 0;
  }

  .section-nav-group .workbench-breadcrumb {
    flex: 1;
    min-width: 0;
  }

  .back-gate-btn {
    width: 40px;
    height: 40px;
  }

  .studio-topbar {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .studio-top-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .brand-lockup {
    gap: 7px;
  }

  .app-squircle {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .app-squircle span {
    font-size: 6px;
  }

  .brand-wordmark {
    font-size: 16px;
  }

  .audio-links {
    gap: 6px;
  }

  .pricing-link-btn {
    padding: 4px 9px;
  }

  .lang-control {
    height: 32px;
    padding: 0 7px;
    gap: 4px;
    min-width: 0;
  }

  .lang-select {
    max-width: 118px;
    text-overflow: ellipsis;
  }

  .hero-stage {
    flex: none;
    min-height: 104px;
    padding: 8px 0 6px;
    justify-content: flex-start;
  }

  .hero-stage h2 {
    font-size: 30px;
    max-width: 62%;
    margin: 0 0 6px;
  }

  .studio-subtitle {
    font-size: var(--text-sm);
    line-height: 1.4;
    max-width: 58%;
  }

  .hero-figure-img {
    height: calc(100% - 6px);
    max-height: 122px;
    max-width: 44%;
    right: 0;
    bottom: 0;
  }

  .workbench {
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding-top: 8px;
    gap: 8px;
  }

  .workbench-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .workbench-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .section-picker {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .sec-tab {
    height: 34px;
    padding: 0 10px;
  }

  .group-picker {
    flex: none;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    padding-right: 20px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }

  .drawer-groups {
    padding-right: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .drawer-groups .g-tab {
    padding: 0 9px;
    gap: 5px;
  }

  .set-config-inline {
    width: 100%;
    justify-content: space-between;
    padding: 6px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .workout-strip {
    flex: 1;
    min-height: 0;
    max-height: none;
    width: 100%;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
  }

  .w-card {
    padding: 12px 12px;
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
    justify-content: flex-start;
    gap: 4px;
  }

  .w-card:last-child {
    border-bottom: 0;
  }

  .w-card.active {
    border-top-color: transparent;
    border-left-color: #FFFFFF;
  }

  .launch-bar {
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .progress-inline {
    max-width: 100%;
  }

  .start-note {
    display: none;
  }

  .start-btn {
    width: 100%;
    min-width: 0;
    height: 48px;
  }

  .drawer-workout-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .studio-shell {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 14px);
  }

  .studio-topbar {
    gap: 4px;
  }

  .brand-lockup {
    gap: 4px;
  }

  .brand-wordmark {
    font-size: 13px;
    letter-spacing: 0.01em;
  }

  .studio-top-controls {
    gap: 4px;
  }

  .audio-links {
    gap: 4px;
  }

  .pricing-link-btn,
  .account-link-btn {
    padding: 4px 6px;
  }

  .account-link-btn {
    max-width: 68px;
  }

  .lang-control {
    padding: 0 5px;
    gap: 0;
  }

  .lang-control #icon-globe {
    display: none;
  }

  .lang-select {
    max-width: 58px;
  }
}

@media (max-width: 640px) {
  .hud {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .hud-exercise-btn,
  .trial-pill,
  .hud-actions,
  .cue-banner,
  .hint-banner {
    background: rgba(8, 8, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .hud-exercise-btn {
    height: 36px;
    padding: 0 9px;
    flex: 1;
    max-width: none;
  }

  .trial-pill {
    height: 36px;
    padding: 0 8px;
    gap: 4px;
  }

  .hud-actions {
    height: 36px;
  }

  .hud-action-btn {
    padding: 0 10px;
  }

  .hud-action-btn.icon-only,
  .hud-action-btn.options-trigger {
    width: 38px;
    padding: 0;
  }

  #lbl-options {
    display: none;
  }

  .options-popover {
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
  }

  .opt-switch-row,
  .opt-action-row {
    min-height: 44px;
  }

  .cue-banner {
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    font-size: var(--text-sm);
    padding: 7px 12px;
  }

  .ai-loader-pill {
    top: calc(env(safe-area-inset-top, 0px) + 100px);
  }
}

@media (max-width: 420px) {
  .hud-group-tag,
  .hud-slash {
    display: none;
  }

  #trial-pill-label {
    display: none;
  }

  .hint-banner {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    padding: 7px 12px;
  }
}

/* ── SHORT LANDSCAPE PHONE (max-height 460px) ───────────────────────────── */
@media (max-height: 460px) and (orientation: landscape) {
  .studio-shell {
    padding: 10px 18px;
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.42fr);
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    row-gap: 8px;
    overflow: hidden;
  }

  .studio-shell[data-step="choose"],
  .studio-shell[data-step="group"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .group-gate {
    gap: 8px;
    padding-top: 2px;
  }

  .group-gate-heading h2 {
    font-size: 22px;
    margin: 0;
  }

  #group-gate-subtitle {
    display: none;
  }

  .group-gate-cards {
    gap: 10px;
    align-content: start;
  }

  .group-gate-cards[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-gate-cards[data-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .group-gate-cards[data-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .group-gate-card {
    min-height: 104px;
    padding: 10px 12px;
    gap: 6px;
  }

  .group-gate-cards[data-count="2"] .group-gate-card,
  .group-gate-cards[data-count="3"] .group-gate-card {
    min-height: 144px;
  }

  .group-gate-card .mode-card-arrow {
    display: none;
  }

  .mode-gate {
    gap: 8px;
    justify-content: space-between;
    padding-top: 2px;
  }

  .gate-hero {
    min-height: 0;
    padding: 2px 0;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }

  .gate-hero h1 {
    font-size: 22px;
    max-width: none;
    margin: 0;
    white-space: nowrap;
  }

  .gate-hero .studio-subtitle {
    max-width: none;
    font-size: var(--text-sm);
  }

  .gate-figure-img {
    display: none;
  }

  .mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    flex: 1;
    align-content: stretch;
  }

  .mode-card {
    min-height: 132px;
    padding: 12px 12px;
    gap: 6px;
    border-radius: 14px;
  }

  .mode-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .mode-card-icon .svg-slot svg {
    width: 15px;
    height: 15px;
  }

  .mode-card-arrow {
    display: none;
  }

  .mode-card-title {
    font-size: 18px;
  }

  .studio-footer {
    flex-direction: row;
    align-items: center;
    margin-top: 4px;
    padding-top: 6px;
  }

  .studio-shell[data-step="workbench"] .studio-footer {
    display: none;
  }

  .studio-topbar {
    grid-column: 1 / 3;
    grid-row: 1;
    flex-wrap: nowrap;
  }

  .brand-lockup {
    order: 0;
  }

  .studio-top-controls {
    display: flex;
    gap: 16px;
  }

  .audio-links {
    order: 0;
    width: auto;
    padding-top: 0;
    gap: 12px;
  }

  .hero-stage {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding: 4px 0;
    min-height: 0;
  }

  .hero-stage h2 {
    font-size: 26px;
    max-width: 100%;
    margin: 0 0 4px;
  }

  .studio-subtitle {
    max-width: 100%;
    font-size: var(--text-sm);
  }

  .hero-figure-img {
    display: none;
  }

  .workbench {
    display: contents;
  }

  .workbench-bar {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    padding-top: 6px;
    gap: 4px;
  }

  .workbench-top-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .section-nav-group {
    flex: 1;
    min-width: 0;
    width: auto;
    gap: 4px;
  }

  .back-gate-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .section-picker {
    display: inline-flex;
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 2px;
    overflow-x: auto;
  }

  .sec-tab {
    height: 28px;
    padding: 0 7px;
    gap: 4px;
  }

  .set-config-inline {
    width: auto;
    justify-content: flex-end;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 2px 0;
    gap: 6px;
    flex: none;
  }

  .config-item {
    gap: 4px;
  }

  .workout-strip {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin-top: 48px;
    height: calc(100% - 48px);
    min-height: 0;
    max-height: none;
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .launch-bar {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    gap: 8px;
  }

  .start-note {
    display: none;
  }

  .start-btn {
    height: 44px;
  }

  .paywall-sheet {
    padding: 16px 18px;
    gap: 8px;
  }

  .pricing-sheet {
    padding: 14px 16px;
    gap: 10px;
    max-height: calc(100dvh - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage h2,
  .studio-subtitle,
  .hero-figure-img,
  .gate-figure-img,
  .mode-gate,
  .progress-fill.compiling {
    animation: none;
  }
  .text-link-btn,
  .lang-control,
  .g-tab,
  .sec-tab,
  .mode-card,
  .mode-card-arrow,
  .back-gate-btn,
  .config-select,
  .w-card,
  .start-btn,
  .complete-secondary-btn,
  .progress-fill,
  .hud-exercise-btn,
  .hud-action-btn,
  .opt-switch-row,
  .opt-action-row,
  .switch-track,
  .switch-thumb {
    transition: none;
  }
}
