/* Gentle Reminder Club palette: blue #2F5CB5, cream #F7F2EE, pink #FFD6EA, star yellow #EFB511 */
:root {
  --bg: #f7f2ee;
  --surface: #ffffff;
  --surface-2: #f2ebe5;
  --text: #1c1c1c;
  --muted: #6e6762;
  --border: #e8dfd7;
  --accent: #2f5cb5;
  --accent-strong: #244a94;
  --accent-soft: #e3eaf7;
  --on-accent: #ffffff;
  --pink: #ffd6ea;
  --on-pink: #2f5cb5;
  --star: #efb511;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --ok: #2f5cb5;
  --logo: url('../img/logo.png');
  --shadow: 0 1px 2px rgb(47 40 30 / 0.05), 0 2px 10px rgb(47 40 30 / 0.05);
  --radius: 16px;
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a2b;
    --surface: #1c2438;
    --surface-2: #252f47;
    --text: #f7f2ee;
    --muted: #a7aec2;
    --border: #313c57;
    --accent: #8fb0f0;
    --accent-strong: #b3caf5;
    --accent-soft: #24345a;
    --on-accent: #10172a;
    --pink: #4a3049;
    --on-pink: #ffd6ea;
    --star: #f2c23d;
    --danger: #fb923c;
    --danger-soft: #3a2116;
    --ok: #8fb0f0;
    --logo: url('../img/logo-white.png');
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Epilogue, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
p { margin: 0 0 10px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 12px 4px; }
.pre { white-space: pre-wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Layout ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.shell { min-height: 100vh; }
.main {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* GRC logo; swaps to the white version in dark mode */
.logo {
  display: block; aspect-ratio: 2 / 1; width: 132px;
  background: var(--logo) no-repeat center / contain;
}
.logo-lg { width: 220px; margin: 0 auto 4px; }
.app-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}
.topbar { display: flex; align-items: center; justify-content: center; padding: 10px 16px 0; }
.topbar .logo { width: 104px; }
.topbar-brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.topbar .app-label { font-size: 10px; }
@media (min-width: 900px) { .topbar { display: none; } }

/* Mobile: bottom tab bar */
.sidebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.sidebar .sidebar-brand, .sidebar-foot { display: none; }
.nav-links { display: flex; height: var(--nav-h); }
.nav-link {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 12px; font-weight: 500;
}
.nav-link.active { color: var(--accent); }
.nav-icon { font-size: 20px; line-height: 1; }

/* Desktop: sidebar */
@media (min-width: 900px) {
  .sidebar {
    top: 0; right: auto; width: 230px; height: auto; padding: 22px 14px;
    border-top: 0; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 22px;
  }
  .sidebar .sidebar-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 10px; }
  .nav-links { flex-direction: column; height: auto; gap: 4px; }
  .nav-link {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--text);
  }
  .nav-link:hover { background: var(--surface-2); }
  .nav-link.active { background: var(--pink); color: var(--on-pink); font-weight: 600; }
  .nav-icon { font-size: 17px; }
  .sidebar-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 0 10px; }
  .main { margin-left: 230px; padding: 32px 40px 48px; max-width: 980px; }
  @supports (margin-left: max(0px)) {
    .main { margin-left: max(230px, calc(230px + (100vw - 230px - 980px) / 2)); }
  }
}

/* ---------- Header ---------- */
.page-header { display: flex; flex-direction: column; gap: 6px; }
.page-header-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { font-size: 14px; font-weight: 500; }
.title-with-avatar { display: inline-flex; align-items: center; gap: 12px; }
.title-input {
  font: inherit; color: inherit; border: 1px solid transparent; background: transparent;
  border-radius: 8px; padding: 2px 6px; margin-left: -7px; width: 100%; max-width: 520px;
}
.title-input:hover, .title-input:focus { border-color: var(--border); background: var(--surface); outline: none; }
.notice { background: var(--accent-soft); color: var(--accent-strong); padding: 8px 12px; border-radius: 10px; font-size: 13px; }

/* ---------- Cards & lists ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.card-head h3 { margin: 0; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.row-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text);
  text-align: left; width: 100%; font: inherit; cursor: pointer;
}
.row-card:hover { border-color: var(--accent); }
.row-title { font-weight: 600; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--pink); color: var(--on-pink);
}
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.video-dot { color: var(--accent); font-size: 11px; margin-left: 4px; }
.date-badge {
  width: 46px; flex: none; text-align: center; border-radius: 10px; padding: 4px 0;
  background: var(--surface-2); line-height: 1.1;
}
.date-badge span { display: block; font-weight: 700; font-size: 17px; }
.date-badge small { color: var(--muted); font-size: 11px; text-transform: uppercase; }

.info-card { display: flex; flex-direction: column; gap: 14px; }
.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }

.empty {
  text-align: center; padding: 36px 20px; border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.empty-title { font-weight: 600; font-size: 17px; }
.empty .row-gap { justify-content: center; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.tag-soft { background: var(--surface-2); color: var(--muted); }

/* ---------- Tabs, chips, filters ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  font: inherit; font-weight: 500; background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.filters { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Forms ---------- */
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.search { background: var(--surface); }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 13px; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.form-error { color: var(--danger); font-size: 14px; }
.switch { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  font: inherit; background: none; border: 0; cursor: pointer; color: var(--muted);
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 16px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.sm { width: 28px; height: 24px; font-size: 10px; }
.link-btn { font: inherit; font-size: 14px; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-align: left; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--surface); width: 100%; max-height: 92vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: slide-up 0.18s ease-out;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { max-width: 520px; border-radius: 18px; padding: 22px 24px; }
  .modal-wide { max-width: 640px; }
}

.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; }
.pick-item {
  font: inherit; text-align: left; display: flex; flex-direction: column; gap: 1px; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; color: var(--text);
}
.pick-item:hover { background: var(--surface-2); border-color: var(--border); }
.pick-name { font-weight: 600; }

.media { border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.media iframe, .media img { width: 100%; height: 100%; border: 0; object-fit: contain; display: block; }

/* ---------- Routine editor ---------- */
.routine-meta { display: flex; flex-direction: column; gap: 12px; }
.notes-input { font-size: 14px; }
.days { display: grid; gap: 14px; }
@media (min-width: 1100px) { .days { grid-template-columns: 1fr 1fr; align-items: start; } }
.day { display: flex; flex-direction: column; gap: 8px; }
.day-head { display: flex; align-items: center; gap: 6px; }
.day-name {
  font-size: 17px; font-weight: 700; border-color: transparent; background: transparent; padding: 4px 6px; margin-left: -6px;
}
.day-name:hover { border-color: var(--border); }
.ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-item { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 8px 6px 8px 10px; }
.ex-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface); flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted);
}
.ex-main {
  flex: 1; min-width: 0; font: inherit; text-align: left; background: none; border: 0; padding: 0;
  color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.ex-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.spec { font-size: 12px; background: var(--surface); border-radius: 6px; padding: 1px 8px; color: var(--muted); }
.spec b { color: var(--text); }
.ex-move { display: flex; flex-direction: column; }
.add-day {
  font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; border-style: dashed;
  background: transparent; box-shadow: none; padding: 18px; width: 100%;
}
.add-day:hover { background: var(--accent-soft); }
.danger-zone { display: flex; justify-content: flex-end; padding-top: 8px; }

/* ---------- Session logger ---------- */
.logger { display: flex; flex-direction: column; gap: 14px; }
.block { display: flex; flex-direction: column; gap: 10px; }
.block-head { display: flex; gap: 6px; align-items: flex-start; }
.prev { color: var(--accent-strong); margin-top: 2px; }
.sets { display: flex; flex-direction: column; gap: 6px; }
.set-row { display: grid; grid-template-columns: 40px 1fr 1fr 48px; gap: 8px; align-items: center; }
.set-row input { text-align: center; font-weight: 600; padding: 10px 6px; }
.set-head { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; text-transform: uppercase; }
.set-num {
  font: inherit; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 0;
  border-radius: 8px; height: 44px; cursor: pointer;
}
.check {
  height: 44px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 18px; font-weight: 700; cursor: pointer;
}
.check.on { background: var(--ok); border-color: var(--ok); color: var(--on-accent); }
.set-row.done input { background: var(--surface-2); }
.save-bar {
  position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; box-shadow: 0 6px 24px rgb(0 0 0 / 0.12);
}
.save-bar .muted { white-space: nowrap; }
@media (min-width: 900px) { .save-bar { bottom: 16px; } }
.rest-timer {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  top: calc(12px + env(safe-area-inset-top)); width: min(420px, calc(100% - 32px));
  background: var(--text); color: var(--bg); border-radius: 14px; padding: 10px 8px 10px 16px;
  display: flex; align-items: center; justify-content: space-between; overflow: hidden;
  font-weight: 700; font-size: 17px; box-shadow: 0 8px 30px rgb(0 0 0 / 0.25);
}
.rest-timer .icon-btn { color: inherit; }
.rest-timer.over { background: var(--star); color: #1c1c1c; }
.rest-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width 0.25s linear; }

/* ---------- Session view & progress ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; }
.stat-num { font-size: 22px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.card-head select { width: auto; max-width: 100%; font-size: 14px; padding: 6px 10px; }

/* ---------- Feedback ---------- */
.spinner {
  width: 28px; height: 28px; margin: 40px auto; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--danger-soft); color: var(--text); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.toasts {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px));
}
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 500; font-size: 14px; box-shadow: 0 6px 24px rgb(0 0 0 / 0.2); }
.toast-error { background: var(--danger); color: #fff; }
@media (min-width: 900px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; }
.center { text-align: center; }

/* ---------- Agenda ---------- */
.agenda-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gcal-status { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gcal-btn { gap: 8px; }
.gdot { width: 8px; height: 8px; border-radius: 50%; background: #34a853; display: inline-block; flex: none; }
.gdot.off { background: var(--muted); }
.gdot.warn { background: var(--star); }

.week { padding: 0; overflow: hidden; display: none; }
.week-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.week-day { padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.week-day span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.week-day b { font-size: 18px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.week-day.today b { background: var(--accent); color: var(--on-accent); }
.week-body { position: relative; display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.hours { position: relative; }
.hours div { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.hours div:first-child { transform: none; }
.day-col { position: relative; border-left: 1px solid var(--border); cursor: copy; }
.day-col.today { background: color-mix(in srgb, var(--pink) 25%, transparent); }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); opacity: 0.6; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--star); z-index: 3; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--star); }
.cal-block {
  position: absolute; z-index: 2; border-radius: 8px; padding: 3px 6px; overflow: hidden; text-align: left;
  font: inherit; font-size: 12px; line-height: 1.25; display: flex; flex-direction: column; gap: 1px; cursor: pointer;
}
.cal-block b, .cal-block span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block span { opacity: 0.85; font-size: 11px; }
.cal-block.appt { background: var(--accent); color: var(--on-accent); border: 0; }
.cal-block.gevent { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border); }
.cal-block.clash { box-shadow: 0 0 0 2px var(--danger); }
.allday {
  font-size: 11px; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.daylist { display: flex; flex-direction: column; gap: 10px; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-chip {
  font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer;
  padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text);
}
.day-chip span { font-size: 11px; color: var(--muted); }
.day-chip b { font-size: 16px; }
.day-chip i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.day-chip i.has { background: var(--accent); }
.day-chip.today { border-color: var(--accent); }
.day-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day-chip.on span { color: inherit; }
.day-chip.on i.has { background: var(--on-accent); }
.day-title { margin: 4px 0 0; }
.agenda-item { align-items: stretch; }
.time-col { display: flex; flex-direction: column; justify-content: center; width: 76px; flex: none; white-space: nowrap; border-right: 2px solid var(--accent); padding-right: 8px; }
.time-col b { font-size: 14px; }
.time-col span { font-size: 12px; color: var(--muted); }
.gevent-row { background: var(--surface-2); box-shadow: none; }
.gevent-row .time-col { border-right-color: var(--border); }
.agenda-item.clash { border-color: var(--danger); }
.clash-text { color: var(--danger); font-weight: 600; }
.free-slot {
  font: inherit; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
  padding: 10px 14px; border-radius: var(--radius); border: 1.5px dashed var(--border); background: transparent; color: var(--muted);
}
.free-slot b { color: var(--accent); font-size: 13px; }
.free-slot:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (min-width: 900px) {
  .week { display: block; }
  .daylist { display: none; }
}

.warn-box {
  background: color-mix(in srgb, var(--star) 18%, var(--surface)); border: 1px solid var(--star);
  border-radius: 12px; padding: 10px 14px; font-size: 14px;
}
.warn-box ul { margin: 6px 0 0; padding-left: 18px; }
.ok-text { color: var(--accent); font-weight: 600; }
.repeat-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.weeks { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.weeks input { width: 72px; padding: 6px 8px; }
.scope, .log-from-appt { display: flex; flex-direction: column; gap: 6px; }
.log-from-appt { border-top: 1px solid var(--border); padding-top: 12px; }
.reply { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.reply-ok { background: #dcf3e3; color: #1e7a3c; }
.reply-no { background: var(--danger-soft); color: var(--danger); }
.reply-wait { background: var(--surface-2); color: var(--muted); }
.cal-block .reply { background: rgb(255 255 255 / 0.25); color: inherit; }

/* ---------- Packages ---------- */
.section-title { font-size: 18px; margin-top: 6px; }
.stat-num.due { color: var(--danger); }
.package-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.package-card {
  font: inherit; color: var(--text); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  border-top: 4px solid var(--accent);
}
.package-card:hover { border-color: var(--accent); }
.package-card.inactive { opacity: 0.6; }
.package-price { font-size: 22px; font-weight: 800; color: var(--accent); }
.alert-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); color: var(--text);
}
.alert-row:last-child { border-bottom: 0; }
.alert-row span.muted { flex: 1; }
.tag-warn { background: color-mix(in srgb, var(--star) 25%, var(--surface)); color: #7a5a00; }
.client-package { display: flex; flex-direction: column; gap: 10px; }
.client-package.done { opacity: 0.7; }
.pkg-left { text-align: right; line-height: 1.1; }
.pkg-left b { font-size: 26px; color: var(--accent); display: block; }
.pkg-left span { font-size: 12px; color: var(--muted); }
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pkg-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-ok { color: #1e7a3c; font-weight: 600; font-size: 14px; }
.pay-due { color: var(--danger); font-weight: 700; font-size: 14px; }
.more { position: relative; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 230px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}
.link-btn.danger { color: var(--danger); }

/* ---------- Today & reminders ---------- */
.today-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.pill-star { background: color-mix(in srgb, var(--star) 22%, var(--surface)); border-color: var(--star); }
.pill-warn { background: var(--pink); color: var(--on-pink); border-color: transparent; }
.today-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); }
.today-row:first-of-type { border-top: 0; }
.today-main { font: inherit; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.today-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.remind { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.preview-bubble {
  align-self: flex-start; max-width: 90%; background: #dcf8c6; color: #111; border-radius: 14px 14px 14px 4px;
  padding: 10px 14px; font-size: 14px; white-space: pre-wrap;
}

/* ---------- Login ---------- */
.google-btn { gap: 10px; background: var(--surface); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.login .link-btn.center { align-self: center; }

/* ---------- Programs (both sides) ---------- */
.badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.nav-icon { position: relative; }
.dot-badge {
  position: absolute; top: -6px; right: -10px; background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 16px;
}
.program-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.program-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); padding: 12px; }
.program-card:hover { border-color: var(--accent); }
.program-cover {
  aspect-ratio: 16 / 9; border-radius: 12px; background: var(--pink) center / cover no-repeat;
  background-image: linear-gradient(135deg, var(--pink), var(--accent-soft));
  display: flex; align-items: flex-start; justify-content: flex-end; padding: 8px;
}
.pt-banner { display: flex; align-items: center; gap: 12px; color: var(--text); background: var(--pink); border-color: transparent; }
.my-program { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.program-hero { display: flex; flex-direction: column; gap: 14px; }
.hero-cover { aspect-ratio: 16 / 7; border-radius: 12px; background: center / cover no-repeat; }
.session-row {
  font: inherit; color: var(--text); text-align: left; cursor: pointer; display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 0; border-radius: 12px; padding: 10px 12px; width: 100%;
}
.session-row .grow { display: flex; flex-direction: column; gap: 2px; }
.session-row.done { opacity: 0.75; }
.check-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); flex: none;
  display: grid; place-items: center; font-weight: 800; color: var(--on-accent);
}
.session-row.done .check-dot { background: var(--accent); border-color: var(--accent); }
.m-ex { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
.m-ex:first-of-type { border-top: 0; }
.m-ex-head { display: flex; gap: 10px; align-items: flex-start; }
.session-nav { padding-top: 4px; }
.question { display: flex; flex-direction: column; gap: 8px; }
.q-body { font-size: 15px; margin: 0; }
.q-answer { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.q-answer.new { box-shadow: 0 0 0 2px var(--star); }
.pex { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pex-head { display: flex; align-items: center; gap: 4px; }
.pex-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pex-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pex-fields input, .pex-notes { padding: 8px 10px; font-size: 15px; }

/* ---------- PDF / print ---------- */
.print-page { display: flex; flex-direction: column; gap: 14px; }
.print-head { display: flex; align-items: center; gap: 16px; }
.print-head .logo { width: 120px; flex: none; }
.print-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.tick-box::after { content: ''; display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 4px; }
@media print {
  .no-print, .toasts { display: none !important; }
  body { background: #fff; color: #111; }
  .main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .print-page .logo { background-image: url('../img/logo.png'); }
  .table th, .table td { border-bottom: 1px solid #ccc; }
  @page { margin: 14mm; }
}

/* ---------- Onboarding questionnaire ---------- */
.onboarding { max-width: 620px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.ob-card { display: flex; flex-direction: column; gap: 16px; padding: 22px 20px; }
.ob-progress { display: grid; grid-auto-flow: column; gap: 6px; }
.ob-progress span { height: 6px; border-radius: 999px; background: var(--border); }
.ob-progress span.on { background: var(--accent); }
.ob-lang { justify-content: center; }
.ob-q { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.ob-q:first-of-type { border-top: 0; }
.ob-label { font-weight: 600; font-size: 16px; }
.req { color: var(--danger); }
.chip-lg { padding: 9px 16px; font-size: 15px; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale-dot {
  font: inherit; font-weight: 700; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; padding: 0;
}
.scale-dot.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.answers { display: flex; flex-direction: column; gap: 10px; }
.answer-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--border); }
.answer-row.flag { background: color-mix(in srgb, var(--star) 15%, transparent); border-radius: 8px; padding: 6px 8px; }
.profile-banner { display: flex; align-items: center; gap: 12px; color: var(--text); background: color-mix(in srgb, var(--star) 20%, var(--surface)); border-color: var(--star); }
.alert-row.as-button { font: inherit; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; width: 100%; }
.ex-item.inactive { opacity: 0.55; }
.ig-card { display: flex; align-items: center; gap: 12px; color: var(--text); }
.ig-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.metric-tile { font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.metric-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stat-num small { font-size: 13px; font-weight: 600; color: var(--muted); }
.metric-tile b.down { color: #1e7a3c; }
.metric-tile b.up { color: var(--accent); }

/* ---------- Guided workout ---------- */
.guided {
  position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow: auto;
  display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.gw-head { display: flex; align-items: center; gap: 10px; max-width: 560px; width: 100%; margin: 0 auto; }
.gw-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.gw-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.gw-body { flex: 1; max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; justify-content: center; padding: 16px 0; }
.gw-body h1 { font-size: 30px; }
.gw-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.gw-set { font-size: 18px; font-weight: 600; color: var(--muted); }
.gw-target { display: flex; gap: 12px; }
.gw-target div { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; }
.gw-target b { font-size: 40px; line-height: 1.1; }
.gw-target span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.gw-notes { background: var(--pink); color: var(--on-pink); border-radius: 12px; padding: 10px 14px; margin: 0; }
.gw-main { padding: 16px; font-size: 17px; }
.gw-list { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }
.gw-list li { display: flex; flex-direction: column; }
.gw-big { font-size: 64px; }
.gw-ring { align-self: center; }
.gw-ring .ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.gw-ring .ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 64px 64px; transition: stroke-dashoffset 0.25s linear; }
.gw-ring .ring-text { font: 700 28px Epilogue, sans-serif; fill: var(--text); }
.day-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nav-link > span:last-child { white-space: nowrap; }
@media (max-width: 899px) {
  .nav-ext { display: none; }
  .nav-link { font-size: 11px; }
}

/* ---------- Community ---------- */
@media (max-width: 899px) {
  .nav-links { overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { flex: 1 0 68px; }
}
.channel-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.channel-card { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.channel-card:hover { border-color: var(--accent); }
.channel-emoji { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: var(--pink); display: grid; place-items: center; flex: none; }
.composer { display: flex; flex-direction: column; gap: 10px; }
.post { display: flex; flex-direction: column; gap: 10px; }
.post.pinned { border-color: var(--star); }
.post-head { display: flex; align-items: center; gap: 8px; }
.post-head .author { flex: 1; }
.post-body { font-size: 15px; }
.post-photo { width: 100%; max-height: 480px; object-fit: cover; border-radius: 12px; }
.author { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.coach { background: var(--accent); color: var(--on-accent); }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; }
.react {
  font: inherit; font-size: 15px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 3px 10px; cursor: pointer; opacity: 0.6;
}
.react.has, .react:hover { opacity: 1; }
.react.on { background: var(--pink); border-color: var(--pink); opacity: 1; }
.react span { font-size: 12px; font-weight: 700; }
.comments { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.comment { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form input { flex: 1; padding: 8px 12px; }
.photo-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-preview { position: relative; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.photo-preview .icon-btn { position: absolute; top: -10px; right: -10px; background: var(--surface); width: 26px; height: 26px; font-size: 12px; box-shadow: var(--shadow); }
.recipe-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.recipe-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); padding: 10px; }
.recipe-photo {
  aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(135deg, var(--pink), color-mix(in srgb, var(--star) 30%, var(--surface))) center / cover;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 8px;
}
.seal { background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.seal.static { font-size: 12px; }
.recipe { display: flex; flex-direction: column; gap: 12px; }
.recipe-hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; }
.recipe-cols ul, .recipe-cols ol { padding-left: 20px; margin: 6px 0; }
.coach-note { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; }
.coach-tools { border-top: 1px dashed var(--border); padding-top: 12px; }
.row-card.inactive { opacity: 0.55; }
.unit-input { display: flex; gap: 6px; }
.unit-input input { flex: 1; min-width: 0; }
.unit-input select { width: 76px; }
.unit-toggle { font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.template-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.template-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); border-left: 4px solid var(--accent); }
.template-card:hover { border-color: var(--accent); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.avatar-img { object-fit: cover; padding: 0; }
.avatar-picker { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.consent-box {
  max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; font-size: 14px; background: var(--surface-2);
}
.consent-check { align-items: flex-start; }
.consent-check span { font-weight: 500; font-size: 14px; }
.signature { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 22px; }
.balance-chip { font-weight: 600; }
.balance-card { display: flex; flex-direction: column; gap: 12px; border-left: 5px solid var(--accent); }
.balance-card.low { border-left-color: var(--star); }
.balance-main { display: flex; align-items: center; gap: 14px; }
.balance-num { font-size: 44px; font-weight: 800; color: var(--accent); line-height: 1; min-width: 56px; text-align: center; }

/* ---------- Excel import ---------- */
.import-summary { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; }
.match-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.match-row { display: grid; grid-template-columns: 1fr auto 1.4fr; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); }
.match-row.ok { border-color: color-mix(in srgb, #1e7a3c 40%, var(--border)); }
.match-row.check { border-color: var(--star); background: color-mix(in srgb, var(--star) 10%, var(--surface)); }
.match-row.new { border-style: dashed; }
.match-row select { padding: 6px 8px; font-size: 14px; }
.match-name { font-weight: 600; font-size: 14px; }
.match-arrow { color: var(--muted); }
@media (max-width: 600px) { .match-row { grid-template-columns: 1fr; } .match-arrow { display: none; } }
.ig-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ig-link svg { width: 16px; height: 16px; }
.topbar { position: relative; }
.ig-corner { position: absolute; right: 16px; top: 50%; transform: translateY(-30%); color: var(--muted); padding: 6px; }
.ig-corner svg { width: 20px; height: 20px; }
.phone-input { display: flex; gap: 6px; }
.phone-input select { width: 108px; flex: none; text-overflow: ellipsis; }
.phone-input input { flex: 1; min-width: 0; }
.request-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 5px solid var(--star); color: var(--text); }
.request-card.question { border-left-color: var(--accent); }
.request-card.question { flex-wrap: nowrap; text-align: left; }
.request-card .grow { text-align: left; }

/* My Training: day tabs and coloured blocks (Warm-up, Main, Finisher, Cool-down) */
.blk-warm   { --blk: #8a6700; --blk-on: #1c1c1c; --blk-fill: var(--star); --blk-soft: color-mix(in srgb, var(--star) 13%, var(--surface)); }
.blk-main   { --blk: var(--accent); --blk-on: var(--on-accent); --blk-fill: var(--accent); --blk-soft: var(--accent-soft); }
.blk-finish { --blk: #c2408a; --blk-on: #ffffff; --blk-fill: #d6559c; --blk-soft: color-mix(in srgb, var(--pink) 55%, var(--surface)); }
.blk-cool   { --blk: var(--muted); --blk-on: var(--surface); --blk-fill: var(--muted); --blk-soft: var(--surface-2); }
@media (prefers-color-scheme: dark) {
  .blk-warm { --blk: var(--star); }
  .blk-finish { --blk: #f08cc4; --blk-fill: #e070b0; --blk-on: #10172a; }
}

.day-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.day-tab.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.day-panel { display: flex; flex-direction: column; gap: 10px; }
.day-panel-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.day-panel-name { font-size: 18px; font-weight: 700; }

.blk { background: var(--blk-soft); border-left: 4px solid var(--blk-fill); border-radius: 12px; padding: 10px 12px; }
.blk-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blk); margin-bottom: 4px; }
.blk-ex { padding: 8px 0; }
.blk-ex + .blk-ex { border-top: 1px solid color-mix(in srgb, var(--blk-fill) 22%, transparent); }
.blk-ex-head { display: flex; align-items: flex-start; gap: 8px; }
.blk-ex-name { font-weight: 650; line-height: 1.3; }
.blk-ex-notes { font-size: 13px; font-style: italic; color: var(--muted); margin-top: 2px; }
.sets-pill {
  flex: none; background: var(--blk-fill); color: var(--blk-on); font-weight: 700; font-size: 14px;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* Routine editor: block headings between exercises */
.ex-block-label {
  list-style: none; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blk); border-left: 4px solid var(--blk-fill); padding: 2px 8px; margin: 10px 0 2px;
}

/* Client file: Client Information */
.client-info h3 { margin: 0 0 12px; }
.info-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 760px) { .info-split { grid-template-columns: 1fr; } }
.info-area { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.info-area.private { background: var(--surface-2); border-style: dashed; }
.area-head { display: flex; align-items: center; gap: 8px; }
.area-title { flex: 1; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.assess-list { display: flex; flex-direction: column; gap: 10px; }

/* Member: Services Catalog */
.service-list { display: flex; flex-direction: column; gap: 10px; }
.service-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.service-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.service-price b { font-size: 17px; color: var(--accent); }

/* Phones: the six member tabs fit without scrolling */
@media (max-width: 440px) {
  .member .nav-link { flex: 1 1 0; min-width: 0; font-size: 10px; letter-spacing: -0.01em; padding: 0 1px; }
  .member .nav-icon { font-size: 19px; }
}
.service-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.service-row + .service-row { border-top: 1px solid var(--border); }

/* ---------- Program builder ---------- */
.blk-power { --blk: #b4532a; --blk-on: #ffffff; --blk-fill: #e07a4a; --blk-soft: color-mix(in srgb, #e07a4a 12%, var(--surface)); }
@media (prefers-color-scheme: dark) { .blk-power { --blk: #f0a07a; --blk-on: #10172a; } }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.blk-label-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.blk-style { font-size: 12px; font-weight: 600; color: var(--blk); opacity: 0.85; }
.blk-notes { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.blk-tag { flex: none; font-size: 11px; font-weight: 800; color: var(--blk); border: 1.5px solid var(--blk-fill); border-radius: 6px; padding: 1px 5px; margin-top: 2px; }

.builder { display: flex; flex-direction: column; gap: 14px; }
.week-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.day-tab.echo { border-style: dashed; color: var(--muted); }
.echo-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.session-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.session-tab {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 140px; max-width: 220px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.session-tab b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.session-tab span { font-size: 12px; color: var(--muted); }
.session-tab.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.session-tab.add { justify-content: center; align-items: center; min-width: 110px; border-style: dashed; color: var(--accent); font-weight: 600; }

.session-editor { display: flex; flex-direction: column; gap: 12px; }
.session-editor.locked { opacity: 0.85; }
.session-head { display: flex; align-items: center; gap: 8px; }
.session-title { flex: 1; font-size: 18px; font-weight: 700; border: 1px solid transparent; background: transparent; padding: 6px 8px; border-radius: 8px; color: var(--text); }
.session-title:hover:not(:disabled), .session-title:focus { border-color: var(--border); background: var(--surface); }
.span-2 { grid-column: 1 / -1; }
.add-component { border-style: dashed; }

.comp { display: flex; flex-direction: column; gap: 8px; }
.comp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.comp-name {
  flex: 1 1 160px; min-width: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blk);
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px;
}
.comp-name:hover:not(:disabled), .comp-name:focus { border-color: color-mix(in srgb, var(--blk-fill) 40%, transparent); background: var(--surface); }
.comp-style { width: auto; font-size: 13px; padding: 4px 8px; }
.comp-rounds { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.comp-rounds input { width: 52px; padding: 4px 6px; }
.comp-actions { display: inline-flex; gap: 2px; margin-left: auto; }
.comp-notes { font-size: 13px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.pex-row { background: var(--surface); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.pex-name { display: flex; align-items: center; gap: 8px; }
.pex-actions { display: inline-flex; gap: 2px; }
.pex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.pex-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; }
.pex-grid input, .pex-grid select { padding: 5px 7px; font-size: 14px; }
.pex-grid label:has(.unit-input) { grid-column: span 2; }
.pex-row .pex-notes { font-size: 13px; padding: 5px 8px; }
.add-ex { align-self: flex-start; font-weight: 600; }

.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.comp-choice {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: var(--blk-soft); border: 1px solid color-mix(in srgb, var(--blk-fill) 35%, transparent); border-left: 4px solid var(--blk-fill);
  color: var(--text); font: inherit;
}
.comp-choice b { color: var(--blk); font-size: 15px; }
.comp-choice span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.comp-choice:hover { border-color: var(--blk-fill); }

.settings-toggle { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.preview-phone { max-width: 420px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--bg); }
.log-section { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blk); border-left: 4px solid var(--blk-fill); padding: 2px 10px; margin-top: 6px; }
.weekday-chips .chip { min-width: 46px; justify-content: center; }
.warn-text { color: var(--danger); font-size: 13px; margin-top: 4px; }
.week-dist { display: flex; flex-direction: column; gap: 8px; }
.week-dist-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.week-dist-row > b { min-width: 60px; font-size: 14px; }
.week-dist-days { display: flex; gap: 6px; flex-wrap: wrap; }
.schedule-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--pink); color: var(--on-pink); border-radius: 12px; padding: 10px 14px; }
.schedule-box { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--accent-soft); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }

/* Guided workout v2 */
.gw-overview { justify-content: flex-start; }
.gw-comps { display: flex; flex-direction: column; gap: 8px; }
.gw-comp { display: flex; align-items: center; gap: 10px; }
.gw-comp.complete { opacity: 0.7; }
.gw-comp-main { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; }
.gw-comp-tag { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blk); background: var(--blk-soft); border-left: 4px solid var(--blk-fill); padding: 4px 10px; border-radius: 8px; }
.gw-set { display: flex; align-items: center; gap: 6px; }
.gw-nav { display: flex; align-items: center; gap: 8px; }
.gw-summary { display: flex; gap: 12px; }
.gw-summary div { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; }
.gw-summary b { font-size: 32px; }
.gw-summary span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.gw-week { font-weight: 700; color: var(--accent); margin: 0; }
.gw-flash { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); padding: 8px 16px; border-radius: 999px; font-weight: 700; z-index: 5; box-shadow: var(--shadow); }
.adherence { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

/* My Training: weekly view */
.pw-title { margin: 2px 0 4px; font-size: 20px; }
.pw-weeknav { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.pw-weeknav .icon-btn { font-size: 22px; }
.pw-progress { display: flex; align-items: center; gap: 10px; }
.pw-progress .meter { flex: 1; }
.pw-sessions { display: flex; flex-direction: column; gap: 8px; }
.session-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.session-card.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.session-card.done { background: var(--surface-2); }
.sc-day { flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sc-day b { font-size: 20px; color: var(--accent); line-height: 1.1; }
.sc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-status { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.sc-status.ok { color: var(--accent); }
.sc-status.going { color: #b4532a; }
.status-banner { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.status-banner.ok { background: var(--accent-soft); color: var(--accent); }
.status-banner.going { background: color-mix(in srgb, #e07a4a 15%, var(--surface)); color: #b4532a; }

/* Store */
.buy-price b { font-size: 30px; color: var(--accent); }
.terms { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.buy-panel { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.essential-banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, var(--accent-soft), var(--pink)); border: 0; }
.essential-banner.on { background: var(--accent-soft); }
.essential-card .perks { margin: 0; padding-left: 20px; }
.purchases summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* ---------- GRC 2.0 · member navigation ---------- */
/* Phones and iPad portrait: five tabs, My Profile is the photo at the top right. */
.nav-short { display: none; }
.avatar-corner { position: absolute; right: 14px; top: 50%; transform: translateY(-30%); border-radius: 50%; padding: 2px; border: 2px solid transparent; }
.avatar-corner.on { border-color: var(--accent); }
@media (max-width: 899px) {
  .member .nav-wide { display: none; }
  .member .nav-link { flex: 1 1 0; min-width: 0; font-size: 11px; padding: 0 2px; }
  .member .nav-link .nav-full { display: none; }
  .member .nav-link .nav-short { display: inline; }
  .member .nav-link:not(:has(.nav-short)) .nav-full { display: inline; }
  .member .nav-icon { font-size: 20px; }
}

/* ---------- GRC 2.0 · My Profile ---------- */
.pf-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .pf-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.pf-card { display: flex; flex-direction: column; gap: 18px; }
.pf-top { display: flex; align-items: center; justify-content: space-between; }
.pf-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.pf-top .icon-btn { font-size: 18px; color: var(--muted); }
.pf-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pf-head .avatar { margin-bottom: 4px; }
.pf-name { font-size: 22px; font-weight: 700; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding-top: 14px; border-top: 1px solid var(--border); }
.pf-stats b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-stats span { color: var(--muted); font-size: 14px; }
.pf-empty { grid-column: 1 / -1; margin: 10px 0 0; }
.pf-menu { display: flex; flex-direction: column; padding-block: 6px; }
.pf-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; color: var(--text); min-height: 52px; }
.pf-row + .pf-row { border-top: 1px solid var(--border); }
.pf-row .grow { display: flex; flex-direction: column; gap: 1px; }
.pf-row-title { font-weight: 500; font-size: 16px; }
.pf-row:hover .pf-row-title { color: var(--accent); }
.pf-signout { align-self: center; margin-top: 10px; background: none; border: 0; color: var(--muted); font: inherit; padding: 10px; cursor: pointer; }
.pf-kv { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.pf-kv + .pf-kv { border-top: 1px solid var(--border); }

/* ---------- GRC 2.0 · My Training ---------- */
.mt-page { display: flex; flex-direction: column; gap: 16px; }
.mt-page-title { display: flex; align-items: baseline; justify-content: space-between; padding-top: 6px; }
.mt-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mt-program { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.mt-head { display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--surface-2); border: 0; border-radius: 14px; padding: 16px; font: inherit; color: var(--text); cursor: pointer; }
.mt-head .link-btn { align-self: flex-start; padding: 0; margin-top: 2px; }
.mt-title { font-size: 22px; font-weight: 700; line-height: 1.2; }
.mt-progress-line { display: flex; justify-content: space-between; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mt-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.mt-bar i { display: block; height: 100%; border-radius: 99px; background: var(--text); }
.mt-weeknav { display: flex; align-items: center; gap: 8px; }
.mt-week-name { font-size: 16px; }
.mt-list { display: flex; flex-direction: column; }
.mt-session { display: flex; align-items: center; gap: 14px; padding: 14px 4px; background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; color: var(--text); text-align: left; cursor: pointer; min-height: 60px; width: 100%; }
.mt-list .mt-session:last-child, .mt-weeks .mt-session:last-child { border-bottom: 0; }
.mt-session:hover b { color: var(--accent); }
.mt-session.static { cursor: default; }
.mt-session.current .mt-day { color: var(--accent); }
.mt-day { width: 44px; flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.mt-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mt-main b { font-weight: 600; font-size: 16px; }
.mt-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #2e7d4f; color: #2e7d4f; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.mt-check.big { width: 56px; height: 56px; font-size: 26px; align-self: center; }
@media (prefers-color-scheme: dark) { .mt-check { border-color: #7ccf9e; color: #7ccf9e; } }
.mt-session.going .muted { color: var(--accent); }
.mt-optional { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.mt-side { display: flex; flex-direction: column; gap: 8px; }
.mt-pt { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text); }
.mt-pt .grow { display: flex; flex-direction: column; }
.mt-explore { font-weight: 700; white-space: nowrap; }
.mt-weeks { display: flex; flex-direction: column; }
.mt-intro { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 18px; max-width: 60ch; }
.mt-intro h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; text-wrap: balance; }
.mt-paths { display: grid; gap: 16px; }
@media (min-width: 760px) { .mt-paths { grid-template-columns: 1fr 1fr; align-items: start; } }
.mt-path .perks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.mt-prices { display: flex; flex-direction: column; }
.mt-prices > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mt-prices > div:last-child { border-bottom: 0; }
.mt-preparing { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border: 0; }
.mt-sent { align-items: center; text-align: center; max-width: 520px; margin: 24px auto; }
.service-card.online { background: var(--surface-2); border-style: dashed; }
/* iPad landscape and computers: My Training in two columns (program | Flo and packages) */
.mt-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1100px) { .mt-page { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } .mt-page > .mt-col + .mt-col { padding-top: 40px; } }

/* ---------- GRC 2.0 · coach side ---------- */
.week-tab-title { display: block; font-size: 11px; font-weight: 500; opacity: 0.75; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-focus { width: 100%; margin-top: 10px; }
.lead-row { border: 1px solid var(--border); border-radius: 12px; }
.lead-row.fresh { border-left: 5px solid var(--accent); }
.lead-main { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.lead-detail { padding: 0 14px 14px; }
@media (max-width: 560px) { .oc-form .grid-2 { grid-template-columns: 1fr; } }

/* ---------- GRC 2.0 · phase 2: formats, set logging, RPE, exercise library ---------- */
.blk-toggle { width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; align-items: center; }
.blk-toggle .blk-style { margin-left: auto; }
.blk-chev { color: var(--blk); font-size: 13px; }
.blk.shut { padding-bottom: 10px; }
.blk-peek { margin-top: 4px; }
.blk > .stack-sm { margin-top: 6px; }
.comp-format { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.howto .field-label { margin-bottom: 2px; }
.howto p { margin: 0; }
.cues { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }

.gw-progress { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.gw-count { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.gw-body h1 .blk-tag { vertical-align: middle; font-size: 15px; }
.gw-main-col { display: flex; flex-direction: column; gap: 14px; }
.gw-split { max-width: 1100px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; justify-content: stretch; }
.gw-head { max-width: 1100px; }
.gw-media { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.gw-target b { font-size: 32px; }
.set-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.set-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: left; padding: 0 6px; font-weight: 700; }
.set-table td { padding: 0 6px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); height: 48px; }
.set-table td:first-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; font-weight: 700; width: 40px; text-align: center; }
.set-table td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; width: 36px; }
.set-table input { width: 100%; min-width: 0; font-size: 17px; font-weight: 600; padding: 8px; border-radius: 8px; }
.set-table tr.on td { border-color: var(--accent); background: var(--accent-soft, var(--surface)); }
.set-table tr.done td { opacity: 0.75; }
.set-check { color: var(--accent); font-weight: 800; text-align: center; }
.gw-clock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gw-clock.resting .ring-fg { stroke: var(--muted); }
.gw-clock-actions .btn { padding: 14px; }
.gw-emom-log { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gw-emom-log label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.gw-emom-log input { font-size: 20px; font-weight: 700; padding: 10px; }
.amrap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.amrap-list li { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.gw-done { justify-content: flex-start; }
.gw-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 32px; font-weight: 800; align-self: center; }
.gw-feedback { text-align: left; }
.rpe-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rpe { padding: 10px 0; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.rpe.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rpe-scale { display: flex; justify-content: space-between; }
.center-row { justify-content: center; }
@media (max-width: 899px) { .gw-split { display: flex; } }

.log-row { border-bottom: 1px solid var(--border); padding: 4px 0 8px; }
.log-row:last-of-type { border-bottom: 0; }
.log-main { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 6px 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; flex-wrap: wrap; }
.log-note { font-size: 14px; background: var(--pink); color: var(--on-pink); border-radius: 10px; padding: 6px 10px; margin: 2px 0 6px; }
.log-sets { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 4px 12px; border-left: 3px solid var(--border); }
.log-main > .grow { order: 5; flex-basis: 100%; }
.log-main > b { margin-right: auto; }

/* ---------- GRC 2.0 · phase 3: import review, drafts, progress ---------- */
.tag-missing { background: color-mix(in srgb, #c0392b 18%, var(--surface)); color: #a32a1d; }
.tag-ok { background: color-mix(in srgb, #1e7a3c 18%, var(--surface)); color: #1e7a3c; }
.import-review .import-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.import-review .match-row { grid-template-columns: 1fr 1.4fr auto; }
.match-ok { color: #1e7a3c; font-weight: 800; padding: 0 10px; }
.review-session { display: flex; flex-direction: column; gap: 10px; }
.review-path { font-size: 14px; color: var(--muted); }
.review-path b { color: var(--text); }
.review-comp { display: flex; flex-direction: column; gap: 8px; }
.review-row { background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.review-ex { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.review-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.review-fields label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.review-fields input { padding: 6px 8px; font-size: 15px; min-width: 0; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flag { font-size: 13px; font-weight: 600; border-radius: 8px; padding: 3px 8px; }
.flag-check { background: color-mix(in srgb, var(--star) 22%, var(--surface)); color: #7a5a00; }
.flag-missing { background: color-mix(in srgb, #c0392b 14%, var(--surface)); color: #a32a1d; }
.review-actions { position: sticky; bottom: -21px; background: var(--surface); padding: 10px 0 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 600px) {
  .import-review .match-row { grid-template-columns: 1fr; }
  .review-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.progress-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; text-align: center; }
.progress-tiles b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-tiles span { color: var(--muted); font-size: 13px; }
.progress-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.progress-note { border-left: 3px solid var(--pink); padding: 2px 0 2px 10px; }
@media (min-width: 900px) { .progress-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } }
@media (max-width: 560px) { .progress-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; } }

/* ---------- GRC Studio (redesign) ---------- */
.studio-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.studio-hero { border-radius: 24px; padding: clamp(24px, 5vw, 48px); background: linear-gradient(140deg, var(--pink), var(--accent-soft) 70%);
  display: flex; flex-direction: column; gap: 12px; }
.studio-hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.05; text-wrap: balance; max-width: 16ch; }
.studio-hero p { font-size: 17px; max-width: 46ch; margin: 0; color: var(--text); opacity: 0.85; }
.studio-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.studio-hero-actions .btn { padding: 12px 18px; font-size: 15px; }
.studio-welcome { display: flex; flex-direction: column; gap: 6px; }
.studio-member-chip { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.studio-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 80px; }
.studio-section .section-title { margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.studio-lead { margin: -4px 0 0; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 16px 16px; }
.plan-card.best { border: 2px solid var(--accent); }
.plan-badge { position: absolute; top: -11px; left: 16px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.plan-name { font-weight: 700; color: var(--muted); }
.plan-price b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); }
.plan-card .btn { margin-top: auto; }
.plan-perks { columns: 2; column-gap: 24px; margin: 0; }
.studio-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.studio-grid.small-tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.studio-tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.studio-tile:hover .studio-cover { transform: translateY(-2px); box-shadow: var(--shadow); }
.studio-cover { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; background: center / cover no-repeat, linear-gradient(140deg, var(--accent-soft), var(--pink));
  display: flex; align-items: flex-end; padding: 14px; transition: transform 0.15s, box-shadow 0.15s; }
.studio-cover-title { font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--accent-strong); letter-spacing: -0.01em; }
.studio-tile-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.about-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-tile { display: flex; flex-direction: column; gap: 6px; }
.about-tile p { margin: 0; }
.about-icon { font-size: 26px; }
.coaching-cta { display: flex; align-items: center; gap: 12px; color: var(--text); }
.buy-panel { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; }
  .plan-perks { columns: 1; }
}
@media (max-width: 420px) {
  .plan-grid { gap: 8px; }
  .plan-card { padding: 18px 12px 12px; }
  .plan-price b { font-size: 24px; }
}
.studio-cover-emoji { font-size: 44px; line-height: 1; }
@media (max-width: 600px) {
  .studio-grid, .studio-grid.small-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .studio-cover { aspect-ratio: 1; border-radius: 16px; padding: 12px; }
  .studio-cover-emoji { font-size: 34px; }
}
.buy-panel .btn { white-space: normal; max-width: 100%; text-align: center; }

/* ---------- GRC Studio v2: featured, pills, shelves ---------- */
.studio { display: flex; flex-direction: column; gap: 28px; }
.studio-intro { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.studio-intro h1 { font-size: clamp(28px, 5.5vw, 44px); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; max-width: 18ch; }
.studio-intro p { margin: 0; color: var(--muted); font-size: 16px; max-width: 46ch; }
.studio-kicker.light { color: rgb(255 255 255 / 0.85); }
.studio-meta.light { color: rgb(255 255 255 / 0.85); font-size: 13px; font-weight: 600; }
.studio-featured { position: relative; display: flex; align-items: flex-end; min-height: 340px; border-radius: 24px; overflow: hidden;
  background: center / cover no-repeat, linear-gradient(140deg, var(--accent), #7e95d6); color: #fff; }
.studio-featured::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 25%, rgb(0 0 0 / 0.72)); }
.studio-featured-text { position: relative; padding: clamp(20px, 4vw, 36px); display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.studio-featured h2 { font-size: clamp(28px, 5vw, 42px); line-height: 1.05; letter-spacing: -0.02em; margin: 0; color: #fff; }
.studio-featured p { margin: 0; opacity: 0.9; }
.studio-featured-btn { align-self: flex-start; margin-top: 8px; background: #fff; color: #1c1c1c; border-color: #fff; }
.studio-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -8px -16px; padding: 8px 16px;
  position: sticky; top: 0; z-index: 3; background: var(--bg); }
.studio-pills::-webkit-scrollbar { display: none; }
.studio-pills .chip { flex: none; padding: 8px 16px; font-size: 14px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }
.studio-tile .studio-cover { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; align-items: flex-end; padding: 0; position: relative; }
.studio-tile.wide .studio-cover { aspect-ratio: 16 / 10; }
.studio-tile .studio-cover.photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0.65)); }
.studio-cover .studio-cover-emoji { position: absolute; top: 14px; left: 14px; }
.studio-cover-text { position: relative; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.studio-cover-text b { font-size: 18px; line-height: 1.15; letter-spacing: -0.01em; }
.studio-cover.photo .studio-cover-text b { color: #fff; }
.studio-cover:not(.photo) .studio-cover-text b { color: var(--accent-strong); }
.studio-cover:not(.photo) .studio-kicker.light { color: var(--accent); }
.studio-badge { position: absolute; top: 10px; right: 10px; background: rgb(255 255 255 / 0.92); color: #1c1c1c; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; z-index: 1; }
.studio-tile-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 2px; }
.studio-access { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.studio-access.soft { color: var(--muted); }
.studio-grid .studio-tile { min-width: 0; }
.continue-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 10px; color: var(--text); width: 300px; }
.shelf:has(.continue-card) { grid-auto-columns: 300px; }
.continue-cover { width: 64px; height: 64px; flex: none; border-radius: 12px; background: center / cover no-repeat, linear-gradient(140deg, var(--accent-soft), var(--pink));
  display: grid; place-items: center; }
.continue-cover .studio-cover-emoji { font-size: 28px; }
.studio-plans { background: var(--surface); border-radius: 24px; padding: clamp(18px, 3vw, 28px); }
.studio-about { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--border); padding-top: 20px; }
.studio-about > div { display: flex; gap: 10px; align-items: flex-start; }
.studio-about p { margin: 2px 0 0; }
@media (min-width: 900px) {
  .shelf { grid-auto-columns: 230px; margin: 0; padding: 2px 0 6px; }
  .studio-pills { margin: -8px 0; padding: 8px 0; }
}
@media (max-width: 700px) {
  .studio { gap: 24px; }
  .studio-featured { min-height: 420px; }
  .shelf { grid-auto-columns: 62%; }
  .shelf:has(.wide) { grid-auto-columns: 78%; }
  .shelf:has(.continue-card) { grid-auto-columns: 86%; }
  .continue-card { width: auto; }
  .studio-about { grid-template-columns: 1fr; }
}
.main:has(.studio) { max-width: 1100px; }
.program-top { display: flex; flex-direction: column; gap: 16px; }
.program-banner { position: relative; min-height: 300px; border-radius: 24px; overflow: hidden; display: flex; align-items: flex-end;
  background: center / cover no-repeat, linear-gradient(140deg, var(--accent), #7e95d6); color: #fff; }
.program-banner.photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 30%, rgb(0 0 0 / 0.7)); }
.program-banner-text { position: relative; padding: clamp(18px, 4vw, 32px); display: flex; flex-direction: column; gap: 6px; }
.program-banner-text h1 { color: #fff; font-size: clamp(28px, 5vw, 42px); line-height: 1.05; letter-spacing: -0.02em; }
.program-banner-text p { margin: 0; opacity: 0.9; }
.program-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.program-facts div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.program-facts span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.program-facts b { font-size: 16px; }
.program-about { font-size: 16px; line-height: 1.6; margin: 0; }
.week-fold summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.week-fold summary::-webkit-details-marker { display: none; }
.week-fold summary::after { content: '▾'; color: var(--muted); }
.week-fold:not([open]) summary::after { content: '▸'; }
.week-fold[open] summary { margin-bottom: 10px; }
.week-fold summary b { margin-right: auto; }
@media (max-width: 700px) { .program-banner { min-height: 360px; } .program-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Logo splash after signing in (2 s, once per visit) */
.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg);
  animation: splash-out 0.45s ease-in 1.55s forwards; }
.splash-logo { width: min(64vw, 320px); animation: splash-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes splash-in { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: scale(1); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .splash-logo { animation: none; } }
.studio-badge.left { right: auto; left: 10px; }
.studio-tile-meta { display: block; padding: 0 2px; }

/* Cover photo field in the builder */
.cover-field { display: flex; flex-direction: column; gap: 8px; }
.cover-previews { display: flex; gap: 10px; align-items: flex-end; }
.cover-card, .cover-wide { border-radius: 14px; background: center / cover no-repeat, linear-gradient(140deg, var(--accent), #7e95d6);
  position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.cover-card { width: 112px; aspect-ratio: 4 / 5; }
.cover-wide { flex: 1; max-width: 300px; aspect-ratio: 16 / 9; }
.cover-card::before, .cover-wide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / 0.6)); }
.cover-card span, .cover-wide span { position: relative; color: #fff; font-weight: 800; font-size: 13px; padding: 8px; line-height: 1.15; }
.session-player { display: flex; flex-direction: column; gap: 8px; }
.session-player .media { border-radius: 18px; }
.session-video { display: flex; flex-direction: column; gap: 8px; }
.session-video .media { max-width: 420px; }
