:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #334155;
  --accent: #22c55e;
  --accent-dim: #16a34a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --danger: #f87171;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

.header {
  padding: 1rem 1.25rem 0.5rem;
  padding-top: max(1rem, env(safe-area-inset-top));
}

.header__brand { display: flex; align-items: center; gap: 0.75rem; }
.header__logo { font-size: 2rem; }
.header__title { font-size: 1.25rem; font-weight: 700; }
.header__subtitle { font-size: 0.8rem; color: var(--muted); }

.main {
  flex: 1;
  padding: 0 1.25rem 6rem;
  overflow-y: auto;
}

.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--surface2);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.nav__btn {
  flex: 1;
  padding: 0.85rem 0.5rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}

.card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--accent);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.exercise {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface2);
}

.exercise:last-child { border-bottom: none; }

.exercise__name { font-weight: 600; font-size: 0.9rem; }
.exercise__detail { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }

.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.hero h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.hero p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--surface2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.chip--selected {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.btn {
  display: block;
  width: 100%;
  padding: 0.95rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn--primary {
  background: var(--accent);
  color: #052e16;
}

.btn--secondary {
  background: var(--surface2);
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stats--4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 380px) {
  .stats--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.macros-goal {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin: -0.35rem 0 1rem;
  line-height: 1.4;
}

.stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.stat__value { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.stat__label { font-size: 0.65rem; color: var(--muted); margin-top: 0.2rem; }

.meal {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--surface2);
}

.meal:last-child { border-bottom: none; }
.meal__time { font-size: 0.7rem; color: var(--accent); font-weight: 600; }
.meal__name { font-weight: 600; margin: 0.15rem 0; }
.meal__items { font-size: 0.8rem; color: var(--muted); }

.meal__compose {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.diary-ingredient {
  display: grid;
  grid-template-columns: 1fr 72px 20px 32px;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.diary-ingredient__product {
  width: 100%;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
}

.diary-ingredient__grams {
  width: 100%;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
}

.diary-ingredient__unit {
  font-size: 0.75rem;
  color: var(--muted);
}

.diary-ingredient__remove {
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-radius: 8px;
  height: 32px;
  cursor: pointer;
  font-size: 1.1rem;
}

.diary-preview {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.diary-preview__lines {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.diary-preview__total {
  font-size: 0.88rem;
  color: #86efac;
}

.diary-preview__empty {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.food-source-note {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.streak-card {
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(239, 68, 68, 0.06));
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.streak-card--compact {
  padding: 0.7rem 0.85rem;
}

.streak-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.streak-card__hero {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.streak-fire {
  font-size: 2rem;
  line-height: 1;
}

.streak-card__num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fdba74;
  line-height: 1;
}

.streak-card__label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.streak-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.streak-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(251, 146, 60, 0.25);
  color: #fdba74;
}

.streak-badge--gold {
  background: rgba(250, 204, 21, 0.25);
  color: #fde047;
}

.streak-calendar-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.streak-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.streak-calendar--compact .streak-day__wd {
  display: none;
}

.streak-day {
  text-align: center;
  padding: 0.35rem 0.2rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  min-height: 42px;
}

.streak-day__wd {
  display: block;
  font-size: 0.55rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.streak-day__num {
  font-size: 0.8rem;
  font-weight: 700;
}

.streak-day--done {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.streak-day--miss {
  opacity: 0.55;
}

.streak-day--today {
  box-shadow: 0 0 0 2px var(--accent);
}

.streak-day--future {
  opacity: 0.25;
}

.streak-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.streak-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.2rem;
  vertical-align: middle;
}

.streak-dot--done {
  background: #22c55e;
}

.streak-dot--miss {
  background: var(--border);
}

.streak-dot--today {
  background: var(--accent);
}

.streak-hint {
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0.5rem 0 0;
  line-height: 1.35;
}

.weekday-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.weekday-chip {
  min-width: 2.6rem;
  padding: 0.45rem 0.55rem;
}

.weekday-hint {
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0.35rem 0 0;
}

.warning {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #fecaca;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.day-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.day-tab {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.day-tab--active {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface2);
  font-size: 0.9rem;
}

.profile-row span:last-child { color: var(--muted); }

.step-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface2);
}

.step-dot--active { background: var(--accent); }

.macro-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  margin-top: 0.35rem;
  overflow: hidden;
}

.macro-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.nav__btn { font-size: 0.65rem; padding: 0.75rem 0.25rem; }

.premium-lock {
  opacity: 0.55;
  position: relative;
}

.premium-lock::after {
  content: '🔒 Premium';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  background: #854d0e;
  color: #fef08a;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.set-check {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.set-check:checked + .set-label { text-decoration: line-through; color: var(--muted); }

.set-label { font-size: 0.85rem; flex: 1; }

.exercise__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm--accent { border-color: var(--accent); color: var(--accent); }

.progress-ring {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, var(--safe-bottom));
}

.modal__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-hint {
  font-size: 0.8rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.video-thumb-link {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.video-thumb {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg);
}

.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.timer-bar {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 2px solid var(--accent);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.timer-bar[hidden] { display: none; }

.timer-bar__label { font-size: 0.7rem; color: var(--muted); display: block; }
.timer-bar__time { font-size: 1.5rem; font-weight: 700; color: var(--accent); }

.timer-bar__actions { display: flex; gap: 0.4rem; }

.timer-bar__btn {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.timer-bar__btn--primary { background: var(--accent); color: #052e16; border-color: var(--accent); }

.timer-bar--done .timer-bar__time { color: #fbbf24; animation: pulse 0.5s infinite; }

@keyframes pulse {
  50% { opacity: 0.6; }
}

.sub-nav {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.sub-nav__btn {
  flex: 1;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.sub-nav__btn--active {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

.phase-block { margin-bottom: 0.75rem; }

.phase-block__head {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0;
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.exercise--warmup { border-left: 3px solid #fbbf24; padding-left: 0.5rem; }

.exercise--cooldown { border-left: 3px solid #60a5fa; padding-left: 0.5rem; }

.exercise__badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  vertical-align: middle;
}

.exercise__recommend {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.35rem 0;
  line-height: 1.4;
}

.phase-block__hint {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.35rem;
}

.phase-block__hint--main {
  color: #86efac;
}

.exercise__howto {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0.35rem 0;
  font-style: italic;
}

.photo-preview {
  width: 100%;
  border-radius: 10px;
  margin-top: 0.75rem;
  max-height: 200px;
  object-fit: cover;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.ach-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ach-badge--on { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--accent); }
.ach-badge--off { background: var(--bg); color: var(--muted); border: 1px solid var(--surface2); }

.toast-achievement {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  z-index: 300;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ex-anim__title { font-weight: 700; margin-bottom: 0.5rem; }
.ex-anim__visual {
  background: var(--bg);
  border-radius: 12px;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}
.ex-anim-svg { width: 100%; height: auto; max-height: 180px; display: block; }
.ex-anim__steps {
  font-size: 0.85rem;
  color: var(--muted);
  padding-left: 1.1rem;
  line-height: 1.5;
}
.ex-anim__steps li { margin-bottom: 0.35rem; }

.recipe-ingredients {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0.35rem 0;
}
.recipe-card { padding-bottom: 0.75rem; border-bottom: 1px solid var(--surface2); }

.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--surface2);
}

.reminder-row:last-of-type { border-bottom: none; }

.reminder-row__info { flex: 1; min-width: 0; }

.reminder-row__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.reminder-row__hint {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
  line-height: 1.3;
}

.reminder-row__time {
  flex-shrink: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
}

.card--position {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.week-grid {
  display: grid;
  gap: 0.35rem;
}

.week-cell {
  text-align: center;
  padding: 0.55rem 0.25rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--surface2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.week-cell--done { background: rgba(34, 197, 94, 0.2); border-color: var(--accent); color: var(--accent); }
.week-cell--partial { background: rgba(251, 191, 36, 0.15); border-color: #fbbf24; color: #fbbf24; }
.week-cell--active { outline: 2px solid var(--accent); outline-offset: 2px; }

.week-cell__pct {
  display: block;
  font-size: 0.65rem;
  margin-top: 0.15rem;
  opacity: 0.9;
}

.workout-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.workout-actions .btn--primary {
  background: #16a34a;
}

.summary-hero {
  text-align: center;
  padding: 0.5rem 0;
}

.summary-hero__pct {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.summary-hero__label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.exercise__load {
  font-size: 0.82rem;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  margin: 0.4rem 0 0.2rem;
  line-height: 1.35;
}

.exercise__load-tip {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.card--journey {
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.06);
}

.journey-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.journey-facts span {
  font-size: 0.7rem;
  background: var(--bg);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: var(--muted);
}

.sub-card {
  border: 1px solid var(--accent);
  background: rgba(34, 197, 94, 0.08);
}

.sub-card--active { border-color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

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

.sync-status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.main--timer { padding-bottom: 9rem; }

/* ——— Workout preview & session ——— */
.card--preview { border: 1px solid var(--surface2); }
.card--session {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.06) 0%, var(--surface) 120px);
}

.preview-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.35rem 0 1rem;
  line-height: 1.45;
}

.workout-preview { display: flex; flex-direction: column; gap: 1.25rem; }

.preview-phase__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.preview-phase__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.preview-phase__tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.preview-phase__tag--main {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.preview-phase__count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
}

.preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}

.preview-item--warmup { border-left: 3px solid #fbbf24; }
.preview-item--main { border-left: 3px solid var(--accent); }
.preview-item--cooldown { border-left: 3px solid #60a5fa; }

.preview-item__num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.preview-item__body { flex: 1; min-width: 0; }

.preview-item__name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
}

.preview-item__meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.preview-item__weight {
  font-size: 0.72rem;
  font-weight: 600;
  color: #86efac;
  margin-top: 0.25rem;
}

.preview-item__tech { flex-shrink: 0; }

/* Active session */
.session-shell { margin-top: 0.5rem; }

.session-header {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--surface2);
}

.session-header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.session-header__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.session-header__pct {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.session-track {
  display: flex;
  gap: 4px;
  height: 6px;
}

.session-seg {
  flex: 1;
  border-radius: 3px;
  background: var(--surface2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.session-seg--done { background: var(--accent); }
.session-seg--current {
  background: #86efac;
  transform: scaleY(1.35);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.session-header__sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.session-card {
  padding: 1.25rem 1rem 1rem;
  background: var(--bg);
  border-radius: 18px;
  border: 1px solid var(--surface2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.session-card--main {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.08);
}

.session-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.session-phase-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
}

.session-phase-pill--warmup { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.session-phase-pill--main { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.session-phase-pill--cooldown { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }

.session-card__step {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.session-card__title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.session-card__scheme {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.session-card__recommend {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.session-card__howto {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.session-card__sets-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.session-card__complete-msg {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.75rem 0 0;
  padding: 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 10px;
}

/* Load / weight card */
.load-card {
  margin: 0.85rem 0 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.load-card--simple {
  background: var(--bg);
  border-color: var(--surface2);
}

.load-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.load-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #86efac;
}

.load-card__edit {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
}

.load-card__edit:hover { color: var(--accent); border-color: var(--accent); }

.load-card__equip-name {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.load-equip-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.load-equip-tab {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.load-equip-tab--active {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.load-card__weight-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.load-card__value {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
}

.load-card__unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.load-card__action {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.load-card__status {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
}

.load-card__status-icon {
  flex-shrink: 0;
  font-weight: 700;
}

.load-card__status--steady { color: var(--muted); }
.load-card__status--learn { color: #93c5fd; background: rgba(96, 165, 250, 0.1); }
.load-card__status--ready { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.load-card__status--deload { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

.load-card__editor {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--surface2);
}

.load-card__editor-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.load-card__editor-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.load-card__input {
  flex: 1;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.load-card__editor-hint {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.sets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.set-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 4.25rem;
  padding: 0.55rem 0.4rem;
  border-radius: 14px;
  border: 2px solid var(--surface2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.set-pill:active { transform: scale(0.97); }

.set-pill--done {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.18);
  color: var(--accent);
}

.set-pill__num {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.set-pill--done .set-pill__num { color: var(--accent); }

.set-pill__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.set-pill--done .set-pill__label {
  text-decoration: line-through;
  opacity: 0.85;
}

.session-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface2);
}

.btn--compact {
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  width: auto;
  display: inline-block;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--surface2);
  color: var(--muted);
  width: auto;
  display: inline-block;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

.session-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.session-nav .btn--primary {
  flex: 1;
  max-width: 12rem;
  margin-left: auto;
}

.session-nav__hint {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  flex: 1;
}

.session-done-btn { margin-top: 0.5rem; }

.session-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
