/* ===== RESET & ROOT ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1f2733;
  --border:    #2d3748;
  --text:      #e6edf3;
  --text2:     #8b949e;
  --text3:     #4a5568;
  --accent:    #f97316;
  --accent2:   #c2410c;
  --accent-ink: #1a1a1a; /* text on orange buttons (dark, not white) */
  --green:     #22c55e;
  --green2:    #15803d;
  --orange:    #f97316;
  --red:       #ef4444;
  --yellow:    #eab308;
  --purple:    #f97316;
  --pink:      #ec4899;
  --teal:      #14b8a6;
  --radius:    8px;
  --radius-lg: 14px;
  --glow-accent: 0 0 20px rgba(249,115,22,0.15);
  --glow-green:  0 0 20px rgba(34,197,94,0.15);
  --glow-purple: 0 0 20px rgba(249,115,22,0.15);
  --glow-orange: 0 0 20px rgba(249,115,22,0.15);
  --gradient-accent: linear-gradient(135deg, #f97316, #fdba74);
  --gradient-green:  linear-gradient(135deg, #22c55e, #14b8a6);
  --gradient-orange: linear-gradient(135deg, #f97316, #fdba74);
  --gradient-surface: linear-gradient(180deg, rgba(249,115,22,0.05) 0%, transparent 100%);
  /* Brutalist landing */
  --brutal-bg: #0a0a0a;
  --brutal-bg2: #141414;
  --brutal-fg: #f2f0e6;
  --brutal-accent: #f97316;
  --brutal-border: #2a2a2a;
  --brutal-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --brutal-radius: 8px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

#app {
  max-width: 1300px;
  margin: 0 auto;
  padding-bottom: 90px;
  animation: appFadeIn 0.3s ease;
}
@keyframes appFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.boot-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
  min-height: 60vh;
}
.boot-logo {
  font-size: 52px;
}
.boot-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin {
  to { transform: rotate(360deg); }
}
.boot-label {
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
}

/* ===== TOP HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  box-shadow: 0 1px 0 rgba(249,115,22,0.06);
}
.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-accent);
  opacity: 0.3;
  border-radius: 1px;
}
.app-header-title {
  flex: 1;
  font-size: 13px;
  color: var(--text2);
  min-width: 0;
}
.app-header-title strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
.badge-block-a { background: rgba(249,115,22,0.2); color: var(--accent); }
.badge-block-b { background: rgba(249,115,22,0.2); color: var(--purple); }
.badge-yoga { background: rgba(34,197,94,0.2); color: var(--green); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.bottom-nav::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-accent);
  opacity: 0.25;
  border-radius: 1px;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}
.nav-btn:active { transform: scale(0.92); }
.nav-btn.active {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(249,115,22,0.3);
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.nav-btn.disabled:active { transform: none; }
.nav-btn[data-tooltip] {
  position: relative;
}
.nav-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 110;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.nav-btn[data-tooltip]:hover::after,
.nav-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== LANDING (brutalist) ===== */
#app.landing-active {
  max-width: none;
  padding-bottom: 0;
  background: var(--brutal-bg);
}
.landing {
  font-family: var(--brutal-mono);
  color: var(--brutal-fg);
  background: var(--brutal-bg);
}
.landing-btn {
  font-family: var(--brutal-mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 14px 22px;
  border: 2px solid var(--brutal-fg);
  background: transparent;
  color: var(--brutal-fg);
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.08s, box-shadow 0.08s, background 0.08s;
  white-space: nowrap;
}
.landing-btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--brutal-accent); }
.landing-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.landing-btn-solid { background: var(--brutal-accent); border-color: var(--brutal-accent); color: var(--accent-ink); }
.landing-btn-solid:hover { box-shadow: 3px 3px 0 var(--brutal-fg); }
.landing-btn-ghost { background: var(--brutal-fg); border-color: var(--brutal-fg); color: var(--brutal-bg); }
.landing-btn-ghost:hover { box-shadow: 3px 3px 0 var(--brutal-accent); }
.landing-kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--brutal-accent);
  font-weight: 800;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  background: var(--brutal-bg);
  border-bottom: 2px solid var(--brutal-border);
}
.landing-brand { font-size: 26px; font-weight: 900; letter-spacing: 0.05em; }
.landing-brand span { color: var(--brutal-accent); }
.landing-nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.landing-nav-links button:not(.landing-btn) {
  background: none;
  border: none;
  color: var(--brutal-fg);
  font-family: var(--brutal-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  padding: 6px 2px;
}
.landing-nav-links button:not(.landing-btn):hover { color: var(--brutal-accent); }

.landing-hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.25) contrast(1.05) brightness(0.62);
}
.landing-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,10,0.82), rgba(10,10,10,0.25));
}
.landing-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 28px;
}
.landing-hero-title {
  font-size: clamp(56px, 12vw, 150px);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 20px 0 26px;
}
.landing-hero-sub {
  font-size: 16px;
  max-width: 500px;
  color: rgba(242,240,230,0.85);
  margin-bottom: 34px;
}
.landing-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.landing-hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.landing-hero-stats div {
  font-size: 11px;
  letter-spacing: 0.14em;
  border-radius: 6px;
}
.landing-hero-stats strong {
  color: var(--brutal-accent);
  font-size: 22px;
  margin-right: 6px;
}

.landing-marquee {
  overflow: hidden;
  border-top: 2px solid var(--brutal-accent);
  border-bottom: 2px solid var(--brutal-accent);
  padding: 12px 0;
}
.landing-marquee-track {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  animation: landingMarquee 24s linear infinite;
}
.landing-marquee-half {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.landing-marquee-track span { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; line-height: 1; }
.landing-marquee-track b { color: var(--brutal-accent); font-weight: 400; line-height: 1; }
@keyframes landingMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.landing-section { padding: 100px 28px; max-width: 1200px; margin: 0 auto; }
.landing-sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 52px; }
.landing-num {
  font-size: 13px;
  color: var(--brutal-accent);
  border: 2px solid var(--brutal-accent);
  padding: 6px 10px;
  font-weight: 900;
}
.landing-sec-head h2 {
  font-size: clamp(28px, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 900;
}
.landing-sec-line { flex: 1; height: 2px; background: var(--brutal-border); }

.landing-feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.landing-feat {
  border: 2px solid var(--brutal-border);
  background: var(--brutal-bg2);
  padding: 24px;
  border-radius: 10px;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.landing-feat:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--brutal-accent);
  border-color: var(--brutal-fg);
}
.landing-feat-tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--brutal-accent);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--brutal-border);
}
.landing-feat p { font-size: 14px; line-height: 1.6; color: rgba(242,240,230,0.8); }
.landing-feat p strong { color: var(--brutal-fg); }
.landing-feat-photo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.landing-feat-img {
  height: 210px;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--brutal-accent);
  filter: grayscale(0.5) contrast(1.08) brightness(0.9);
}
.landing-feat-body { padding: 22px; }

#landing-how .landing-btn { margin-top: 34px; }


.landing-band { position: relative; overflow: hidden; padding: 110px 28px; }
.landing-band-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; }
.landing-band-title {
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.98;
  margin: 16px 0 20px;
}
.landing-band-sub { font-size: 15px; max-width: 540px; color: rgba(242,240,230,0.85); margin-bottom: 42px; }
.landing-prog-table-wrap {
  max-width: 100%;
  margin-bottom: 40px;
  background: rgba(10,10,10,0.78);
  border: 2px solid var(--brutal-border);
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.landing-prog-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 13px; }
.landing-prog-table th,
.landing-prog-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--brutal-border); white-space: nowrap; }
.landing-prog-table th { color: var(--brutal-accent); letter-spacing: 0.16em; font-size: 11px; }
.landing-prog-table tr:last-child td { border-bottom: none; }
.landing-prog-table .lp-day { font-weight: 900; }
.landing-prog-table .lp-block { font-weight: 900; color: var(--brutal-accent); }
.landing-prog-table .lp-focus { color: rgba(242,240,230,0.7); }
.landing-prog-table .lp-bench { color: rgba(242,240,230,0.6); font-size: 12px; }
.landing-prog-table .lp-mins { color: rgba(242,240,230,0.6); }
.landing-prog-table .lp-type { text-align: right; color: var(--brutal-accent); font-weight: 900; }

.landing-price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.landing-price {
  border: 2px solid var(--brutal-border);
  background: var(--brutal-bg2);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 12px;
}
.landing-price:hover { border-color: var(--brutal-fg); }
.landing-price-name { font-size: 13px; letter-spacing: 0.2em; font-weight: 900; }
.landing-price-amount { font-size: 54px; font-weight: 900; line-height: 1; margin: 14px 0 2px; }
.landing-price-unit { font-size: 11px; letter-spacing: 0.14em; color: rgba(242,240,230,0.6); }
.landing-price ul { list-style: none; margin: 22px 0 28px; padding: 0; flex: 1; }
.landing-price ul li {
  padding: 8px 0 8px 18px;
  position: relative;
  font-size: 13px;
  border-bottom: 1px dashed var(--brutal-border);
  color: rgba(242,240,230,0.85);
}
.landing-price ul li::before { content: '\25B8'; position: absolute; left: 0; color: var(--brutal-accent); }
.landing-price-premium { border-color: var(--brutal-accent); box-shadow: 4px 4px 0 var(--brutal-accent); }
.landing-price-flag {
  position: absolute;
  top: -14px;
  left: 16px;
  background: var(--brutal-accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 5px 10px;
  font-weight: 900;
  border-radius: 4px;
}

.landing-cta { position: relative; overflow: hidden; padding: 130px 28px; text-align: center; }
.landing-cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.3) contrast(1.05) brightness(0.55);
}
.landing-cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.45), rgba(10,10,10,0.82));
}
.landing-cta-inner { position: relative; z-index: 2; }
.landing-cta-title {
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 38px;
}
.landing-cta-sub { margin-top: 18px; font-size: 11px; letter-spacing: 0.18em; color: rgba(242,240,230,0.6); }

.landing-footer {
  border-top: 2px solid var(--brutal-border);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(242,240,230,0.5);
}
.landing-footer > div:first-child { justify-self: start; }
.landing-footer > div:nth-child(2) { justify-self: center; text-align: center; }
.landing-footer > div:nth-child(3) { justify-self: end; }
.landing-footer-links { display: flex; align-items: center; gap: 10px; }
.landing-footer-links a { color: rgba(242,240,230,0.7); text-decoration: underline; letter-spacing: 0.08em; }
.landing-footer-links a:hover { color: var(--brutal-accent); }

@media (max-width: 900px) {
  .landing-feat-grid, .landing-price-grid { grid-template-columns: 1fr; }
  .landing-hero { min-height: 72vh; }
  .landing-nav-links button:not(.landing-btn) { display: none; }
  .landing-nav-links { gap: 8px; }
  .landing-nav-links .landing-btn { padding: 10px 14px; font-size: 11px; }
  .landing-footer { grid-template-columns: 1fr; }
  .landing-footer > div { justify-self: center; }
}
.btn-primary {
  display: inline-block;
  background: var(--accent);
  background: var(--gradient-accent);
  color: var(--accent-ink);
  padding: 15px 34px;
  border-radius: var(--radius);
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(249,115,22,0.2);
}
.btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 4px 20px rgba(249,115,22,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--accent);
}
.btn-secondary {
  display: inline-block;
  background: var(--surface2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(249,115,22,0.1);
}
.btn-secondary:disabled,
.btn-secondary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface2);
}
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* ===== SESSION VIEW ===== */
.session-view { padding: 0 0 20px; }

.session-hero {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.session-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.session-title { font-size: 24px; font-weight: 700; }
.session-subtitle { color: var(--text2); font-size: 16px; margin-top: 4px; }
.session-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.meta-pill {
  font-size: 13px;
  color: var(--text2);
  background: var(--surface2);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.meta-pill.done { color: var(--green); background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); }

/* Option A/B toggle */
.mode-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.mode-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Progress bar */
.cycle-progress {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ===== SECTION CARDS ===== */
.section-card {
  margin: 14px 20px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s;
}
.section-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), var(--glow-accent);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}
.section-header:hover { background: var(--surface2); }
.section-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-icon svg { width: 18px; height: 18px; }
.section-label { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.section-time { font-size: 13px; color: var(--text3); margin-top: 2px; }
.section-chevron { color: var(--text3); font-size: 20px; transition: transform 0.2s; }
.section-chevron.open { transform: rotate(180deg); }
.section-body { border-top: 1px solid var(--border); }
.section-body.collapsed { display: none; }

/* icon colours — vibrant gradient backgrounds */
.icon-warmup { background: linear-gradient(135deg, rgba(234,179,8,0.2), rgba(234,179,8,0.08)); color: var(--yellow); }
.icon-strength { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.08)); color: var(--accent); }
.icon-conditioning { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.08)); color: var(--orange); }
.icon-core { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.08)); color: var(--green); }
.icon-yoga { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.08)); color: var(--purple); }

/* ===== WARMUP ===== */
.warmup-list { padding: 14px 18px; }
.warmup-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.warmup-item:last-child { border-bottom: none; }
.warmup-item::before {
  content: '›';
  color: var(--text3);
  font-size: 20px;
  flex-shrink: 0;
}

/* ===== EXERCISE TABLE ===== */
.exercise-list { padding: 8px 0; }
.exercise-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.exercise-item:last-child { border-bottom: none; }
.exercise-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.exercise-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--text3);
  min-width: 22px;
}
.exercise-name { font-size: 17px; font-weight: 600; flex: 1; }
.exercise-prescription {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.exercise-notes {
  font-size: 14px;
  color: var(--text3);
  margin: 4px 0 10px 22px;
  font-style: italic;
}
.last-weight {
  font-size: 13px;
  color: var(--text3);
  margin: 0 0 10px 22px;
}
.last-weight span { color: var(--yellow); font-weight: 600; }

/* Weight suggestion — shown when previous session all sets complete */
.weight-suggestion {
  font-size: 13px;
  color: var(--green);
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 6px;
  padding: 7px 10px;
  margin: 0 0 10px 22px;
  line-height: 1.4;
}
.weight-suggestion strong { color: var(--green); font-size: 15px; }

/* Set rows */
.sets-grid { display: flex; flex-direction: column; gap: 8px; margin-left: 22px; }
.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.set-label {
  font-size: 13px;
  color: var(--text3);
  width: 42px;
  flex-shrink: 0;
}
.set-input {
  width: 76px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 16px;
  text-align: center;
}
.set-input:focus { outline: none; border-color: var(--accent); }
.set-unit { font-size: 13px; color: var(--text3); }
.set-check {
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-radius: 7px;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
  flex-shrink: 0;
  color: transparent;
}
.set-check:hover { border-color: var(--green); }
.set-check.done {
  background: var(--green2);
  border-color: var(--green);
  color: white;
}
.set-check.done::after { content: '✓'; font-size: 17px; }
.set-row.done .set-input { opacity: 0.5; }
.reps-input {
  width: 56px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 8px;
  font-size: 16px;
  text-align: center;
}
.reps-input:focus { outline: none; border-color: var(--accent); }

/* ===== CONDITIONING SECTION ===== */
.conditioning-body { padding: 18px; }
.cond-title { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.cond-steps { margin-bottom: 16px; }
.cond-step {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 16px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.cond-step:last-child { border-bottom: none; }
.cond-step::before { content: '·'; color: var(--orange); font-size: 20px; flex-shrink: 0; }
.benchmark-box {
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.25);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
}
.benchmark-label { font-size: 13px; font-weight: 700; color: var(--yellow); letter-spacing: 0.06em; margin-bottom: 8px; }
.benchmark-prev { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.benchmark-prev span { color: var(--yellow); }
.score-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 17px;
}
.score-input:focus { outline: none; border-color: var(--yellow); }

/* ===== CORE SECTION ===== */
.core-list { padding: 8px 0; }
.core-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.core-item:last-child { border-bottom: none; }
.core-check {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.core-check:hover { border-color: var(--green); }
.core-check.done { background: var(--green2); border-color: var(--green); }
.core-check.done::after { content: '✓'; font-size: 15px; color: white; }
.core-text { flex: 1; font-size: 16px; }
.core-text.done { text-decoration: line-through; color: var(--text3); }
.core-prescription { font-size: 15px; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ===== YOGA SECTION ===== */
.yoga-focus {
  padding: 15px 18px;
  font-size: 16px;
  color: var(--text2);
  font-style: italic;
  border-bottom: 1px solid var(--border);
}
.yoga-list { padding: 8px 0; }
.yoga-pose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.yoga-pose:last-child { border-bottom: none; }
.yoga-check {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.yoga-check:hover { border-color: var(--purple); }
.yoga-check.done { background: var(--purple); border-color: var(--purple); }
.yoga-check.done::after { content: '✓'; font-size: 15px; color: white; }
.yoga-name { flex: 1; font-size: 16px; }
.yoga-name.done { text-decoration: line-through; color: var(--text3); }
.yoga-dur { font-size: 15px; color: var(--purple); font-weight: 600; white-space: nowrap; }

/* ===== NOTES ===== */
.notes-area {
  margin: 14px 20px 0;
}
.notes-area textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
}
.notes-area textarea:focus { outline: none; border-color: var(--border); color: var(--text); }
.notes-area label { font-size: 13px; color: var(--text3); display: block; margin-bottom: 6px; }

/* ===== SESSION ACTIONS ===== */
.session-actions {
  display: flex;
  gap: 10px;
  padding: 12px 20px 16px;
  align-items: center;
  flex-wrap: wrap;
}
/* Order: Reset | Complete | Prev | Next */
.session-actions .btn-danger   { order: 1; }
.session-actions .btn-complete { order: 2; flex: 1; min-width: 140px; }
.session-actions .btn-prev     { order: 3; }
.session-actions .btn-next     { order: 4; }

@media (max-width: 520px) {
  .session-actions { flex-direction: column; }
  .session-actions > * { width: 100% !important; order: unset; }
  .session-actions .btn-danger   { order: 1; }
  .session-actions .btn-complete { order: 2; }
  .session-actions .btn-prev     { order: 3; }
  .session-actions .btn-next     { order: 4; }
}

.btn-prev, .btn-next {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 12px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-prev:hover, .btn-next:hover { border-color: var(--accent); color: var(--text); }
.btn-prev:disabled, .btn-next:disabled { opacity: 0.3; cursor: default; }
.btn-complete {
  background: var(--green2);
  border: none;
  color: white;
  padding: 15px 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.btn-complete:hover { background: var(--green); }
.btn-complete.done {
  background: var(--surface2);
  color: var(--green);
  border: 1px solid var(--green2);
}

/* Reset session row */
.reset-session-row {
  padding: 10px 20px 4px;
  display: flex;
  justify-content: flex-end;
}

/* ===== OVERVIEW VIEW ===== */
.overview-view { padding: 20px; }
.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.overview-header h2 { font-size: 22px; }
.week-grid { display: flex; flex-direction: column; gap: 16px; }
.week-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.week-block-header {
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.week-block-title { font-weight: 700; font-size: 16px; }
.week-block-progress { font-size: 13px; color: var(--text2); }
.day-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
  cursor: pointer;
  transition: background 0.1s;
}
.day-row:last-child { border-bottom: none; }
.day-row:hover { background: var(--surface2); }
.day-row.current { background: rgba(249,115,22,0.08); border-left: 3px solid var(--accent); }
.day-status {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-done { background: var(--green); }
.status-current { background: var(--accent); }
.status-pending { background: var(--surface2); border: 1px solid var(--border); }
.day-info { flex: 1; }
.day-name { font-size: 15px; font-weight: 600; }
.day-type { font-size: 13px; color: var(--text2); }
.day-row-actions { display: flex; align-items: center; gap: 8px; }
.day-chevron { color: var(--text3); font-size: 17px; }
.day-reset-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.day-reset-btn:hover { border-color: var(--red); color: var(--red); }

/* ===== HISTORY VIEW ===== */
.history-view { padding: 20px; }
.history-view h2 { font-size: 22px; margin-bottom: 16px; }
.benchmarks-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.bm-header {
  background: var(--surface2);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.bm-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.bm-row:last-child { border-bottom: none; }
.bm-name { color: var(--text2); }
.bm-val { font-weight: 600; text-align: right; }
.bm-val.good { color: var(--green); }
.bm-val.empty { color: var(--text3); }
.bm-delta { color: var(--green); font-size: 13px; text-align: right; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.history-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.history-info { flex: 1; }
.history-title { font-size: 16px; font-weight: 600; }
.history-date { font-size: 13px; color: var(--text3); }



/* Info block used in settings */
.info-block {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
}
.info-block:last-child { border-bottom: none; }
.info-block strong { color: var(--text); }

/* Prompt template box */
.prompt-box {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.prompt-box:last-child { border-bottom: none; }
.prompt-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text2);
  padding: 12px 14px;
  font-size: 13px;
  font-family: 'Menlo', 'Courier New', monospace;
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
  margin-top: 8px;
}
.prompt-textarea:focus { outline: none; border-color: var(--accent); color: var(--text); }
.prompt-copy-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Cycle card */
.cycle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
}
.cycle-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cycle-card h3 { font-size: 17px; }
.cycle-dates { font-size: 13px; color: var(--text3); margin-bottom: 10px; }
.cycle-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cycle-stat {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.cycle-stat-val { font-size: 22px; font-weight: 700; color: var(--accent); }
.cycle-stat-label { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ===== COMPLETE MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.modal-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: var(--gradient-accent);
  border-radius: 50%;
  color: white;
  box-shadow: 0 0 14px rgba(249,115,22,0.2);
}
.modal-icon svg { width: 20px; height: 20px; }
.modal h3 { font-size: 23px; margin-bottom: 8px; }
.modal p { color: var(--text2); font-size: 16px; margin-bottom: 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ===== NEW CYCLE MODAL ===== */
.new-cycle-form { text-align: left; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; color: var(--text2); margin-bottom: 6px; }
.form-field input, .form-field select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--accent); }

/* ===== MISC ===== */
.option-b-banner {
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.25);
  color: var(--purple);
  font-size: 14px;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 42px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }
.tag-benchmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(234,179,8,0.12);
  border: 1px solid rgba(234,179,8,0.25);
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  html, body { font-size: 17px; }
  .session-title { font-size: 21px; }
  .set-input { width: 66px; }
  .reps-input { width: 50px; }
  .section-card { margin: 12px 14px 0; }
  .session-actions { padding: 14px 14px; }
  .overview-view, .history-view, .settings-view { padding: 14px 14px 80px; }
}

/* =====================================================
   DASHBOARD HOME
   ===================================================== */

.dashboard-home {
  padding: 20px 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dh-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.dh-cycle-card {
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
}
.dh-cycle-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.dh-cycle-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: var(--radius);
  color: var(--accent);
}
.dh-cycle-icon svg { width: 22px; height: 22px; }
.dh-cycle-info { flex: 1; min-width: 0; }
.dh-cycle-pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}
.dh-continue-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  font-size: 15px;
}
.dh-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dh-user-avatar {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: 50%;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 0 20px rgba(249,115,22,0.2);
}
.dh-user-avatar svg { width: 26px; height: 26px; }
.dh-user-info {
  flex: 1;
  min-width: 0;
}
.dh-user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.dh-user-tier {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}
.dh-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.dh-card-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}
.dh-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.dh-progress-track {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.dh-progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(249,115,22,0.3);
}
.dh-progress-label {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}
.dh-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dh-start-card {
  text-align: center;
  padding: 28px 24px;
}
.dh-start-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.dh-start-icon svg {
  color: var(--accent);
  width: 36px; height: 36px;
}
.dh-start-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.dh-start-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 20px;
  line-height: 1.5;
}
.dh-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dh-section-label::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(249,115,22,0.5);
}
.dh-tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  vertical-align: middle;
}
.dh-tier-badge.free {
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
}
.dh-tier-badge.premium {
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(234,179,8,0.05));
  color: var(--yellow);
  border: 1px solid rgba(234,179,8,0.3);
}
.dh-credits {
  font-size: 13px;
  color: var(--text2);
  margin-left: 8px;
}
.dh-cycle-active {
  border-left-color: var(--arc-accent);
  background: linear-gradient(135deg, rgba(249,115,22,0.05), transparent);
}
.dh-active-pill {
  display: inline-block;
  font-family: var(--arc-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--arc-accent);
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.4);
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}
.dh-active-pill::before {
  content: '●';
  font-size: 8px;
  margin-right: 5px;
  vertical-align: 1px;
}
.dh-other-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  overflow: hidden;
}
.dh-other-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.dh-other-row + .dh-other-row {
  border-top: 1px solid var(--border);
}
.dh-other-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dh-other-main:hover .dh-other-title { color: var(--accent); }
.dh-other-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text3);
}
.dh-other-main:hover .dh-other-icon {
  color: var(--accent);
  border-color: var(--accent);
}
.dh-other-icon svg { width: 18px; height: 18px; }
.dh-other-meta {
  flex: 1;
  min-width: 0;
}
.dh-other-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s;
}
.dh-other-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dh-other-prog {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.dh-other-track {
  flex: 1;
  max-width: 160px;
  height: 5px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.dh-other-fill {
  height: 100%;
  background: var(--text3);
  border-radius: 99px;
  opacity: 0.55;
}
.dh-other-count {
  font-size: 11px;
  color: var(--text3);
  flex-shrink: 0;
}
.dh-other-switch {
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 13px;
}
.dh-other-switch svg { width: 14px; height: 14px; }
.dh-cycle-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.dh-cycle-actions .btn-primary,
.dh-cycle-actions .btn-secondary {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dh-switch-btn svg { width: 14px; height: 14px; }

.dh-action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.dh-action-btn:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.dh-action-btn.disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.dh-action-highlight {
  background: var(--surface2);
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--accent) 6%, var(--surface)) 100%);
  border-color: var(--border);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
}
.dh-action-highlight:hover {
  border-color: var(--accent);
  background: var(--surface2);
  background: linear-gradient(135deg, var(--surface2) 0%, color-mix(in srgb, var(--accent) 12%, var(--surface2)) 100%);
  box-shadow: 0 0 20px rgba(249,115,22,0.15), var(--glow-accent);
  transform: translateY(-2px);
}
.dh-action-highlight:active {
  transform: translateY(0) scale(0.98);
}
.dh-login-card {
  text-align: center;
}
.dh-login-text {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 14px;
}
.dh-login-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.dh-action-icon {
  font-size: 16px;
  margin-bottom: 4px;
}
.dh-action-icon svg {
  color: var(--accent);
  width: 18px; height: 18px;
}
.dh-action-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.dh-action-desc {
  font-size: 12px;
  color: var(--text3);
}

/* =====================================================
   DASHBOARD MODE
   ===================================================== */

/* When dashboard is active, app goes full-width */
#app.dash-active {
  max-width: 100%;
  padding-bottom: 0;
}

/* Heights anchored to CSS vars set by JS after measure */
:root {
  --header-h: 48px;
  --nav-h: 57px;
}

.dashboard-layout {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h) - var(--nav-h));
  overflow: hidden;
  padding: 6px 10px;
  gap: 6px;
  box-sizing: border-box;
}

/* ---- Compact hero bar ---- */
.dash-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  flex-shrink: 0;
}
.dash-hero-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hero-sub { font-size: 12px; color: var(--text2); }
.dash-hero-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Progress mini */
.dash-progress-wrap { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text3); }
.dash-progress-bar { width: 80px; height: 4px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.dash-progress-fill { height: 100%; background: var(--accent); border-radius: 99px; }

/* ---- Mode toggles ---- */
.dash-toggles { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.compact-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.compact-toggle-btn {
  padding: 5px 11px;
  border: none;
  background: none;
  color: var(--text3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.compact-toggle-btn.active { background: var(--accent); color: var(--accent-ink); }
.compact-toggle-btn.active-travel { background: var(--purple); color: white; }

/* View toggle (list vs dash) — removed with the list view (no toggle anymore)
 * .view-mode-toggle / .view-mode-btn classes are gone. */

/* ---- Main body: warmup strip top, then 2-col strength | cond+core ---- */
.dash-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Warmup spans full width as a horizontal strip */
.dash-warmup-panel {
  grid-column: 1 / -1;
}
.dash-warmup-body {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 12px !important;
  overflow-y: visible !important;
}
.dash-wu-item {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  line-height: 1.35;
  padding: 2px 0;
}
.dash-wu-item::before { content: '›'; color: var(--text3); flex-shrink: 0; }

.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.dash-panel-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}
.dash-panel-icon { font-size: 14px; }
.dash-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text2);
  flex: 1;
}
.dash-panel-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 8px 12px;
}
.dash-panel-body::-webkit-scrollbar { width: 3px; }
.dash-panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Opt-B banner inside panel */
.dash-optb-tag {
  font-size: 11px;
  color: var(--purple);
  background: rgba(249,115,22,0.12);
  border-bottom: 1px solid rgba(249,115,22,0.2);
  padding: 4px 12px;
  flex-shrink: 0;
}

/* ---- Strength panel ---- */
.dash-exercise {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.dash-exercise:last-child { border-bottom: none; }

.dash-ex-hd {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 3px;
}
.dash-ex-num { font-size: 11px; color: var(--text3); min-width: 16px; flex-shrink: 0; }
.dash-ex-name { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.2; }
.dash-ex-rx { font-size: 12px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.dash-ex-loading {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  white-space: nowrap;
  align-self: center;
}

.dash-ex-notes { font-size: 11px; color: var(--text3); font-style: italic; margin: 2px 0 4px 17px; line-height: 1.3; }
.dash-hint-suggest {
  font-size: 11px;
  color: var(--green);
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 4px;
  padding: 3px 7px;
  margin: 2px 0 4px 17px;
  display: inline-block;
}
.dash-hint-last { font-size: 11px; color: var(--text3); margin: 2px 0 4px 17px; }
.dash-hint-last span { color: var(--yellow); }

.dash-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 17px;
}
.dash-set {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 7px;
  transition: all 0.1s;
}
.dash-set.done {
  opacity: 0.55;
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.2);
}
.dash-set-label { font-size: 11px; color: var(--text3); flex-shrink: 0; }
.dash-set-input {
  width: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 3px 4px;
  font-size: 12px;
  text-align: center;
}
.dash-set-input:focus { outline: none; border-color: var(--accent); }
.dash-set-sep { font-size: 11px; color: var(--text3); }
.dash-reps-input {
  width: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 3px 4px;
  font-size: 12px;
  text-align: center;
}
.dash-reps-input:focus { outline: none; border-color: var(--accent); }
.dash-set-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dash-set-check:hover { border-color: var(--green); }
.dash-set-check.done { background: var(--green2); border-color: var(--green); color: white; }
.dash-set-check.done::after { content: '✓'; }

/* ---- Conditioning panel ---- */
.dash-cond-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.dash-cond-step {
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  line-height: 1.3;
}
.dash-cond-step:last-child { border-bottom: none; }
.dash-cond-step::before { content: '·'; color: var(--orange); font-size: 16px; flex-shrink: 0; line-height: 1; margin-top: 2px; }

.dash-bm-box {
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.25);
  border-radius: var(--radius);
  padding: 10px;
  margin-top: 10px;
}
.dash-bm-label { font-size: 11px; font-weight: 700; color: var(--yellow); letter-spacing: 0.06em; margin-bottom: 5px; }
.dash-bm-prev { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.dash-bm-prev span { color: var(--yellow); font-weight: 600; }
.dash-score-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 15px;
}
.dash-score-input:focus { outline: none; border-color: var(--yellow); }

/* ---- Core blast strip ---- */
.dash-core-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  overflow-x: auto;
  min-height: 52px;
}
.dash-core-strip::-webkit-scrollbar { height: 3px; }
.dash-core-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.dash-core-label-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 6px;
  border-right: 1px solid var(--border);
  margin-right: 3px;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.dash-core-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 11px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.dash-core-badge:hover { border-color: var(--green); }
.dash-core-badge.done {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.3);
}
.dash-core-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  pointer-events: none;
}
.dash-core-badge.done .dash-core-check { background: var(--green); border-color: var(--green); color: white; }
.dash-core-badge.done .dash-core-check::after { content: '✓'; }
.dash-core-name { font-size: 13px; }
.dash-core-badge.done .dash-core-name { text-decoration: line-through; color: var(--text3); }
.dash-core-rx { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ---- Bottom actions strip ---- */
.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* Notes left, all buttons grouped on the right */
.dash-actions-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 768px) {
  .dash-actions { flex-direction: column; gap: 8px; padding: 6px 10px; }
  .dash-actions > .dash-notes-input { width: 100%; }
  .dash-actions-btns { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .dash-actions-btns > * { flex: 1; min-width: 0; }
  .dash-actions-btns .dash-complete-btn { flex: 2; min-width: 130px; }
}

.dash-notes-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  height: 38px;
  overflow: hidden;
  flex: 1;
  min-width: 160px;
}
.dash-notes-input:focus { outline: none; color: var(--text); border-color: var(--border); }
.dash-reset-btn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.dash-reset-btn:hover { background: rgba(239,68,68,0.22); }
.dash-nav-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  white-space: nowrap;
}
.dash-nav-btn:hover { border-color: var(--accent); color: var(--text); }
.dash-nav-btn:disabled { opacity: 0.25; cursor: default; }
.dash-complete-btn {
  background: var(--green2);
  border: none;
  color: white;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s;
  text-align: center;
}
.dash-complete-btn:hover { background: var(--green); }
.dash-complete-btn.done { background: var(--surface2); color: var(--green); border: 1px solid var(--green2); }

/* ---- Yoga dashboard ---- */
.dash-yoga-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 7px;
  min-height: 0;
}
.dash-yoga-focus {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 15px;
  font-size: 14px;
  color: var(--text2);
  font-style: italic;
  flex-shrink: 0;
}
.dash-yoga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 7px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}
.dash-yoga-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
  align-items: start;
}
.dash-yoga-card:hover { border-color: var(--purple); }
.dash-yoga-card.done {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.3);
}
.dash-yoga-check {
  grid-column: 1;
  grid-row: 1;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  pointer-events: none;
  margin-top: 2px;
}
.dash-yoga-card.done .dash-yoga-check { background: var(--purple); border-color: var(--purple); color: white; }
.dash-yoga-card.done .dash-yoga-check::after { content: '✓'; }
.dash-yoga-name {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
}
.dash-yoga-card.done .dash-yoga-name { text-decoration: line-through; color: var(--text3); }
.dash-yoga-dur {
  grid-column: 3;
  grid-row: 1;
  font-size: 13px;
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
}
/* Timer button sits on its own row below name/duration */
.dash-yoga-card .timer-trigger-btn {
  grid-column: 2 / 4;
  grid-row: 2;
  margin-top: 2px;
  font-size: 12px;
  justify-content: center;
  padding: 4px 10px;
  border-color: rgba(249,115,22,0.4);
  color: var(--purple);
}

/* ---- Responsive for dashboard ---- */
@media (max-width: 768px) {
  /* On phones/tablets the dashboard is a naturally-scrolling single column:
     panels stack and expand to their content instead of being locked to a
     full-viewport grid with internal panel scroll. */
  .dashboard-layout {
    height: auto;
    overflow: visible;
    padding: 6px 10px calc(var(--nav-h) + 16px);
  }
  .dash-hero { flex-wrap: wrap; }
  .dash-hero-title { white-space: normal; overflow: visible; text-overflow: clip; }
  .dash-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: visible;
  }
  .dash-warmup-panel { grid-column: 1; }
  .dash-panel { min-height: 0; }
  .dash-panel-body { overflow: visible; }
  .dash-yoga-layout { flex: none; min-height: 0; }
  .dash-yoga-grid { overflow: visible; flex: none; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .dash-body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
  }
  .dash-warmup-panel { grid-column: 1 / -1; }
}

/* =====================================================
   FLOATING TIMER WIDGET — compact + fullscreen focus mode
   ===================================================== */

/* ── Compact widget (default) ─────────────────────────── */
.ftimer {
  position: fixed;
  bottom: 76px;
  right: 14px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 300;
  transition: transform 0.25s ease, opacity 0.2s ease;
  user-select: none;
  overflow: hidden;
}
.ftimer-hidden {
  transform: translateY(20px) scale(0.92);
  opacity: 0;
  pointer-events: none;
}

/* Top bar */
.ftimer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 5px;
}
.ftimer-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 155px;
}
.ftimer-top-btns {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ftimer-expand-btn, .ftimer-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  padding: 3px 5px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s;
}
.ftimer-expand-btn:hover, .ftimer-close:hover { color: var(--text); background: var(--surface2); }
.ftimer-expand-btn { font-size: 16px; }

/* Phase banner */
.ftimer-phase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  gap: 8px;
}
.ftimer-phase-tag {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ftimer-phase-prep  { background: rgba(234,179,8,0.2);    color: var(--yellow); }
.ftimer-phase-work  { background: rgba(249,115,22,0.2);   color: var(--orange); }
.ftimer-phase-rest  { background: rgba(249,115,22,0.2);   color: var(--accent); }
.ftimer-phase-emom  { background: rgba(249,115,22,0.2);   color: var(--purple); }
.ftimer-phase-done  { background: rgba(34,197,94,0.2);    color: var(--green);  }
.ftimer-round-info  { font-size: 11px; color: var(--text3); white-space: nowrap; }

/* Block progress bar */
.ftimer-block-bar { padding: 3px 12px 0; display: none; }
.ftimer-block-steps { display: flex; gap: 3px; align-items: center; }
.ftimer-block-step {
  height: 4px; border-radius: 2px; flex: 1;
  background: var(--surface2); transition: background 0.3s;
}
.ftimer-block-step.done { background: var(--green2); }
.ftimer-block-step.cur  { background: var(--accent); }
.ftimer-block-label { font-size: 10px; color: var(--text3); margin-top: 2px; text-align: center; }

/* Compact ring */
.ftimer-ring-wrap {
  position: relative;
  width: 128px; height: 128px;
  margin: 4px auto 2px;
  cursor: pointer;
}
.ftimer-ring-wrap:hover::after {
  content: '⛶ Focus';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.ftimer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ftimer-track { fill: none; stroke: var(--surface2); stroke-width: 8; }
.ftimer-arc {
  fill: none; stroke: var(--accent); stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.85s linear, stroke 0.3s ease;
}
/* Arc colours by phase */
.ftimer[data-phase="prepare"]  .ftimer-arc { stroke: var(--yellow); }
.ftimer[data-phase="work"]     .ftimer-arc { stroke: var(--orange); }
.ftimer[data-phase="rest"]     .ftimer-arc { stroke: var(--accent); }
.ftimer[data-phase="emom"]     .ftimer-arc { stroke: var(--purple); }
.ftimer[data-phase="stopwatch"].ftimer-arc { stroke: var(--orange); }
.ftimer[data-phase="countdown"].ftimer-arc { stroke: var(--accent); }
.ftimer[data-phase="done"]     .ftimer-arc { stroke: var(--green); }

.ftimer-display {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  pointer-events: none;
  flex-direction: column;
  transition: color 0.2s;
}
.ftimer-mode-tag {
  font-size: 9px; color: var(--text3); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: -2px;
}

/* Next-up bar */
.ftimer-next-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 2px 12px 3px; font-size: 11px;
}
.ftimer-next-label { color: var(--text3); }
#ftimer-next-val { color: var(--text2); font-weight: 600; }

/* Round dots */
.ftimer-round-dots {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 3px 12px 2px; justify-content: center; min-height: 16px;
}
.ft-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ft-dot-done { background: var(--green2); }
.ft-dot-cur  { background: var(--orange); box-shadow: 0 0 5px rgba(249,115,22,0.7); }
.ft-dot-todo { background: var(--surface2); border: 1px solid var(--border); }
.ft-dot-rest { background: var(--accent2); opacity: 0.5; }

/* Controls */
.ftimer-controls {
  display: flex; justify-content: center; gap: 12px; padding: 6px 12px 5px;
}
.ftimer-ctrl-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ftimer-ctrl-btn:hover { border-color: var(--accent); background: var(--surface); }
.ftimer-reset-ctrl { font-size: 19px; }

/* Config section */
.ftimer-config { border-top: 1px solid var(--border); padding: 8px 12px 10px; }
.ftimer-config-label {
  font-size: 10px; color: var(--text3); font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px;
}
.ftimer-config-row { display: flex; gap: 5px; margin-bottom: 6px; }
.ftimer-config-field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ftimer-config-field label { font-size: 10px; color: var(--text3); text-align: center; }
.ftimer-config-field input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text); padding: 5px 4px;
  font-size: 13px; text-align: center; min-width: 0;
}
.ftimer-config-field input:focus { outline: none; border-color: var(--accent); }
.ftimer-config-btns { display: flex; gap: 4px; }
.ftimer-set-btn {
  flex: 1; background: var(--accent); border: none; border-radius: 5px;
  color: var(--accent-ink); padding: 6px 4px; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap; text-align: center;
}
.ftimer-set-btn:hover { background: var(--accent2); }
.ftimer-set-btn-alt {
  background: var(--surface2); color: var(--text2); border: 1px solid var(--border);
}
.ftimer-set-btn-alt:hover { background: var(--surface); border-color: var(--accent); color: var(--text); }

/* ── FOCUS OVERLAY (full-screen large timer) ──────────── */
.ftimer-focus-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer; /* tap anywhere to minimise */
  transition: opacity 0.2s ease;
}
.ftimer-focus-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.ftimer-focus-label {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ftimer-focus-phase {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 28px;
  border-radius: 30px;
  margin-bottom: 20px;
  transition: all 0.3s;
}
.ftimer-focus-phase.prep  { background: rgba(234,179,8,0.2);  color: var(--yellow); }
.ftimer-focus-phase.work  { background: rgba(249,115,22,0.2); color: var(--orange); }
.ftimer-focus-phase.rest  { background: rgba(249,115,22,0.2); color: var(--accent); }
.ftimer-focus-phase.emom  { background: rgba(249,115,22,0.2); color: var(--purple); }
.ftimer-focus-phase.done  { background: rgba(34,197,94,0.2);  color: var(--green);  }
.ftimer-focus-phase.sw    { background: rgba(249,115,22,0.15);color: var(--orange); }
.ftimer-focus-phase.cdown { background: rgba(249,115,22,0.15);color: var(--accent); }

/* Large ring */
.ftimer-focus-ring {
  position: relative;
  width: min(72vw, 360px);
  height: min(72vw, 360px);
  margin-bottom: 24px;
  cursor: default; /* ring itself doesn't close */
}
.ftimer-focus-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ftimer-focus-track { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 10; }
.ftimer-focus-arc {
  fill: none; stroke: var(--accent); stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.85s linear, stroke 0.3s ease;
}
/* Arc colours inside focus overlay — driven by data-fphase */
.ftimer-focus-overlay[data-fphase="prepare"]  .ftimer-focus-arc { stroke: var(--yellow); }
.ftimer-focus-overlay[data-fphase="work"]     .ftimer-focus-arc { stroke: var(--orange); }
.ftimer-focus-overlay[data-fphase="rest"]     .ftimer-focus-arc { stroke: var(--accent); }
.ftimer-focus-overlay[data-fphase="emom"]     .ftimer-focus-arc { stroke: var(--purple); }
.ftimer-focus-overlay[data-fphase="stopwatch"].ftimer-focus-arc { stroke: var(--orange); }
.ftimer-focus-overlay[data-fphase="countdown"].ftimer-focus-arc { stroke: var(--accent); }
.ftimer-focus-overlay[data-fphase="done"]     .ftimer-focus-arc { stroke: var(--green); }

.ftimer-focus-time {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.ftimer-focus-digits {
  font-size: min(22vw, 110px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1;
  transition: color 0.2s;
}
.ftimer-focus-subtag {
  font-size: 14px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Round dots in focus mode */
.ftimer-focus-dots {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  max-width: min(80vw, 400px);
  margin-bottom: 16px;
}
.ftimer-focus-dots .ft-dot {
  width: 13px; height: 13px;
}
.ftimer-focus-dots .ft-dot-cur {
  width: 16px; height: 16px;
  box-shadow: 0 0 10px rgba(249,115,22,0.9);
}

/* Next / round info */
.ftimer-focus-next {
  font-size: 16px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}
.ftimer-focus-next span { color: rgba(255,255,255,0.75); font-weight: 600; }

/* Focus controls */
.ftimer-focus-controls {
  display: flex; gap: 20px; align-items: center;
  cursor: default;
}
.ftimer-focus-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: white; font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ftimer-focus-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); }
.ftimer-focus-min-btn {
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,0.4); background: none; border: none;
  cursor: pointer; padding: 8px 14px;
  border-radius: 8px; letter-spacing: 0.04em;
  transition: color 0.15s;
}
.ftimer-focus-min-btn:hover { color: rgba(255,255,255,0.7); }

/* Timer trigger buttons — inline */
.timer-trigger-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text3);
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.timer-trigger-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(249,115,22,0.08);
}
.timer-trigger-cond {
  font-size: 13px; padding: 7px 14px; margin-top: 10px;
  border-color: var(--orange); color: var(--orange);
  width: 100%; justify-content: center; font-weight: 600;
}
.timer-trigger-cond:hover {
  background: rgba(249,115,22,0.1);
  border-color: var(--orange); color: var(--orange);
}

/* Conditioning title row */
.cond-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.cond-title { font-size: 19px; font-weight: 700; flex: 1; margin-bottom: 0; }

/* Yoga pose with timer */
.yoga-pose {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 18px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}

/* Core item with timer */
.core-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}

/* =====================================================
   PROGRAMME SWITCHER SHEET
   ===================================================== */

/* Header pill */
.prog-switch-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.prog-switch-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface);
}

/* Bottom sheet overlay */
.prog-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.prog-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 700px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.prog-sheet-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.prog-sheet-title {
  font-size: 16px;
  font-weight: 700;
}
.prog-sheet-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
}
.prog-sheet-close:hover { background: var(--surface2); color: var(--text); }

.prog-sheet-body {
  overflow-y: auto;
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Programme group */
.prog-group { display: flex; flex-direction: column; gap: 6px; }
.prog-group-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Cycle row inside sheet */
.prog-cycle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.prog-cycle-row.active {
  border-color: var(--accent);
  background: rgba(249,115,22,0.07);
}
.prog-cycle-info { flex: 1; min-width: 0; }
.prog-cycle-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prog-cycle-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.prog-cycle-bar {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.prog-cycle-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s; }

.prog-no-cycles { font-size: 13px; color: var(--text3); padding: 8px 0; }
.prog-active-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(249,115,22,0.15);
  padding: 2px 8px;
  border-radius: 20px;
}
.prog-current-tag {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}
.prog-switch-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 7px 14px;
}

.prog-sheet-footer {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.prog-new-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
}

/* =====================================================
   SETTINGS — PROGRAMME OVERVIEW CARDS
   ===================================================== */

.prog-settings-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 2px;
  transition: border-color 0.15s;
}
.prog-settings-card.active {
  border-color: var(--accent);
  background: rgba(249,115,22,0.06);
}
.prog-settings-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.prog-settings-name { font-size: 15px; font-weight: 700; }
.prog-settings-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.prog-settings-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.prog-settings-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prog-settings-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.prog-settings-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s; }
.prog-settings-pct { font-size: 12px; color: var(--text3); white-space: nowrap; }

/* Older cycles collapsible */
.prog-older-cycles {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.prog-older-cycles summary {
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
  list-style: none;
}
.prog-older-cycles summary::before { content: '› '; }
.prog-older-cycles[open] summary::before { content: '⌄ '; }
.prog-older-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.prog-older-row:last-child { border-bottom: none; }
.prog-older-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.prog-older-meta { font-size: 11px; color: var(--text3); }

/* =====================================================
   SETTINGS — TABBED LAYOUT
   ===================================================== */


/* stab-body inside settings page body — plain block, full scroll via #app */
.stab-body {
  display: block;
  padding-bottom: 20px;
}

/* Section title */
.stab-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 4px;
}

/* Card container */
.stab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 4px;
  flex-shrink: 0;
}

/* Row inside card */
.stab-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.stab-row:last-child { border-bottom: none; }
.stab-row-info { flex: 1; min-width: 0; }
.stab-row-label { font-size: 15px; font-weight: 500; }
.stab-row-desc  { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* Info block */
.stab-info-block {
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}
.stab-info-block:last-child { border-bottom: none; }
.stab-info-block strong { color: var(--text); }
.stab-info-block code {
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
}

/* Active cycle card */
.stab-active-card {
  background: rgba(249,115,22,0.07);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.stab-active-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.stab-active-name { font-size: 16px; font-weight: 700; }
.stab-active-sub  { font-size: 12px; color: var(--text3); margin-top: 2px; }
.stab-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stab-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(249,115,22,0.2);
  border-radius: 99px;
  overflow: hidden;
}
.stab-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; }
.stab-pct { font-size: 12px; color: var(--text3); white-space: nowrap; }

/* Programme block */
.stab-prog-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.stab-prog-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.stab-prog-name { font-size: 14px; font-weight: 700; }
.stab-prog-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.stab-sm-btn { font-size: 12px !important; padding: 5px 10px !important; white-space: nowrap; }
.stab-no-cycles { padding: 10px 14px; font-size: 13px; color: var(--text3); }

/* Cycle row */
.stab-cycle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.stab-cycle-row:last-child { border-bottom: none; }
.stab-cycle-row.active { background: rgba(249,115,22,0.05); }
.stab-cycle-info { flex: 1; min-width: 0; }
.stab-cycle-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stab-cycle-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.stab-mini-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.stab-mini-fill { height: 100%; background: var(--accent); border-radius: 99px; }

/* Imported tag */
.imported-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--purple);
  background: rgba(249,115,22,0.15);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* Programme level badge (beginner / intermediate / advanced / ranges) */
.prog-level-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  vertical-align: 2px;
  margin: 0 2px;
  white-space: nowrap;
}

/* Full-width action button */
.stab-full-btn {
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text2);
  padding: 13px;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}
.stab-full-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(249,115,22,0.05); }

/* Import validation modal */
.import-preview {
  text-align: left;
  margin-top: 8px;
}
.import-preview-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.import-preview-stat:last-child { border-bottom: none; }
.import-stat-ok   { color: var(--green); font-size: 16px; }
.import-stat-warn { color: var(--yellow); font-size: 16px; }
.import-stat-err  { color: var(--red); font-size: 16px; }
.import-stat-label { flex: 1; }
.import-stat-val  { color: var(--text3); font-size: 13px; }


/* =====================================================
   ICON SYSTEM — SVG icons replacing all emoji
   All SVGs rendered via icon() are raw <svg> elements.
   Target them directly — no .icon wrapper needed.
   ===================================================== */

/* Catch-all: all inline SVGs from icon() get 14x14 by default */
svg[viewBox] { width: 14px; height: 14px; vertical-align: middle; }

/* Override for specific containers that need different sizes */
.stab-icon svg,
.weight-suggestion svg,
.dash-hint-suggest svg,
.benchmark-label svg,
.dash-bm-label svg,
.btn-danger svg,
.dash-reset-btn svg,
.dash-complete-btn svg,
.gen-type-btn svg,
.benchmark-prev svg,
.dash-bm-prev svg,
.day-reset-btn svg,
.ftimer-focus-min-btn svg,
#copy-prompt-btn svg,
.dash-panel-icon svg {
  width: 14px; height: 14px;
  vertical-align: middle;
}

/* Larger icons */
.nav-btn svg             { width: 18px; height: 18px; }
.section-icon svg        { width: 18px; height: 18px; }
.ftimer-ctrl-btn svg     { width: 16px; height: 16px; }
.ftimer-focus-btn svg    { width: 18px; height: 18px; }
.section-chevron svg     { width: 16px; height: 16px; }
.prog-switch-pill svg    { width: 12px; height: 12px; }
.dash-nav-btn svg        { width: 14px; height: 14px; }
#ai-generate-btn svg     { width: 14px; height: 14px; }

/* Small/tight icons */
.timer-trigger-btn svg   { width: 13px; height: 13px; }
.ftimer-expand-btn svg   { width: 13px; height: 13px; }
.ftimer-close svg        { width: 12px; height: 12px; }
.prog-sheet-close svg    { width: 13px; height: 13px; }
.import-stat-ok svg,
.import-stat-warn svg,
.import-stat-err svg     { width: 13px; height: 13px; }
.dash-optb-tag svg,
.option-b-banner svg     { width: 12px; height: 12px; }
.compact-toggle-btn svg  { width: 12px; height: 12px; }

/* Hero / display icons (larger, standalone) */
.auth-logo svg          { width: 26px; height: 26px; }
.empty-icon svg         { width: 28px; height: 28px; }
.modal-icon svg         { width: 20px; height: 20px; }

/* Auth logo container */
.auth-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: var(--gradient-accent);
  border-radius: 50%;
  color: white;
  box-shadow: 0 0 20px rgba(249,115,22,0.2);
}

/* Inline layout helpers */
.dash-panel-icon { display: inline-flex; align-items: center; gap: 5px; }
.stab-icon { display: inline-flex; align-items: center; justify-content: center; }

.dash-reset-btn svg { color: var(--text3); }
.dash-complete-btn svg { color: inherit; }
#ai-generate-btn svg { color: inherit; }
.nav-btn svg { color: var(--text3); }
.nav-btn.active svg { color: var(--accent); }
.prog-switch-pill svg { color: var(--text3); }
.section-chevron svg { color: var(--text3); }
.timer-trigger-btn svg { color: var(--text3); }
#copy-prompt-btn svg { color: inherit; }
.gen-type-btn svg { color: var(--text3); }
.gen-type-btn.active svg { color: var(--accent); }
.dash-optb-tag svg { color: var(--purple); }
.option-b-banner svg { color: var(--purple); }
.compact-toggle-btn svg { color: var(--text3); }
.compact-toggle-btn.active svg, .compact-toggle-btn.active-travel svg { color: var(--accent-ink); }
.day-reset-btn svg { color: var(--text3); }
.day-reset-btn:hover svg { color: var(--red); }

/* =====================================================
   GENERATE FORM
   ===================================================== */

.gen-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px; /* breathing room before step 2 when step 1 is expanded */
}

.gen-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: opacity 0.2s;
  flex-shrink: 0; /* never compress — scroll instead */
}
.gen-card-muted {
  opacity: 0.55;
}
.gen-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gen-not-programmed {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
}
.gen-hint {
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.gen-required {
  color: var(--accent);
  font-weight: 700;
}
.gen-input-error {
  border-color: var(--red) !important;
}
.gen-input-error:focus {
  border-color: var(--red) !important;
}
.gen-field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 5px;
  font-weight: 500;
}
.gen-char-count {
  font-size: 11px;
  color: var(--text3);
  text-align: right;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.gen-char-count.near {
  color: var(--yellow);
}
.gen-char-count.full {
  color: var(--red);
}
.gen-char-bar {
  display: block;
  height: 5px;
  margin-top: 5px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}
.gen-char-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 120ms ease, background-color 200ms ease;
}
.gen-char-fill.lv-grey    { background: var(--text3); }
.gen-char-fill.lv-green   { background: var(--green); }
.gen-char-fill.lv-orange  { background: var(--orange); }
.gen-char-fill.lv-red     { background: var(--red); }

/* Form rows */
.gen-row { margin-bottom: 10px; }
.gen-row:last-child { margin-bottom: 0; }
.gen-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.gen-row-2:last-child { margin-bottom: 0; }
.gen-col { display: flex; flex-direction: column; gap: 5px; }
.gen-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}
.gen-input, .gen-select, .gen-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.gen-input:focus, .gen-select:focus, .gen-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.gen-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.gen-empty-msg {
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
  margin: 0;
  padding: 2px 0;
}

/* Day selector */
.gen-day-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gen-day-btn {
  padding: 7px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.gen-day-btn.active {
  background: rgba(249,115,22,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* Session type pills */
.gen-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gen-type-btn {
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  text-align: center;
}
.gen-type-btn.active {
  background: rgba(249,115,22,0.12);
  border-color: var(--accent);
  color: var(--text);
}
.gen-type-icon { display: inline-flex; align-items: center; justify-content: flex-start; }
.gen-type-label { text-align: center; }
.gen-type-check { display: inline-flex; align-items: center; justify-content: flex-end; }
.gen-type-check svg { color: var(--accent); }

/* Equipment grid */
.gen-equip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gen-equip-btn {
  padding: 6px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text3);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.gen-equip-btn.active {
  background: rgba(34,197,94,0.12);
  border-color: var(--green2);
  color: var(--green);
}

/* Toggle switch for core */
.gen-toggle-label { cursor: pointer; margin-left: auto; }
.gen-toggle {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  vertical-align: middle;
}
.gen-toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--text3);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.gen-toggle.active { background: rgba(249,115,22,0.3); border-color: var(--accent); }
.gen-toggle.active::after { transform: translateX(16px); background: var(--accent); }

/* Build button */
.gen-build-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: var(--accent-ink);
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.gen-build-btn:hover { background: var(--accent2); }

/* Prompt output — full width, no side card padding on textarea */
.gen-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gen-output-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.stab-prompt-textarea {
  display: block;
  width: 100%;
  background: var(--bg);
  border: none;
  border-radius: 0;
  color: var(--text2);
  padding: 14px 16px;
  font-size: 13px;
  font-family: 'Menlo', 'Courier New', monospace;
  resize: vertical;
  min-height: 280px;
  line-height: 1.55;
  box-sizing: border-box;
}
.stab-prompt-textarea:focus { outline: none; color: var(--text); }

/* Not programmed in session view */
.core-not-programmed {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text3);
  font-style: italic;
}

@media (max-width: 520px) {
  .gen-row-2 { grid-template-columns: 1fr; }
  .gen-type-grid { grid-template-columns: 1fr 1fr; }
  .dh-other-row { flex-wrap: wrap; }
  .dh-other-switch { width: 100%; }
  .gen-steps { flex-wrap: wrap; }
  .gen-step-line { display: none; }
  .gen-ai-row { flex-direction: column; align-items: flex-start; }
  .gen-ai-row .btn-arc { align-self: stretch; }
}

/* Core toggle row in generate form */
.gen-core-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.gen-core-desc {
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}
.gen-core-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  flex-shrink: 0;
  color: var(--text3);
  font-size: 13px;
  font-weight: 600;
}
.gen-toggle-track {
  width: 38px;
  height: 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 11px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.gen-toggle-knob {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--text3);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.gen-core-toggle.active .gen-toggle-track {
  background: rgba(249,115,22,0.2);
  border-color: var(--accent);
}
.gen-core-toggle.active .gen-toggle-knob {
  transform: translateX(16px);
  background: var(--accent);
}
.gen-core-toggle.active { color: var(--accent); }
.gen-toggle-lbl { font-size: 12px; min-width: 24px; }

/* ── PR / weight tracking styles ── */
.pr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(234,179,8,0.15);
  border: 1px solid rgba(234,179,8,0.3);
  padding: 1px 6px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.pr-up   { color: var(--green);  font-size: 12px; font-weight: 700; }
.pr-down { color: var(--red);    font-size: 12px; }

/* Generate form action row */
.gen-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.gen-reset-btn {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius);
  color: var(--red);
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.gen-reset-btn:hover { background: rgba(239,68,68,0.22); }

/* Stepped generation — Step 1 (Build prompt) / Step 2 (Build with AI) */
.gen-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Quick / Advanced builder mode tabs */
.gen-mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
}
.gen-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.gen-mode-tab svg { width: 13px; height: 13px; }
.gen-mode-tab:hover { color: var(--text); }
.gen-mode-tab.active {
  background: var(--accent);
  color: var(--accent-ink);
}

.gen-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text3);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.gen-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
}
.gen-step-num svg { width: 11px; height: 11px; }
.gen-step-active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(249,115,22,0.1);
}
.gen-step-active .gen-step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.gen-step-done {
  border-color: var(--green2);
  color: var(--green);
  background: rgba(34,197,94,0.1);
}
.gen-step-done .gen-step-num {
  background: var(--green);
  border-color: var(--green);
  color: var(--accent-ink);
}
.gen-step-line {
  flex: 1;
  min-width: 24px;
  max-width: 60px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}
.gen-step-line-done { background: var(--green2); }

/* Step section headers (1: Build prompt, 2: Build with AI) */
.gen-step-hd {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.gen-step-hd-2 {
  padding: 14px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.gen-step-hd-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.gen-step-hd-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.gen-step-hd-sub {
  font-size: 13px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.4;
}

/* Collapsed step-1 card — shown after the prompt is built, above step 2.
   Reopens the full form via the toggle (window.toggleGenStep1). */
.gen-step-min {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.gen-step-min-bd {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.gen-step-min-txt {
  min-width: 0;
}
.gen-step-min-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.gen-step-min-toggle:hover { border-color: var(--accent); color: var(--accent); }
.gen-step-min-toggle svg { width: 16px; height: 16px; }

/* Build-with-AI row: cost/assist notice + button */
.gen-ai-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.gen-ai-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.4;
  flex: 1;
  min-width: 180px;
}
.gen-ai-cost svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }

/* =====================================================
   SETTINGS — FULL PAGE LAYOUT (drop-up entry)
   ===================================================== */

/* Settings active — no special scroll behaviour, same as Progress/Plan */
#app.settings-active {
  max-width: 1300px;
  padding-bottom: 0;
}





/* Programme generation prompt viewer */
.prog-prompt-details {
  border-top: 1px solid var(--border);
}
.prog-prompt-summary {
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  padding: 8px 14px;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.prog-prompt-summary::-webkit-details-marker { display: none; }
.prog-prompt-summary::before { content: '› '; font-size: 14px; }
details[open] .prog-prompt-summary::before { content: '⌄ '; }
.prog-prompt-summary:hover { color: var(--text2); }
.prog-prompt-date { color: var(--text3); font-weight: 400; }
.prog-prompt-textarea {
  display: block;
  width: 100%;
  background: var(--bg);
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text3);
  padding: 12px 14px;
  font-size: 12px;
  font-family: 'Menlo', 'Courier New', monospace;
  line-height: 1.5;
  min-height: 160px;
  resize: vertical;
  box-sizing: border-box;
}

/* Attach prompt row */
.prog-attach-prompt {
  border-top: 1px solid var(--border);
  padding: 8px 14px;
}
.prog-attach-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s;
}
.prog-attach-btn:hover { color: var(--accent); }
.header-auth-link {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;  flex-shrink: 0;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.header-auth-link:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.header-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: var(--border);
  color: var(--text2);
}
.header-logout-link:hover {
  background: rgba(239,68,68,0.12);
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 12px rgba(239,68,68,0.15);
}

/* =====================================================
   SETTINGS PAGE (sidebar + content)
   ===================================================== */
.settings-view {
  padding: 16px 20px 100px;
}
.settings-view-hd h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.set-mobile-head { display: none; }

.settings-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Sidebar */
.set-sidebar {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: calc(var(--header-h, 48px) + 16px);
}
.set-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.set-sidebar-btn:hover { background: var(--surface2); color: var(--text); }
.set-sidebar-btn.active {
  background: rgba(249,115,22,0.1);
  color: var(--accent);
  font-weight: 600;
}
.set-sidebar-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.set-sidebar-icon svg { width: 16px; height: 16px; }

/* Mobile tab bar */
.set-mobile-bar { display: none; }

/* Content area */
.set-content {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Account section */
.set-account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.set-account-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: 50%;
  color: white;
  flex-shrink: 0;
}
.set-account-avatar svg { width: 20px; height: 20px; }
.set-account-info { flex: 1; min-width: 0; }
.set-account-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.set-account-role {
  font-size: 13px;
  color: var(--text3);
  margin-top: 1px;
}
.set-sub-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
}
.set-sub-badge.free {
  background: var(--surface2);
  color: var(--text3);
}
.set-sub-badge.premium {
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(234,179,8,0.05));
  color: var(--yellow);
}
.set-account-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
  font-size: 14px;
}
.set-credits { color: var(--text2); }
.set-upgrade-btn {
  padding: 6px 14px !important;
  font-size: 13px !important;
}
.set-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.set-acc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 14px;
  padding: 8px 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.12s;
}
.set-acc-btn:hover { color: var(--text); }
.set-acc-btn svg { width: 14px; height: 14px; }
.set-acc-btn-danger { color: var(--red); }
.set-acc-btn-danger:hover { color: var(--red); opacity: 0.8; }

/* Change password form */
.set-change-pw {
  padding: 12px 0 4px;
}
.set-pw-field {
  margin-bottom: 10px;
}
.set-pw-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.set-pw-msg {
  font-size: 13px;
  padding: 6px 0;
  margin-bottom: 8px;
}
.set-pw-msg.error { color: var(--red); }
.set-pw-msg.success { color: var(--green); }
.set-pw-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.set-pw-actions .btn-primary,
.set-pw-actions .btn-secondary {
  padding: 10px 20px !important;
  font-size: 14px !important;
}

/* Mobile: collapse sidebar into top tab bar */
@media (max-width: 768px) {
  .set-sidebar { display: none; }
  .set-mobile-head { display: block; }
  .set-mobile-bar {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    padding-bottom: 4px;
  }
  .set-mobile-bar::-webkit-scrollbar { display: none; }
  .set-mobile-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
  }
  .set-mobile-tab svg { width: 14px; height: 14px; }
  .set-mobile-tab.active {
    background: rgba(249,115,22,0.12);
    color: var(--accent);
    border-color: rgba(249,115,22,0.3);
  }
  .settings-layout { flex-direction: column; gap: 0; }
  .set-content { border: none; border-radius: 0; padding: 0; background: transparent; }
}

/* Admin dashboard */
.admin-filter-bar {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.admin-filter-btn {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.12s;
}
.admin-filter-btn.active {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.admin-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
}
.admin-stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; text-align: center;
}
.admin-stat-label {
  font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.admin-stat-value {
  font-size: 22px; font-weight: 700; color: var(--text);
}
.admin-table-wrap {
  overflow-x: auto; margin-bottom: 24px;
}
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th {
  text-align: left; padding: 8px 10px; color: var(--text3); font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text2);
  white-space: nowrap;
}
.admin-table tbody tr:hover td { background: rgba(249,115,22,0.04); }
.admin-col-expand { width: 32px; }
.admin-col-menu { width: 40px; }
.admin-row-toggle {
  background: transparent; border: none; color: var(--text3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; border-radius: 4px; transition: transform 0.15s, color 0.15s;
}
.admin-row-toggle svg { width: 16px; height: 16px; }
.admin-user-row.admin-row-open .admin-row-toggle { transform: rotate(90deg); color: var(--accent); }
.admin-user-name { font-weight: 600; color: var(--text); }
.admin-pill {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  padding: 2px 6px; border-radius: 10px; background: rgba(249,115,22,0.15); color: var(--accent);
  margin-left: 6px; vertical-align: middle;
}
.admin-pill-muted { background: var(--surface2); color: var(--text3); }
.admin-pill-sub { background: rgba(56,189,248,0.15); color: #38bdf8; }
.admin-readonly-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--yellow);
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
  line-height: 1.5;
}
.admin-user-detail td {
  background: var(--surface2); border-bottom: 1px solid var(--border); white-space: normal;
}
.admin-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px;
  padding: 14px 6px;
}
.admin-detail-item { display: flex; flex-direction: column; gap: 3px; }
.admin-detail-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.admin-detail-item strong { font-size: 13px; color: var(--text); font-weight: 600; }
.admin-detail-mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px !important; word-break: break-all; }
.admin-menu-wrap { position: relative; }
.admin-menu-btn {
  background: transparent; border: none; color: var(--text3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 6px; transition: all 0.12s;
}
.admin-menu-btn svg { width: 18px; height: 18px; }
.admin-menu-btn:hover, .admin-menu-btn.open { background: var(--surface2); color: var(--text); }
.admin-menu {
  position: absolute; right: 0; top: 30px; z-index: 60; min-width: 170px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); padding: 4px; display: none;
}
.admin-menu.open { display: block; }
.admin-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text2); cursor: pointer;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; font-family: inherit;
  transition: background 0.12s;
}
.admin-menu-item svg { width: 15px; height: 15px; color: var(--text3); }
.admin-menu-item:hover { background: var(--surface2); color: var(--text); }
.admin-menu-sep { height: 1px; background: var(--border); margin: 4px 8px; }
.admin-menu-item[data-action="add"]:hover svg { color: var(--green); }
.admin-menu-item[data-action="remove"]:hover { color: var(--red); }
.admin-menu-item[data-action="remove"]:hover svg { color: var(--red); }
.admin-menu-item[data-action="delete"] { color: var(--red); }
.admin-menu-item[data-action="delete"] svg { color: var(--red); }
.admin-menu-item[data-action="delete"]:hover { background: rgba(239,68,68,0.12); }

/* Generate tab tier status banner */
.gen-tier {
  margin-bottom: 18px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.gen-tier-muted {
  border-left-color: var(--text3);
  color: var(--text3);
}
/* Free builds all used — stronger visual so the blocked state reads at a glance */
.gen-tier-exhausted {
  border-left-color: var(--red);
  background: rgba(239,68,68,0.08);
  color: var(--text);
}

/* Free-plan 2-week preview notice (generate tab + import modal) */
.gen-demo-preview {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.gen-demo-preview-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.gen-demo-preview-hd svg { width: 15px; height: 15px; }
.gen-demo-preview-bd {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

/* Demo-preview value panel (import modal / success modal) — sells the
   full-length unlock instead of just warning "this is only 2 weeks". */
.gen-demo-value {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface2);
  border-radius: 0 var(--radius) var(--radius) 0;
  text-align: left;
}
.gen-demo-value-bd {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 8px;
}
.gen-demo-value-feats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.gen-demo-value-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}
.gen-demo-value-feat svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}
.gen-demo-value-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.gen-demo-value-actions .btn-primary,
.gen-demo-value-actions .btn-secondary {
  flex: 1;
  justify-content: center;
  padding: 8px 10px;
  font-size: 13px;
  white-space: normal;
  text-align: center;
}
.gen-demo-value-unlock {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
}
/* Exhausted free builds — red accent to differentiate from the live preview notice */
.gen-demo-preview.gen-demo-exhausted {
  border-left-color: var(--red);
  background: rgba(239,68,68,0.08);
}
.gen-demo-preview.gen-demo-exhausted .gen-demo-preview-hd { color: var(--red); }

/* 2-week preview tag on programme cards */
.preview-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(234,179,8,0.15);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* =====================================================
   FULL-PAGE "PROGRAM BEING BUILT" LOADER (AI generation)
   ===================================================== */
.build-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--brutal-bg);
  font-family: var(--brutal-mono);
  color: var(--brutal-fg);
}
.build-overlay-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--brutal-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--brutal-border) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
}
.build-overlay-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  border: 2px solid var(--brutal-border);
  background: var(--brutal-bg2);
  box-shadow: 8px 8px 0 rgba(249,115,22,0.18);
  padding: 34px 30px 28px;
  text-align: center;
  animation: buildCardIn 0.22s ease-out;
}
@keyframes buildCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.build-overlay-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brutal-accent);
  font-weight: 800;
  margin-bottom: 20px;
}
.build-overlay-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brutal-accent);
  color: var(--brutal-accent);
  animation: buildPulse 1.1s ease-in-out infinite;
}
.build-overlay-icon svg { width: 30px; height: 30px; }
@keyframes buildPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(249,115,22,0.5); }
  50%      { transform: scale(1.08); box-shadow: 0 0 22px 4px rgba(249,115,22,0.35); }
}
.build-overlay-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.build-overlay-msg {
  min-height: 20px;
  font-size: 14px;
  color: var(--brutal-fg);
  opacity: 0.7;
  margin-bottom: 22px;
}
.build-overlay-elapsed {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brutal-accent);
  opacity: 0.9;
}
.build-overlay-track {
  height: 8px;
  background: var(--brutal-bg);
  border: 1px solid var(--brutal-border);
  overflow: hidden;
  position: relative;
}
.build-overlay-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 42%;
  background: var(--gradient-accent);
  animation: buildSlide 1.15s ease-in-out infinite;
}
@keyframes buildSlide {
  0%   { left: -42%; }
  100% { left: 100%; }
}
.build-overlay-foot {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--brutal-fg);
  opacity: 0.5;
}

/* Preview-end "Next" button accent on the training dashboard */
.dash-nav-preview-end {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(249,115,22,0.18);
}

/* =====================================================
   FULLSCREEN UPGRADE GATE — 2-week preview complete
   ===================================================== */
.preview-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-family: var(--brutal-mono);
  color: var(--brutal-fg);
}
.preview-end-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--brutal-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--brutal-border) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.25;
  pointer-events: none;
}
.preview-end-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  border: 2px solid var(--brutal-accent);
  background: var(--brutal-bg2);
  box-shadow: 10px 10px 0 var(--brutal-accent);
  padding: 34px 30px 26px;
  text-align: center;
  animation: buildCardIn 0.22s ease-out;
}
.preview-end-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brutal-accent);
  font-weight: 800;
  margin-bottom: 18px;
}
.preview-end-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 0 18px rgba(249,115,22,0.4);
}
.preview-end-icon svg { width: 28px; height: 28px; }
.preview-end-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}
.preview-end-sub {
  font-size: 14px;
  line-height: 1.6;
  color: var(--brutal-fg);
  opacity: 0.75;
  margin: 0 0 20px;
}
.preview-end-feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}
.preview-end-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--brutal-fg);
  padding: 8px 12px;
  border: 1px solid var(--brutal-border);
  background: var(--brutal-bg);
}
.preview-end-feat svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--brutal-accent);
}
.preview-end-actions { display: flex; flex-direction: column; gap: 10px; }
.preview-end-actions .btn-primary,
.preview-end-actions .btn-secondary {
  width: 100%;
  font-family: var(--brutal-mono);
  font-weight: 800;
  letter-spacing: 0.05em;
}
.preview-end-later {
  margin-top: 6px;
  background: none;
  border: none;
  padding: 8px;
  font-family: var(--brutal-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--brutal-fg);
  opacity: 0.55;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.12s;
}
.preview-end-later:hover { opacity: 1; }

/* =====================================================
   ARC INTERIOR — landing personality brought in-app
   (header kicker, mono section labels, card accents)
   ===================================================== */
:root {
  --arc-mono: var(--brutal-mono);
  --arc-accent: #f97316;
}

/* ── Header kicker ──────────────────────────────────── */
.header-kicker {
  font-family: var(--arc-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--arc-accent);
  display: block;
  line-height: 1;
  margin-bottom: 3px;
}

/* ── Section labels → mono uppercase kickers ────────── */
.dh-section-label,
.stab-section-title {
  font-family: var(--arc-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--arc-accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stab-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stab-section-title::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--arc-accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.dh-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.dh-section-label::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--arc-accent);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(249,115,22,0.5);
}

/* ── Dashboard cards ──────────────────────────────────── */
.dh-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.dh-cycle-card {
  border-left: none;
}
.dh-cycle-card.dh-cycle-active {
  border-color: rgba(249,115,22,0.5);
  box-shadow: 0 4px 24px rgba(249,115,22,0.12);
}
.dh-action-highlight {
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, #f97316 5%, var(--surface)) 100%);
  border-color: color-mix(in srgb, #f97316 22%, var(--border));
}
.dh-action-highlight:hover {
  border-color: var(--arc-accent);
  background: linear-gradient(135deg, var(--surface2) 0%, color-mix(in srgb, #f97316 9%, var(--surface2)) 100%);
  box-shadow: 0 0 20px rgba(249,115,22,0.14);
}

/* ── AI build CTA button (orange mono, ARC signature) ── */
.btn-arc {
  background: var(--gradient-orange);
  font-family: var(--arc-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  box-shadow: 0 2px 14px rgba(249,115,22,0.28);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.btn-arc:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(249,115,22,0.38);
}

/* ── Programme card titles (generate tab) ───────────── */
.gen-card-title {
  font-family: var(--arc-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--arc-accent);
  font-weight: 800;
}
.gen-card {
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ── Tier status banner → orange accent ─────────────── */
.gen-tier {
  border-left: 3px solid var(--arc-accent);
}

/* ── Action card labels → mono accent ───────────────── */
.dh-action-label {
  font-family: var(--arc-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== AUTH VIEW (brutalist, matches landing) ===== */
.auth-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  font-family: var(--brutal-mono);
  color: var(--brutal-fg);
  background: var(--brutal-bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  background: var(--brutal-bg2);
  border: 2px solid var(--brutal-border);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--brutal-accent);
}
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: var(--brutal-accent);
  margin-bottom: 10px;
}
.auth-title { font-size: 30px; font-weight: 900; letter-spacing: 0.02em; margin: 0 0 8px; }
.auth-sub { font-size: 13px; color: rgba(242,240,230,0.65); margin: 0; line-height: 1.5; }
.auth-view .auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brutal-accent);
  border: 2px solid var(--brutal-accent);
  border-radius: 8px;
  color: #fff;
  box-shadow: none;
}
.auth-card .form-field { margin-bottom: 16px; }
.auth-card .form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--brutal-fg);
  margin-bottom: 7px;
}
.auth-card .gen-input {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--brutal-mono);
  font-size: 15px;
  color: var(--brutal-fg);
  background: var(--brutal-bg);
  border: 2px solid var(--brutal-border);
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.auth-card .gen-input::placeholder { color: rgba(242,240,230,0.35); }
.auth-card .gen-input:focus {
  outline: none;
  border-color: var(--brutal-accent);
  box-shadow: 3px 3px 0 var(--brutal-accent);
}
.auth-error { display: none; color: #ff6b6b; font-size: 13px; margin: 0 0 14px; text-align: center; }
.auth-card .consent-field { margin-bottom: 10px; }
.auth-card .consent-field .consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: rgba(242,240,230,0.8);
  margin-bottom: 0;
  cursor: pointer;
}
.auth-card .consent-field .consent input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--brutal-accent);
  cursor: pointer;
}
.auth-card .consent-field .consent a { color: var(--brutal-accent); text-decoration: underline; }
.auth-card .consent-field .consent .consent-text { flex: 1 1 auto; min-width: 0; }

.terms-card .terms-links { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; }
.terms-card .terms-link { text-align: center; text-decoration: none; display: block; }
.auth-submit {
  width: 100%;
  font-family: var(--brutal-mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  padding: 15px 22px;
  border: 2px solid var(--brutal-accent);
  background: var(--brutal-accent);
  color: var(--accent-ink);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.15s;
}
.auth-submit:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--brutal-fg); }
.auth-submit:active { transform: translate(1px, 1px); box-shadow: none; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-recovery {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: var(--brutal-bg);
  border: 2px solid var(--brutal-accent);
  border-radius: 6px;
}
.auth-recovery-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--brutal-accent);
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 12px;
}
.auth-recovery-warn svg { width: 16px; height: 16px; flex-shrink: 0; }
.auth-recovery-text {
  font-family: var(--brutal-mono);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  background: var(--brutal-bg2);
  border: 1px solid var(--brutal-border);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 14px;
}
.auth-footer { text-align: center; font-size: 13px; color: rgba(242,240,230,0.6); margin-top: 22px; }
.auth-footer p { margin: 0 0 6px; }
.auth-footer a { color: var(--brutal-accent); text-decoration: none; font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }
.auth-forgot a, .auth-back a { color: rgba(242,240,230,0.5); font-size: 12px; }
.auth-forgot a:hover, .auth-back a:hover { color: var(--brutal-accent); }
.auth-back { margin-top: 18px; }
