:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #111111;
  --panel-soft: #181818;
  --text: #f5f5f5;
  --muted: #b7b7b7;
  --accent: #f8ff71;
  --danger: #ff6f61;
  --success: #6dffa3;
  --border: #2d2d2d;
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.4rem;
  --radius-xl: 1.8rem;
  --glass: rgba(8, 8, 8, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Fixed top strip: title chip + (during onboarding) step dots under it — not part of mirror windows */
.screen-context-ribbon {
  position: fixed;
  top: max(0.4rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  /* Above onboarding overlay (10065), plan overlay, and fingertip cursor (10080) */
  z-index: 10100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: min(96vw, 800px);
  max-width: calc(100vw - 1.5rem);
  pointer-events: none;
}

.screen-context-header {
  width: 100%;
  text-align: center;
  padding: 0.55rem 1.35rem 0.7rem;
  /* Glass “window” chip — matches status / panel tokens (see :root) */
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(248, 255, 113, 0.06) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.screen-context-header.hidden {
  display: none !important;
}

.screen-context-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 255, 113, 0.85);
  margin: 0 0 0.2rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.screen-context-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.2rem, 3.4vw, 1.85rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.95), 0 2px 12px rgba(0, 0, 0, 0.85);
}

.screen-context-detail {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
  line-height: 1.45;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.screen-context-detail.hidden {
  display: none !important;
}

/* Onboarding step dots: directly under the title chip; toggled in JS (hidden during head gesture intro) */
.onboarding-breadcrumb-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0.1rem 0 0.15rem;
  margin: 0;
  box-sizing: border-box;
  pointer-events: none;
}

.onboarding-breadcrumb-bar.hidden {
  display: none !important;
}

h1, h2, h3 {
  margin: 0;
  font-family: Poppins, Inter, sans-serif;
}

h2 { font-size: 1.1rem; margin-bottom: 0.45rem; }

p {
  color: var(--muted);
  margin: 0.2rem 0 0.55rem;
}

/* ── Full-screen mirror background ── */

.mirror-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.38;
  filter: contrast(1.05) brightness(0.72);
  z-index: 0;
}

/* Full mirror visibility during onboarding (overlay is a light scrim, not a black wall) */
body.onboarding-active .mirror-bg {
  z-index: 9980;
  opacity: 0.96;
  filter: contrast(1.08) brightness(0.92);
}

/* Hide idle widgets so the camera feed + onboarding prompts stay the focus */
body.onboarding-active .mirror-shell {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* ── Shell overlay on top of mirror ── */

.mirror-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Optional user pinch/scroll on shell — see updateMirrorShellSpatialScale() */
  --shell-ui-scale: 1;
  transform: scale(var(--shell-ui-scale));
  transform-origin: 50% 42%;
  transition: transform 0.28s ease-out;
  will-change: transform;
}

/* ── Side widgets (idle glanceable info) ── */

.side-widget {
  position: absolute;
  z-index: 3;
  padding: 1.2rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.side-widget.dimmed {
  opacity: 0.15;
  pointer-events: none;
}

.side-tl {
  top: 0;
  left: 0;
}

.side-tr {
  top: 0;
  right: 0;
  max-width: 260px;
  text-align: right;
}

.side-tr h3 {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 600;
}

.clock {
  color: var(--text);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

.date {
  margin-top: 0;
  font-size: 0.95rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.side-weather p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.8;
}

.status-chip {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--accent);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Mini-list (schedule on idle side) ── */

.mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  text-align: left;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.45rem;
}

/* ── Content panel (centered, over the mirror) ── */

.content-panel {
  position: absolute;
  top: 50%;
  left: calc(50% - 2rem);
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(90vw, 640px);
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.content-panel.hidden {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%);
}

.content-panel.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
  .content-panel { left: 50%; width: min(92vw, 680px); }
}

.content-section {
  background: rgba(14, 14, 14, 0.94);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.content-section.hidden {
  display: none;
}

.content-section.visible {
  display: block;
}

/* ── Camera feed (hidden element, shares stream with mirror-bg) ── */

#cameraFeed {
  position: fixed;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── Full-screen tracking overlay ── */

/* Body + hand skeleton: only during workout flow (see syncWorkoutTrackingOverlayVisibility in app.js) */
.tracking-overlay-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  transform: scaleX(-1);
  z-index: 2;
}

.tracking-overlay-fullscreen.hidden {
  display: none;
}

.tracking-overlay-fullscreen.visible {
  display: block;
}

/* ── Training HUD (edge-docked widgets) ── */

.train-hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

/* Move only from the top handle; inner layout uses the same edge positions as before */
.train-hud-dock {
  position: absolute;
  inset: 0;
  transform: translate(var(--train-hud-dx, 0px), var(--train-hud-dy, 0px))
    scale(var(--train-hud-sc, 1));
  transform-origin: center center;
  pointer-events: none;
}

.hud-move-handle {
  position: absolute;
  top: 0.4rem;
  left: 50%;
  z-index: 8;
  transform: translateX(-50%);
  width: min(200px, 40vw);
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  border-radius: 6px 6px 0 0;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hud-move-handle:active {
  cursor: grabbing;
  color: rgba(248, 255, 113, 0.5);
}

.train-hud.train-hud--pending-pick .hud-move-handle {
  opacity: 0.25;
  pointer-events: none;
}

.train-hud.hidden {
  display: none;
}

.train-hud.visible {
  display: block;
}

.train-hud .train-hud-dock,
.train-hud .train-hud-dock * {
  pointer-events: auto;
}
.train-hud .hud-move-handle {
  pointer-events: auto;
}

/* Before a workout mode is chosen: hide rep counter, exercise title, and form guide */
.train-hud.train-hud--pending-pick .train-hud-tl,
.train-hud.train-hud--pending-pick .train-hud-ml {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Rest break: center float has timer + next — hide edge HUD so nothing duplicates or sits under it */
.train-hud.train-hud--rest-break .train-hud-tl,
.train-hud.train-hud--rest-break .train-hud-tr,
.train-hud.train-hud--rest-break .train-hud-ml,
.train-hud.train-hud--rest-break .train-hud-bc {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Fixed bottom-right: 3s hold to exit; fill rises bottom→top, camera shows through */
.workout-exit-hold {
  position: fixed;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  z-index: 10070;
  width: min(20rem, calc(100vw - 1.3rem));
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.workout-exit-hold.hidden {
  display: none;
}

.workout-exit-hold__shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 2px solid #d4a82a;
  background: rgba(18, 20, 14, 0.58);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  min-height: 5.75rem;
}

.workout-exit-hold__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  transform: scaleY(var(--exit-fill, 0));
  transform-origin: bottom center;
  will-change: transform;
  background: linear-gradient(180deg, rgba(255, 220, 90, 0.2) 0%, rgba(210, 170, 40, 0.42) 100%);
  pointer-events: none;
  border-radius: 0 0 14px 14px;
}

.workout-exit-hold__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem 0.9rem 0.9rem;
}

.workout-exit-hold__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.workout-exit-hold__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.workout-exit-hold__kicker {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0e6a0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.workout-exit-hold__line {
  margin: 0;
  font-size: clamp(0.88rem, 2.1vw, 0.98rem);
  font-weight: 800;
  line-height: 1.4;
  color: #fff6b0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.workout-exit-hold__meta {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255, 245, 200, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.workout-exit-hold__meta:empty,
.workout-exit-hold__meta[aria-hidden="true"] {
  display: none;
}

.train-hud-tl {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
}

.train-exercise {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.2rem, 2.2vmin, 1.75rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,0.85);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.train-rep-line {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.1rem 0 0;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}

.train-rep-slash {
  color: var(--muted);
  font-weight: 600;
  font-size: 1.4rem;
}

.train-goal-caption {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0.15rem 0 0;
}

/* ── Workout: film countdown + head-tracked reps + floating rest ── */

.workout-countdown-hud {
  position: fixed;
  inset: 0;
  z-index: 10065;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.78) 65%, #000 100%);
  pointer-events: none;
}

.workout-countdown-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.65rem, 2.8vmin, 1.35rem);
  max-width: min(92vw, 28rem);
}

.workout-countdown-exercise-title {
  margin: 0;
  padding: 0 0.75rem;
  text-align: center;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1rem, 4vmin, 1.4rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.85),
    0 0 36px rgba(0, 0, 0, 0.65);
  line-height: 1.28;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workout-countdown-inner {
  position: relative;
  width: min(52vmin, 260px);
  height: min(52vmin, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workout-countdown-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 24px rgba(248, 255, 113, 0.25));
}

.workout-countdown-track {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 4.5;
  fill: none;
}

.workout-countdown-ring {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

/* Ring progress is driven in JS (requestAnimationFrame) so each second reliably drains 0→100 */

.workout-countdown-num {
  position: relative;
  z-index: 1;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(4.5rem, 22vmin, 7.5rem);
  font-weight: 800;
  color: var(--accent);
  text-shadow:
    0 0 0 rgba(0, 0, 0, 0.9),
    0 3px 0 rgba(0, 0, 0, 0.85),
    0 0 48px rgba(248, 255, 113, 0.35);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.workout-reps-float-hud {
  z-index: 10056;
}

.workout-reps-float-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  max-width: min(88vw, 20rem);
}

.workout-reps-float-title {
  margin: 0;
  padding: 0 0.35rem;
  width: 100%;
  text-align: center;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(0.8rem, 2.4vmin, 1.05rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(250, 250, 252, 0.96);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workout-reps-float-pill {
  position: relative;
  padding: 0.55rem 1.15rem 0.5rem;
  min-width: 9.5rem;
  text-align: center;
  background: rgba(6, 6, 8, 0.82);
  border: 1px solid rgba(248, 255, 113, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 12px 36px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.workout-reps-float-line {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(2.35rem, 7.5vmin, 3.25rem);
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
  font-variant-numeric: tabular-nums;
}

.workout-reps-float-slash {
  color: rgba(230, 230, 235, 0.55);
  font-weight: 600;
  font-size: 0.55em;
  margin: 0 0.08em;
}

.workout-reps-float-caption {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(230, 230, 235, 0.55);
  margin: 0.35rem 0 0;
}

.workout-rest-float-hud {
  z-index: 10056;
}

.workout-rest-float-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: min(96vw, 120px);
  padding: 0;
  pointer-events: none;
}

/* Timer + next: modest scale so it stays above the head, not over the whole face */
.workout-rest-headline {
  margin: 0 0 0.25rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.8rem, 5.2vmin, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  text-align: center;
  text-shadow:
    0 0 0 #000,
    0 3px 0 rgba(0, 0, 0, 0.9),
    0 0 32px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.workout-rest-float-scaled {
  position: relative;
  z-index: 1;
  transform: scale(1.5);
  transform-origin: center top;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.workout-rest-float-card {
  width: 100%;
  max-width: 15.5rem;
  padding: 0.5rem 0.7rem 0.55rem;
  background: #050506;
  border: 2px solid rgba(248, 255, 113, 0.45);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 16px 48px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.workout-rest-float-card--film {
  padding: 0.45rem 0.55rem 0.5rem;
}

.workout-rest-film-inner {
  position: relative;
  width: min(12.5rem, 50vmin);
  height: min(12.5rem, 50vmin);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workout-rest-film-inner .workout-countdown-svg {
  filter: drop-shadow(0 0 18px rgba(248, 255, 113, 0.22));
}

.workout-rest-film-time {
  position: relative;
  z-index: 1;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(2.4rem, 8vmin, 3.4rem);
  font-weight: 800;
  color: #f8ff71;
  margin: 0;
  line-height: 1;
  text-shadow:
    0 0 0 rgba(0, 0, 0, 0.95),
    0 3px 0 rgba(0, 0, 0, 0.88),
    0 0 40px rgba(248, 255, 113, 0.45);
  font-variant-numeric: tabular-nums;
}

.workout-rest-float-next {
  text-align: center;
  width: 100%;
  max-width: 12rem;
}

.workout-rest-float-next-kicker {
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.workout-rest-float-next-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.workout-rest-float-next-meta {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
  margin: 0.25rem 0 0;
  line-height: 1.2;
}

/* Skip / +20s: separate HUDs, shoulder-anchored in JS (above center “window”) */
.workout-rest-arm-hud {
  z-index: 10058;
  pointer-events: none;
}

.workout-rest-arm-hud .workout-rest-arm-node.mirror-nav-node {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  pointer-events: auto;
}

.workout-rest-float-disk--accent {
  border-color: rgba(248, 255, 113, 0.42) !important;
  box-shadow:
    0 0 0 1px rgba(248, 255, 113, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.4);
}

.workout-rest-float-hint {
  font-size: 0.65rem;
  color: rgba(230, 230, 235, 0.72);
  margin: 0.15rem 0 0;
  text-align: center;
  max-width: min(88vw, 280px);
  line-height: 1.35;
  padding: 0 0.35rem;
}

.train-next-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.15rem;
}

.train-next-move {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  margin: 0 0 0.4rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.train-hud-ml {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: min(42vw, 200px);
  padding: 0.65rem 0.75rem;
  background: rgba(8, 8, 8, 0.78);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.workout-form-title {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

/* Shared by train HUD form panel + rest “next up” preview */
.form-guide-host {
  --dummy-fill: #5ad49a;
  --dummy-edge: #1f8a58;
  --dummy-limb: #4ecf91;
  --dummy-limb-back: #2a8f55;
  --dummy-edge-back: #186b3d;
  --dummy-hint: #f07840;
  color: var(--accent);
}

.workout-form-fig {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 140px;
  margin-bottom: 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workout-break-next-fig {
  width: 100%;
  max-height: 100px;
  aspect-ratio: 11 / 10;
  margin: 0.45rem 0 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workout-break-next {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.workout-break-next-kicker {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.workout-break-next-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.workout-break-next-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0.35rem 0 0;
}

.form-guide-host svg {
  width: 85%;
  height: 85%;
  opacity: 0.95;
}

/* Green dummy figure parts */
.form-guide-host svg .dg-core {
  fill: var(--dummy-fill);
  stroke: var(--dummy-edge);
  stroke-width: 1.15;
}

.form-guide-host svg .dg-limb {
  fill: none;
  stroke: var(--dummy-limb);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-guide-host svg.form-guide-jj .dg-limb {
  stroke-width: 9.5;
}

.form-guide-host svg .dg-limb-back {
  fill: none;
  stroke: var(--dummy-limb-back);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-guide-host svg .dg-cap {
  fill: var(--dummy-limb);
  stroke: var(--dummy-edge);
  stroke-width: 0.9;
}

.form-guide-host svg .dg-cap-back {
  fill: var(--dummy-limb-back);
  stroke: var(--dummy-edge-back);
  stroke-width: 0.85;
}

.form-guide-host svg .dg-hint {
  fill: none;
  stroke: var(--dummy-hint);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  pointer-events: none;
}

.form-guide-host svg .dg-hint-fill {
  fill: var(--dummy-hint);
  stroke: none;
  opacity: 0.88;
  pointer-events: none;
}

/* Form guide: layered poses crossfade + stretch sway */
.form-guide-host svg.form-guide-jj .pose {
  transform-origin: 50% 45%;
}

.form-guide-host svg.form-guide-march .march-f {
  transform-origin: 50% 72%;
}

.form-guide-host svg.form-guide-jj .jj-hints {
  animation: formGuideHintPulse 1.35s ease-in-out infinite;
}

@keyframes formGuideHintPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.form-guide-host svg.form-guide-jj .pose-b {
  opacity: 0;
  animation: formGuideJjSwap 1.35s ease-in-out infinite;
}

.form-guide-host svg.form-guide-jj .pose-a {
  animation: formGuideJjSwapRev 1.35s ease-in-out infinite;
}

@keyframes formGuideJjSwap {
  0%,
  40% {
    opacity: 0;
  }
  48%,
  88% {
    opacity: 1;
  }
  96%,
  100% {
    opacity: 0;
  }
}

@keyframes formGuideJjSwapRev {
  0%,
  40% {
    opacity: 1;
  }
  48%,
  88% {
    opacity: 0;
  }
  96%,
  100% {
    opacity: 1;
  }
}

/* Standing march: profile — R knee → neutral → L knee → neutral (loop) */
.form-guide-host svg.form-guide-march .march-f--r {
  opacity: 0;
  animation: formGuideMarchR 3.2s ease-in-out infinite;
}

.form-guide-host svg.form-guide-march .march-f--n {
  animation: formGuideMarchN 3.2s ease-in-out infinite;
}

.form-guide-host svg.form-guide-march .march-f--l {
  opacity: 0;
  animation: formGuideMarchL 3.2s ease-in-out infinite;
}

.form-guide-host svg.form-guide-march .march-knee-hint {
  animation: formGuideMarchHintPulse 3.2s ease-in-out infinite;
}

@keyframes formGuideMarchR {
  0%,
  18% {
    opacity: 1;
  }
  23%,
  100% {
    opacity: 0;
  }
}

@keyframes formGuideMarchN {
  0%,
  19% {
    opacity: 0;
  }
  23%,
  45% {
    opacity: 1;
  }
  48%,
  69% {
    opacity: 0;
  }
  73%,
  96% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes formGuideMarchL {
  0%,
  46% {
    opacity: 0;
  }
  50%,
  67% {
    opacity: 1;
  }
  71%,
  100% {
    opacity: 0;
  }
}

@keyframes formGuideMarchHintPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.form-guide-host svg.form-guide-stretch .stretch-fig {
  animation: formGuideStretchSway 4.5s ease-in-out infinite;
}

.form-guide-host svg.form-guide-stretch .stretch-breathe {
  animation: formGuideStretchBreath 4.5s ease-in-out infinite;
}

@keyframes formGuideStretchSway {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px) rotate(-2deg);
  }
  75% {
    transform: translateX(5px) rotate(2deg);
  }
}

@keyframes formGuideStretchBreath {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-guide-host svg.form-guide-jj .pose-a,
  .form-guide-host svg.form-guide-jj .pose-b {
    animation: none;
  }

  .form-guide-host svg.form-guide-jj .pose-b {
    opacity: 0;
  }

  .form-guide-host svg.form-guide-jj .pose-a {
    opacity: 1;
  }

  .form-guide-host svg.form-guide-march .march-f--r,
  .form-guide-host svg.form-guide-march .march-f--n,
  .form-guide-host svg.form-guide-march .march-f--l {
    animation: none;
  }

  .form-guide-host svg.form-guide-march .march-f--r,
  .form-guide-host svg.form-guide-march .march-f--l {
    opacity: 0;
  }

  .form-guide-host svg.form-guide-march .march-f--n {
    opacity: 1;
  }

  .form-guide-host svg.form-guide-jj .jj-hints {
    animation: none;
    opacity: 0.75;
  }

  .form-guide-host svg.form-guide-march .march-knee-hint {
    animation: none;
    opacity: 0.7;
  }

  .form-guide-host svg.form-guide-stretch .stretch-fig,
  .form-guide-host svg.form-guide-stretch .stretch-breathe {
    animation: none;
  }

  .form-guide-host svg.form-guide-stretch .stretch-fig {
    transform: none;
  }
}

.workout-form-bullets {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.train-hud-tr {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  text-align: right;
  max-width: 220px;
}

.train-cue {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,0.7);
  line-height: 1.2;
}

.train-hud-bc {
  position: absolute;
  bottom: 8rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(88vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cue-danger { color: var(--danger) !important; }
.cue-success { color: var(--success) !important; }

/* ── Workout flow overlays & edge ring ── */

.workout-edge-ring {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
}

.workout-edge-ring.hidden {
  display: none;
}

.workout-edge-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.workout-edge-fg {
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(248, 255, 113, 0.35));
  transition: stroke-dashoffset 0.12s linear;
}

.workout-flow-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 1rem;
}

.workout-flow-overlay.hidden {
  display: none;
}

.workout-flow-card {
  width: min(92vw, 400px);
  padding: 1.5rem 1.35rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.workout-flow-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.workout-flow-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* Head-tracked workout mode pickers — same layer as mirror nav (10) */
.workout-mode-targets {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

/* Right-edge program carousel (~2× prior size): above WMT arc */
.wmt-plan-edge-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10062;
  width: min(calc(88vw / 1.5), 400px);
  max-height: min(92vh, 1120px);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  padding: 1.05rem 0.8rem 0.75rem 1.05rem;
  margin-right: max(0.2rem, env(safe-area-inset-right));
  background: linear-gradient(200deg, rgba(18, 18, 22, 0.4) 0%, rgba(6, 6, 10, 0.35) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 0;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  touch-action: pan-y;
}

.wmt-plan-edge-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.4rem;
}

.wmt-plan-edge-kicker {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: right;
  padding-right: 0.15rem;
}

.wmt-plan-edge-viewport {
  overflow: hidden;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  touch-action: pan-y pinch-zoom;
}

.wmt-plan-edge-track {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 0;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.wmt-plan-edge-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.1rem 0.15rem 0.2rem 0;
  text-align: right;
}

.wmt-plan-edge-name {
  margin: 0 0 0.2rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.65rem, 3.9vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.wmt-plan-edge-meta {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.45;
  color: rgba(230, 230, 235, 0.92);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

.wmt-plan-move-specs {
  margin: 0;
  padding: 0 0 0 0.5rem;
  list-style: none;
  font-size: 1.2rem;
  line-height: 1.45;
  text-align: right;
  color: rgba(220, 220, 228, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wmt-plan-move-specs li {
  position: relative;
  margin-bottom: 0.3rem;
  padding-right: 0.15rem;
}

.wmt-plan-move-specs li::before {
  content: "·";
  position: absolute;
  right: 100%;
  margin-right: 0.1rem;
  color: var(--accent);
  font-weight: 800;
}

.wt-move-title {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.wt-move-val {
  display: block;
  font-size: 1.05rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.08rem;
}

.wmt-plan-edge-dots {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0 0.1rem;
}

.wmt-plan-edge-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wmt-plan-edge-dot:disabled {
  opacity: 0.4;
  cursor: default;
}

.wmt-plan-edge-dot[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

.wmt-plan-edge-schedule {
  margin-top: 0.25rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  max-height: 18vh;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.wmt-plan-edge-hint {
  margin: 0;
  padding: 0.2rem 0 0;
  font-size: 1.02rem;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.wmt-tools-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
}

.wmt-schedule-peek {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 1.125rem;
  line-height: 1.4;
  color: rgba(230, 230, 235, 0.88);
  max-height: 14rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.wmt-peek-time {
  display: inline-block;
  min-width: 3.6rem;
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wmt-peek-item {
  display: block;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wmt-peek-item:last-child {
  border-bottom: 0;
}

.wmt-peek-empty {
  color: var(--muted);
  font-size: 1.02rem;
  font-style: italic;
}

/* WMT: Home / Esc live inside the head-tracked cluster — apex of the ▽ below Plan + Free (see app.js) */
.wmt-cluster-apex {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: min(340px, 88vw);
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  will-change: left, top;
  pointer-events: auto;
}

.wmt-back-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(250, 250, 252, 0.95);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(32, 32, 38, 0.92) 0%, rgba(14, 14, 18, 0.9) 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.wmt-back-btn--apex {
  min-width: min(280px, 78vw);
  min-height: 3.1rem;
  padding: 0.85rem 1.4rem;
  font-size: clamp(1.02rem, 3.2vw, 1.32rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.35);
  border-width: 2px;
}

.wmt-back-btn:hover,
.wmt-back-btn.pointable-hover {
  border-color: rgba(248, 255, 113, 0.45);
  background: linear-gradient(180deg, rgba(40, 40, 48, 0.96) 0%, rgba(20, 20, 24, 0.94) 100%);
}

.wmt-esc {
  position: static;
  margin: 0;
  transform: none;
  font-size: 0.72rem;
  color: var(--muted);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.wmt-esc kbd {
  font-family: inherit;
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
}

.wmt-esc--apex {
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}

/* Same layout model as .mirror-nav-node: cluster origin + arc offsets from JS */
.wmt-float-hud .mirror-nav-cluster .wmt-node {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(220px, 52vw);
  margin: 0;
  transform: translate(-50%, -50%);
  will-change: left, top;
  pointer-events: auto;
}

/* HUD shell stays none; .wmt-node re-enables hit targets (for pinch + dwell) */
.workout-mode-targets .wmt-float-hud.mirror-nav-hud {
  pointer-events: none;
}

.wmt-node-disabled {
  opacity: 0.42;
}

.wmt-ring {
  --dwell: 0;
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(248, 255, 113, calc(0.12 + 0.38 * var(--dwell))) 0%,
    rgba(248, 255, 113, 0.04) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 8px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 24px rgba(248, 255, 113, calc(0.08 * var(--dwell)));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.12s ease, background 0.12s ease;
}

.wmt-ring-locked {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.wmt-ico {
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.wmt-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  max-width: min(240px, 54vw);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92), 0 0 2px rgba(0, 0, 0, 0.8);
}

.wmt-label {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.05rem, 3.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.wmt-sub {
  font-size: clamp(0.88rem, 2.75vw, 1.15rem);
  font-weight: 600;
  line-height: 1.25;
  color: rgba(230, 230, 235, 0.92);
}

.train-stretch-timer {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--success);
  margin: 0.1rem 0 0;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  font-variant-numeric: tabular-nums;
}

.workout-flow-minimal .workout-break-card {
  padding: 2rem 1.5rem;
}

.workout-break-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.workout-break-time {
  font-family: Poppins, Inter, sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}

.workout-break-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.workout-cool-msg {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0.6rem 0 0;
}

.workout-summary-card {
  text-align: center;
}

.workout-summary-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.workout-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.workout-sum-item {
  padding: 0.55rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

.workout-sum-label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.workout-sum-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.workout-sum-encourage {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.4;
}

/* ── Coach panel ── */

.coach-panel {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(12, 12, 12, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-height: 2.8rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.coach-panel.coach-warn {
  border-color: var(--danger);
  box-shadow: 0 0 14px rgba(255, 111, 97, 0.15);
}

.coach-panel.coach-ok {
  border-color: var(--success);
  box-shadow: 0 0 10px rgba(109, 255, 163, 0.08);
}

.coach-icon { font-size: 1.3rem; flex-shrink: 0; }

.coach-msg {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.coach-panel.coach-warn .coach-msg { color: var(--danger); }
.coach-panel.coach-ok .coach-msg { color: var(--success); }

.gesture-bar {
  margin-top: 0.5rem;
  background: rgba(12, 12, 12, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
}

/* ── Stats screen ── */

.stats-card { padding: 1.1rem 1rem; }

.stats-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.stats-date-row h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.stats-date-nav { display: flex; gap: 0.35rem; }

.stats-nav-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 1.1rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.stats-nav-btn:hover { background: var(--panel); border-color: var(--muted); }

.stats-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.stats-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.7);
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.stats-day-pill.stats-day-active {
  background: rgba(109, 255, 163, 0.08);
  border-color: rgba(109, 255, 163, 0.25);
}

.stats-day-pill.stats-day-today {
  background: rgba(248, 255, 113, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(248, 255, 113, 0.15);
}

.stats-day-pill.stats-day-today.stats-day-active {
  background: rgba(248, 255, 113, 0.12);
  border-color: var(--accent);
}

.stats-day-name {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-day-num {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.stats-day-today .stats-day-num { background: var(--accent); color: #000; }
.stats-day-active .stats-day-num { background: rgba(109, 255, 163, 0.2); color: var(--success); }
.stats-day-today.stats-day-active .stats-day-num { background: var(--accent); color: #000; }

.stats-metrics { display: flex; flex-direction: column; gap: 0.55rem; }

.stats-metric-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: rgba(24, 24, 24, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stats-metric-row:hover,
.stats-metric-row.pointable-hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stats-metric-icon { font-size: 1.2rem; flex-shrink: 0; width: 1.8rem; text-align: center; }
.stats-metric-body { flex: 1; min-width: 0; }

.stats-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.stats-metric-label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.stats-metric-value { font-size: 0.8rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stats-metric-goal { font-weight: 500; color: var(--muted); }

.stats-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Plans mirror HUD: schedule card in draggable window; program carousel is inside the card ── */

.plans-mirror-hud {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: min(82vw, 360px);
  max-height: min(55vh, 480px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  --stats-gap: 132px;
}

.plans-mirror-hud .plans-card {
  pointer-events: auto;
  max-height: min(55vh, 480px);
  overflow-y: auto;
  margin: 0;
  padding: 0.9rem 1rem;
}

/* ── Calendar mirror (torso-anchored, larger type for distance reading) ── */

.calendar-mirror-hud {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: min(94vw, 720px);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  --stats-gap: 148px;
}

.calendar-mirror-hud .calendar-card {
  pointer-events: auto;
  max-height: min(78vh, 720px);
  overflow-y: auto;
  margin: 0;
  padding: 1.35rem 1.5rem;
}

.calendar-mirror-hud .cal-header h2 {
  font-size: clamp(1.2rem, 3.4vw, 1.65rem);
}

.calendar-mirror-hud .cal-week-badge,
.calendar-mirror-hud .cal-sync-badge {
  font-size: clamp(0.72rem, 2vw, 0.88rem);
}

.calendar-mirror-hud .cal-day-name {
  font-size: clamp(0.62rem, 1.8vw, 0.78rem);
}

.calendar-mirror-hud .cal-day-num {
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
}

.calendar-mirror-hud .cal-time-label {
  font-size: clamp(0.68rem, 1.9vw, 0.82rem);
}

.calendar-mirror-hud .cal-ev-title {
  font-size: clamp(0.72rem, 2vw, 0.88rem);
}

.calendar-mirror-hud .cal-empty-title {
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
}

.calendar-mirror-hud .cal-empty-desc {
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  line-height: 1.45;
}

/* ── Profile mirror: card body; floating back + tab arc are separate HUDs (main mirror nav off) ── */

.profile-mirror-hud {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: min(72vh, 640px);
  --stats-gap: 148px;
}

.profile-mirror-hud .profile-mirror-card {
  pointer-events: auto;
  max-height: min(72vh, 640px);
  overflow-y: auto;
  margin: 0;
  padding: 1.35rem 1.45rem;
}

/* Unify handle + card: one window — drag strip is the top of the glass panel, not a separate “cap”. */
#profileMirrorWindow .floating-mirror-body > .floating-mirror-handle {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

#profileMirrorWindow .floating-mirror-body:has(> .floating-mirror-handle) .profile-mirror-hud .profile-mirror-card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* Calendar: drag strip is the top of the glass panel, not a separate cap above the card */
#calendarMirrorWindow .floating-mirror-body > .floating-mirror-handle {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

#calendarMirrorWindow .floating-mirror-body:has(> .floating-mirror-handle) .calendar-mirror-hud .calendar-card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.profile-mirror-pane-title {
  margin-top: 0;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
}

.profile-mirror-hud .profile-name {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.profile-mirror-hud .profile-subtitle {
  font-size: clamp(0.88rem, 2.5vw, 1.05rem);
}

.profile-mirror-hud .profile-stat-num {
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
}

.profile-mirror-hud .profile-detail-label,
.profile-mirror-hud .profile-detail-value {
  font-size: clamp(0.82rem, 2.3vw, 0.98rem);
}

.profile-goals-lead {
  font-size: clamp(0.92rem, 2.6vw, 1.08rem);
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 1rem;
}

.profile-goals-highlight {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(248, 255, 113, 0.08);
  border: 1px solid rgba(248, 255, 113, 0.22);
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-goals-highlight-label {
  font-size: clamp(0.62rem, 1.7vw, 0.72rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.profile-goals-highlight-value {
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.profile-mirror-hint {
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  color: var(--muted);
  margin: 1rem 0 0;
  line-height: 1.4;
}

.profile-settings-block {
  margin-bottom: 1.25rem;
}

.profile-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.profile-settings-label {
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  font-weight: 600;
}

.profile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--text);
  font: inherit;
}

.profile-toggle-track {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.profile-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5rem - 6px);
  height: calc(1.5rem - 6px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.profile-toggle[aria-pressed="true"] .profile-toggle-track {
  background: rgba(109, 255, 163, 0.25);
  border-color: rgba(109, 255, 163, 0.45);
}

.profile-toggle[aria-pressed="true"] .profile-toggle-knob {
  transform: translateX(1.2rem);
}

.profile-toggle-text {
  font-size: clamp(0.88rem, 2.3vw, 1rem);
  font-weight: 600;
  min-width: 2rem;
  text-align: right;
}

.profile-settings-desc {
  font-size: clamp(0.78rem, 2.1vw, 0.9rem);
  color: var(--muted);
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.profile-gesture-settings .profile-gesture-grid {
  margin-top: 0.5rem;
}

/* Left rail: four section jumps — 1.5× compact base; JS half-width = SECTION_NAV_LEFT_DISK_HALF_PX (42) */
.section-nav-left-float-hud {
  z-index: 11;
}

.section-nav-left-float-hud .mirror-nav-node--section-nav .mirror-nav-disk {
  width: 5.25rem;
  height: 5.25rem;
  border-width: 2px;
}

.section-nav-left-float-hud .mirror-nav-node--section-nav .nav-icon {
  font-size: clamp(1.58rem, 4.2vw, 2.03rem);
}

.section-nav-left-float-hud .mirror-nav-node--section-nav .nav-label {
  max-width: 8.25rem;
  font-size: clamp(0.83rem, 2.1vw, 1.05rem);
  top: calc(100% + 0.48rem);
}

/* Profile: tab stack to the right of the glass (z above mirror window body) */
.profile-tab-float-hud {
  z-index: 11;
}

/* Smaller tab chips + breathing room; JS assumes ~38px half-width (4.75rem disk). */
.profile-tab-float-hud .mirror-nav-node--profile-tab .mirror-nav-disk {
  width: 4.75rem;
  height: 4.75rem;
  border-width: 2px;
}

.profile-tab-float-hud .mirror-nav-node--profile-tab .nav-icon {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
}

.profile-tab-float-hud .mirror-nav-node .nav-label {
  max-width: 7rem;
  font-size: clamp(0.6rem, 1.6vw, 0.75rem);
  top: calc(100% + 0.5rem);
}

.profile-back-float-hud {
  z-index: 11;
}

.profile-back-float-hud .mirror-nav-node .nav-label {
  max-width: 5rem;
  font-size: clamp(0.62rem, 1.8vw, 0.82rem);
}

/* Draggable “mirror windows”: grab handle + two-hand pinch to scale (transform from app.js) */
.floating-mirror-window {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: max-content;
  max-width: min(96vw, 900px);
  transform-origin: center center;
  pointer-events: none;
}

.floating-mirror-window.hidden {
  display: none !important;
}

/* Drag strip: top row inside a mirror panel — 100% of that panel, never a separate “cap” */
.floating-mirror-body > .floating-mirror-handle,
.onboarding-card--mirror > .floating-mirror-handle {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 1.4rem;
  height: 1.5rem;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(
    180deg,
    rgba(248, 255, 113, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(20, 20, 22, 0.5) 100%
  );
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 0;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  cursor: grab;
}

.floating-mirror-body > .floating-mirror-handle:active,
.onboarding-card--mirror > .floating-mirror-handle:active {
  cursor: grabbing;
  background: linear-gradient(
    180deg,
    rgba(248, 255, 113, 0.28) 0%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(10, 10, 12, 0.6) 100%
  );
}

.floating-mirror-body {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.floating-mirror-body:has(> .floating-mirror-handle) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* Head-tracked mirror panels without a drag strip (stats, session summary) */
.floating-mirror-body.floating-mirror-body--track-only {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.plan-mirror-floating-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(96vw, 720px);
  max-height: 92vh;
  pointer-events: auto;
}

.plan-mirror-floating-body > .plan-container {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}

/* Plan overlay: same fixed drag layer as the rest, above overlay background */
.plan-overlay .floating-mirror-window#planMirrorWindow {
  z-index: 10050;
}

.plans-mirror-floating-body-c {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: min(82vw, 360px);
}

/* Same unified chrome as profile/calendar: handle is top of glass, not a separate strip */
#plansMirrorWindow .floating-mirror-body > .floating-mirror-handle {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

#plansMirrorWindow .floating-mirror-body:has(> .floating-mirror-handle) .plans-mirror-hud .plans-card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* In-mirror program rail: not fixed to viewport edge — reuses WMT track/dots, full-width in card */
.wmt-plan-edge-panel.plans-mirror-plan-edge {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  max-height: min(36vh, 300px);
  margin: 0 0 0.55rem;
  padding: 0.6rem 0.55rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.65) 0%, rgba(10, 10, 14, 0.5) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-kicker,
.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-slide,
.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-name,
.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-meta {
  text-align: left;
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-name {
  font-size: clamp(1.12rem, 2.8vw, 1.42rem);
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-meta {
  font-size: 0.88rem;
  line-height: 1.4;
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-hint {
  font-size: 0.65rem;
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-tools-kicker {
  text-align: left;
}

.plans-mirror-hud .plans-mirror-plan-edge .wmt-plan-edge-dots {
  justify-content: flex-start;
}

/* Slightly smaller type in My Plan window vs center Plans tab */
.plans-mirror-hud .plans-title {
  font-size: 1.05rem;
}

.plans-mirror-hud .plans-desc {
  font-size: 0.72rem;
  margin: 0 0 0.6rem;
}

.plans-mirror-hud .plans-w-title {
  font-size: 0.8rem;
}

.plans-mirror-hud .plans-w-meta {
  font-size: 0.64rem;
}

.plans-subhd {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.onboarding-mirror-floating-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(96vw, 640px);
  max-height: min(88vh, 860px);
  margin: 0 auto;
  pointer-events: auto;
}

.floating-mirror-body .mirror-nav-hud.mirror-float-hud,
.floating-mirror-body .ob-tut-arc-hud {
  position: relative;
  left: 50%;
  top: auto;
  transform: translateX(-50%);
  margin-top: 0.15rem;
}

#plansSwapFloatHud.plans-swap-hud-embedded {
  z-index: 10056;
}

/* Move swap: card carousel (≤3 per page), pinch / slide like program carousel */
#plansSwapFloatHud .mirror-nav-cluster.plans-swap-cluster--wrap {
  width: min(92vw, 580px);
  min-height: 1px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

#plansSwapFloatHud .move-swap-shell {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  pointer-events: auto;
}

#plansSwapFloatHud .move-swap-panel-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

#plansSwapFloatHud .move-swap-card-panel {
  position: relative;
  right: auto;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  max-height: min(55vh, 480px);
  margin: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  padding: 0.65rem 0.6rem 0.5rem;
  touch-action: pan-y;
}

#plansSwapFloatHud .move-swap-viewport {
  min-height: 9.2rem;
}

#plansSwapFloatHud .move-swap-card-inner {
  min-height: 0;
  gap: 0.3rem;
}

#plansSwapFloatHud .move-swap-hint {
  font-size: 0.7rem;
  line-height: 1.3;
  margin-top: 0.15rem;
  padding: 0;
}

#plansSwapFloatHud .move-swap-empty {
  margin: 0.35rem 0 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(250, 250, 252, 0.86);
  padding: 0.5rem 0.4rem;
}

#plansSwapFloatHud .move-swap-slide {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  padding: 0.05rem 0.1rem 0.15rem;
}

#plansSwapFloatHud .move-swap-slide .mirror-nav-node:only-child {
  max-width: 100%;
  flex: 1 1 auto;
}

#plansSwapFloatHud .move-swap-slide .mirror-nav-node {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  flex: 1 1 0;
  min-width: 0;
  max-width: 33.33%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(32, 32, 40, 0.96) 0%, rgba(12, 12, 16, 0.98) 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#plansSwapFloatHud .move-swap-card:hover,
#plansSwapFloatHud .move-swap-card.pointable-hover {
  border-color: rgba(248, 255, 113, 0.45);
  box-shadow: 0 0 0 1px rgba(248, 255, 113, 0.15), 0 8px 24px rgba(0, 0, 0, 0.5);
}

#plansSwapFloatHud .move-swap-card .mirror-nav-disk {
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: none;
}

#plansSwapFloatHud .move-swap-hero-ico {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
  z-index: 1;
  position: relative;
}

#plansSwapFloatHud .move-swap-card--int-low .mirror-nav-disk {
  background: linear-gradient(135deg, rgba(100, 180, 200, 0.55) 0%, rgba(20, 40, 50, 0.85) 100%);
}

#plansSwapFloatHud .move-swap-card--int-med .mirror-nav-disk {
  background: linear-gradient(135deg, rgba(248, 200, 80, 0.5) 0%, rgba(60, 45, 12, 0.88) 100%);
}

#plansSwapFloatHud .move-swap-card--int-high .mirror-nav-disk {
  background: linear-gradient(135deg, rgba(255, 90, 90, 0.55) 0%, rgba(50, 12, 12, 0.9) 100%);
}

#plansSwapFloatHud .move-swap-card-cap {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0.4rem 0.45rem 0.5rem;
  gap: 0.12rem;
  flex: 1 1 auto;
  min-height: 0;
}

#plansSwapFloatHud .move-swap-kicker {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

#plansSwapFloatHud .move-swap-name {
  font-size: clamp(0.75rem, 2.1vw, 0.9rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

#plansSwapFloatHud .move-swap-line {
  margin: 0.1rem 0 0;
  font-size: 0.62rem;
  line-height: 1.3;
  color: rgba(230, 230, 235, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#plansSwapFloatHud .move-swap-meta {
  margin-top: auto;
  padding-top: 0.2rem;
  font-size: 0.6rem;
  line-height: 1.25;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
}

#plansSwapFloatHud .move-swap-cancel {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin: 0.25rem auto 0;
  align-self: center;
}

.ob-gest-tut-mirror-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(88vw, 420px);
  pointer-events: auto;
}

.ob-gest-tut-mirror-body > .ob-gesture-tutorial {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
}

/* ── Stats mirror HUD (large floating text, flanks user, pose-tracked) ── */

.stats-mirror-hud {
  position: fixed;
  z-index: 8;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  --stats-gap: 148px;
}

.floating-mirror-body > .stats-mirror-hud,
.floating-mirror-body > .session-summary-mirror-hud,
.floating-mirror-body > .plans-mirror-hud,
.floating-mirror-body > .calendar-mirror-hud,
.floating-mirror-body > .profile-mirror-hud {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 1;
  width: 100%;
  max-width: 100%;
}

.floating-mirror-body:has(> .floating-mirror-handle) > .stats-mirror-hud,
.floating-mirror-body:has(> .floating-mirror-handle) > .session-summary-mirror-hud,
.floating-mirror-body:has(> .floating-mirror-handle) > .calendar-mirror-hud,
.floating-mirror-body:has(> .floating-mirror-handle) > .profile-mirror-hud,
.floating-mirror-body:has(> .floating-mirror-handle) > .plans-mirror-hud,
.floating-mirror-body.floating-mirror-body--track-only > .stats-mirror-hud,
.floating-mirror-body.floating-mirror-body--track-only > .session-summary-mirror-hud {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.stats-mirror-spacer {
  width: var(--stats-gap);
  flex-shrink: 0;
  align-self: stretch;
  pointer-events: none;
}

.stats-mirror-col {
  flex: 0 1 min(42vw, 300px);
  max-width: min(42vw, 300px);
  pointer-events: auto;
  padding: 1rem 1rem;
  background: rgba(6, 6, 6, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.stats-mirror-col,
.stats-mirror-col h2,
.stats-mirror-col .stats-metric-label,
.stats-mirror-col .stats-metric-value,
.stats-mirror-col .stats-day-name,
.stats-mirror-col .stats-day-num {
  text-shadow:
    0 0 24px rgba(0, 0, 0, 1),
    0 2px 14px rgba(0, 0, 0, 0.95),
    0 0 3px rgba(0, 0, 0, 0.9);
}

.stats-mirror-col-left .stats-date-row {
  margin-bottom: 0.75rem;
}

.stats-mirror-col-left .stats-date-row h2 {
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stats-mirror-col .stats-week-strip {
  gap: 0.28rem;
  margin-bottom: 0;
}

.stats-mirror-col .stats-day-pill {
  padding: 0.42rem 0.1rem 0.48rem;
}

.stats-mirror-col .stats-day-name {
  font-size: clamp(0.55rem, 1.6vw, 0.68rem);
}

.stats-mirror-col .stats-day-num {
  width: 1.65rem;
  height: 1.65rem;
  font-size: clamp(0.82rem, 2.2vw, 0.98rem);
}

.stats-mirror-col .stats-metric-row {
  padding: 0.65rem 0.7rem;
}

.stats-mirror-col .stats-metric-label {
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  font-weight: 700;
}

.stats-mirror-col .stats-metric-value {
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  font-weight: 800;
}

.stats-mirror-col .stats-bar-track {
  height: 7px;
}

@media (max-width: 520px) {
  .stats-mirror-col {
    flex-basis: min(46vw, 240px);
    max-width: min(46vw, 240px);
    padding: 0.75rem 0.7rem;
  }
}

/* Post-workout session summary (floating beside user) */
.session-summary-mirror-hud {
  z-index: 8;
}

.session-summary-mirror-hud .session-sum-main-title {
  font-size: clamp(1.15rem, 3.8vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 0.7rem;
  line-height: 1.15;
  text-shadow:
    0 0 24px rgba(0, 0, 0, 1),
    0 2px 14px rgba(0, 0, 0, 0.95);
}

.session-summary-mirror-hud .session-sum-encourage {
  margin: 0;
  font-size: clamp(0.95rem, 2.9vw, 1.15rem);
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
  text-shadow:
    0 0 20px rgba(0, 0, 0, 1),
    0 2px 12px rgba(0, 0, 0, 0.92);
}

.session-summary-mirror-hud .session-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.58rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.session-summary-mirror-hud .session-sum-row:last-child {
  border-bottom: none;
}

.session-summary-mirror-hud .session-sum-lbl {
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.session-summary-mirror-hud .session-sum-val {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* Floating Done ball — stats tab + session summary (hand dwell, same as workout mode pick) */
.mirror-done-ball-wrap {
  position: fixed;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: min(88vw, 220px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mirror-done-ring {
  --dwell: 0;
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 3px solid var(--success);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(109, 255, 163, calc(0.15 + 0.45 * var(--dwell))) 0%,
    rgba(109, 255, 163, 0.06) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 10px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 22px rgba(109, 255, 163, calc(0.1 * var(--dwell)));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.12s ease, background 0.12s ease;
}

.mirror-done-ico {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--success);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}

.mirror-done-label {
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  font-weight: 800;
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

.mirror-done-hint {
  margin: 0;
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Dev-only on-screen skip (when keyboard shortcut is unreliable) */
.dev-skip-exercise-fab {
  position: fixed;
  z-index: 25;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(0.75rem, env(safe-area-inset-right));
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid rgba(248, 255, 113, 0.45);
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.dev-skip-exercise-fab:hover {
  border-color: var(--accent);
  background: rgba(248, 255, 113, 0.12);
}

.dev-skip-exercise-fab.hidden {
  display: none;
}

/* ── Calendar ── */

.calendar-card { padding: 1rem 0.6rem 0.8rem; }

.cal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.6rem 0.7rem;
}

.cal-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }

.cal-week-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(24, 24, 24, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.cal-grid-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 60vh;
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.cal-grid {
  display: grid;
  grid-template-columns: 40px repeat(7, 1fr);
  min-width: 520px;
}

.cal-times { position: relative; padding-top: 40px; }

.cal-time-label {
  position: absolute;
  right: 4px;
  font-size: 0.6rem;
  color: var(--muted);
  transform: translateY(-50%);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.cal-day-col { border-left: 1px solid rgba(255, 255, 255, 0.04); }
.cal-day-col.cal-today { background: rgba(248, 255, 113, 0.02); }

.cal-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0 0.35rem;
  height: 40px;
  justify-content: center;
  position: sticky;
  top: 0;
  background: var(--glass);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.cal-day-name {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-day-num { font-size: 0.85rem; font-weight: 700; color: var(--text); line-height: 1; }

.cal-day-num-today {
  background: var(--accent);
  color: #000;
  width: 1.45rem;
  height: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day-body { position: relative; min-height: 100px; }

.cal-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.cal-event-block {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  padding: 0.25rem 0.35rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cal-event-block:hover,
.cal-event-block.pointable-hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.cal-ev-title {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-ev-time { font-size: 0.55rem; opacity: 0.7; }

.cal-now-line {
  position: absolute;
  left: 40px;
  right: 0;
  height: 2px;
  background: var(--danger);
  z-index: 4;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.cal-now-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  margin-left: -3.5px;
  box-shadow: 0 0 8px rgba(255, 111, 97, 0.6);
}

/* ── Profile card ── */

.profile-card {
  text-align: center;
  padding: 2rem 1.6rem 1.4rem !important;
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(248, 255, 113, 0.12), rgba(109, 255, 163, 0.1));
  border: 3px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-name {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--text);
}

.profile-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.profile-stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.profile-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-stat-divider {
  width: 1px;
  height: 2.2rem;
  background: rgba(255, 255, 255, 0.1);
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.profile-action-btn {
  width: 3.8rem;
  height: 3.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: rgba(24, 24, 24, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.profile-action-btn:hover,
.profile-action-btn.pointable-hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

.profile-action-btn.profile-action-primary {
  background: rgba(248, 255, 113, 0.1);
  border-color: rgba(248, 255, 113, 0.25);
}

.profile-action-btn.profile-action-primary:hover,
.profile-action-btn.profile-action-primary.pointable-hover {
  background: rgba(248, 255, 113, 0.18);
  border-color: var(--accent);
}

.profile-action-icon {
  font-size: 1.3rem;
}

.profile-detail-section {
  text-align: left;
}

.profile-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.7rem;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.profile-detail-item {
  background: rgba(24, 24, 24, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-detail-item:hover,
.profile-detail-item.pointable-hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-detail-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.profile-detail-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.profile-gesture-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.profile-gesture-grid {
  display: flex;
  gap: 0.4rem;
}

.gesture-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.3rem;
  background: rgba(24, 24, 24, 0.5);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.gesture-option:hover { border-color: rgba(255, 255, 255, 0.15); }

.gesture-option.active {
  border-color: var(--accent);
  background: rgba(248, 255, 113, 0.06);
  color: var(--text);
}

.gesture-opt-icon { font-size: 1.4rem; }

.gesture-opt-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
}

.profile-hint {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
}

/* ── Bottom nav ── */

/* ── Mirror-anchored arc nav: upper ∩ above pose anchor (training via gesture, not a rail button) ── */

.mirror-nav-hud {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  --stats-gap: 148px;
}

.mirror-nav-cluster {
  position: relative;
  width: 0;
  height: 0;
}

/* Outer node: positioned at arc anchor; label sits below the disk (not inside the ring) */
.mirror-nav-node {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  font-family: inherit;
  overflow: visible;
}

.mirror-nav-disk {
  --dwell: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.3rem;
  height: 7.3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.32);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(36, 36, 40, 0.96) 0%,
    rgba(14, 14, 16, 0.94) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.15s ease;
}

/* Pie-style dwell fill: solid accent sweeps clockwise from 12 o’clock — shows exact progress to confirm */
.mirror-nav-disk::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from -90deg,
    rgba(248, 255, 113, 0.96) 0deg,
    rgba(248, 255, 113, 0.96) calc(var(--dwell, 0) * 360deg),
    rgba(26, 26, 30, 0.98) calc(var(--dwell, 0) * 360deg),
    rgba(26, 26, 30, 0.98) 360deg
  );
  transition: none;
}

.mirror-nav-node .nav-label {
  position: absolute;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 0.4rem);
  max-width: 9rem;
  text-align: center;
  font-size: clamp(0.68rem, 2.1vw, 0.95rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: rgba(245, 245, 245, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 1);
  pointer-events: none;
}

.mirror-nav-node .nav-icon {
  position: relative;
  z-index: 1;
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
  line-height: 1;
  color: var(--muted);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.mirror-nav-node:active .mirror-nav-disk {
  transform: scale(0.92);
}

.mirror-nav-node:hover .mirror-nav-disk,
.mirror-nav-node.pointable-hover .mirror-nav-disk {
  border-color: rgba(248, 255, 113, 0.65);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(248, 255, 113, 0.35),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

.mirror-nav-node:hover .nav-icon,
.mirror-nav-node.pointable-hover .nav-icon {
  color: var(--text);
}

.mirror-nav-node:hover .nav-label,
.mirror-nav-node.pointable-hover .nav-label {
  color: var(--text);
}

.mirror-nav-node.active .mirror-nav-disk {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 36px rgba(248, 255, 113, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.48);
}

.mirror-nav-node.active .nav-icon {
  color: var(--accent);
}

.mirror-nav-node.active .nav-label {
  color: var(--accent);
}

/* Smaller disks (onboarding goals / plan picker) */
.mirror-nav-node--dense .mirror-nav-disk {
  width: 5.5rem;
  height: 5.5rem;
}

.mirror-nav-node--dense .nav-icon {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.mirror-nav-node--dense .nav-label {
  font-size: clamp(0.55rem, 1.7vw, 0.75rem);
  max-width: 6.5rem;
}

/* Session count: single digit in the ring, optically centered (flex alone skews some glyphs e.g. 5) */
.mirror-nav-node--sessions .nav-label {
  display: none;
}

.mirror-nav-node--sessions .mirror-nav-disk {
  position: relative;
  display: block;
}

.mirror-nav-node--sessions .nav-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 1.1em;
  height: 1em;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  font-size: clamp(1.45rem, 4.5vw, 1.95rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Slightly smaller disks for dense session count nodes (legacy); bucket rings use .mirror-nav-node--dense */
.mirror-nav-node--dense.mirror-nav-node--sessions .mirror-nav-disk {
  width: 4.75rem;
  height: 4.75rem;
}

/* Plan picker: readable title + summary under disk (wider arc in JS) */
.mirror-nav-node--plan-pick {
  overflow: visible;
}

.mirror-nav-node--plan-pick .mirror-nav-disk {
  width: 6.75rem;
  height: 6.75rem;
}

.mirror-nav-node--plan-pick .nav-icon {
  font-size: clamp(1.5rem, 4.2vw, 1.95rem);
}

.mirror-nav-node--plan-pick .nav-label-block {
  position: absolute;
  z-index: 1;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(12.5rem, 46vw);
  max-width: 12.5rem;
  pointer-events: none;
  text-align: center;
}

.mirror-nav-node--plan-pick .nav-label {
  position: static;
  transform: none;
  left: auto;
  top: auto;
  display: block;
  max-width: none;
  width: 100%;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: clamp(0.72rem, 2.2vw, 0.9rem);
  font-weight: 700;
  line-height: 1.28;
}

.mirror-nav-node--plan-pick .nav-label-sub {
  display: block;
  margin-top: 0.28rem;
  font-size: clamp(0.58rem, 1.85vw, 0.74rem);
  font-weight: 500;
  line-height: 1.38;
  color: rgba(210, 210, 215, 0.96);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 1);
}

.mirror-nav-node--selected .mirror-nav-disk,
.mirror-nav-node--selected:hover .mirror-nav-disk,
.mirror-nav-node--selected.pointable-hover .mirror-nav-disk {
  border-color: rgba(248, 255, 113, 0.95);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(248, 255, 113, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

.mirror-nav-node--selected .nav-icon,
.mirror-nav-node--selected.pointable-hover .nav-icon {
  color: var(--accent);
}

/* While dwelling, icon stays dark on the filling accent wedge */
.mirror-nav-node.pointable-hover:not(.mirror-nav-node--disabled) .nav-icon {
  color: #0d0d0d;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Unselected options stay fully visible; only “selected” adds the ring (no dimming) */

/* Continue / inactive float actions only — not used on goal & session picks */
.mirror-nav-node--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.mirror-nav-node--disabled .mirror-nav-disk {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.mirror-nav-node--disabled .mirror-nav-disk::before {
  opacity: 0.25;
}

/* Floating dwell HUDs layered above plan / onboarding */
.mirror-float-hud {
  z-index: 10055;
}

.onboarding-overlay.onboarding-float-active .ob-float-source {
  opacity: 0.4;
  pointer-events: none;
}

.onboarding-overlay.onboarding-float-active .ob-goal-grid,
.onboarding-overlay.onboarding-float-active .ob-session-pills {
  opacity: 1;
  pointer-events: none;
}

/* Plan UI: mirror float + prompt; no full-screen blur. Card panel only in edit mode. */
.plan-overlay:not(.hidden) .plan-container {
  display: none;
}

.plan-overlay:not(.hidden)[data-plan-ui="edit"] .plan-container {
  display: block;
  width: min(94vw, 440px);
  max-height: min(52vh, 460px);
  margin: 0.35rem auto 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding: 1.1rem 1.15rem 1rem;
  background: rgba(6, 6, 8, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

/* ── Utility ── */

.hint { color: var(--muted); font-size: 0.85rem; }

.hidden { display: none; }
.visible { display: block; }

/* ── Fingertip cursor (index tip while pointing) + dwell ring ── */

.pointer-fingertip-hud {
  position: fixed;
  z-index: 10080;
  pointer-events: none;
  transform: translate(-50%, -50%);
  /* No transition on left/top — cursor must track the fingertip with no lag */
  transition: opacity 0.15s ease;
  will-change: left, top;
  filter: drop-shadow(0 0 6px rgba(248, 255, 113, 0.4));
}

.pointer-fingertip-hud.hidden { display: block !important; opacity: 0; }
.pointer-fingertip-hud.visible { opacity: 1; }

.pointer-fingertip-stack {
  position: relative;
  width: 44px;
  height: 44px;
}

.pointer-fingertip-dwell-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pointer-fingertip-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 12px rgba(248, 255, 113, 0.55);
  z-index: 1;
}

/* r=16 → circumference ≈ 100.53 (must match app.js DWELL_CIRCUMFERENCE) */
.dwell-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 2.75; }

.dwell-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.531;
  stroke-dashoffset: 100.531;
  transform-origin: center;
  transition: stroke-dashoffset 0.08s linear;
}

[data-pointable] { transition: outline 0.15s ease, box-shadow 0.15s ease; }

[data-pointable].pointable-hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 18px rgba(248, 255, 113, 0.18);
}

@keyframes dwell-flash {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%  { transform: translate(-50%, -50%) scale(1.35); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pointer-fingertip-hud.dwell-fire { animation: dwell-flash 0.3s ease-out; }

/* Pinch = thumb+index: blue midpoint dot (one per hand). Must not block hit testing — all pinch logic uses the same (x,y). */
.pinch-cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 10078;
  pointer-events: none;
  contain: layout style;
}

.pinch-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: left, top;
  background: radial-gradient(circle at 32% 30%, #8ec5ff, #2a7ce8 48%, #0a4a9a 100%);
  box-shadow:
    0 0 0 1.5px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(45, 140, 255, 0.55),
    0 0 4px rgba(255, 255, 255, 0.25) inset;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.1s ease, visibility 0.1s ease;
  visibility: visible;
}

.pinch-cursor--off {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Splash screen ── */

.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.8s ease;
}

.splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  animation: splash-enter 0.6s ease-out;
}

@keyframes splash-enter {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.splash-bolt {
  font-size: 3.5rem;
  margin-bottom: 0.3rem;
  filter: drop-shadow(0 0 24px rgba(248, 255, 113, 0.5));
}

.splash-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(248, 255, 113, 0.3);
}

.splash-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.3rem 0 1.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.splash-loader {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin: 0 auto;
  overflow: hidden;
}

.splash-loader-bar {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  animation: splash-load 1.4s ease-in-out infinite;
}

@keyframes splash-load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── Plan overlay (picker / detail / edit) ── */

.plan-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(0.45rem, env(safe-area-inset-top)) 0.75rem 0.5rem;
  background: transparent;
  transition: opacity 0.45s ease;
  overflow: visible;
  pointer-events: none;
}


.plan-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.plan-container {
  width: min(96vw, 720px);
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.plan-view { animation: ob-fade-in 0.3s ease-out; }
.plan-view.hidden { display: none; }

.plan-heading {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
  text-align: center;
}

.plan-sub {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.4rem;
}

/* Plan cards grid */

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .plan-cards { grid-template-columns: 1fr; }
}

.plan-card {
  background: var(--glass);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.3rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}

.plan-card:hover,
.plan-card.pointable-hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.plan-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(248, 255, 113, 0.1);
}

.plan-card-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(248, 255, 113, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  align-self: flex-start;
}

.plan-card-name {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.plan-card-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  margin: 0;
}

.plan-card-stats {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.3rem;
}

.plan-card-stat {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.plan-card-stat strong { color: var(--text); font-weight: 700; }

.plan-diff-dots {
  display: flex;
  gap: 0.2rem;
}

.plan-diff-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.plan-diff-dot.filled { background: var(--accent); }

.plan-card-select {
  margin-top: auto;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.plan-card-select:hover,
.plan-card-select.pointable-hover {
  background: rgba(248, 255, 113, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Plan detail view ── */

.plan-back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
  margin-bottom: 0.6rem;
  transition: color 0.15s;
}

.plan-back-btn:hover { color: var(--text); }

.plan-detail-header {
  margin-bottom: 1rem;
}

.plan-detail-name {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.3rem;
}

.plan-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.plan-diff-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.plan-diff-badge.diff-1 { color: var(--success); background: rgba(109, 255, 163, 0.12); }
.plan-diff-badge.diff-2 { color: var(--accent); background: rgba(248, 255, 113, 0.12); }
.plan-diff-badge.diff-3 { color: var(--danger); background: rgba(255, 111, 97, 0.12); }

.plan-meta-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.plan-detail-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Week strip (shared by detail + edit) */

.plan-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.plan-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.15rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(24, 24, 24, 0.5);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.plan-week-day.active-day {
  border-color: rgba(109, 255, 163, 0.25);
  background: rgba(109, 255, 163, 0.06);
}

.plan-week-day.rest-day { opacity: 0.45; }

.plan-week-edit .plan-week-day {
  cursor: pointer;
}

.plan-week-edit .plan-week-day:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.plan-week-edit .plan-week-day.editing {
  border-color: var(--accent);
  background: rgba(248, 255, 113, 0.08);
}

.pw-day-name {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.pw-day-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.active-day .pw-day-dot { background: var(--success); }
.rest-day .pw-day-dot { background: rgba(255, 255, 255, 0.06); }

.pw-day-label {
  font-size: 0.55rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-day .pw-day-label { color: var(--success); }

.plan-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}

/* Exercise list */

.plan-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.plan-ex-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: rgba(24, 24, 24, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.plan-ex-day {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  width: 2rem;
  flex-shrink: 0;
}

.plan-ex-info { flex: 1; min-width: 0; }

.plan-ex-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.plan-ex-meta {
  font-size: 0.68rem;
  color: var(--muted);
}

.plan-ex-tag {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.plan-ex-tag.tag-low { color: var(--success); background: rgba(109, 255, 163, 0.1); }
.plan-ex-tag.tag-medium { color: var(--accent); background: rgba(248, 255, 113, 0.1); }
.plan-ex-tag.tag-high { color: var(--danger); background: rgba(255, 111, 97, 0.1); }

.plan-ex-rest {
  color: var(--muted);
  opacity: 0.4;
  font-style: italic;
}

.plan-summary-bar {
  padding: 0.55rem 0.7rem;
  background: rgba(248, 255, 113, 0.06);
  border: 1px solid rgba(248, 255, 113, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
}

.plan-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.plan-edit-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--muted) !important;
  border: 1px solid var(--glass-border);
}

.plan-edit-btn:hover { color: var(--text) !important; background: rgba(255, 255, 255, 0.08) !important; }

/* ── Edit view extras ── */

.plan-edit-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.plan-edit-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.plan-edit-day-panel {
  padding: 0.8rem;
  background: rgba(24, 24, 24, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: ob-fade-in 0.2s ease-out;
}

.plan-edit-day-panel.hidden { display: none; }

.pe-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.pe-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.pe-toggle {
  width: 2.6rem;
  height: 1.4rem;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.pe-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}

.pe-toggle:checked { background: var(--accent); }
.pe-toggle:checked::after { transform: translateX(1.2rem); }

.pe-select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: rgba(24, 24, 24, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}

.pe-exercise-select.hidden { display: none; }

/* ── Onboarding overlay ── */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  /* Above .mirror-float-hud (10055) so gesture tutorial prompt isn’t covered by idle float HUDs */
  z-index: 10065;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(0.45rem, env(safe-area-inset-top)) 0.75rem 0.5rem;
  /* Light scrim only — no backdrop blur so the camera matches the rest of the app */
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.onboarding-overlay > * {
  pointer-events: auto;
}

/* Top ribbon: “Tutorial” + current step (same skin as .screen-context-header) */
.gest-tut-flow-header {
  max-width: min(88vw, 420px);
  pointer-events: auto;
}

/* ── Gesture tutorial: 3-step modal (videos in assets/gest-tut/) + practice window for step 2 ── */
#obGestureTutWindow.gest-tut-instruction-window {
  position: fixed;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10024 !important;
  /* Portrait-leaning card: all three tutorial steps share this shell */
  width: min(88vw, 420px) !important;
  max-width: min(88vw, 420px) !important;
  pointer-events: auto;
}

/* Step 2: nudge the portrait video card right so the practice “dummy” panel on the left does not sit on it */
#obGestureTutWindow.gest-tut--step-2 {
  top: 44% !important;
  left: 57% !important;
  transform: translate(-50%, -52%) !important;
}

.onboarding-overlay.ob-gesture-tutorial-phase .onboarding-card {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.onboarding-overlay.ob-gesture-tutorial-phase #onboardingFloatHud {
  visibility: hidden;
  pointer-events: none;
}

#obGestureTutWindow .ob-gesture-tutorial {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  min-height: 0;
  pointer-events: auto;
}

#obGestureTutWindow .ob-gesture-tutorial.ob-tut-tracking-weak,
#obGestureTutWindow .ob-gesture-tutorial.ob-tut-exit-phase {
  opacity: 1;
}

.gest-tut-modal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1.35rem;
  width: 100%;
  max-height: min(80vh, 640px);
  overflow-y: auto;
  text-align: center;
  background: rgba(8, 8, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
}

.gest-tut-title {
  margin: 0 0 0.95rem;
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
}

/* Step 2 main card: video only — keep a heading for screen readers */
#gestTutStep2 {
  position: relative;
}

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

.gest-tut-video-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  aspect-ratio: 3 / 4;
  max-height: min(50vh, 380px);
}

.gest-tut-video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  object-fit: cover;
  background: #0f0f12;
}

.gest-tut-video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
}

.gest-tut-copy {
  margin: 0.35rem 0 0;
  font-size: clamp(0.84rem, 2.2vw, 0.95rem);
  line-height: 1.55;
  text-align: center;
  color: rgba(250, 250, 250, 0.96);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.2rem;
}

/* Step 2 modal: same hierarchy as the practice panel (bold lead + accent phrases) */
.gest-tut-copy-lead {
  display: block;
  margin: 0 0 0.4rem;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.99);
  text-align: center;
}

.gest-tut-copy-sub {
  display: block;
  font-size: clamp(0.8rem, 2.1vw, 0.9rem);
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.gest-tut-hl {
  color: rgba(248, 255, 130, 0.95);
  font-weight: 700;
}

.gest-tut-action-row {
  display: flex;
  justify-content: center;
  padding: 0.4rem 0 0;
}

.gest-tut-circle-btn {
  width: 5.5rem;
  height: 5.5rem;
  padding: 0.35rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  color: #101014;
  background: linear-gradient(160deg, #f0ff6a, #9be15d);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gest-tut-circle-btn:hover,
.gest-tut-circle-btn.pointable-hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.gest-tut-step--leaving {
  opacity: 0;
  transition: opacity 0.36s ease;
  pointer-events: none;
}

.gest-tut-practice-window {
  z-index: 10025 !important;
  left: 20% !important;
  top: 52% !important;
  max-width: min(44vw, 360px) !important;
  width: min(44vw, 360px) !important;
  transform-origin: center center;
  /* transform set by applyMirrorWTransform in app.js (don’t !important; would block drag/scale) */
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
}

.gest-tut-practice-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  background: transparent;
  pointer-events: auto;
}

/* Card chrome + handle as direct child: matches .floating-mirror-body > .floating-mirror-handle (gradient strip, full width) */
.floating-mirror-body.gest-tut-practice-body:has(> .floating-mirror-handle) {
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(165deg, rgba(28, 28, 34, 0.96) 0%, rgba(8, 8, 10, 0.94) 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) inset, 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.gest-tut-practice-frost {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: stretch;
  min-width: 0;
  min-height: 168px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.gest-tut-practice-surface {
  min-height: 200px;
  padding: 0.75rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.5rem;
  box-sizing: border-box;
  border-top: 1px solid rgba(0, 0, 0, 0.45);
  background: rgba(4, 4, 6, 0.35);
}

.gest-tut-practice-explain {
  text-align: center;
}

.gest-tut-practice-explain .gest-tut-copy {
  margin: 0;
}

.gest-tut-practice-explain .gest-tut-copy-lead {
  margin: 0 0 0.35rem;
}

.gest-tut-practice-explain .gest-tut-copy-sub {
  margin: 0;
}

.gest-tut-practice-hint-sub {
  margin: 0;
  text-align: center;
  font-size: clamp(0.78rem, 1.9vw, 0.88rem);
  font-weight: 600;
  line-height: 1.4;
  color: rgba(248, 255, 130, 0.88);
  max-width: 24rem;
}

.gest-tut-practice--leaving {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.onboarding-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Workout-mode style prompt strip (no modal “window”) */
.ob-prompt-stack {
  position: relative;
  width: min(96vw, 640px);
  margin: 0 auto;
  padding: 0.85rem 1.1rem 1rem;
  text-align: center;
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  z-index: 1;
}

.ob-prompt-kicker {
  margin: 0 0 0.35rem;
  font-size: clamp(0.72rem, 2vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

.ob-prompt-title {
  margin: 0 0 0.45rem;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.25rem, 4.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 1);
}

.ob-prompt-detail {
  margin: 0;
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  line-height: 1.45;
  color: rgba(245, 245, 245, 0.96);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92);
}

.ob-prompt-detail strong {
  color: var(--accent);
  font-weight: 800;
}

/* One panel: drag strip is the first row *inside* the same rounded card as the form */
.onboarding-card.onboarding-card--mirror {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(94vw, 440px);
  max-height: min(52vh, 420px);
  margin-top: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: rgba(6, 6, 8, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.onboarding-card--mirror > .floating-mirror-handle {
  position: sticky;
  top: 0;
  z-index: 4;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.onboarding-card--mirror > .ob-step {
  padding: 1.15rem 1.35rem 1.1rem;
  box-sizing: border-box;
}

/* Float-only steps: hide the duplicate lower “card” so only the top prompt strip shows */
body.onboarding-active #onboarding[data-ob-step="1"] .onboarding-card,
body.onboarding-active #onboarding[data-ob-step="2"] .onboarding-card {
  display: none !important;
}

/* No draggable panel on float-only steps — card is hidden, so don’t show an orphan handle */
body.onboarding-active #onboarding[data-ob-step="1"] .onboarding-mirror-window .floating-mirror-handle,
body.onboarding-active #onboarding[data-ob-step="2"] .onboarding-mirror-window .floating-mirror-handle {
  display: none !important;
}

/* Steps that are fully driven by float rings: hide duplicate in-card chrome */
body.onboarding-active .onboarding-card #obNext1,
body.onboarding-active .onboarding-card .ob-step[data-step="0"] .ob-step-title,
body.onboarding-active .onboarding-card .ob-step[data-step="1"] .ob-step-title,
body.onboarding-active .onboarding-card .ob-step[data-step="1"] .ob-step-desc,
body.onboarding-active .onboarding-card .ob-step[data-step="2"] .ob-step-title,
body.onboarding-active .onboarding-card .ob-step[data-step="2"] .ob-step-desc,
body.onboarding-active .onboarding-card .ob-goal-grid,
body.onboarding-active .onboarding-card .ob-session-target,
body.onboarding-active .onboarding-card #obNext2,
body.onboarding-active .onboarding-card #obNext3,
body.onboarding-active .onboarding-card .ob-step[data-step="3"] .ob-cal-icon,
body.onboarding-active .onboarding-card .ob-step[data-step="3"] .ob-step-title,
body.onboarding-active .onboarding-card .ob-step[data-step="3"] .ob-step-desc {
  display: none !important;
}

/* Invisible dev skip (top-right of onboarding overlay). Keeps participants unaware. */
.dev-ob-skip {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  right: max(0.5rem, env(safe-area-inset-right));
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  opacity: 0.02;
  cursor: default;
  z-index: 10002;
}

.dev-ob-skip:hover {
  opacity: 0.06;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
}

.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s, transform 0.3s;
}

.ob-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}

.ob-dot.done {
  background: var(--success);
}

.ob-step {
  display: none;
}

.ob-step.visible {
  display: block;
  animation: ob-fade-in 0.35s ease-out;
}

@keyframes ob-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ob-hero-icon {
  font-size: 3.5rem;
  margin-bottom: 0.8rem;
}

.ob-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.ob-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.6rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.ob-step-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.3rem;
}

.ob-step-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.ob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

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

.ob-btn-primary {
  background: var(--accent);
  color: #000;
  margin-top: 0.6rem;
}

.ob-btn-primary:hover:not(:disabled) { box-shadow: 0 4px 20px rgba(248, 255, 113, 0.25); }

.ob-btn-primary:disabled,
.ob-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Continue / primary actions in onboarding: clearer “locked” until selections are valid */
.onboarding-card .ob-btn-primary:disabled {
  filter: grayscale(0.35);
  opacity: 0.28;
}

.ob-btn-google {
  background: #fff;
  color: #3c4043;
  margin-top: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid #dadce0;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-sm);
}

.ob-btn-google:hover {
  background: #f7f8f8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ob-google-svg {
  flex-shrink: 0;
}

.ob-btn-skip {
  background: transparent;
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 0.82rem;
}

.ob-btn-skip:hover { color: var(--text); }

.ob-btn.hidden { display: none; }

.ob-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
  margin-bottom: 0.4rem;
}

.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.ob-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ob-label span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ob-input {
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(24, 24, 24, 0.7);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
}

.ob-input:focus {
  border-color: var(--accent);
}

.ob-input::placeholder { color: rgba(255, 255, 255, 0.2); }

/* Profile step: touch-friendly sliders for weight / height */
.ob-label--slider {
  display: block;
  margin-top: 0.65rem;
}

.ob-slider-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ob-slider-value {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ob-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.55rem;
  margin: 0.35rem 0 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
}

.ob-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(248, 255, 113, 0.95), rgba(220, 200, 60, 0.95));
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.ob-range::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(248, 255, 113, 0.95), rgba(220, 200, 60, 0.95));
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.ob-prompt-detail.hidden {
  display: none;
}

.ob-goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.ob-goal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.5rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--glass-border);
  background: rgba(24, 24, 24, 0.5);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.ob-goal-btn:hover { border-color: rgba(255, 255, 255, 0.15); }

.ob-goal-btn:not(.active) {
  opacity: 0.72;
}

.ob-goal-btn.active {
  border-color: var(--accent);
  background: rgba(248, 255, 113, 0.08);
  box-shadow: 0 0 12px rgba(248, 255, 113, 0.12);
}

.ob-goal-icon { font-size: 1.4rem; }

.ob-goal-text {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.ob-session-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  padding: 0.6rem 0;
}

.ob-session-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.ob-session-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
}

.ob-pill {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: rgba(24, 24, 24, 0.5);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.ob-pill:not(.active) {
  opacity: 0.7;
}

.ob-pill.active {
  border-color: var(--accent);
  background: rgba(248, 255, 113, 0.12);
  color: var(--accent);
}

.ob-cal-icon {
  font-size: 3rem;
  margin-bottom: 0.6rem;
}

.ob-cal-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(109, 255, 163, 0.08);
  border: 1px solid rgba(109, 255, 163, 0.25);
  color: var(--success);
  font-size: 0.88rem;
  font-weight: 600;
}

.ob-cal-status.hidden { display: none; }

.ob-cal-check {
  font-size: 1.1rem;
  font-weight: 800;
}

@keyframes ob-spinner {
  to { transform: rotate(360deg); }
}

/* ── Connection progress steps ── */

.ob-connect-progress {
  margin-top: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ob-connect-progress.hidden { display: none; }

.ob-progress-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(24, 24, 24, 0.5);
  animation: ob-fade-in 0.3s ease-out;
}

.ob-progress-step.hidden { display: none; }

.ob-progress-step.done .ob-prog-spinner {
  animation: none;
  border-color: var(--success);
  border-top-color: var(--success);
}

.ob-progress-step.done .ob-prog-spinner::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: var(--success);
}

.ob-prog-spinner {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: ob-spinner 0.7s linear infinite;
  flex-shrink: 0;
}

.ob-prog-text {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.ob-progress-step.done .ob-prog-text {
  color: var(--text);
}

/* ── Calendar success state ── */

.ob-cal-success {
  margin-top: 1rem;
  animation: ob-fade-in 0.4s ease-out;
}

.ob-cal-success.hidden { display: none; }

.ob-account-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: rgba(24, 24, 24, 0.6);
  border: 1px solid rgba(109, 255, 163, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 0.7rem;
  text-align: left;
}

.ob-account-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.ob-account-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.ob-account-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.ob-account-email {
  font-size: 0.72rem;
  color: var(--muted);
}

.ob-account-check {
  color: var(--success);
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ob-sync-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  background: rgba(66, 133, 244, 0.08);
  border: 1px solid rgba(66, 133, 244, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.ob-sync-icon { font-size: 1rem; }

.ob-sync-text {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}

.ob-sync-detail {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
  margin: 0.3rem 0 0.2rem;
}

/* ── Fake Google OAuth popup ── */

.gauth-overlay {
  position: fixed;
  inset: 0;
  /* Above #onboarding (10065) so the mock OAuth UI is visible and receives clicks; below fingertip cursor (10080) */
  z-index: 10068;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  animation: ob-fade-in 0.2s ease-out;
  pointer-events: auto;
  touch-action: manipulation;
}

.gauth-overlay.hidden { display: none; }

.gauth-popup {
  width: min(92vw, 400px);
  background: #fff;
  border-radius: 8px;
  padding: 2rem 2rem 1.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #202124;
  text-align: center;
  font-family: 'Google Sans', Inter, -apple-system, sans-serif;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}

.gauth-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  position: relative;
}

.gauth-logo { display: block; margin: 0 auto; }

.gauth-close {
  position: absolute;
  right: -0.8rem;
  top: -0.8rem;
  min-width: 44px;
  min-height: 44px;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: #5f6368;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  touch-action: manipulation;
}

.gauth-close:hover { background: rgba(0, 0, 0, 0.06); }

.gauth-title {
  font-size: 1.25rem;
  font-weight: 400;
  color: #202124;
  margin: 0 0 0.3rem;
}

.gauth-desc {
  font-size: 0.88rem;
  color: #5f6368;
  margin: 0 0 1.2rem;
}

.gauth-desc strong { color: #202124; }

.gauth-accounts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.gauth-account-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border: none;
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
  touch-action: manipulation;
  font-family: inherit;
  transition: background 0.15s;
  border-bottom: 1px solid #dadce0;
}

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

.gauth-account-row:hover { background: #f7f8f8; }

.gauth-acc-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.gauth-acc-plus {
  background: #e8eaed;
  color: #5f6368;
  font-size: 1.3rem;
  font-weight: 400;
}

.gauth-acc-detail {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gauth-acc-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #202124;
}

.gauth-acc-email {
  font-size: 0.75rem;
  color: #5f6368;
}

.gauth-footer {
  font-size: 0.7rem;
  color: #5f6368;
  line-height: 1.45;
  margin: 0;
}

.gauth-footer a {
  color: #4285f4;
  text-decoration: none;
}

.gauth-footer a:hover { text-decoration: underline; }

/* ── Calendar sync badge ── */

.cal-sync-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(109, 255, 163, 0.08);
  border: 1px solid rgba(109, 255, 163, 0.2);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-left: auto;
}

.cal-sync-badge.hidden { display: none; }

/* ── Workout prompt (home) — pose-tracked below head / under mirror nav (JS positions) ── */

.workout-prompt.workout-prompt--pose {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  transform: translate(-50%, -50%);
  max-width: min(92vw, 560px);
  width: min(92vw, 560px);
  margin: 0;
  padding: 0;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.workout-prompt--pose .wp-next-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.15rem;
}

.workout-prompt--pose .wp-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.25rem, 3.8vw, 1.85rem);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.workout-prompt--pose .wp-meta {
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  color: var(--muted);
  margin: 0.1rem 0 0.55rem;
}

.workout-prompt--pose .wp-action {
  pointer-events: auto;
}

.wp-action {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(248, 255, 113, 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.wp-gesture-icon {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
}

/* Home start: text lives in a pill-shaped track; fill grows left → right over 3s in JS. */
.wp-gesture-text-track {
  --wp-start-fill: 0;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(248, 255, 113, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.wp-gesture-text-fill {
  position: absolute;
  inset: 0;
  right: auto;
  width: 100%;
  transform: scaleX(var(--wp-start-fill));
  transform-origin: left center;
  background: linear-gradient(
    90deg,
    rgba(248, 255, 113, 0.42) 0%,
    rgba(248, 255, 113, 0.22) 100%
  );
  will-change: transform;
  pointer-events: none;
}

.wp-gesture-text {
  position: relative;
  z-index: 1;
  font-size: clamp(0.88rem, 2.3vw, 1.1rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--accent);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.45);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0.05rem 0;
}

.workout-prompt.dimmed {
  opacity: 0;
  pointer-events: none;
}

/* ── Plans card (workout list) ── */

.plans-card {
  padding: 1.2rem 1.4rem;
}

.plans-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
}

.plans-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.plans-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(248, 255, 113, 0.1);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

.plans-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.plans-workout-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: rgba(24, 24, 24, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.plans-workout-row:hover,
.plans-workout-row.pointable-hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 24, 0.7);
}

.plans-w-info { flex: 1; min-width: 0; }

.plans-w-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.plans-w-meta {
  font-size: 0.68rem;
  color: var(--muted);
}

.plans-swap-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.plans-swap-btn:hover {
  color: var(--accent);
  background: rgba(248, 255, 113, 0.08);
}

.plans-actions {
  margin-top: 0.3rem;
}

.plans-change-btn {
  width: 100%;
}

/* Plans swap: mirror float + top prompt (no inline panel) */
.plans-swap-float-prompt {
  position: fixed;
  top: max(0.55rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 560px);
  z-index: 10054;
  pointer-events: none;
}

.plans-swap-float-prompt.hidden {
  display: none;
}

/* ── Calendar empty state ── */

.cal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.2rem 2rem;
}

.cal-empty.hidden { display: none; }

.cal-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 12px rgba(248, 255, 113, 0.2));
}

.cal-empty-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.cal-empty-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 320px;
  margin: 0 0 1.2rem;
}

.cal-empty-connect {
  width: auto;
  padding: 0.65rem 1.5rem;
}

/* ── Workout suggestion blocks on calendar ── */

.cal-suggestion-block {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: var(--radius-sm);
  border: 2px dashed rgba(109, 255, 163, 0.5);
  background: rgba(109, 255, 163, 0.06);
  padding: 0.2rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: default;
  transition: opacity 0.3s, transform 0.2s, background 0.2s;
  z-index: 2;
}

.cal-suggestion-block:hover,
.cal-suggestion-block.pointable-hover {
  background: rgba(109, 255, 163, 0.12);
}

.cal-sug-title {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--success);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-sug-time {
  font-size: 0.5rem;
  color: rgba(109, 255, 163, 0.7);
}

.cal-sug-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.cal-sug-btn {
  flex: 1;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.4);
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cal-sug-accept {
  color: var(--success);
  border-color: rgba(109, 255, 163, 0.3);
}

.cal-sug-accept:hover,
.cal-sug-accept.pointable-hover {
  background: rgba(109, 255, 163, 0.15);
  border-color: var(--success);
}

.cal-sug-dismiss {
  color: var(--muted);
}

.cal-sug-dismiss:hover,
.cal-sug-dismiss.pointable-hover {
  background: rgba(255, 255, 255, 0.06);
}

.cal-suggestion-block.accepted {
  border-style: solid;
  border-color: rgba(109, 255, 163, 0.5);
  background: rgba(109, 255, 163, 0.18);
}

.cal-suggestion-block.dismissed {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}
