:root {
  --bg: #080d16; --panel: #111a28; --panel-2: #162235; --line: #26354a;
  --text: #f5f7fa; --muted: #9ba9ba; --blue: #1597ff; --green: #49ea7b;
  --amber: #ffbf3f; --red: #ff5d67; --radius: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { width: 100%; max-width: 100%; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 17px; }
html[lang="en"][data-i18n-ready="pending"] body { visibility: hidden; }
body { width: 100%; max-width: 100%; margin: 0; min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 75% -10%, #12325a 0, transparent 32rem), var(--bg); }
a { color: inherit; }
.app-frame { --app-sidebar-width: 228px; display: grid; grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr); width: 100%; max-width: 100%; min-height: 100vh; overflow-x: clip; }
.app-sidebar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 16px; height: 100vh; padding: 22px 14px 16px; border-right: 1px solid #202f43; background: linear-gradient(180deg, #0c1421 0%, #0a111c 100%); }
.app-content { width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
.app-view a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand em { color: var(--blue); font-style: normal; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--blue); border-radius: 10px; font-size: .75rem; color: white; }
.brand-logo { width: 40px; height: 48px; flex: 0 0 40px; object-fit: contain; filter: drop-shadow(0 7px 15px rgba(0,0,0,.3)); }
.brand-wordmark { color: #f4f8ff; font-weight: 950; letter-spacing: -.055em; }
.brand-wordmark > span { color: #1ba8ff; }
.sidebar-brand { padding: 0 8px 17px; border-bottom: 1px solid var(--line); }
.sidebar-club-context { display: grid; gap: 8px; padding: 9px; border: 1px solid color-mix(in srgb, var(--club-accent, var(--blue)) 32%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--club-accent, var(--blue)) 7%, rgba(7,15,27,.82)); }
.sidebar-club-identity { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; }
.sidebar-club-identity > img, .sidebar-club-identity > span { width: 34px; height: 34px; object-fit: contain; border-radius: 9px; }
.sidebar-club-identity > span { display: grid; place-items: center; color: #07111c; background: var(--club-accent, var(--blue)); font-size: .82rem; font-weight: 950; }
.sidebar-club-identity > div { display: grid; min-width: 0; gap: 2px; }
.sidebar-club-identity strong { overflow: hidden; color: white; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-club-identity small { color: var(--muted); font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; }
.club-switcher { position: relative; }
.club-switcher summary, .sidebar-club-website { color: var(--club-accent, var(--blue)); font-size: .66rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.club-switcher > div { position: absolute; z-index: 30; top: calc(100% + 7px); left: -4px; display: grid; width: min(260px, calc(100vw - 28px)); gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #0d1725; box-shadow: 0 18px 45px rgba(0,0,0,.42); }
.club-switcher form { margin: 0; }
.club-switcher button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; color: var(--text); border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.club-switcher button:hover, .club-switcher button.is-active { background: color-mix(in srgb, var(--club-accent, var(--blue)) 14%, transparent); }
.club-switcher button small { color: var(--muted); }
.has-active-club .sidebar-nav a.is-active { border-color: color-mix(in srgb, var(--club-accent) 32%, transparent); background: color-mix(in srgb, var(--club-accent) 10%, transparent); box-shadow: inset 3px 0 var(--club-accent); }
.mobile-club-brand { display: flex; min-width: 0; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.mobile-club-brand > img, .mobile-club-brand > span:first-child { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; border-radius: 9px; }
.mobile-club-brand > span:first-child { display: grid; place-items: center; color: #07111c; background: var(--club-accent, var(--blue)); font-weight: 950; }
.mobile-club-brand > span:last-child { display: grid; min-width: 0; }
.mobile-club-brand strong { overflow: hidden; max-width: 11rem; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.mobile-club-brand small { color: var(--muted); font-size: .55rem; font-weight: 850; letter-spacing: .08em; }
.club-font-compact { font-family: "Arial Narrow", Inter, "Segoe UI", system-ui, sans-serif; }
.club-font-friendly { font-family: Inter, "Trebuchet MS", "Segoe UI", system-ui, sans-serif; }
.sidebar-nav { display: grid; align-content: start; gap: 5px; }
.sidebar-nav p { margin: 14px 11px 5px; color: #60738d; font-size: .63rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; color: var(--muted); border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-size: .86rem; font-weight: 760; }
.sidebar-nav a:hover { color: white; background: rgba(255,255,255,.035); }
.sidebar-nav a.is-active { color: white; border-color: rgba(21,151,255,.24); background: rgba(21,151,255,.11); box-shadow: inset 3px 0 var(--blue); }
.sidebar-nav svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-ai { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(22,34,53,.55); }
.sidebar-ai > div, .sidebar-profile > span:nth-child(2) { display: grid; gap: 3px; }
.sidebar-ai strong, .sidebar-profile strong { font-size: .76rem; }
.sidebar-ai small, .sidebar-profile small { color: var(--muted); font-size: .65rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #617087; box-shadow: 0 0 0 4px rgba(97,112,135,.11); }
.soon-pill { padding: 4px 7px; color: #a9b7c8; border-radius: 99px; background: #263246; font-size: .58rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.sidebar-ai.is-online { border-color: rgba(73,234,123,.3); background: rgba(73,234,123,.055); }
.sidebar-ai.is-online .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(73,234,123,.12), 0 0 13px rgba(73,234,123,.36); }
.sidebar-ai.is-online .soon-pill { color: #79f4a1; background: rgba(73,234,123,.13); }
.sidebar-ai.is-waiting .status-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,191,63,.12); }
.sidebar-ai.is-waiting .soon-pill { color: #ffd47a; background: rgba(255,191,63,.12); }
.sidebar-profile { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 9px; border-radius: 12px; text-decoration: none; }
.sidebar-profile:hover, .sidebar-profile.is-active { background: var(--panel); }
.profile-avatar { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; color: #d9efff; border: 1px solid #31577a; border-radius: 10px; background: #17324b; font-size: .68rem; font-weight: 850; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-profile b { color: #6d7e94; }
.sidebar-account { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.sidebar-account .sidebar-profile { min-width: 0; }
.language-switcher {
  display: inline-grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(2.25rem, 1fr));
  gap: .2rem;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: rgba(7, 17, 30, .72);
}
.language-switcher a {
  display: grid;
  min-height: 1.8rem;
  padding: 0 .45rem;
  place-items: center;
  border-radius: .45rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
}
.language-switcher a:hover { color: white; }
.language-switcher a.is-active { color: white; background: #0b70aa; }
.language-switcher.is-compact { display: none; }
.workspace-mode-switch {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(73,234,123,.24);
  border-radius: 11px;
  background: rgba(73,234,123,.055);
}

/* Group workouts: one shared event, compact on mobile and roomy on desktop. */
.group-workouts-view .app-main {
  width: min(1180px, 100%);
}

.group-workouts-hero,
.group-workout-form-hero {
  align-items: end;
}

.group-workout-links,
.group-event-meta,
.dashboard-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.group-workout-links {
  margin: 0 0 1rem;
}

.group-event-list {
  display: grid;
  gap: .85rem;
}

.group-event-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 1rem;
  transition: border-color .18s ease, transform .18s ease;
}

.group-event-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.group-event-card time {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 70, 109, .2);
}

.group-event-card time strong {
  font-size: 1.8rem;
  line-height: 1;
}

.group-event-card time span,
.group-event-main small,
.group-event-side small {
  color: var(--muted);
  font-size: .75rem;
}

.group-event-main h2 {
  margin: .15rem 0 .45rem;
}

.group-event-meta span,
.dashboard-group-meta span {
  padding: .32rem .58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .76rem;
}

.group-event-side {
  display: grid;
  justify-items: end;
  gap: .35rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: .35rem .62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-going {
  border-color: rgba(54, 217, 148, .42);
  color: #59e1a3;
}

.status-maybe {
  border-color: rgba(245, 193, 76, .42);
  color: #f5c14c;
}

.status-declined {
  opacity: .65;
}

.group-workout-form {
  max-width: 820px;
  margin-inline: auto;
}

.group-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.group-form-wide {
  grid-column: 1 / -1;
}

.group-workout-form label,
.team-score-editor label {
  display: grid;
  gap: .4rem;
  font-weight: 750;
}

.group-workout-form label small {
  color: var(--muted);
  font-weight: 500;
}

.group-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.group-detail-hero {
  padding: 1rem 0 1.25rem;
}

.group-detail-topline,
.group-section-head,
.group-team-card > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.group-detail-hero h1 {
  max-width: 820px;
  margin: .3rem 0 .7rem;
  font-size: clamp(2rem, 7vw, 4rem);
}

.group-rsvp {
  display: flex;
  gap: .55rem;
  margin-top: 1rem;
}

.group-rsvp button {
  min-height: 44px;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 750;
}

.group-rsvp button.is-active {
  border-color: var(--accent);
  background: rgba(24, 156, 255, .14);
  color: var(--text);
}

.group-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
  gap: 1rem;
}

.group-wod-card,
.group-attendance-card,
.group-team-card,
.group-leaderboard {
  padding: 1rem;
}

.group-wod-description {
  margin: .7rem 0;
  padding: .7rem .8rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.group-wod-movements {
  display: grid;
  gap: .25rem;
  margin: .8rem 0 0;
  padding: 0;
  list-style: none;
}

.group-wod-movements li {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 58px;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
}

.group-wod-movements li > span {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 850;
}

.group-wod-movements li div {
  display: grid;
  gap: .15rem;
}

.group-wod-movements li small {
  color: var(--muted);
}

.group-participant-list {
  display: grid;
  gap: .25rem;
  margin: .6rem 0 1rem;
}

.group-participant-list > div {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}

.group-participant-list > div > span:nth-of-type(2) {
  display: grid;
}

.participant-team-select {
  width: auto;
  min-width: 105px;
  margin-left: auto;
  padding: .45rem .55rem;
  font-size: .78rem;
}

.group-participant-list small {
  color: var(--muted);
}

.group-teams-section {
  margin-top: 1.3rem;
}

.group-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: .8rem;
}

.group-team-card.is-current {
  border-color: var(--accent);
}

.group-team-card h3 {
  margin: .15rem 0;
  font-size: 1.35rem;
}

.group-team-card header small,
.team-score small {
  color: var(--accent);
  font-weight: 850;
  letter-spacing: .12em;
}

.team-rank {
  font-size: 1.45rem;
  color: #59e1a3;
}

.team-members {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .8rem 0;
}

.team-members span {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: .8rem;
}

.team-members span b {
  color: var(--accent);
}

.team-score {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: .75rem;
  border: 1px solid rgba(54, 217, 148, .3);
  border-radius: 12px;
  background: rgba(54, 217, 148, .06);
}

.team-score small {
  grid-column: 1 / -1;
}

.team-score strong {
  font-size: 1.5rem;
}

.team-score-editor {
  margin-top: .7rem;
  border-top: 1px solid var(--line);
}

.team-score-editor summary {
  padding: .75rem 0 0;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.team-score-editor form {
  display: grid;
  gap: .65rem;
  margin-top: .75rem;
}

.score-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.score-time-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.score-time-fieldset > legend {
  margin-bottom: .45rem;
  color: #c9d5e4;
  font-size: .72rem;
  font-weight: 800;
}
.score-time-fieldset > legend small {
  color: var(--muted);
  font-weight: 500;
}

.group-leaderboard {
  margin-top: 1rem;
}

.group-leaderboard > div:not(.group-section-head) {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
}

.group-leaderboard > div > span {
  display: grid;
}

.group-leaderboard small {
  color: var(--muted);
}

.dashboard-group-workout {
  border-color: rgba(54, 217, 148, .35);
}

.dashboard-group-meta {
  margin: -.25rem 0 .85rem;
}

@media (max-width: 700px) {
  .group-workouts-hero,
  .group-workout-form-hero {
    align-items: stretch;
  }

  .group-event-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: .75rem;
    padding: .8rem;
  }

  .group-event-card time {
    min-height: 64px;
  }

  .group-event-side {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr auto;
    justify-items: start;
    align-items: center;
    padding-top: .65rem;
    border-top: 1px solid var(--line);
  }

  .group-form-grid,
  .group-detail-grid {
    grid-template-columns: 1fr;
  }

  .group-workout-form {
    padding: .9rem;
  }

  .group-form-actions {
    display: grid;
  }

  .group-form-actions .button {
    width: 100%;
  }

  .group-detail-hero {
    padding-top: .5rem;
  }

  .group-detail-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .group-rsvp {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .group-rsvp button:first-child {
    grid-column: 1 / -1;
  }

  .group-team-grid {
    grid-template-columns: 1fr;
  }

  .group-teams-section .section-heading {
    align-items: stretch;
  }

  .group-teams-section .section-heading .button {
    width: 100%;
  }
}
.workspace-mode-switch span { color: #83e9a5; font-size: .63rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.workspace-mode-switch button,
.mobile-mode-switch button {
  min-height: 30px;
  padding: 0 9px;
  color: white;
  border: 1px solid rgba(73,234,123,.28);
  border-radius: 8px;
  background: rgba(73,234,123,.1);
  font: inherit;
  font-size: .64rem;
  font-weight: 800;
  cursor: pointer;
}
.coach-mode .sidebar-nav a.is-active { border-color: rgba(73,234,123,.25); background: rgba(73,234,123,.09); box-shadow: inset 3px 0 var(--green); }
.account-menu-toggle { min-width: 34px; min-height: 34px; padding: 0 8px; color: var(--muted); border: 1px solid transparent; border-radius: 9px; background: transparent; font: inherit; font-size: .72rem; font-weight: 850; cursor: pointer; }
.account-menu-toggle:hover, .account-menu-toggle[aria-expanded="true"] { color: white; border-color: var(--line); background: var(--panel); }
.account-popover { position: absolute; z-index: 60; right: 0; bottom: calc(100% + 8px); width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #111a28; box-shadow: 0 16px 45px rgba(0,0,0,.45); }
.account-popover a, .account-popover button { display: flex; width: 100%; min-height: 36px; align-items: center; padding: 0 10px; color: var(--text); border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: .75rem; text-decoration: none; cursor: pointer; }
.account-popover a:hover, .account-popover button:hover { background: var(--panel-2); }
.mobile-header, .mobile-tabbar { display: none; }

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

.is-navigating .mobile-tabbar a.is-loading,
.is-navigating .sidebar-nav a.is-loading {
  opacity: .72;
  pointer-events: none;
}
.shell { width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 52px clamp(24px, 4vw, 76px) 100px; }
.hero { max-width: 850px; margin-bottom: 42px; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: .76rem; letter-spacing: .16em; font-weight: 800; }
.eyebrow.positive { color: var(--green); }
h1 { margin: 0; font-size: clamp(2.7rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--blue); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; margin: 0 0 24px; }
h3 { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.65; max-width: 720px; }
.panel { background: linear-gradient(145deg, rgba(22,34,53,.97), rgba(13,22,35,.97)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); }
.upload-form { display: grid; gap: 28px; }
.capture-mode-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #0b1320; }
.capture-mode-tab { min-height: 48px; padding: 0 16px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.capture-mode-tab.is-active { color: white; border-color: rgba(21,151,255,.38); background: rgba(21,151,255,.14); box-shadow: inset 0 -2px var(--blue); }
.capture-panel { display: grid; gap: 16px; }
.camera-stage { position: relative; display: grid; min-height: min(58vh, 560px); place-items: center; overflow: hidden; border: 1px solid #30455f; border-radius: 16px; background: #03070c; }
.camera-stage video { display: block; width: 100%; height: 100%; max-height: min(72vh, 680px); object-fit: contain; background: black; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 28px; color: var(--muted); text-align: center; background: radial-gradient(circle at 50% 45%, rgba(21,151,255,.1), transparent 18rem), #070d16; }
.camera-placeholder strong { color: var(--text); font-size: 1.1rem; }
.camera-placeholder-icon { display: grid; width: 58px; height: 58px; margin-bottom: 8px; place-items: center; color: var(--blue); border: 1px solid rgba(21,151,255,.35); border-radius: 50%; background: rgba(21,151,255,.1); font-size: 1.1rem; }
.camera-countdown { position: absolute; z-index: 4; display: grid; min-width: 130px; min-height: 130px; place-items: center; color: white; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(3,7,12,.72); box-shadow: 0 14px 70px rgba(0,0,0,.55); font-size: 3.4rem; font-weight: 900; }
.recording-indicator { position: absolute; z-index: 3; top: 16px; left: 16px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: white; border-radius: 99px; background: rgba(6,10,16,.78); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.recording-indicator i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255,93,103,.15); animation: recording-pulse 1.2s infinite; }
@keyframes recording-pulse { 50% { opacity: .45; } }
.camera-status-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 28px; }
.camera-status-row p { margin: 0; color: var(--muted); font-size: .84rem; }
.camera-status-row span { flex: 0 0 auto; color: #b9ddff; font-size: .72rem; font-weight: 800; }
.camera-actions { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; }
.camera-actions .button:only-child { grid-column: 1 / -1; }
.recording-stop { color: white; border-color: var(--red); background: var(--red); }
.capture-support-note { margin: 0; padding: 13px 15px; color: #f1dba9; border: 1px solid rgba(255,191,63,.3); border-radius: 10px; background: rgba(255,191,63,.08); font-size: .82rem; line-height: 1.5; }
.capture-review { display: grid; gap: 15px; }
.capture-review > header { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.capture-review h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.capture-review .eyebrow { margin-bottom: 6px; }
.review-player { overflow: hidden; border: 1px solid #30455f; border-radius: 14px; background: black; }
.capture-review video { display: block; width: 100%; max-height: 68vh; background: black; }
.capture-submit-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  margin-top: 4px;
}

/* Admin cockpit */
.admin-view .shell { width: 100%; max-width: none; }
.admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 8px 0 24px; }
.admin-hero h1 { margin: 4px 0 6px; font-size: clamp(2rem, 4vw, 3.6rem); }
.admin-hero > div > p:last-child { margin: 0; color: var(--muted); }
.admin-live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; color: #bdd0e5; white-space: nowrap; }
.admin-live-badge i, .admin-health-row i, .admin-worker-list i { width: 9px; height: 9px; border-radius: 50%; background: #5b687a; box-shadow: 0 0 0 5px rgba(91,104,122,.1); }
.admin-live-badge i, .admin-health-row i.is-online, .admin-worker-list i.is-online { background: #42dc9b; box-shadow: 0 0 0 5px rgba(66,220,155,.1); }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10,18,31,.8); scrollbar-width: none; }
.admin-tabs a { display: flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); font-weight: 800; text-decoration: none; white-space: nowrap; }
.admin-tabs a.is-active { color: white; border-color: rgba(21,151,255,.35); background: #102f4a; }
.admin-tabs b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: rgba(255,93,103,.16); color: #ff9ba2; font-size: .7rem; }

.platform-control-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.platform-control-form { position: sticky; top: 18px; }
.platform-control-form h2, .platform-inline-create h2 { margin: 4px 0 8px; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.platform-control-form form, .platform-inline-create form { display: grid; gap: 12px; margin-top: 18px; }
.platform-control-form label, .platform-inline-create label { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.platform-control-list { display: grid; gap: 10px; }
.platform-control-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; align-items: center; }
.platform-control-row > div { display: grid; gap: 3px; min-width: 0; }
.platform-control-row small, .platform-table-header { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.platform-control-row strong { overflow-wrap: anywhere; }
.platform-control-row span { color: var(--muted); font-size: .8rem; }
.platform-inline-create { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 16px; }
.platform-inline-create form { grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto; align-items: end; margin: 0; }
.platform-table-wrap { padding: 0; overflow: hidden; }
.platform-table-header, .platform-table-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 13px 16px; }
.platform-table-header { border-bottom: 1px solid var(--line); }
.platform-table-row + .platform-table-row { border-top: 1px solid var(--line); }
.platform-table-row form, .platform-table-row select { width: 100%; }
.access-row { grid-template-columns: 1fr .6fr; }
@media (max-width: 900px) {
  .platform-control-grid { grid-template-columns: 1fr; }
  .platform-control-form { position: static; }
  .platform-inline-create { display: grid; }
  .platform-inline-create form { grid-template-columns: 1fr; }
  .platform-table-header { display: none; }
  .platform-table-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .platform-control-row, .access-row, .platform-table-row { grid-template-columns: 1fr; }
}
.admin-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.admin-metric-grid article, .admin-system-grid article { display: flex; flex-direction: column; gap: 5px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(20,37,59,.97), rgba(12,23,38,.97)); }
.admin-metric-grid article.needs-attention { border-color: rgba(255,178,70,.45); }
.admin-metric-grid small, .admin-system-grid small { color: #8ea1b9; font-size: .72rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.admin-metric-grid strong { font-size: 2.2rem; }
.admin-metric-grid span, .admin-system-grid span { color: var(--muted); font-size: .82rem; }
.admin-overview-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px; }
.admin-overview-grid .panel { padding: 22px; }
.admin-overview-grid header, .admin-section > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.admin-overview-grid h2, .admin-section h2 { margin: 3px 0; }
.admin-action-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  color: #9fd6ff;
  border: 1px solid #2b4b68;
  border-radius: 10px;
  background: rgba(21,151,255,.08);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}
.admin-action-link:hover { color: #fff; border-color: #3572a0; background: rgba(21,151,255,.14); }
.admin-health-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-health-row span { display: flex; align-items: center; gap: 12px; }
.admin-attention-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7,15,27,.48);
  text-decoration: none;
}
.admin-attention-card > a b { color: var(--blue); }
.admin-attention-card > a i { color: #6f879f; font-style: normal; }
.admin-attention-card > a:hover { border-color: #355778; background: rgba(21,151,255,.07); }
.admin-section { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(15,27,44,.9); }
.admin-section > header p:last-child { margin: 4px 0 0; color: var(--muted); }
.admin-filter { display: flex; gap: 10px; width: 100%; max-width: 920px; margin-bottom: 16px; }
.admin-filter input, .admin-filter select { width: auto; min-height: 46px; }
.admin-filter input { flex: 1 1 260px; min-width: 220px; }
.admin-filter select { flex: 0 1 190px; min-width: 150px; }
.admin-list { display: grid; gap: 9px; }
.admin-user-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto auto auto; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.admin-job-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.admin-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #245c85; border-radius: 12px; background: #102f4a; color: #65c2ff; font-weight: 900; }
.admin-row-main { display: grid; gap: 3px; min-width: 0; }
.admin-row-main small, .admin-row-main em { overflow: hidden; color: var(--muted); font-size: .8rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-main em { color: #ff9ba2; }
.admin-row-stat { display: grid; min-width: 54px; text-align: center; }
.admin-row-stat small, .admin-user-row time, .admin-job-row time { color: var(--muted); font-size: .72rem; }
.admin-status { display: inline-flex; align-items: center; justify-content: center; min-width: 74px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: #aec0d4; font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.admin-status.is-completed, .admin-status.is-resolved { color: #52dda2; border-color: rgba(82,221,162,.35); background: rgba(82,221,162,.08); }
.admin-status.is-failed, .admin-status.is-open { color: #ff8e97; border-color: rgba(255,93,103,.35); background: rgba(255,93,103,.08); }
.admin-status.is-processing, .admin-status.is-queued { color: #60bcfa; border-color: rgba(34,158,242,.4); background: rgba(34,158,242,.08); }
.admin-report-row { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(7,15,27,.55); }
.admin-report-head, .admin-report-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.admin-report-row blockquote { margin: 0; padding: 12px 14px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: rgba(33,151,235,.07); color: #c8d6e7; }
.admin-report-row p, .admin-report-row time { margin: 0; color: var(--muted); font-size: .8rem; }
.admin-report-actions { justify-content: flex-end; }
.admin-system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.admin-system-grid strong { margin: 5px 0; font-size: 1.3rem; }
.admin-worker-list { margin-top: 24px; }
.admin-worker-list > article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.admin-worker-list div { display: grid; }
.admin-worker-list small, .admin-worker-list span { color: var(--muted); font-size: .78rem; }
.admin-empty { padding: 35px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.admin-open-row { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); text-decoration: none; }
.admin-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .78rem; text-align: center; }
.admin-pagination a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.admin-pagination a:last-child { justify-self: end; }
.admin-bulk-action { margin-bottom: 14px; }
.admin-audit-preview { margin-top: 16px; padding: 22px; }
.admin-audit-preview > header { display: flex; justify-content: space-between; align-items: flex-start; }
.admin-audit-preview h2 { margin: 3px 0 18px; }
.admin-audit-preview header a { color: var(--blue); font-weight: 800; }
.admin-audit-list { display: grid; gap: 2px; }
.admin-audit-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.admin-audit-list div { display: grid; }
.admin-audit-list small, .admin-audit-list time { color: var(--muted); font-size: .72rem; }
.admin-audit-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #52dda2; background: rgba(82,221,162,.1); font-size: .72rem; font-weight: 900; }
.admin-capabilities { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.admin-capabilities b { padding: 3px 6px; border-radius: 99px; color: #93cfff; background: rgba(21,151,255,.1); font-size: .58rem; font-weight: 800; }
.admin-back-link { display: inline-flex; margin-bottom: 22px; color: #9acdf2; font-weight: 800; text-decoration: none; }
.commerce-org-switch { display: grid; gap: 6px; min-width: 230px; }
.commerce-org-switch span, .commerce-stack-form label > span, .commerce-form-grid label > span, .commerce-form-pair label > span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.commerce-tabs span { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 18px; color: #657990; font-weight: 800; white-space: nowrap; }
.commerce-tabs span b { color: #7890a8; background: rgba(120,144,168,.1); }
.commerce-tabs a { text-decoration: none; }
.commerce-empty-state { display: grid; grid-template-columns: .75fr 1.25fr; gap: 30px; align-items: start; }
.commerce-empty-state h2 { margin: 4px 0 8px; }
.commerce-empty-state p:last-child { color: var(--muted); }
.commerce-platform-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr); gap: 16px; align-items: start; }
.commerce-platform-grid > .admin-section { min-width: 0; }
.commerce-platform-grid .commerce-metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 12px; }
.commerce-platform-grid .commerce-metrics-grid article { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #0b1625; }
.commerce-platform-grid .commerce-metrics-grid :is(small, span) { color: var(--muted); font-size: .7rem; }
.commerce-platform-grid .commerce-metrics-grid strong { font-size: 1.15rem; }
.commerce-platform-grid .admin-row { gap: 12px; padding-block: 10px; }
.commerce-platform-grid .admin-row-main { min-width: 0; }
.commerce-platform-grid .admin-row-main small { line-height: 1.35; }
.commerce-organization-list { display: grid; gap: 9px; margin-bottom: 20px; }
.commerce-organization-list > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px; color: inherit; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.52); text-decoration: none; }
.commerce-organization-list > a:hover, .commerce-organization-list > a.is-active { border-color: rgba(21,151,255,.55); background: rgba(21,151,255,.08); }
.commerce-organization-list > a > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.commerce-organization-list small { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.commerce-organization-list > a > b { color: var(--blue); font-size: .72rem; }
.commerce-onboarding-callout { padding: 24px; border: 1px dashed #35506e; border-radius: 14px; background: rgba(21,151,255,.05); }
.commerce-onboarding-callout h3 { font-size: 1.35rem; }
.commerce-onboarding-callout p:last-child { margin-bottom: 0; color: var(--muted); }
.commerce-settings-form { padding-top: 20px; border-top: 1px solid var(--line); }
.commerce-location-settings { display: grid; gap: 10px; margin-top: 18px; }
.commerce-location-edit { display: grid; grid-template-columns: 1fr 1.4fr .65fr 1fr auto; align-items: end; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.commerce-location-edit label, .commerce-kvk-search label { display: grid; gap: 6px; }
.commerce-location-edit label > span, .commerce-kvk-search label > span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.commerce-location-edit .button { min-height: 44px; }
.commerce-kvk-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-bottom: 18px; padding: 14px; border: 1px solid rgba(21,151,255,.28); border-radius: 14px; background: rgba(21,151,255,.06); }
.commerce-kvk-search .button { align-self: end; min-height: 46px; }
.commerce-kvk-results { display: grid; grid-column: 1 / -1; gap: 7px; }
.commerce-kvk-result { display: grid; gap: 3px; width: 100%; padding: 10px 12px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: rgba(7,15,27,.7); font: inherit; text-align: left; cursor: pointer; }
.commerce-kvk-result:hover { border-color: #426789; background: rgba(21,151,255,.09); }
.commerce-kvk-result small { color: var(--muted); font-size: .7rem; }
.commerce-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commerce-form-grid label, .commerce-stack-form label { display: grid; gap: 7px; }
.commerce-form-grid .button { grid-column: 1 / -1; justify-self: start; }
.commerce-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr); gap: 16px; margin-top: 16px; align-items: start; }
.commerce-side-stack { display: grid; gap: 16px; }
.commerce-member-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.commerce-status-form select { width: 145px; min-height: 38px; padding-block: 6px; font-size: .78rem; }
.commerce-stack-form { display: grid; gap: 13px; }
.commerce-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.commerce-location-list { display: grid; margin-bottom: 14px; }
.commerce-location-list div { display: grid; padding: 11px 0; border-top: 1px solid var(--line); }
.commerce-location-list small { color: var(--muted); }
.commerce-inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.commerce-product-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.commerce-stock { min-width: 110px; color: var(--muted); font-size: .76rem; text-align: right; }
.commerce-stock.needs-attention { color: #ffbd6c; }
.commerce-stock-form { display: flex; gap: 6px; }
.commerce-stock-form input { width: 70px; min-height: 38px; padding-block: 6px; }
.commerce-stock-form .button { min-height: 38px; padding: 6px 10px; }
.commerce-checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.commerce-checkbox input { width: 18px; }
.commerce-pos-form { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(90px, .4fr); gap: 14px; }
.commerce-pos-form label { display: grid; gap: 7px; }
.commerce-pos-form label > span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.commerce-pos-form label:nth-of-type(n+3) { grid-column: 1 / -1; }
.commerce-checkout-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.commerce-checkout-actions .button { flex: 1; }
.commerce-order-list { display: grid; }
.commerce-order-list article { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.commerce-order-list article > div { display: grid; }
.commerce-order-list small { color: var(--muted); }
.commerce-refund-form { grid-column: 1 / -1; display: grid; grid-template-columns: 90px 1fr auto; gap: 6px; }
.commerce-refund-form input, .commerce-refund-form .button { min-height: 36px; padding-block: 6px; }
.commerce-contract-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.commerce-contract-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.commerce-contract-actions .button { min-height: 34px; padding: 5px 10px; font-size: .72rem; }
.admin-status.is-active { color: #52dda2; border-color: rgba(82,221,162,.35); background: rgba(82,221,162,.08); }
.admin-status.is-paused, .admin-status.is-cancellation_pending { color: #ffbd6c; border-color: rgba(255,189,108,.35); background: rgba(255,189,108,.08); }
.admin-status.is-payment_due, .admin-status.is-ended { color: #ff8e97; border-color: rgba(255,93,103,.35); background: rgba(255,93,103,.08); }
.commerce-invoice-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.commerce-invoice-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.commerce-invoice-action select, .commerce-invoice-action .button { min-height: 36px; padding-block: 6px; }
.commerce-money { display: block; margin: 8px 0; font-size: 2.1rem; }
.commerce-schedule-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,15,27,.55); }
.commerce-booking-list { display: grid; gap: 6px; }
.commerce-booking-list > div { display: flex; align-items: center; gap: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.commerce-booking-list > div > span { flex: 1; }
.commerce-booking-list .button { min-height: 34px; padding: 5px 9px; font-size: .68rem; }
.commerce-bookings-page > header { margin-bottom: 10px; }
.commerce-booking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.commerce-booking-class-heading { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.commerce-booking-class-heading > time { display: grid; width: 50px; height: 50px; place-content: center; justify-items: center; border: 1px solid #315274; border-radius: 10px; color: #fff; background: #13253a; }
.commerce-booking-class-heading > time strong { font-size: 1.35rem; line-height: 1; }
.commerce-booking-class-heading > time span { color: #8fd1ff; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.commerce-booking-counts { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 1px 4px; min-width: 74px; text-align: right; }
.commerce-booking-counts strong { color: #8fd1ff; font-size: 1.35rem; line-height: 1; }
.commerce-booking-counts span { color: #bfd1e2; font-size: .66rem; font-weight: 850; }
.commerce-booking-counts small { grid-column: 1 / -1; color: #ffbd6c; font-size: .6rem; }
.commerce-booking-empty { margin: 0; padding: 10px 12px; border: 1px dashed #28415d; border-radius: 9px; color: var(--muted); font-size: .72rem; text-align: center; }
.commerce-booking-add { border-top: 1px solid var(--line); }
.commerce-booking-add summary { width: max-content; padding-top: 10px; color: #8fd1ff; font-size: .7rem; font-weight: 900; cursor: pointer; list-style: none; }
.commerce-booking-add summary::-webkit-details-marker { display: none; }
.commerce-booking-add .commerce-inline-form { grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.commerce-calendar-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 8px; text-align: center; }
.commerce-calendar-toolbar-start { display: flex; min-width: 0; align-items: center; gap: 6px; justify-self: start; }
.commerce-calendar-toolbar > .button:last-child { justify-self: end; }
.commerce-calendar-toolbar .button { min-height: 40px; padding-inline: 12px; }
.commerce-calendar-period { display: grid; justify-items: center; gap: 5px; }
.commerce-schedule-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, .33fr); }
.commerce-schedule-layout > article { min-width: 0; }
.commerce-calendar-scroll { width: 100%; overflow-x: auto; scrollbar-width: thin; }
.commerce-week-calendar { display: grid; grid-template-columns: 58px repeat(7, minmax(130px, 1fr)); min-width: 1038px; border: 1px solid var(--line); border-radius: 15px; background: #09111d; overflow: hidden; }
.commerce-time-axis { position: sticky; z-index: 12; left: 0; background: #09111d; box-shadow: 1px 0 #263b54; }
.commerce-calendar-day { min-width: 0; border-left: 1px solid var(--line); }
.commerce-time-axis + .commerce-calendar-day { border-left: 0; }
.commerce-calendar-day > header { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(18,32,50,.92); }
.commerce-calendar-day > header span { color: var(--muted); font-size: .68rem; }
.commerce-calendar-track { position: relative; min-height: var(--calendar-track-height, 900px); background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(48,68,92,.34) 32px); }
.commerce-calendar-day.is-drop-target .commerce-calendar-track { background-color: rgba(21,151,255,.08); box-shadow: inset 0 0 0 2px rgba(21,151,255,.42); }
.commerce-calendar-event { position: absolute; z-index: 2; right: 5px; left: 5px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; align-content: start; box-sizing: border-box; gap: 2px 6px; min-height: 42px; padding: 5px 7px; overflow: hidden; border: 1px solid var(--event-color); border-left: 4px solid var(--event-color); border-radius: 9px; background: #14243a; box-shadow: 0 5px 16px rgba(0,0,0,.2); cursor: grab; }
.commerce-calendar-event.is-dragging { opacity: .48; cursor: grabbing; }
.commerce-calendar-event.is-saving::after {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78caff;
  box-shadow: 0 0 0 3px rgba(21, 151, 255, .16);
  content: "";
  animation: commerce-save-pulse .8s ease-in-out infinite alternate;
}

@keyframes commerce-save-pulse {
  to { opacity: .35; transform: scale(.75); }
}
.commerce-calendar-event > span, .commerce-calendar-event > small { overflow: hidden; color: #a8bbd0; font-size: .66rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.commerce-calendar-event > span { grid-column: 1; grid-row: 1; }
.commerce-calendar-event > strong { grid-column: 1 / -1; grid-row: 2; overflow: hidden; font-size: .76rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.commerce-calendar-event > small { grid-column: 1 / -1; grid-row: 3; }
.commerce-calendar-event.is-compact > small { display: none; }
.commerce-calendar-event.is-personal_training { --event-color: #a56bff !important; background: #251b3c; }
.commerce-calendar-event.is-open_gym { --event-color: #42dc9b !important; background: #102c28; }
.commerce-calendar-event.is-workshop { --event-color: #ffb246 !important; background: #322618; }
.commerce-calendar-event.is-draft { border-style: dashed; opacity: .78; }
.commerce-event-publication { position: absolute; right: 6px; bottom: 5px; padding: 2px 5px; border-radius: 999px; background: #f0b429; color: #17120a; font-size: .55rem; line-height: 1; letter-spacing: .05em; text-transform: uppercase; }
.commerce-publication-state { display: inline-flex; margin: 0; padding: 3px 8px; border: 1px solid #38516f; border-radius: 999px; color: #b7c6d8; font-size: .68rem; line-height: 1.15; }
.commerce-publication-state.is-draft { border-color: #8a6823; background: rgba(240, 180, 41, .08); color: #f0c86d; }
.commerce-publication-state.is-live { border-color: #25775c; background: rgba(49, 212, 155, .08); color: #70e3ba; }
.commerce-publication-form { display: flex; flex-wrap: wrap; gap: 8px; }
.commerce-calendar-status { min-height: 20px; margin: 7px 0; color: #9fd6ff; font-size: .72rem; }
.commerce-schedule-details { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.commerce-schedule-details > summary { color: #a9c6e0; font-weight: 800; cursor: pointer; }
.commerce-schedule-details > .admin-list { margin-top: 12px; }
.admin-user-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 24px; }
.admin-user-hero .admin-avatar { width: 64px; height: 64px; font-size: 1rem; }
.admin-user-hero h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.admin-user-hero p { margin: 5px 0 0; color: var(--muted); }
.admin-user-metrics { margin-bottom: 16px; }
.admin-user-detail-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.admin-user-detail-grid .panel { padding: 22px; }
.admin-detail-list { display: grid; gap: 0; margin: 0; }
.admin-detail-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-detail-list dt { color: var(--muted); }
.admin-detail-list dd { margin: 0; font-weight: 800; text-align: right; }
.admin-mini-list { display: grid; }
.admin-mini-list a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.admin-mini-list a > div { display: grid; }
.admin-mini-list small { color: var(--muted); font-size: .72rem; }
.admin-action-status { position: fixed; right: 24px; bottom: 24px; z-index: 20; margin: 0; padding: 10px 14px; border-radius: 10px; background: #102f4a; color: white; opacity: 0; pointer-events: none; transition: opacity .2s; }
.admin-action-status:not(:empty) { opacity: 1; }
.admin-community-create { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(220px, 1fr) minmax(220px, 1.2fr) minmax(150px, .5fr); align-items: end; gap: 14px; margin-bottom: 20px; }
.admin-community-create h3 { margin: 0; }
.admin-community-create .button { min-height: 48px; }

/* Coach subscriptions and delegated programming */
.coach-hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; width: 100%; max-width: 1120px; }
.coach-hub > .save-state { grid-column: auto; }
.coach-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.coach-hero h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
.coach-plan { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 24px; }
.coach-plan h2 { margin-bottom: 0; }
.coach-plan .progress-track, .coach-plan > p { grid-column: 1 / -1; }
.coach-plan > p { margin: 0; color: var(--muted); }
.coach-capacity { display: grid; text-align: right; }
.coach-capacity strong { font-size: 2rem; }
.coach-capacity span { color: var(--muted); font-size: .75rem; }
.coach-card-grid, .coach-athlete-list { display: grid; gap: 12px; }
.coach-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coach-invite-card { display: grid; gap: 16px; }
.coach-invite-card > div:first-child { display: grid; }
.coach-invite-card small, .coach-athlete-card small { color: var(--muted); }
.coach-permissions { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-permissions span { padding: 5px 9px; border-radius: 99px; color: #9fd6ff; background: rgba(21,151,255,.1); font-size: .68rem; font-weight: 800; }
.coach-athlete-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; }
.coach-athlete-card > div { display: grid; }
.coach-athletes-panel { display: grid; gap: 18px; }
.coach-athletes-panel > header h2 { margin: 4px 0 0; }
.coach-athletes-panel .admin-empty { background: rgba(7,15,27,.42); }
.coach-invite-form { display: grid; gap: 10px; margin-top: 18px; }
.coach-invite-form .community-enable { padding: 8px 0; border: 0; background: transparent; }
.coach-add-athlete { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: 20px 36px; align-items: start; }
.coach-add-athlete h2 { margin-bottom: 8px; }
.coach-add-athlete p:last-child { color: var(--muted); }
.coach-add-athlete .coach-invite-form { margin-top: 0; }
.coach-add-athlete .coach-sent-list { grid-column: 1 / -1; margin: 0; }
.coach-invite-rights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.athlete-coach-invitations { display: grid; gap: 10px; margin: 18px 0; }
.athlete-coach-invitations article { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(73,234,123,.28); border-radius: 12px; background: rgba(73,234,123,.06); }
.athlete-coach-invitations article > div:first-child { display: grid; }
.athlete-coach-invitations small { color: var(--muted); }
.coach-sent-list { display: grid; gap: 6px; margin: 16px 0; }
.coach-sent-list span { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.coach-sent-list small { color: var(--muted); text-transform: capitalize; }
.coach-workspace-banner { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 10px 16px; color: #dff7ea; border: 1px solid rgba(73,234,123,.35); border-radius: 14px; background: rgba(73,234,123,.08); }
.coach-workspace-banner > div { display: grid; gap: 2px; }
.coach-workspace-banner span { color: #83b596; font-size: .62rem; font-weight: 850; letter-spacing: .08em; }
.coach-workspace-banner nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.coach-workspace-banner a,
.coach-workspace-banner nav b { padding: 7px 10px; color: #b8d9c4; border: 1px solid transparent; border-radius: 8px; font-size: .7rem; font-weight: 800; text-decoration: none; }
.coach-workspace-banner nav b { color: white; border-color: rgba(73,234,123,.3); background: rgba(73,234,123,.1); }
.coach-workspace-banner a:hover { color: white; background: rgba(255,255,255,.05); }
.coach-athlete-page { display: grid; gap: 18px; width: 100%; max-width: 1180px; margin-inline: auto; }
.coach-athlete-context { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.coach-athlete-context h1 { margin: 2px 0 12px; font-size: clamp(2.2rem, 5vw, 4.6rem); }
.coach-permission-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-permission-badges span { padding: 6px 9px; color: #9ce5b4; border: 1px solid rgba(73,234,123,.25); border-radius: 99px; background: rgba(73,234,123,.07); font-size: .66rem; font-weight: 800; }
.coach-athlete-tabs { display: flex; gap: 6px; overflow-x: auto; }
.coach-athlete-tabs a { flex: 0 0 auto; padding: 9px 12px; color: var(--muted); border: 1px solid transparent; border-radius: 9px; font-size: .76rem; font-weight: 800; text-decoration: none; }
.coach-athlete-tabs a:is(:hover, .is-active) { color: white; border-color: rgba(73,234,123,.28); background: rgba(73,234,123,.08); }
.coach-athlete-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.coach-athlete-summary article { display: grid; gap: 4px; padding: 18px; }
.coach-athlete-summary span,
.coach-athlete-summary small { color: var(--muted); }
.coach-athlete-summary strong { font-size: 2rem; }
.coach-athlete-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.coach-athlete-columns > .panel,
.coach-athlete-reviews { display: grid; align-content: start; gap: 0; padding: 18px; }
.coach-athlete-columns header,
.coach-athlete-reviews header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.coach-athlete-columns h2,
.coach-athlete-reviews h2 { margin: 2px 0 0; font-size: 1.55rem; }
.coach-athlete-columns article,
.coach-athlete-reviews > a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.coach-athlete-columns article > div,
.coach-athlete-reviews > a > div { display: grid; gap: 3px; min-width: 0; }
.coach-athlete-columns small,
.coach-athlete-columns article > span,
.coach-athlete-reviews small,
.coach-athlete-reviews > a > span { color: var(--muted); font-size: .72rem; }
.coach-athlete-empty { margin: 0; padding: 24px 8px; color: var(--muted); text-align: center; }
.mobile-mode-switch { padding: 8px 0; }
.mobile-mode-switch button { width: 100%; min-height: 44px; color: #bff4d0; }

@media (max-width: 760px) {
  .admin-view .shell { padding-inline: 14px; }
  .admin-hero { align-items: flex-start; padding-top: 2px; }
  .admin-hero h1 { font-size: 2.15rem; }
  .admin-hero > div > p:last-child, .admin-live-badge { display: none; }
  .admin-tabs { margin-inline: -4px; }
  .admin-tabs a { flex: 0 0 auto; padding-inline: 14px; }
  .admin-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-metric-grid article { padding: 16px; }
  .admin-metric-grid strong { font-size: 1.8rem; }
  .admin-overview-grid, .admin-system-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 15px; }
  .admin-user-row, .admin-job-row { grid-template-columns: auto 1fr auto; gap: 10px; }
  .admin-user-row .admin-row-stat, .admin-user-row time { display: none; }
  .commerce-layout, .commerce-empty-state, .commerce-platform-grid { grid-template-columns: 1fr; }
  .commerce-location-edit { grid-template-columns: 1fr; }
  .commerce-calendar-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .commerce-calendar-period { order: -1; flex: 1 0 100%; }
  .commerce-calendar-toolbar-start { max-width: calc(100% - 88px); overflow-x: auto; }
  .commerce-form-grid { grid-template-columns: 1fr; }
  .commerce-member-row { grid-template-columns: auto 1fr; }
  .commerce-status-form { grid-column: 1 / -1; }
  .commerce-status-form select { width: 100%; }
  .commerce-inline-form { grid-template-columns: 1fr; }
  .commerce-product-row { grid-template-columns: 1fr auto; }
  .commerce-product-row .commerce-stock, .commerce-product-row .commerce-stock-form { grid-column: 1 / -1; width: 100%; text-align: left; }
  .commerce-pos-form { grid-template-columns: 1fr; }
  .commerce-pos-form label { grid-column: 1 !important; }
  .commerce-checkout-actions { grid-column: 1; flex-direction: column; }
  .commerce-refund-form { grid-template-columns: 1fr; }
  .commerce-contract-row { grid-template-columns: 1fr auto; }
  .commerce-contract-row .admin-status { grid-column: 1 / -1; justify-self: start; }
  .commerce-invoice-row { grid-template-columns: 1fr auto; }
  .commerce-invoice-row .admin-status { grid-column: 1 / -1; justify-self: start; }
  .admin-job-row time { display: none; }
  .admin-job-row .button { grid-column: 2 / -1; width: 100%; }
  .admin-filter { width: 100%; }
  .admin-filter .button { padding-inline: 12px; }
  .admin-filter { flex-wrap: wrap; }
  .admin-filter input { flex-basis: 100%; }
  .admin-pagination { grid-template-columns: 1fr 1fr; }
  .admin-pagination span { grid-column: 1 / -1; grid-row: 1; }
  .admin-user-detail-grid { grid-template-columns: 1fr; }
  .admin-user-hero { grid-template-columns: auto 1fr; }
  .admin-user-hero > .admin-status { grid-column: 1 / -1; justify-self: start; }
  .admin-action-status { right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); left: 14px; text-align: center; }
  .coach-hero { align-items: stretch; flex-direction: column; }
  .coach-card-grid { grid-template-columns: 1fr; }
  .coach-athlete-card { grid-template-columns: auto 1fr; }
  .coach-athlete-card .button, .coach-athlete-card .admin-status { grid-column: 1 / -1; width: 100%; }
  .coach-plan { grid-template-columns: 1fr; }
  .coach-add-athlete { grid-template-columns: 1fr; }
  .coach-invite-rights { grid-template-columns: 1fr; }
  .coach-capacity { text-align: left; }
  .coach-workspace-banner { align-items: flex-start; flex-direction: column; }
  .coach-workspace-banner span { margin-left: 0; }
  .coach-workspace-banner nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .coach-athlete-context { align-items: stretch; flex-direction: column; }
  .coach-athlete-context .button { width: 100%; }
  .coach-athlete-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coach-athlete-summary article { padding: 13px 10px; }
  .coach-athlete-summary strong { font-size: 1.55rem; }
  .coach-athlete-summary small { font-size: .62rem; }
  .coach-athlete-columns { grid-template-columns: 1fr; }
}
.capture-submit-actions[hidden] { display: none; }
.capture-submit-actions .button { width: 100%; min-width: 0; }
.video-review-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.video-scrubber { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.video-scrubber output { min-width: 54px; color: var(--muted); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.video-scrubber output:last-child { text-align: right; }
.video-scrubber input[type="range"] { --scrub-progress: 0%; appearance: none; -webkit-appearance: none; width: 100%; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; cursor: ew-resize; touch-action: pan-x; }
.video-scrubber input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--blue) 0 var(--scrub-progress), #27374b var(--scrub-progress) 100%); }
.video-scrubber input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8.5px; border: 3px solid #eaf6ff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(21,151,255,.18); }
.video-scrubber input[type="range"]::-moz-range-track { height: 5px; border: 0; border-radius: 999px; background: #27374b; }
.video-scrubber input[type="range"]::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--blue); }
.video-scrubber input[type="range"]::-moz-range-thumb { width: 17px; height: 17px; border: 3px solid #eaf6ff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(21,151,255,.18); }
.video-scrubber input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(21,151,255,.4); }
.video-scrubber input[type="range"]:disabled { opacity: .45; cursor: default; }
.playback-rates, .frame-controls { display: flex; gap: 6px; }
.frame-controls { justify-self: end; }
.video-review-controls button { min-width: 58px; min-height: 40px; padding: 0 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: #0b1320; font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; }
.video-review-controls button:hover, .video-review-controls button.is-active { color: white; border-color: rgba(21,151,255,.52); background: rgba(21,151,255,.13); }
.analyze-submit { width: 100%; }
.dropzone { position: relative; min-height: 260px; border: 1.5px dashed #3b506c; border-radius: 16px; display: grid; place-items: center; overflow: hidden; transition: .2s; }
.dropzone.dragging { border-color: var(--blue); background: rgba(21,151,255,.07); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.drop-copy { display: grid; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.drop-copy strong { color: var(--text); font-size: 1.15rem; }
.upload-icon { display: grid; place-items: center; width: 54px; height: 54px; color: var(--blue); background: rgba(21,151,255,.12); border-radius: 50%; font-size: 1.8rem; }
.dropzone video { width: 100%; max-height: 480px; background: black; }
.dropzone.has-video .drop-copy { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
label { display: grid; gap: 8px; color: #c9d2de; font-size: .88rem; font-weight: 650; }
input, select { width: 100%; border: 1px solid var(--line); background: #0b1320; color: var(--text); border-radius: 10px; padding: 13px 14px; font: inherit; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: #0b1320; color: var(--text); border-radius: 10px; padding: 13px 14px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 50px; border-radius: 12px; border: 1px solid transparent; padding: 0 20px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--blue); color: white; }
.button.secondary { border-color: var(--line); background: var(--panel); color: var(--text); }
.button.danger { background: transparent; color: var(--red); border-color: rgba(255,93,103,.4); }
.button:disabled { opacity: .55; cursor: wait; }
.navigation-progress { position: fixed; z-index: 9999; top: 0; left: 0; width: 0; height: 3px; background: var(--blue); box-shadow: 0 0 12px rgba(21,151,255,.75); opacity: 0; pointer-events: none; transition: width .8s ease, opacity .12s ease; }
.navigation-progress.is-active { width: 82%; opacity: 1; }
.button.full { width: 100%; margin-top: 22px; }
.error { color: #ffd2d5; background: rgba(255,93,103,.12); padding: 14px; border-radius: 10px; }
.capture-guide { margin-top: 80px; }
.dashboard-hero, .compact-hero { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 42px; }
.dashboard-hero > div, .compact-hero > div { max-width: 820px; }
.shell:has(.dashboard-page) { width: 100%; max-width: none; padding-inline: clamp(24px, 4vw, 76px); }
.dashboard-page { width: 100%; max-width: 100%; }
.dashboard-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.dashboard-hero > div { max-width: none; }
.dashboard-hero h1 { white-space: nowrap; font-size: clamp(2.7rem, 4vw, 5.2rem); }
.dashboard-hero .lead { max-width: 900px; }
.compact-hero h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 26px 0; }
.onboarding-banner { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 16px; margin: 0 0 26px; padding: 16px 18px; color: inherit; text-decoration: none; border: 1px solid rgba(73,234,123,.35); border-radius: 14px; background: rgba(73,234,123,.07); }
.onboarding-banner > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #06110a; background: var(--green); font-size: .75rem; font-weight: 900; }
.onboarding-banner > div { display: grid; gap: 4px; }
.onboarding-banner small { color: var(--muted); }
.onboarding-banner > b { color: var(--green); font-size: .85rem; }
.week-strip a { position: relative; display: grid; gap: 5px; place-items: center; padding: 14px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: rgba(17,26,40,.65); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.week-strip a:hover { color: white; border-color: #49617f; background: rgba(22,34,53,.92); transform: translateY(-1px); }
.week-strip a.active { color: white; border-color: var(--blue); background: rgba(21,151,255,.14); box-shadow: inset 0 -2px var(--blue); }
.week-strip small { font-size: .73rem; }
.training-dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(73,234,123,.1); }
.dashboard-sessions { display: grid; gap: 20px; width: 100%; }
.workout-summary { width: 100%; max-width: none; margin: 0; }
.workout-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.workout-summary h2 { margin-bottom: 8px; }
.dashboard-empty { display: grid; justify-items: center; min-height: 270px; align-content: center; }
.dashboard-empty h2 { margin-bottom: 8px; }
.dashboard-empty .button { margin-top: 12px; }
.muted { color: var(--muted); }
.progress-ring { --progress: 0; flex: 0 0 92px; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle closest-side, var(--panel) 79%, transparent 80% 100%), conic-gradient(var(--green) calc(var(--progress) * 1%), var(--line) 0); }
.progress-ring strong { font-size: 1.15rem; }
.progress-ring small { color: var(--muted); }
.movement-list { margin-top: 24px; border-top: 1px solid var(--line); }
.movement-list a { display: grid; grid-template-columns: 42px 1fr auto 20px; gap: 14px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.movement-list a > span:nth-child(2) { display: grid; gap: 4px; }
.movement-list small { color: var(--muted); }
.movement-index { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(21,151,255,.12); color: var(--blue); font-size: .75rem; font-weight: 800; }
.movement-done { color: var(--muted); font-variant-numeric: tabular-nums; }
.session-stack, .history-stack { display: grid; gap: 24px; }
.exercise-card { scroll-margin-top: 20px; }
.exercise-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.exercise-head h2 { margin: 0; }
.exercise-head p { color: var(--muted); margin: 7px 0 0; }
.exercise-head > a { color: #b9ddff; text-decoration: none; font-size: .85rem; font-weight: 700; }
.set-table { margin-top: 16px; }
.set-row { display: grid; grid-template-columns: 42px 64px minmax(66px, .7fr) minmax(58px, .6fr) minmax(58px, .6fr) 54px 54px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(38,53,74,.68); transition: opacity .2s; }
.set-row input { padding: 10px; }
.set-row.is-complete { opacity: .58; }
.set-labels { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.target { display: grid; gap: 2px; color: var(--muted); }
.target small { color: #b9ddff; font-size: .64rem; }
.set-video { display: grid; place-items: center; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); text-decoration: none; font-weight: 900; }
.icon-button.analyzed { color: var(--green); border-color: rgba(73,234,123,.45); }
.icon-button.processing { color: var(--amber); }
.icon-button.disabled { color: #536176; cursor: not-allowed; }
.complete-toggle { display: grid; place-items: center; cursor: pointer; }
.complete-toggle input { position: absolute; opacity: 0; width: 1px; }
.complete-toggle span { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; color: transparent; }
.complete-toggle input:checked + span { color: #06110a; background: var(--green); border-color: var(--green); }
.set-comment { grid-column: 3 / 7; }
.save-state { grid-column: 7; color: var(--muted); font-size: .7rem; text-align: center; }
.error-text { color: var(--red); }
.history-card header { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.history-card header h2 { margin: 0; }
.history-sets > div { display: grid; grid-template-columns: 80px 1fr 100px auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.history-sets span { color: var(--muted); }
.history-sets a { color: #b9ddff; text-decoration: none; font-weight: 700; }
.empty-state, .empty-review { color: var(--muted); text-align: center; }
.guide-grid, .strength-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-grid article { padding: 22px 0; border-top: 1px solid var(--line); }
.guide-grid b { color: var(--blue); display: block; margin-bottom: 22px; }
.guide-grid strong { font-size: 1.05rem; }
.guide-grid p, .strength-card p { color: var(--muted); line-height: 1.55; }
.analysis-flow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 920px; margin: 0 auto 26px; }
.analysis-flow-steps > div { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: #718096; background: rgba(12, 23, 38, .72); }
.analysis-flow-steps b { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #8b9aaf; background: #172438; font-size: .8rem; }
.analysis-flow-steps span { display: grid; min-width: 0; }
.analysis-flow-steps strong { color: inherit; font-size: .83rem; }
.analysis-flow-steps small { overflow: hidden; font-size: .68rem; white-space: nowrap; text-overflow: ellipsis; }
.analysis-flow-steps .is-active { color: var(--text); border-color: rgba(21,151,255,.65); background: rgba(21,151,255,.1); }
.analysis-flow-steps .is-active b { color: white; background: var(--blue); box-shadow: 0 0 0 5px rgba(21,151,255,.12); }
.analysis-flow-steps .is-done { color: #bcefd0; border-color: rgba(73,234,123,.28); }
.analysis-flow-steps .is-done b { color: #05160d; background: var(--green); }
.analysis-setup-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #0b1320; }
.result-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #0b1320; }
.analysis-setup-tabs button,
.result-tabs button { min-height: 46px; padding: 0 16px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.analysis-setup-tabs button.is-active,
.result-tabs button.is-active { color: white; border-color: rgba(21,151,255,.38); background: rgba(21,151,255,.14); box-shadow: inset 0 -2px var(--blue); }
.analysis-settings-copy { margin: 0 0 16px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.auto-clip-source { position: fixed; left: -2px; bottom: -2px; width: 1px; height: 1px; opacity: .01; pointer-events: none; }
.analysis-submit-state { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 360px; padding: 32px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.analysis-submit-state h2,
.analysis-submit-state p { margin: 0; }
.analysis-submit-state .progress-track { width: min(100%, 520px); }
.analysis-submit-state small { color: var(--muted); }
.analysis-submit-spinner { width: 56px; height: 56px; border: 5px solid rgba(21,151,255,.14); border-top-color: var(--blue); border-radius: 50%; animation: analysis-spin .85s linear infinite; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
.job-layout { width: 100%; max-width: 860px; margin: 0 auto; }
.job-layout h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); }
.analysis-process-header { text-align: center; }
.analysis-process-header .lead { margin-inline: auto; }
.progress-panel { margin-top: 28px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.progress-track { height: 9px; background: #08101c; border-radius: 9px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--blue); transition: width .4s; }
.analysis-live-state { display: flex; align-items: center; gap: 8px; color: #a9d9ff; font-size: .82rem; font-weight: 800; }
.analysis-live-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(21,151,255,.12); animation: ai-pulse 1.2s ease-in-out infinite; }
.steps { list-style: none; padding: 28px 0 0; margin: 0; display: grid; gap: 17px; }
.steps li { color: #607086; padding-left: 32px; position: relative; }
.steps li::before { content: "○"; position: absolute; left: 4px; }
.steps li.done { color: var(--green); }
.steps li.done::before { content: "✓"; }
.steps li.active { color: var(--text); font-weight: 700; }
.steps li.active::before { content: "→"; color: var(--blue); }
.privacy-note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 22px; }
.manual-input { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.early-analysis { display: grid; gap: 22px; margin-top: 18px; border-color: rgba(73,234,123,.35); }
.early-analysis[hidden] { display: none; }
.early-analysis h2 { margin-top: 8px; font-size: clamp(1.55rem, 4vw, 2.25rem); }
.early-analysis .lead { margin-top: 8px; font-size: .95rem; }
.early-analysis-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.early-analysis-stats span { display: grid; gap: 3px; padding: 13px; border-radius: 12px; background: #0b1625; }
.early-analysis-stats strong { font-size: 1.25rem; }
.early-analysis-stats small { color: var(--muted); font-size: .68rem; }
.video-finishing { display: flex; align-items: center; gap: 10px; color: #b9ddff; font-size: .8rem; }
.video-finishing i { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(21,151,255,.12); animation: ai-pulse 1.2s ease-in-out infinite; }
@media (max-width: 620px) {
  .analysis-flow-steps { gap: 6px; margin-bottom: 18px; }
  .analysis-flow-steps > div { display: grid; justify-items: center; gap: 6px; padding: 9px 5px; text-align: center; }
  .analysis-flow-steps b { width: 27px; height: 27px; flex-basis: 27px; }
  .analysis-flow-steps small { display: none; }
  .analysis-flow-steps strong { font-size: .72rem; }
  .analysis-process-header { text-align: left; }
  .job-layout h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .progress-panel { margin-top: 18px; padding: 20px; }
  .steps { gap: 13px; padding-top: 22px; font-size: .84rem; }
  .early-analysis-stats span { padding: 10px 8px; }
  .analysis-setup-tabs { gap: 4px; padding: 4px; }
  .analysis-setup-tabs button { min-height: 44px; padding: 0 5px; font-size: .72rem; line-height: 1.15; }
  .result-tabs { gap: 4px; padding: 4px; }
  .result-tabs button { min-height: 44px; padding: 0 4px; font-size: .72rem; }
}
.seed-image img { display: block; max-width: 100%; cursor: crosshair; border-radius: 10px; border: 2px solid var(--blue); }
#segment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#segment-form button { grid-column: 1 / -1; }
.result-header { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.result-tabs { width: 100%; margin: 32px 0 0; }
[data-result-panel] { animation: profile-panel-in .18s ease-out; }
.result-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.quality-banner { margin: 30px 0; display: flex; gap: 15px; padding: 16px 20px; background: rgba(255,191,63,.09); border: 1px solid rgba(255,191,63,.3); border-radius: 12px; color: #f1dba9; }
.video-card { padding: 12px; margin-top: 36px; }
.video-card video { width: 100%; max-height: 76vh; background: black; border-radius: 13px; display: block; }
.video-viewer-expand,
.video-viewer-close {
  position: absolute;
  z-index: 5;
  top: 22px;
  right: 22px;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: white;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(5,11,19,.82);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: .74rem;
  cursor: pointer;
}
.video-viewer-expand span,
.video-viewer-close span { font-size: 1.1rem; line-height: 1; }
.video-viewer-close { display: none; }
.video-card:has(.video-viewer-expand) { position: relative; }
body.analysis-video-expanded { overflow: hidden; overscroll-behavior: none; }
body.analysis-video-expanded .mobile-header,
body.analysis-video-expanded .mobile-tabbar,
body.analysis-video-expanded .site-footer { display: none; }
.video-card.is-expanded {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  width: 100vw;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 9px;
  margin: 0;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #03070c;
}
.video-card.is-expanded .video-viewer-expand { display: none; }
.video-card.is-expanded .video-viewer-close {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: inline-flex;
}
.video-card.is-expanded .analysis-layer-player,
.video-card.is-expanded .review-player {
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.video-card.is-expanded video {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
}
.video-card.is-expanded .analysis-layer-controls {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 0 2px;
  scrollbar-width: none;
}
.video-card.is-expanded .analysis-layer-controls::-webkit-scrollbar { display: none; }
.video-card.is-expanded .analysis-layer-controls > span { flex: 0 0 auto; }
.video-card.is-expanded .analysis-layer-controls label {
  flex: 0 0 auto;
  min-height: 40px;
}
.video-card.is-expanded .video-review-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 8px;
  padding: 0 2px;
}
.video-card.is-expanded .video-scrubber { grid-column: 1 / -1; }
.video-card.is-expanded .playback-rates,
.video-card.is-expanded .frame-controls { display: flex; gap: 6px; }
.video-card.is-expanded .video-review-controls button {
  min-width: 52px;
  min-height: 42px;
}
.analysis-layer-player {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: black;
}
.analysis-layer-player video { position: relative; z-index: 1; }
.analysis-layer-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.analysis-layer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 12px 4px 2px;
}
.analysis-layer-controls > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.analysis-layer-controls label {
  display: inline-flex;
  min-height: 34px;
  gap: 7px;
  align-items: center;
  margin: 0;
  padding: 0 10px;
  color: #b7c3d2;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b1523;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
.analysis-layer-controls label:has(input:checked) {
  color: white;
  border-color: rgba(21,151,255,.44);
  background: rgba(21,151,255,.1);
}
.analysis-layer-controls input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.analysis-layer-controls i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #77879b;
}
.analysis-layer-controls .layer-original i { background: #e8edf3; }
.analysis-layer-controls .layer-bar-path i { background: #1597ff; }
.analysis-layer-controls .layer-plate i { background: #ffb13b; }
.analysis-layer-controls .layer-pose i { background: #49ea7b; }
.analysis-layer-controls .layer-phase i { background: #705cff; }
.video-card .video-review-controls { padding: 12px 4px 2px; }
.section-block { margin-top: 78px; }
.priority-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.priority-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); }
.priority-card.main-priority { border-color: rgba(21,151,255,.6); box-shadow: inset 0 3px var(--blue); }
.priority-card.muted { opacity: .72; }
.priority-top { display: flex; justify-content: space-between; gap: 15px; color: var(--blue); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.priority-card h3 { font-size: 1.65rem; margin-top: 24px; }
.priority-card p, .priority-card li, .limitations li { color: var(--muted); line-height: 1.65; }
.priority-card h4 { margin-top: 24px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
blockquote { margin: 0; border-left: 3px solid var(--blue); padding: 4px 0 4px 16px; line-height: 1.6; font-weight: 700; }
.drills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.drills span { background: #1b2d45; color: #b9ddff; border-radius: 99px; padding: 8px 12px; font-size: .82rem; }
.strength-card { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.strength-card > span { color: var(--green); font-size: 1.4rem; }
.strength-card h3 { font-size: 1rem; }
.strength-card p { margin: 0; font-size: .9rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.timeline { display: grid; }
.timeline > div { display: grid; grid-template-columns: 20px 1fr auto auto; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.timeline span { width: 9px; height: 9px; background: var(--blue); border-radius: 50%; }
.timeline b { font-variant-numeric: tabular-nums; }
.timeline small { color: var(--muted); width: 35px; text-align: right; }
.chart { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.analysis-chart-picker {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.analysis-chart-picker .chart { display: block; }
.analysis-chart-picker > button {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: zoom-in;
}
.analysis-chart-picker > button:first-of-type { left: 0; }
.analysis-chart-picker > button:last-of-type {
  right: 0;
  border-left-color: rgba(255, 255, 255, .12);
}
.analysis-chart-picker > button:hover,
.analysis-chart-picker > button:focus-visible {
  border-color: var(--blue);
  background: rgba(21, 151, 255, .08);
  outline: none;
}
.analysis-chart-picker > button span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  color: white;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(4, 10, 18, .82);
  font-size: .68rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s;
}
.analysis-chart-picker > button:hover span,
.analysis-chart-picker > button:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}
.analysis-image-dialog {
  width: min(94vw, 1100px);
  max-width: 1100px;
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  border: 1px solid #30445d;
  border-radius: 18px;
  background: #0d1928;
}
.analysis-image-dialog::backdrop {
  background: rgba(2, 7, 14, .88);
  backdrop-filter: blur(8px);
}
.analysis-image-dialog-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(92dvh, 850px);
}
.analysis-image-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.analysis-image-dialog h2,
.analysis-image-dialog .eyebrow { margin: 0; }
.analysis-image-explanation {
  display: grid;
  gap: 5px;
  padding: 14px 20px;
  color: #dce9f6;
  border-bottom: 1px solid var(--line);
  background: rgba(21, 151, 255, .055);
}
.analysis-image-explanation strong { color: #a9d9ff; font-size: .78rem; }
.analysis-image-explanation p,
.analysis-image-explanation small { margin: 0; line-height: 1.5; }
.analysis-image-explanation p { font-size: .82rem; }
.analysis-image-explanation small { color: var(--muted); font-size: .7rem; }
.analysis-image-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background: #07101b;
}
.analysis-image-stage canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 10px;
}
.result-page .analysis-flow-steps { margin-bottom: 18px; }
.result-page .result-header .lead { margin: 16px 0 0; }
.result-page .result-tabs { margin-top: 22px; }
.result-page .quality-banner { margin: 18px 0; }
.result-page .video-card { margin-top: 20px; }
.result-page .section-block { margin-top: 42px; }
.result-page .two-column.section-block + .two-column.section-block {
  margin-top: 24px;
}
.metrics { margin: 0; }
.metrics > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.metrics dt { color: var(--muted); text-transform: capitalize; }
.metrics dd { margin: 0; font-weight: 700; text-align: right; }
.downloads { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; align-items: center; padding-top: 45px; border-top: 1px solid var(--line); }
.coach-review-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.coach-review-grid form { display: grid; gap: 17px; }
.review-fields { grid-template-columns: 1fr 1fr; }
.review-list { display: grid; align-content: start; gap: 12px; }
.review-card { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.review-card > div { display: flex; justify-content: space-between; gap: 12px; }
.review-card > div span { color: var(--blue); font-size: .75rem; text-transform: uppercase; font-weight: 800; }
.review-card p { color: var(--muted); line-height: 1.6; }
.review-card.ai-feedback { border-color: rgba(21,151,255,.5); background: rgba(21,151,255,.07); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.profile-utility-row { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.profile-avatar-editor { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(21,151,255,.045); }
.profile-avatar-editor .profile-avatar { width: 54px; height: 54px; border-radius: 14px; font-size: .9rem; }
.profile-avatar-editor > div { display: grid; gap: 2px; }
.profile-avatar-editor small { color: var(--muted); font-size: .7rem; }
.profile-avatar-editor .save-message { grid-column: 2 / -1; margin: 0; }
.profile-club-card { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; }
.profile-club-card :is(h2, p) { margin-block: 0; }
.profile-grid form { display: grid; gap: 18px; }
.profile-grid h2 { font-size: 2rem; }
.profile-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bodyweight-history { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(8,13,22,.42); }
.bodyweight-history > span { margin-right: auto; color: var(--muted); font-size: .72rem; font-weight: 750; }
.bodyweight-history b { padding: 6px 8px; border-radius: 8px; background: #172438; font-size: .74rem; }
.bodyweight-history small { color: var(--muted); font-weight: 500; }
.profile-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 100%; min-width: 0; margin-bottom: 22px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10,17,28,.76); }
.profile-tabs button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 72px; padding: 12px 16px; color: var(--muted); border: 1px solid transparent; border-radius: 11px; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.profile-tabs button:hover { color: white; background: rgba(255,255,255,.025); }
.profile-tabs button[aria-selected="true"] { color: white; border-color: rgba(21,151,255,.4); background: rgba(21,151,255,.11); box-shadow: inset 0 -2px var(--blue); }
.profile-tabs button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; color: var(--blue); border-radius: 9px; background: rgba(21,151,255,.12); font-size: .7rem; font-weight: 900; }
.profile-tabs button strong { align-self: end; font-size: .92rem; }
.profile-tabs button small { align-self: start; color: var(--muted); font-size: .72rem; }
.profile-tab-panel { animation: profile-panel-in .18s ease-out; }
@keyframes profile-panel-in { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.profile-import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 22px;
  align-items: start;
}

/* Session execution: keep starting, set logging and finishing in one flow. */
.session-execution-bar {
  position: sticky;
  z-index: 12;
  top: .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.25rem 0 1.25rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(21, 151, 255, .34);
  border-radius: .9rem;
  background: rgba(12, 21, 34, .94);
  box-shadow: 0 .7rem 2rem rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}

.session-execution-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
}

.session-execution-status > div {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.session-execution-status small {
  color: var(--blue);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.session-execution-status strong {
  overflow: hidden;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-status-dot {
  width: .7rem;
  height: .7rem;
  flex: 0 0 .7rem;
  border-radius: 50%;
  background: #64758b;
  box-shadow: 0 0 0 .3rem rgba(100, 117, 139, .12);
}

.session-status-dot.is-active {
  background: var(--blue);
  box-shadow: 0 0 0 .3rem rgba(21, 151, 255, .13);
}

.session-status-dot.is-complete {
  background: var(--green);
  box-shadow: 0 0 0 .3rem rgba(73, 234, 123, .13);
}

.finish-training-dialog {
  width: min(42rem, calc(100vw - 2rem));
}

.finish-training-dialog > form {
  display: grid;
  gap: 1rem;
}

.finish-training-fields {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(0, .8fr));
  gap: .75rem;
}

.finish-training-dialog label > small {
  color: var(--muted);
  font-weight: 500;
}

.finish-training-share:empty {
  display: none;
}

.set-table {
  display: grid;
  gap: .7rem;
  border-top: 0;
}

.missing-rm-notice {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  margin: .9rem 0;
  padding: .75rem;
  border: 1px solid rgba(255, 191, 63, .28);
  border-radius: .75rem;
  background: rgba(255, 191, 63, .06);
}

.missing-rm-notice > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  color: var(--amber);
  border-radius: .6rem;
  background: rgba(255, 191, 63, .12);
  font-weight: 850;
}

.missing-rm-notice p {
  display: grid;
  gap: .1rem;
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}

.missing-rm-notice p strong {
  color: var(--text);
}

.missing-rm-notice a {
  color: var(--amber);
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}

.set-row.set-form {
  display: grid;
  grid-template-columns: 3.4rem 6.2rem repeat(3, minmax(5rem, 1fr)) auto;
  gap: .65rem;
  align-items: end;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: rgba(7, 14, 24, .34);
}

.set-row.set-form.is-complete {
  opacity: .72;
  border-color: rgba(73, 234, 123, .28);
  background: rgba(73, 234, 123, .035);
}

.set-number,
.set-target {
  display: grid;
  align-content: center;
  align-self: stretch;
}

.set-number {
  justify-items: center;
  border-radius: .65rem;
  background: rgba(21, 151, 255, .1);
}

.set-number span,
.set-target span,
.set-field > span,
.set-comment-field > span {
  color: #74869d;
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.set-number strong {
  font-size: 1.2rem;
}

.set-target {
  gap: .12rem;
}

.set-target strong {
  font-size: .92rem;
}

.set-target small {
  color: var(--muted);
  font-size: .66rem;
}

.set-field {
  display: grid;
  min-width: 0;
  gap: .35rem;
}

.set-field input {
  min-width: 0;
  height: 2.75rem;
  padding: .55rem .65rem;
  font-weight: 750;
}

.set-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
}

.set-actions .complete-toggle {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.set-actions .complete-toggle b {
  display: none;
  font-size: .68rem;
}

.set-comment-field {
  display: grid;
  grid-column: 3 / 7;
  gap: .35rem;
}

.set-comment-field .set-comment {
  grid-column: auto;
  min-width: 0;
  height: 2.5rem;
  padding: .5rem .65rem;
}

.set-form > .save-state {
  grid-column: 6;
  min-height: .8rem;
  text-align: right;
}

@media (max-width: 720px) {
  .session-page .shell {
    padding-top: 1rem;
  }

  .session-page .compact-hero {
    gap: .75rem;
    margin-bottom: 1rem;
  }

  .session-page .compact-hero h1 {
    font-size: 2.35rem;
  }

  .session-page .compact-hero .lead {
    display: none;
  }

  .session-page .compact-hero > .button {
    display: none;
  }

  .session-execution-bar {
    top: 4.65rem;
    margin: 0 0 1rem;
    padding: .65rem .75rem;
  }

  .session-execution-bar .button {
    min-height: 42px;
    padding-inline: .8rem;
    font-size: .76rem;
  }

  .finish-training-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 1rem);
    margin: auto 0 0;
    border-radius: 1.1rem 1.1rem 0 0;
  }

  .finish-training-dialog > form {
    gap: .8rem;
    padding: 1rem;
  }

  .finish-training-dialog .dialog-header h2 {
    margin-bottom: 0;
    font-size: 1.7rem;
  }

  .finish-training-fields {
    grid-template-columns: 1fr 1fr;
  }

  .finish-training-fields label:first-child {
    grid-column: 1 / -1;
  }

  .exercise-card {
    padding: 1rem;
  }

  .exercise-head {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    padding-bottom: 1rem;
  }

  .exercise-head h2 {
    font-size: 1.6rem;
  }

  .exercise-head p:not(.eyebrow) {
    font-size: .84rem;
  }

  .missing-rm-notice {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .missing-rm-notice a {
    grid-column: 2;
  }

  .set-row.set-form {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
    align-items: stretch;
    padding: .75rem;
    font-size: .8rem;
  }

  .set-number {
    grid-column: 1;
    min-height: 3.2rem;
  }

  .set-target {
    grid-column: 2 / 5;
  }

  .set-actions {
    grid-column: 5 / 7;
    justify-content: flex-end;
  }

  .set-field--weight {
    grid-column: 1 / 3;
  }

  .set-field--reps {
    grid-column: 3 / 5;
  }

  .set-field--rpe {
    grid-column: 5 / 7;
  }

  .set-field input {
    width: 100%;
    height: 2.9rem;
    padding: .55rem;
    font-size: 1rem;
  }

  .set-comment-field {
    grid-column: 1 / 7;
  }

  .set-comment-field .set-comment {
    height: 2.75rem;
    padding: .55rem;
  }

  .set-form > .save-state {
    grid-column: 1 / 7;
    min-height: 0;
    font-size: .66rem;
    text-align: right;
  }
}

@media (max-width: 620px) {
  .result-page .shell { padding-top: 24px; }
  .result-page .analysis-flow-steps { margin-bottom: 16px; }
  .result-page .result-header h1 {
    font-size: clamp(2.45rem, 12vw, 3.3rem);
  }
  .result-page .result-header .lead {
    margin-top: 12px;
    line-height: 1.5;
  }
  .result-page .result-tabs { margin-top: 18px; }
  .result-page .quality-banner {
    gap: 6px;
    margin: 14px 0;
    padding: 13px 15px;
  }
  .result-page .video-card { margin-top: 14px; }
  .result-page .section-block { margin-top: 28px; }
  .result-page .section-block > .eyebrow { margin-bottom: 8px; }
  .result-page .panel { padding: 18px; }
  .result-page .metrics > div { padding: 10px 0; }

  .analysis-chart-picker > button span {
    right: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    padding: 5px 7px;
    font-size: .58rem;
    opacity: 1;
    transform: none;
  }

  .analysis-image-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .analysis-image-dialog-shell { height: 100dvh; }
  .analysis-image-dialog header {
    padding: max(16px, env(safe-area-inset-top)) 16px 14px;
  }
  .analysis-image-stage {
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  }
}

@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

.import-provider-card {
  display: grid;
  gap: 24px;
}

.import-provider-card > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.import-provider-logo {
  display: grid;
  place-items: center;
  width: 176px;
  height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(56, 189, 248, .32);
  border-radius: 13px;
  background: #080d16;
}

.import-provider-logo img {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-import-form {
  display: grid;
  gap: 14px;
}

.import-file-picker {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 20px;
  border: 1px dashed #3b6688;
  border-radius: 15px;
  background: rgba(56, 189, 248, .045);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.import-file-picker:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, .08);
}

.import-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.import-file-picker span {
  display: grid;
  gap: 6px;
}

.import-file-picker small {
  color: var(--muted);
}

.btwb-import-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btwb-import-button img {
  width: 78px;
  height: 24px;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,.28);
}

.import-summary-card h2 {
  margin-bottom: 10px;
}

.import-privacy-note {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(70,240,164,.24);
  border-radius: 12px;
  background: rgba(70,240,164,.055);
}

.import-privacy-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.relationship-card > p { color: var(--muted); line-height: 1.7; }
.profile-facts { margin: 28px 0; }
.profile-facts > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 800; }
.future-feature { display: grid; gap: 7px; padding: 18px; border: 1px dashed #3b506c; border-radius: 12px; }
.future-feature span { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.save-message { min-height: 20px; color: var(--green); margin: 0; }
.profile-lifts { margin-top: 0; }
.profile-lifts-header { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.profile-lifts-header > div { max-width: 760px; }
.profile-lifts-header h2 { margin-bottom: 10px; }
.athlete-lift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.athlete-lift-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(9,16,27,.68); }
.athlete-lift-card > header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); }
.athlete-lift-card > header > div:first-child { display: grid; gap: 5px; }
.athlete-lift-card > header span { color: var(--blue); font-size: .62rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.athlete-lift-card h3 { margin: 0; font-size: 1.3rem; }
.lift-primary-max { display: grid; justify-items: end; }
.lift-primary-max strong { font-size: 1.65rem; line-height: 1; }
.lift-primary-max small { margin-top: 4px; color: var(--muted); font-size: .62rem; }
.lift-primary-max .bodyweight-ratio { color: var(--green); }
.rm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.rm-chip { display: grid; justify-items: start; gap: 5px; min-height: 67px; padding: 11px; color: var(--muted); border: 0; background: #101927; font: inherit; text-align: left; cursor: pointer; }
.rm-chip:hover { color: white; background: #17263a; }
.rm-chip span { font-size: .61rem; font-weight: 850; letter-spacing: .06em; }
.rm-chip strong { color: #728198; font-size: .72rem; }
.rm-chip.has-value strong { color: white; }
.rm-chip.has-value { box-shadow: inset 0 -2px rgba(21,151,255,.5); }
.athlete-lift-card > footer { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; border-top: 0; }
.profile-lifts-empty { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; min-height: 120px; padding: 20px; border: 1px dashed #3b506c; border-radius: 14px; }
.profile-lifts-empty > span { display: grid; place-items: center; width: 40px; height: 40px; color: #06110a; border-radius: 50%; background: var(--green); font-size: .7rem; font-weight: 900; }
.profile-lifts-empty p { margin: 5px 0 0; color: var(--muted); }
.profile-dialog { width: min(680px, calc(100vw - 30px)); }
.profile-dialog > div { display: grid; gap: 17px; padding: 25px; }
.profile-dialog > div > header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.lift-picker-list { display: grid; max-height: 55vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.lift-picker-list button { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 58px; padding: 10px 13px; color: var(--text); border: 0; border-bottom: 1px solid var(--line); background: #0d1624; font: inherit; text-align: left; cursor: pointer; }
.lift-picker-list button:hover { background: #15243a; }
.lift-picker-list button.is-selected { background: rgba(73,234,123,.055); }
.lift-picker-list button > span { display: grid; gap: 4px; }
.lift-picker-list button strong { font-size: .82rem; }
.lift-picker-list button small { color: var(--muted); font-size: .65rem; }
.lift-picker-list button b { color: var(--blue); font-size: .68rem; white-space: nowrap; }
.lift-picker-list button.is-selected b { color: var(--green); }
.rm-form-grid { display: grid; grid-template-columns: .75fr 1fr 1fr; gap: 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 42px; }
.input-suffix span { position: absolute; top: 50%; right: 13px; color: var(--muted); transform: translateY(-50%); }
.rm-explanation { margin: 0; padding: 12px; color: var(--muted); border-left: 2px solid var(--blue); background: rgba(21,151,255,.055); font-size: .72rem; line-height: 1.5; }
.rm-history-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.rm-history-list > div { display: grid; grid-template-columns: 70px 1fr auto; gap: 15px; align-items: center; min-height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.rm-history-list > div strong { color: var(--blue); }
.rm-history-list > div b { font-size: .9rem; }
.rm-history-list > div span { color: var(--muted); font-size: .72rem; }
.builder-header { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 26px; }
.builder-header h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.builder-actions { display: flex; align-items: end; gap: 10px; }
.builder-actions label { min-width: 220px; }
.week-toolbar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.week-toolbar > div { display: grid; justify-items: center; min-width: 210px; }
.week-toolbar span { color: var(--muted); font-size: .78rem; }
.button.compact { min-height: 38px; padding: 0 14px; font-size: .82rem; }
.program-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; align-items: stretch; width: 100%; min-width: 0; padding-bottom: 18px; overflow: hidden; }
.program-board-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.program-board-scroll { scrollbar-width: thin; scrollbar-color: #4b6078 #111a28; }
.program-board-scroll::-webkit-scrollbar { height: 9px; }
.program-board-scroll::-webkit-scrollbar-track { background: #111a28; border-radius: 9px; }
.program-board-scroll::-webkit-scrollbar-thumb { background: #4b6078; border: 2px solid #111a28; border-radius: 9px; }
.shell:has(.program-board-scroll) { max-width: none; padding: 0; }
.program-workspace { --builder-rail-width: 274px; display: grid; grid-template-columns: var(--builder-rail-width) minmax(0, 1fr); width: 100%; max-width: 100%; min-width: 0; min-height: calc(100vh - 67px); overflow: hidden; }
.builder-rail { position: sticky; top: 0; z-index: 5; align-self: start; display: grid; align-content: start; gap: 10px; min-height: 100vh; padding: 28px 16px; border-right: 1px solid var(--line); background: rgba(13,22,35,.94); backdrop-filter: blur(18px); }
.column-resizer { position: absolute; z-index: 40; top: 0; right: -7px; width: 14px; height: 100%; padding: 0; border: 0; background: transparent; cursor: col-resize; touch-action: none; }
.column-resizer::before { content: ""; position: absolute; inset: 0 6px; background: transparent; transition: background .15s, box-shadow .15s; }
.column-resizer::after { content: ""; position: absolute; top: 50%; left: 4px; width: 6px; height: 44px; border: 1px solid #3b506b; border-radius: 99px; background: #142236; opacity: .32; transform: translateY(-50%); transition: opacity .15s, border-color .15s, background .15s; }
.column-resizer:hover::before, .column-resizer:focus-visible::before, .column-resizer.is-dragging::before { background: var(--blue); box-shadow: 0 0 14px rgba(21,151,255,.35); }
.column-resizer:hover::after, .column-resizer:focus-visible::after, .column-resizer.is-dragging::after { opacity: 1; border-color: var(--blue); background: #173a58; }
.column-resizer:focus-visible { outline: none; }
html.is-column-resizing, html.is-column-resizing * { cursor: col-resize !important; user-select: none !important; }
.sidebar-nav p { font-size: .68rem; }
.sidebar-nav a { font-size: .9rem; }
.sidebar-ai strong, .sidebar-profile strong { font-size: .8rem; }
.sidebar-ai small, .sidebar-profile small { font-size: .69rem; }
.rail-intro { padding: 0 6px 17px; }
.rail-intro h2 { margin: 8px 0 9px; font-size: 1.35rem; }
.rail-intro p, .rail-section-body p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.rail-kicker { color: var(--blue); font-size: .61rem; font-weight: 900; letter-spacing: .16em; }
.rail-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,25,39,.82); }
.rail-section > summary { display: grid; min-height: 43px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 0 12px; color: var(--text); cursor: pointer; list-style: none; }
.rail-section > summary::-webkit-details-marker { display: none; }
.rail-section > summary strong { font-size: .76rem; letter-spacing: .035em; text-transform: uppercase; }
.rail-section > summary > span:last-child { color: var(--muted); transition: transform .15s ease; }
.rail-section[open] > summary { border-bottom: 1px solid var(--line); }
.rail-section[open] > summary > span:last-child { transform: rotate(180deg); }
.rail-section > header { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; min-height: 43px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.rail-section > header > span { color: var(--blue); font-size: .62rem; font-weight: 900; }
.rail-section > header strong { font-size: .76rem; letter-spacing: .035em; text-transform: uppercase; }
.rail-section > header b:not(.soon-pill) { display: grid; place-items: center; min-width: 24px; height: 21px; padding: 0 6px; color: #c4d3e4; border-radius: 99px; background: #26364b; font-size: .62rem; }
.rail-section-body { display: grid; gap: 11px; padding: 13px 12px 14px; }
.rail-section-body label { font-size: .72rem; }
.rail-section-body select { padding: 10px; font-size: .76rem; }
.rail-section-body .button { width: 100%; }
.rail-link { display: flex; justify-content: space-between; color: #9dd4ff; text-decoration: none; font-size: .73rem; font-weight: 800; }
.rail-ai-section { border-color: rgba(140,102,255,.32); }
.rail-ai-section textarea { min-height: 82px; padding: 10px; font-size: .72rem; }
.rail-ai-section small { color: #718098; font-size: .64rem; line-height: 1.4; }
.ai-button { color: #cbbdff; border: 1px solid rgba(140,102,255,.4); background: rgba(140,102,255,.1); }
.ai-button.is-loading { opacity: 1; color: #e0d8ff; border-color: rgba(140,102,255,.65); background: rgba(140,102,255,.16); }
.ai-button-spinner { display: none; width: 14px; height: 14px; border: 2px solid rgba(203,189,255,.28); border-top-color: #cbbdff; border-radius: 50%; }
.ai-button.is-loading .ai-button-spinner { display: inline-block; animation: ai-spin .8s linear infinite; }
.ai-progress { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: start; }
.ai-progress-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #617087; }
.ai-progress time { color: #9ba8ff; font-size: .62rem; font-variant-numeric: tabular-nums; }
.ai-progress.is-active .ai-progress-dot { background: #a88bff; box-shadow: 0 0 0 4px rgba(140,102,255,.12); animation: ai-pulse 1.2s ease-in-out infinite; }
.ai-progress.is-complete .ai-progress-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(73,234,123,.1); }
.ai-progress.is-error .ai-progress-dot { background: var(--red); }
.ai-draft-sessions { display: grid; gap: 14px; }
.ai-draft-session { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.ai-draft-session h3 { margin: 0 0 6px; font-size: 1rem; }
.ai-draft-session > p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; }
.ai-draft-exercise { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.05); font-size: .82rem; }
.ai-draft-exercise span { color: var(--muted); text-align: right; }
.ai-draft-wod-meta { margin: 8px 0; color: #65f0ad; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.ai-draft-wod-segment { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 8px 0 4px; border-top: 1px solid rgba(101,240,173,.24); font-size: .78rem; text-transform: uppercase; }
.ai-draft-wod-segment > strong { color: #65f0ad; }
.ai-draft-wod-segment > span { color: var(--muted); text-align: right; text-transform: none; }
.ai-draft-warnings { padding: 12px; color: #ffd58d; border: 1px solid rgba(255,190,86,.3); border-radius: 10px; background: rgba(255,190,86,.06); font-size: .78rem; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 50% { opacity: .38; transform: scale(.8); } }
.rail-tip { display: grid; gap: 7px; margin-top: 4px; padding: 13px; border-left: 2px solid var(--green); background: rgba(73,234,123,.045); }
.rail-tip span { color: var(--green); font-size: .58rem; font-weight: 900; letter-spacing: .12em; }
.rail-tip p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.builder-canvas { min-width: 0; padding: 34px 18px 80px; }
.builder-library-count { display: grid; justify-items: end; color: var(--muted); font-size: .72rem; }
.builder-library-count strong { color: var(--text); font-size: 1.4rem; }
.day-column { display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; min-width: 0; height: max(520px, calc(100vh - 330px)); border: 1px solid var(--line); border-radius: 15px; background: rgba(8,13,22,.68); overflow: hidden; }
.day-column > header { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; color: #bedfff; background: #173a58; font-size: .8rem; }
.day-column.is-today { border-color: rgba(21,151,255,.8); box-shadow: 0 0 0 1px rgba(21,151,255,.2); }
.day-column.is-today > header { background: var(--blue); color: white; }
.day-content { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 10px; overflow-y: auto; padding: 9px; }
.day-content > .builder-session { min-height: 142px; flex: 0 0 auto; }
.builder-session { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; background: #101824; overflow: hidden; }
.builder-session-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 15px 14px 10px; }
.builder-session-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.builder-session-head .eyebrow { font-size: .62rem; margin-bottom: 6px; }
.training-block-stack { display: grid; gap: 8px; margin: 0 7px 9px; }
.training-block-stack > .training-block { margin: 0; }
.training-block { order: calc(10 + var(--block-order, 0)); margin: 0 7px 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,14,24,.5); }
.training-block-crossfit { border-color: rgba(70,240,164,.3); }
.training-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.training-block-head > div { display: grid; min-width: 0; gap: 2px; }
.training-block-head span { color: var(--blue); font-size: .58rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.training-block-crossfit .training-block-head span { color: #65f0ad; }
.training-block-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.training-block-head > .block-actions { display: flex; flex-wrap: nowrap; gap: 3px; opacity: .78; }
.training-block:hover .training-block-head > .block-actions { opacity: 1; }
.training-block .wod-badges { padding: 0 10px; }
.training-block-coming-soon { margin: 0; padding: 12px; color: var(--muted); font-size: .72rem; }
.add-training-block { order: 90; width: calc(100% - 14px); min-height: 34px; margin: 0 7px 9px; color: var(--muted); border: 1px dashed #3b506c; border-radius: 8px; background: transparent; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.add-training-block:hover { color: white; border-color: var(--blue); background: rgba(21,151,255,.07); }
.plain-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; padding: 0; color: #9eb3ca; border: 1px solid rgba(91,119,150,.38); border-radius: 7px; background: rgba(21,36,54,.72); font: inherit; cursor: pointer; transition: color .15s, border-color .15s, background .15s, opacity .15s; }
.plain-icon:hover { color: white; border-color: rgba(21,151,255,.7); background: rgba(21,151,255,.16); }
.plain-icon:disabled { opacity: .22; cursor: default; }
.training-block .block-actions .plain-icon:disabled { display: none; }
.action-icon::before { content: ""; display: block; width: 15px; height: 15px; background: currentColor; mask-repeat: no-repeat; mask-position: center; mask-size: contain; }
.icon-edit::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 20 4.6-1 10-10a2.1 2.1 0 0 0-3-3l-10 10L4 20Zm10-12 3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-up::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 14 6-6 6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-down::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 10 6 6 6-6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-delete { color: #ff8d9c; border-color: rgba(255,87,111,.35); background: rgba(255,87,111,.08); }
.icon-delete::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M9 7V4h6v3m-9 0 1 13h10l1-13M10 11v5m4-5v5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-delete:hover { color: white; border-color: #ff5770; background: rgba(255,87,111,.22); }
.session-notes { margin: 0; padding: 0 14px 13px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.builder-exercises { display: grid; gap: 5px; }
.builder-exercise { position: relative; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 64px; padding: 10px 8px 10px 0; background: #1b2533; }
.movement-accent { align-self: stretch; border-radius: 0 4px 4px 0; background: var(--blue); }
.movement-accent.accent-1 { background: var(--green); }
.movement-accent.accent-2 { background: var(--amber); }
.movement-accent.accent-3 { background: #8c66ff; }
.builder-exercise > div:nth-child(2) { display: grid; min-width: 0; gap: 5px; }
.builder-exercise strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.builder-exercise small { color: var(--muted); }
.block-actions { display: flex; flex-wrap: nowrap; gap: 2px; opacity: .7; transition: opacity .15s; }
.builder-exercise:hover .block-actions { opacity: 1; }
.add-exercise-button, .add-session-button { width: calc(100% - 20px); margin: 10px; min-height: 38px; border: 1px solid rgba(21,151,255,.7); border-radius: 8px; color: #8dceff; background: transparent; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.add-exercise-button:hover, .add-session-button:hover { color: white; background: rgba(21,151,255,.11); }
.add-session-button { width: 100%; margin: 0; border-style: dashed; }
.day-content > .add-session-button { flex: 0 0 auto; margin-top: auto; }
.builder-session-footer { display: flex; order: 100; justify-content: space-between; gap: 8px; padding: 8px 12px 12px; }
.text-button { padding: 4px; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: .72rem; cursor: pointer; }
.text-button:hover { color: white; }
.danger-text { color: #d98086; }
.empty-day { display: grid; place-items: center; min-height: 120px; padding: 16px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.empty-day span { color: var(--muted); font-weight: 800; }
.empty-day p { margin: 5px 0 0; color: #5f6e82; font-size: .76rem; }
.rail-kicker { font-size: .66rem; }
.rail-intro p, .rail-section-body p { font-size: .81rem; }
.rail-section > header > span { font-size: .67rem; }
.rail-section > header strong { font-size: .81rem; }
.rail-section-body label { font-size: .77rem; }
.rail-section-body select { font-size: .81rem; }
.rail-link { font-size: .78rem; }
.rail-ai-section textarea { font-size: .77rem; }
.rail-ai-section small { font-size: .69rem; }
.rail-tip span { font-size: .63rem; }
.rail-tip p { font-size: .73rem; }
.day-column > header { font-size: .84rem; }
.empty-day p { font-size: .8rem; }
.builder-dialog { width: min(540px, calc(100vw - 30px)); max-height: calc(100dvh - 32px); padding: 0; color: var(--text); border: 1px solid #2b3f58; border-radius: 15px; background: var(--panel); box-shadow: 0 28px 100px rgba(0,0,0,.65); }
.builder-dialog::backdrop { background: rgba(2,7,13,.78); backdrop-filter: blur(5px); }
.builder-dialog form { display: grid; gap: 14px; max-height: calc(100dvh - 34px); padding: 21px; overflow-y: auto; }
.builder-dialog header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.builder-dialog h2 { margin: 0; font-size: 1.55rem; }
.dialog-compact { width: min(480px, calc(100vw - 30px)); }
.block-dialog { width: min(460px, calc(100vw - 30px)); }
.block-dialog > div { display: grid; gap: 13px; padding: 20px; }
.block-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.block-type-grid button { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; min-height: 70px; padding: 11px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: rgba(8,13,22,.6); font: inherit; text-align: left; cursor: pointer; }
.block-type-grid button:hover:not(:disabled) { border-color: var(--blue); background: rgba(21,151,255,.09); }
.block-type-grid button:disabled { opacity: .42; cursor: default; }
.block-type-grid button > span { grid-row: 1 / 3; color: var(--blue); font-size: .65rem; font-weight: 900; }
.block-type-grid button strong { font-size: .9rem; }
.block-type-grid button small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.dialog-close { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; padding: 0; color: #9eb3ca; border: 1px solid rgba(91,119,150,.38); border-radius: 8px; background: rgba(21,36,54,.72); font-size: 1.25rem; cursor: pointer; }
.dialog-close:hover { color: white; border-color: var(--blue); background: rgba(21,151,255,.15); }
.app-confirm-dialog { width: min(420px, calc(100vw - 30px)); }
.app-confirm-dialog form { grid-template-columns: 42px minmax(0, 1fr); gap: 15px; padding: 22px; overflow: visible; }
.confirm-dialog-icon { display: grid; place-items: center; width: 40px; height: 40px; color: #ff8d9c; border: 1px solid rgba(255,87,111,.32); border-radius: 11px; background: rgba(255,87,111,.1); }
.confirm-dialog-icon::before { width: 19px; height: 19px; }
.confirm-dialog-copy { display: grid; gap: 7px; }
.confirm-dialog-copy .eyebrow { margin: 0; }
.confirm-dialog-copy h2 { font-size: 1.35rem; }
.confirm-dialog-copy p:last-child { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.app-confirm-dialog .dialog-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 3px; }
.exercise-picker-label { position: relative; }
.exercise-picker { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; overflow: hidden; color: var(--text); border: 1px solid #38516e; border-radius: 11px; background: #101a28; box-shadow: 0 22px 60px rgba(0,0,0,.55); }
.exercise-picker > header { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.exercise-picker > header strong { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.exercise-picker > header span { display: grid; place-items: center; min-width: 25px; height: 20px; padding: 0 6px; color: #b9ddff; border-radius: 99px; background: #203752; font-size: .65rem; }
.exercise-picker-options { max-height: 275px; overflow-y: auto; }
.exercise-picker-options button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; color: var(--text); border: 0; border-bottom: 1px solid rgba(38,53,74,.55); background: transparent; text-align: left; font: inherit; cursor: pointer; }
.exercise-picker-options button:hover { background: rgba(21,151,255,.1); }
.exercise-picker-options button > span { display: grid; gap: 3px; }
.exercise-picker-options button strong { font-size: .78rem; }
.exercise-picker-options button small { color: var(--muted); font-size: .62rem; }
.exercise-picker-options button b { color: #7990a9; font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.exercise-picker > footer { padding: 9px 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: .62rem; text-align: left; }
.exercise-picker > footer span { color: var(--green); font-weight: 800; }
.two-fields { grid-template-columns: 1fr 1fr; }
.exercise-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exercise-fields label { font-size: .72rem; }
.exercise-fields input { padding: 11px 7px; }
.range-field { grid-column: span 2; }
.range-field.compact-range { grid-column: auto; }
.range-field > div { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 9px; align-items: center; min-height: 45px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #0b1320; }
.range-field input[type="range"] { height: 5px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #8c66ff); accent-color: var(--blue); }
.range-field output { color: #b9ddff; font-size: .82rem; font-weight: 850; text-align: right; }
.optional-range > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .68rem; font-weight: 650; }
.range-toggle { width: auto; margin: 0; accent-color: var(--blue); }
.range-field input[type="range"]:disabled { opacity: .28; }
.calculated-load { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 58px; padding: 12px 15px; border: 1px solid rgba(21,151,255,.3); border-radius: 11px; background: rgba(21,151,255,.06); }
.calculated-load span { color: var(--muted); font-size: .7rem; }
.calculated-load strong { color: #b9ddff; font-size: .85rem; text-align: right; }
.calculated-load strong a { color: #b9ddff; text-decoration: none; }
.calculated-load strong button { display: block; margin: 6px 0 0 auto; padding: 0; color: var(--green); border: 0; background: transparent; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; }
.ai-draft-dialog { width: min(760px, calc(100vw - 30px)); overflow: hidden; }
.ai-draft-dialog > .ai-draft-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; max-height: calc(100dvh - 34px); }
.ai-draft-header { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); background: rgba(17,26,40,.97); }
.ai-draft-header .eyebrow { margin-bottom: 6px; font-size: .66rem; }
.ai-draft-header h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.ai-draft-content { display: grid; min-height: 0; gap: 14px; padding: 17px 22px 20px; overflow-y: auto; overscroll-behavior: contain; }
.ai-draft-rationale { padding: 11px 13px; border: 1px solid rgba(21,151,255,.18); border-radius: 10px; background: rgba(21,151,255,.045); }
.ai-draft-rationale summary { color: #a9d9ff; font-size: .78rem; font-weight: 800; cursor: pointer; }
.ai-draft-rationale p { margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.ai-draft-actions { align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(13,21,33,.98); box-shadow: 0 -12px 30px rgba(3,8,14,.22); }
.ai-draft-actions .button { min-height: 46px; }
.ai-draft-actions .button.dialog-close { display: inline-flex; width: auto; height: auto; padding: 0 18px; font-size: .82rem; }
.library-hero { align-items: center; }
.library-hero h1 span { color: var(--blue); }
.library-stat { flex: 0 0 210px; display: grid; justify-items: center; gap: 5px; padding: 25px; border: 1px solid rgba(21,151,255,.35); border-radius: 18px; background: rgba(21,151,255,.07); }
.library-stat strong { color: var(--blue); font-size: 3.5rem; line-height: 1; letter-spacing: -.06em; }
.library-stat span { font-size: .77rem; font-weight: 800; }
.library-stat small { color: var(--muted); }
.library-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(12,20,32,.75); }
.library-view-tabs { display: flex; gap: 8px; margin-bottom: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: rgba(12,20,32,.75); }
.library-view-tabs button { min-height: 40px; padding: 0 16px; color: var(--muted); border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .78rem; font-weight: 850; cursor: pointer; }
.library-view-tabs button.is-active { color: white; background: rgba(21,151,255,.15); box-shadow: inset 0 0 0 1px rgba(21,151,255,.35); }
.library-view-tabs span { margin-left: 6px; color: #8ecbff; }
.library-toolbar { display: grid; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.library-search { max-width: 540px; }
.search-clear-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.search-clear-wrap > input {
  width: 100%;
  padding-right: 44px;
}
.search-clear-wrap input[type="search"]::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}
.search-clear-button {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: #a9b8ca;
  border: 0;
  border-radius: 50%;
  background: rgba(102, 124, 150, .13);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}
.search-clear-button:hover,
.search-clear-button:focus-visible {
  color: white;
  background: rgba(21, 151, 255, .2);
  outline: 1px solid rgba(21, 151, 255, .55);
}
.search-clear-button[hidden] { display: none; }
.category-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.category-chip { display: flex; gap: 7px; align-items: center; min-height: 34px; padding: 0 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; background: transparent; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.category-chip span { color: #71839a; font-size: .63rem; }
.category-chip:hover, .category-chip.is-active { color: white; border-color: rgba(21,151,255,.55); background: rgba(21,151,255,.1); }
.category-chip.is-active span { color: #88caff; }
.exercise-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.library-exercise { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 11px; align-items: center; min-height: 74px; padding: 13px 16px; border-right: 1px solid rgba(38,53,74,.7); border-bottom: 1px solid rgba(38,53,74,.7); }
.library-exercise:hover { background: rgba(21,151,255,.045); }
.library-exercise[data-open-exercise] { cursor: pointer; }
.library-exercise[data-open-exercise]:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.library-exercise.is-unavailable { opacity: .58; }
.library-exercise > div { display: grid; min-width: 0; gap: 4px; }
.library-exercise strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.library-exercise small { color: var(--muted); font-size: .66rem; text-transform: capitalize; }
.exercise-detail-dialog { width: min(680px, calc(100vw - 30px)); }
.exercise-detail-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(
    calc(100dvh - 34px),
    calc(var(--exercise-detail-viewport-height, 100dvh) - 12px)
  );
  padding: 21px;
}
.exercise-detail-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.exercise-detail-shell > header h2 { margin: 3px 0 4px; }
.exercise-detail-shell > header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  text-transform: capitalize;
}
.exercise-detail-content {
  display: grid;
  min-height: 0;
  gap: 22px;
  align-content: start;
  grid-auto-rows: max-content;
  padding-top: 18px;
  scroll-padding-block: 1rem;
  overflow-y: auto;
}
.exercise-detail-maxes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.exercise-detail-maxes > div {
  position: relative;
  display: grid;
  min-height: 76px;
  gap: 4px;
  align-content: space-between;
  padding: 12px;
  border: 1px solid rgba(21,151,255,.32);
  border-radius: 11px;
  background: rgba(21,151,255,.07);
}
.exercise-detail-maxes small { color: #75caff; font-size: .62rem; font-weight: 850; }
.exercise-detail-maxes strong { font-size: .88rem; }
.exercise-detail-rm-edit {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: #9dcdf4;
  border: 1px solid rgba(21, 151, 255, .24);
  border-radius: 8px;
  background: rgba(7, 18, 31, .48);
  cursor: pointer;
}
.exercise-detail-rm-edit:hover,
.exercise-detail-rm-edit:focus-visible {
  color: white;
  border-color: var(--blue);
  outline: none;
}
.exercise-detail-rm-form {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(21,151,255,.38);
  border-radius: 13px;
  background: rgba(21,151,255,.055);
  scroll-margin-block: 1rem;
}
.exercise-detail-rm-form[hidden] { display: none; }
.exercise-detail-rm-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.exercise-detail-rm-heading h3,
.exercise-detail-rm-heading p { margin: 0; }
.exercise-detail-rm-fields {
  display: grid;
  grid-template-columns: .7fr 1fr 1fr;
  gap: 9px;
}
.exercise-detail-rm-fields label { margin: 0; }
.exercise-detail-rm-form > .button { justify-self: end; min-height: 42px; }
.exercise-detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.exercise-detail-heading h3 { margin: 4px 0 0; }
.exercise-detail-heading > span { color: var(--muted); font-size: .68rem; }
.exercise-detail-history { display: grid; margin-top: 10px; }
.exercise-detail-history article {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.exercise-detail-history time,
.exercise-detail-history span { color: var(--muted); font-size: .68rem; }
.exercise-detail-history strong { font-size: .78rem; }
.library-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #a9dbff; border-radius: 9px; background: #173550; font-size: .7rem; font-weight: 900; }
.library-source { color: #687991; font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; }
.library-availability { padding: 5px 7px; color: #8fa1b8; border: 1px solid rgba(91,119,150,.34); border-radius: 7px; background: transparent; font: inherit; font-size: .6rem; font-weight: 800; cursor: pointer; }
.library-availability:hover { color: white; border-color: var(--blue); background: rgba(21,151,255,.1); }
.library-panel > .empty-state { padding: 40px; }
.saved-wod-panel { padding: 0; overflow: hidden; }
.saved-wod-header { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 0; padding: 20px 22px 18px; border-bottom: 1px solid var(--line); }
.saved-wod-header h2 { margin: 5px 0; font-size: 1.65rem; }
.saved-wod-header p:last-child { margin: 0; color: var(--muted); font-size: .78rem; }
.saved-wod-header-actions { display: grid; flex: 0 0 auto; justify-items: end; gap: 6px; }
.saved-wod-header-actions > div { display: flex; gap: 9px; }
.saved-wod-header-actions > small { color: #71839a; font-size: .62rem; }
.saved-wod-header-actions .button { min-height: 42px; white-space: nowrap; }
.saved-wod-header-actions .button:disabled {
  color: #6f8298;
  border-color: rgba(91,119,150,.25);
  background: rgba(91,119,150,.06);
  cursor: not-allowed;
  opacity: .72;
}
.saved-wod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.saved-wod-search {
  display: flex;
  gap: 10px;
  align-items: end;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.saved-wod-search label { flex: 1 1 auto; margin: 0; }
.saved-wod-search .button { min-height: 42px; }
.saved-wod-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}
.saved-wod-pagination[hidden] { display: none; }
.saved-wod-pagination span { color: var(--muted); font-size: .72rem; }
.saved-wod-card {
  --wod-accent: #ffb454;
  --wod-accent-rgb: 255,180,84;
  display: grid;
  align-content: start;
  grid-template-rows: auto minmax(38px, 1fr) auto;
  gap: 9px;
  min-height: 156px;
  padding: 13px 14px;
  border: 0;
  border-right: 1px solid rgba(38,53,74,.7);
  border-bottom: 1px solid rgba(38,53,74,.7);
  border-radius: 0;
  background: linear-gradient(155deg, rgba(var(--wod-accent-rgb),.045), rgba(8,14,23,.45) 42%);
  box-shadow: inset 0 2px rgba(var(--wod-accent-rgb),.42);
}
.saved-wod-card > .saved-wod-heading { display: grid; min-width: 0; gap: 7px; }
.saved-wod-card > .saved-wod-heading > span { color: var(--wod-accent); font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.saved-wod-card > .saved-wod-heading strong { font-size: 1rem; }
.saved-wod-card > p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.saved-wod-card > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: pre-line;
}
.wod-title-keyline { display: flex; align-items: center; min-width: 0; gap: 9px; overflow: hidden; }
.wod-title-keyline > strong { flex: 0 0 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-wod-movements { display: flex; flex-wrap: nowrap; min-width: 0; gap: 6px; overflow: hidden; }
.saved-wod-movements span { flex: 0 0 auto; padding: 4px 7px; color: #bdd5eb; border-radius: 99px; background: #1a2a3d; font-size: .62rem; white-space: nowrap; }
.saved-wod-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding: 9px 0 0; border-top: 1px solid rgba(38,53,74,.6); }
.saved-wod-card footer .saved-wod-button {
  min-height: 31px;
  padding: 0 11px;
  color: #06141c;
  border: 1px solid rgba(var(--wod-accent-rgb),.5);
  border-radius: 8px;
  background: var(--wod-accent);
  font: inherit;
  font-size: .64rem;
  font-weight: 850;
  cursor: pointer;
}
.saved-wod-card footer .saved-wod-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.saved-wod-card footer .saved-wod-button-secondary { color: #ffd79e; background: rgba(var(--wod-accent-rgb),.08); }
.saved-wod-card footer .saved-wod-button-danger { color: #ff9cab; border-color: rgba(255,87,111,.38); background: rgba(255,87,111,.08); }
.saved-wod-dialog { width: min(780px, calc(100vw - 30px)); }
.saved-wod-dialog .dialog-actions .button.dialog-close { display: inline-flex; width: auto; height: auto; padding: 0 18px; font-size: .82rem; }
.saved-wod-ai-review {
  padding: 12px 14px;
  color: #b9ddf8;
  border: 1px solid rgba(21,151,255,.32);
  border-radius: 10px;
  background: rgba(21,151,255,.07);
}
.saved-wod-ai-review[hidden] { display: none; }
.saved-wod-ai-review strong { color: white; font-size: .78rem; }
.saved-wod-ai-review p { margin: 4px 0 0; font-size: .7rem; }
.saved-wod-ai-review ul { margin: 7px 0 0; padding-left: 18px; color: #ffd59b; font-size: .69rem; }
.wod-photo-dialog { width: min(680px, calc(100vw - 30px)); }
.wod-photo-dialog form { gap: 16px; }
.wod-photo-dialog .dialog-actions .button.dialog-close {
  position: static;
  display: inline-flex;
  width: auto;
  height: auto;
  padding: 0 18px;
  font-size: .82rem;
}
.wod-photo-intro, .wod-photo-privacy { margin: 0; color: var(--muted); line-height: 1.55; }
.wod-photo-intro { font-size: .82rem; }
.wod-photo-privacy { font-size: .68rem; }
.wod-photo-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  padding: 18px;
  border: 1px dashed rgba(89,180,255,.5);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(21,151,255,.08), rgba(8,14,23,.72));
  cursor: pointer;
}
.wod-photo-picker:hover { border-color: var(--blue); background-color: rgba(21,151,255,.07); }
.wod-photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wod-photo-placeholder { display: grid; place-items: center; gap: 7px; text-align: center; }
.wod-photo-placeholder b { color: #9fd5ff; font-size: .92rem; }
.wod-photo-placeholder small { color: var(--muted); font-size: .7rem; }
.wod-photo-picker img {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  border-radius: 9px;
}
.wod-photo-change {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: none;
  padding: 7px 10px;
  color: white;
  border-radius: 8px;
  background: rgba(5,12,21,.82);
  font-size: .66rem;
  font-weight: 800;
}
.wod-photo-picker.has-photo .wod-photo-placeholder { display: none; }
.wod-photo-picker.has-photo .wod-photo-change { display: block; }
.wod-photo-progress {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(21,151,255,.28);
  border-radius: 10px;
  background: rgba(21,151,255,.06);
}
.wod-photo-progress[hidden] { display: none; }
.wod-photo-progress > span {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(159,213,255,.28);
  border-top-color: #9fd5ff;
  border-radius: 50%;
  animation: ai-spin .85s linear infinite;
}
.wod-photo-progress p { margin: 0; color: #b9ddf8; font-size: .73rem; }
.saved-wod-movement-editor { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(8,14,23,.55); }
.saved-wod-movement-editor > header { align-items: center; }
.saved-wod-movement-editor > header > div { display: grid; gap: 3px; }
.saved-wod-movement-editor > header small { color: var(--muted); font-size: .65rem; }
.saved-wod-movement-editor > header button { color: #9fd5ff; border: 0; background: transparent; font: inherit; font-size: .7rem; font-weight: 850; cursor: pointer; }
#saved-wod-movement-rows { display: grid; gap: 8px; }
.saved-wod-movement-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) 1fr .7fr .7fr auto; gap: 7px; align-items: end; }
.saved-wod-movement-row label { font-size: .64rem; }
.saved-wod-movement-row select, .saved-wod-movement-row input { padding: 9px 7px; font-size: .7rem; }
.saved-wod-movement-row > button { width: 34px; height: 38px; color: #ff91a0; border: 1px solid rgba(255,87,111,.3); border-radius: 8px; background: rgba(255,87,111,.07); cursor: pointer; }
.wod-library-hero { margin-bottom: 28px; }
.wod-library-hero > div:first-child { max-width: none; }
.wod-library-hero h1 { white-space: nowrap; font-size: clamp(2.35rem, 3.55vw, 4.25rem); }
.saved-wod-header h2 span { color: #8ecbff; font-size: .8rem; vertical-align: middle; }
.official-wod-section {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12,20,32,.75);
}
.official-wod-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.official-wod-heading h2 { margin: 5px 0; font-size: 1.65rem; }
.official-wod-heading p:last-child { margin: 0; color: var(--muted); font-size: .78rem; }
.official-wod-heading > span {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .68rem;
}
.official-wod-heading > span strong { color: white; }
.official-wod-heading .saved-wod-header-actions { align-self: center; }
.official-wod-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.official-wod-toolbar .library-search { grid-column: 1; }
.official-wod-toolbar .category-filters { grid-column: 1 / -1; }
.wod-visible-count {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  padding: 8px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .68rem;
}
.wod-visible-count strong { color: white; }
.official-wod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.official-wod-card {
  --wod-accent: #46f0a4;
  --wod-accent-rgb: 70,240,164;
  display: grid;
  grid-template-rows: auto minmax(42px, 1fr) auto;
  align-content: stretch;
  gap: 9px;
  min-height: 156px;
  padding: 13px 14px;
  border-right: 1px solid rgba(38,53,74,.7);
  border-bottom: 1px solid rgba(38,53,74,.7);
  background: linear-gradient(155deg, rgba(var(--wod-accent-rgb),.045), rgba(8,14,23,.45) 42%);
  box-shadow: inset 0 2px rgba(var(--wod-accent-rgb),.42);
}
.official-wod-card:hover { background: linear-gradient(155deg, rgba(var(--wod-accent-rgb),.085), rgba(8,14,23,.48) 46%); }
.official-wod-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.official-wod-card > header > b {
  flex: 0 0 auto;
  color: #7d90a8;
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.official-wod-labels, .official-wod-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.official-wod-labels span, .official-wod-detail-meta span {
  padding: 3px 7px;
  color: #9cb0c5;
  border: 1px solid rgba(111,139,168,.24);
  border-radius: 99px;
  background: rgba(111,139,168,.07);
  font-size: .56rem;
  font-weight: 850;
  text-transform: uppercase;
}
.official-wod-title { display: grid; min-width: 0; gap: 5px; }
.official-wod-title strong { font-size: .95rem; }
.official-wod-title small { color: var(--muted); font-size: .67rem; text-transform: capitalize; }
.official-wod-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding: 9px 0 0;
  border-top: 1px solid rgba(38,53,74,.6);
}
.official-wod-card > footer .official-wod-button {
  min-height: 31px;
  padding: 0 10px;
  color: #06141c;
  border: 1px solid rgba(var(--wod-accent-rgb),.5);
  border-radius: 8px;
  background: var(--wod-accent);
  font: inherit;
  font-size: .64rem;
  font-weight: 850;
  cursor: pointer;
}
.official-wod-card > footer .official-wod-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.official-wod-card > footer .official-wod-button-secondary {
  color: #b9d9f5;
  border-color: rgba(111,158,199,.38);
  background: rgba(21,151,255,.08);
}
.wod-type-hero {
  --wod-accent: #46f0a4;
  --wod-accent-rgb: 70,240,164;
}
.wod-type-girl {
  --wod-accent: #ff72c6;
  --wod-accent-rgb: 255,114,198;
}
.wod-type-benchmark {
  --wod-accent: #45b8ff;
  --wod-accent-rgb: 69,184,255;
}
.wod-type-personal {
  --wod-accent: #ffb454;
  --wod-accent-rgb: 255,180,84;
}
.wod-label-hero {
  color: #46f0a4 !important;
  border-color: rgba(70,240,164,.28) !important;
  background: rgba(70,240,164,.07) !important;
}
.wod-label-girl {
  color: #ff8bd0 !important;
  border-color: rgba(255,114,198,.3) !important;
  background: rgba(255,114,198,.075) !important;
}
.wod-label-benchmark {
  color: #70c9ff !important;
  border-color: rgba(69,184,255,.3) !important;
  background: rgba(69,184,255,.075) !important;
}
.wod-label-personal { color: #ffc477 !important; }
.official-wod-toolbar .wod-filter-personal { --filter-accent: 255,180,84; }
.official-wod-toolbar .wod-filter-hero { --filter-accent: 70,240,164; }
.official-wod-toolbar .wod-filter-girl { --filter-accent: 255,114,198; }
.official-wod-toolbar .wod-filter-benchmark { --filter-accent: 69,184,255; }
.official-wod-toolbar [class*="wod-filter-"]:hover,
.official-wod-toolbar [class*="wod-filter-"].is-active {
  border-color: rgba(var(--filter-accent),.62);
  background: rgba(var(--filter-accent),.12);
}
.official-wod-toolbar [class*="wod-filter-"].is-active span {
  color: rgba(var(--filter-accent),.95);
}
.official-wod-card > footer .saved-wod-button-danger {
  color: #ff9cab;
  border-color: rgba(255,87,111,.38);
  background: rgba(255,87,111,.08);
}
.official-wod-card > footer .saved-wod-share-button {
  margin-right: auto;
  color: #07141e;
  border-color: rgba(69,184,255,.55);
  background: #45b8ff;
}
.wod-share-dialog { width: min(620px, calc(100vw - 30px)); }
.wod-share-dialog form { gap: 18px; }
.wod-share-dialog header p:last-child {
  margin: 5px 0 0;
  color: #b9c7d8;
  font-size: .78rem;
}
.wod-share-link-action {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px;
  color: #dcecff;
  border: 1px solid rgba(69,184,255,.4);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(69,184,255,.14), rgba(69,184,255,.05));
  text-align: left;
  cursor: pointer;
}
.wod-share-link-action > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(69,184,255,.15);
}
.wod-share-link-action > span:nth-child(2) { display: grid; gap: 3px; }
.wod-share-link-action small,
.wod-share-section-heading small,
.wod-share-choice small {
  color: var(--muted);
  font-size: .66rem;
}
.wod-share-link-action b { color: #65c5ff; font-size: .7rem; }
.wod-share-destinations { display: grid; gap: 10px; min-height: 0; }
.wod-share-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.wod-share-section-heading > div { display: grid; gap: 3px; }
.wod-share-section-heading > span {
  color: #65c5ff;
  font-size: .66rem;
  font-weight: 800;
}
.wod-share-search { display: grid; gap: 5px; }
.wod-share-search > span,
.wod-share-message > span { font-size: .68rem; font-weight: 800; }
.wod-share-search input { min-height: 44px; }
.wod-share-choice-list { display: grid; gap: 7px; }
.wod-share-athlete-list {
  max-height: 240px;
  padding-right: 3px;
  overflow-y: auto;
}
.wod-share-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(83,112,143,.34);
  border-radius: 11px;
  background: rgba(7,14,23,.5);
  cursor: pointer;
}
.wod-share-choice:has(input:checked) {
  border-color: #1597ff;
  background: rgba(21,151,255,.11);
}
.wod-share-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.wod-share-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #bde3ff;
  border: 1px solid rgba(21,151,255,.45);
  border-radius: 10px;
  background: rgba(21,151,255,.1);
  font-size: .65rem;
  font-weight: 900;
}
.wod-share-choice > span:nth-of-type(2) { display: grid; min-width: 0; gap: 2px; }
.wod-share-check {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: transparent;
  border: 1px solid rgba(125,151,180,.4);
  border-radius: 8px;
}
.wod-share-choice input:checked ~ .wod-share-check {
  color: white;
  border-color: #1597ff;
  background: #1597ff;
}
.wod-share-message { display: grid; gap: 6px; }
.wod-share-message small { color: var(--muted); font-weight: 500; }
.wod-share-actions { position: sticky; bottom: 0; }
.shared-wod-page {
  display: grid;
  width: min(760px, calc(100% - 32px));
  min-height: calc(100dvh - 190px);
  margin: 0 auto;
  padding: 34px 0 max(28px, env(safe-area-inset-bottom));
  align-content: start;
  gap: 20px;
}
.shared-wod-hero { display: grid; gap: 16px; }
.shared-wod-hero h1 { margin: 5px 0 8px; font-size: clamp(2rem, 7vw, 4.4rem); }
.shared-wod-hero p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.shared-wod-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.shared-wod-badges span {
  padding: 6px 10px;
  color: #74d0ff;
  border: 1px solid rgba(69,184,255,.35);
  border-radius: 999px;
  background: rgba(69,184,255,.08);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}
.shared-wod-card {
  padding: 20px;
  border: 1px solid #2b4059;
  border-radius: 16px;
  background: linear-gradient(150deg, #132237, #0c1624);
}
.shared-wod-card h2 { margin: 4px 0 14px; }
.shared-wod-movements { display: grid; margin: 0; padding: 0; list-style: none; }
.shared-wod-movements li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(60,84,111,.52);
}
.shared-wod-movements li > b {
  display: grid;
  height: 36px;
  place-items: center;
  color: #6ccaff;
  border-radius: 9px;
  background: rgba(21,151,255,.12);
  font-size: .7rem;
}
.shared-wod-movements li > div { display: grid; gap: 3px; }
.shared-wod-movements span,
.shared-wod-movements small { color: var(--muted); font-size: .72rem; }
.shared-wod-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.shared-wod-feedback { margin: 0; color: #69e5aa; text-align: center; }
.official-wod-section > .empty-state { padding: 40px; }
.official-wod-dialog { width: min(760px, calc(100vw - 30px)); overflow: hidden; }
.official-wod-dialog > .official-wod-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  max-height: calc(100dvh - 34px);
}
.official-wod-dialog-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(17,26,40,.97);
}
.official-wod-dialog-header .eyebrow { margin-bottom: 7px; font-size: .66rem; }
.official-wod-dialog-header h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.official-wod-dialog-content {
  display: grid;
  min-height: 0;
  gap: 16px;
  padding: 20px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.official-wod-detail-meta { margin: 0; }
.official-wod-prescription {
  display: grid;
  gap: 7px;
  padding: 18px 20px;
  border: 1px solid rgba(70,240,164,.25);
  border-radius: 11px;
  background: rgba(70,240,164,.055);
}
.official-wod-prescription p { margin: 0; color: #d9e7f4; font-size: .82rem; line-height: 1.5; }
.official-wod-dialog .muted { margin: 0; color: var(--muted); font-size: .72rem; }
.official-wod-dialog-actions {
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(13,21,33,.98);
  box-shadow: 0 -12px 30px rgba(3,8,14,.22);
}
.official-wod-dialog-actions .button { min-height: 44px; }
.official-wod-dialog-actions .button.dialog-close {
  display: inline-flex;
  width: auto;
  height: auto;
  padding: 0 18px;
  font-size: .82rem;
}
.download-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.download-links a { background: var(--panel); border: 1px solid var(--line); padding: 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.site-footer {
  min-height: 67px;
  padding: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .8rem;
  text-align: center;
}
code { color: #b9ddff; }

/* Viewport contract: primary workspaces never make the browser document scroll. */
html, body { height: 100%; }
html.has-open-builder-dialog,
html.has-open-builder-dialog body {
  overflow: hidden;
  overscroll-behavior: none;
}
body.dashboard-view, body.program-view { overflow: hidden; }
body.dashboard-view .app-frame, body.program-view .app-frame {
  height: 100dvh;
  min-height: 0;
}
body.dashboard-view .app-content, body.program-view .app-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.dashboard-view .site-footer, body.program-view .site-footer { display: none; }
body.dashboard-view .shell, body.program-view .shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
body.program-view .shell { padding: 0; }

/* Today: the training is primary; readiness is a small optional action. */
body.dashboard-view .shell { padding: 24px clamp(22px, 3vw, 54px); }
.dashboard-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
}
.dashboard-hero {
  align-items: center;
  gap: 24px;
  margin: 0;
}
.dashboard-hero h1 {
  font-size: clamp(2rem, 3vw, 3.8rem);
  white-space: normal;
}
.dashboard-hero .lead {
  max-width: 1050px;
  margin: 10px 0 0;
  font-size: .94rem;
  line-height: 1.45;
}
.dashboard-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.dashboard-view .onboarding-banner {
  margin: 0;
  padding-block: 10px;
}
.dashboard-view .week-strip { margin: 0; }
.dashboard-view .week-strip a { min-height: 52px; padding: 7px; }
.dashboard-sessions {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.dashboard-view .workout-summary { padding: 22px 26px; }
.dashboard-view .workout-summary h2 { font-size: clamp(1.6rem, 2.2vw, 2.4rem); }
.dashboard-view .movement-list { margin-top: 12px; }
.dashboard-view .movement-list a { padding: 10px 4px; }
.dashboard-view .button.full { min-height: 42px; margin-top: 12px; }

/* Admin and commerce are full-screen workspaces on desktop. */
@media (min-width: 761px) {
  body.admin-view {
    overflow: hidden;
  }

  body.admin-view .app-frame {
    height: 100dvh;
    min-height: 0;
  }

  body.admin-view .app-content {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.admin-view .site-footer {
    display: none;
  }

  body.admin-view .shell {
    height: 100%;
    min-height: 0;
    padding: clamp(20px, 2.4vh, 32px) clamp(24px, 3vw, 54px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #39516d #08111e;
  }

  body.admin-view .shell::-webkit-scrollbar {
    display: block;
    width: 9px;
  }

  body.admin-view .shell::-webkit-scrollbar-track {
    background: #08111e;
  }

  body.admin-view .shell::-webkit-scrollbar-thumb {
    border: 2px solid #08111e;
    border-radius: 9px;
    background: #39516d;
  }
}

/* Commerce is an operational workspace: compact controls and maximum usable area. */
.commerce-view .shell {
  width: 100%;
  max-width: none;
}
.commerce-workspace {
  --commerce-action-rail-width: 212px;
  display: grid;
  grid-template-columns: var(--commerce-action-rail-width) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}
.commerce-workspace-main { min-width: 0; }
.commerce-action-rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-width: 0;
  min-height: min(620px, calc(100dvh - 56px));
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #101c2d, #0a1422);
}
.commerce-action-rail > header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 3px 12px;
  border-bottom: 1px solid var(--line);
}
.commerce-action-rail > header > span:last-child { display: grid; min-width: 0; }
.commerce-action-rail > header small {
  color: #6f89a4;
  font-size: .57rem;
  font-weight: 950;
  letter-spacing: .1em;
}
.commerce-action-rail > header strong { font-size: .9rem; }
.commerce-action-rail-mark {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(21,151,255,.4);
  border-radius: 9px;
  color: #80ceff;
  background: rgba(21,151,255,.1);
}
.commerce-action-rail-mark svg,
.commerce-modal-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.commerce-action-list { display: grid; gap: 7px; padding-top: 12px; }
.commerce-action-list .commerce-modal-trigger {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  text-align: left;
}
.commerce-action-list .commerce-modal-trigger svg { justify-self: center; }
.commerce-action-list .commerce-modal-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commerce-action-empty {
  margin: 14px 3px;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
}
.commerce-action-empty[hidden] { display: none; }
.commerce-action-rail.is-compact { padding-inline: 7px; }
.commerce-action-rail.is-compact > header { justify-content: center; }
.commerce-action-rail.is-compact > header > span:last-child,
.commerce-action-rail.is-compact .commerce-modal-trigger span,
.commerce-action-rail.is-compact .commerce-action-empty { display: none; }
.commerce-action-rail.is-compact .commerce-modal-trigger {
  grid-template-columns: 1fr;
  padding-inline: 5px;
}
.commerce-action-rail-resizer { right: -10px; }
.commerce-view .admin-hero {
  margin-bottom: 10px;
}
.commerce-view .admin-hero h1 {
  font-size: clamp(2.2rem, 3.5vw, 4rem);
}
.commerce-view .admin-hero p {
  margin-block: 3px 0;
}
.commerce-view .admin-tabs {
  margin-bottom: 12px;
}
.commerce-view .admin-metric-grid {
  gap: 9px;
  margin-bottom: 10px;
}
.commerce-view .admin-metric-grid article {
  min-height: 92px;
  padding: 14px 16px;
}
.commerce-view .admin-metric-grid strong {
  font-size: 1.7rem;
}
.commerce-view .commerce-layout {
  gap: 12px;
  margin-top: 10px;
}
.commerce-view .admin-section {
  padding: 18px 20px;
}
.commerce-view .admin-section > header {
  margin-bottom: 13px;
}
.commerce-view .admin-section h2 {
  font-size: clamp(1.55rem, 2.1vw, 2.2rem);
}
.commerce-view .admin-section h3 {
  margin: 0;
  font-size: 1.2rem;
}
.commerce-view input,
.commerce-view select,
.commerce-view textarea {
  min-height: 42px;
  padding: 8px 12px;
}
.commerce-view .commerce-stack-form {
  gap: 9px;
}
.commerce-view .commerce-form-grid {
  gap: 10px;
}
.commerce-view .commerce-side-stack {
  gap: 12px;
}
.commerce-sepa-settings {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.commerce-sepa-settings header {
  grid-column: 1 / -1;
}
.commerce-invite-card {
  border-color: rgba(21,151,255,.45);
  background: linear-gradient(145deg, rgba(21,151,255,.1), rgba(12,22,37,.95));
}
.commerce-invite-result {
  display: grid;
  gap: 9px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.commerce-invite-result[hidden] {
  display: none;
}
.commerce-invite-result label {
  display: grid;
  gap: 6px;
}
.commerce-invite-result label > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.commerce-invite-result > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.commerce-enrollment-list [data-enrollment-list] {
  display: grid;
}
.commerce-enrollment-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.commerce-enrollment-row > span {
  display: grid;
  min-width: 0;
  flex: 1;
}
.commerce-enrollment-actions { display: flex; gap: 6px; }
.commerce-enrollment-actions .button { min-height: 34px; padding: 7px 10px; }
.commerce-enrollment-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commerce-manual-member {
  padding: 0 !important;
}
.commerce-manual-member > summary {
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
}
.commerce-details-body > .admin-section {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
}
.commerce-sepa-export {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Public, mobile-first digital enrollment flow. */
.enrollment-page {
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% 0, rgba(21,151,255,.22), transparent 30rem),
    #07101d;
}
.enrollment-shell {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 60px;
}
.enrollment-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.enrollment-brand img {
  width: 37px;
  height: 46px;
}
.enrollment-brand > span {
  font-size: 1.25rem;
  font-weight: 950;
}
.enrollment-brand > span b {
  color: var(--blue);
}
.enrollment-brand small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}
.enrollment-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
  gap: 28px;
  margin-bottom: 20px;
}
.enrollment-intro h1 {
  margin: 4px 0 8px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: .96;
}
.enrollment-intro > div > p:last-child {
  max-width: 650px;
  color: #b6c6d8;
}
.enrollment-intro aside {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(21,151,255,.4);
  border-radius: 16px;
  background: rgba(21,151,255,.08);
}
.enrollment-intro aside small {
  color: var(--blue);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.enrollment-intro aside strong {
  font-size: 1.25rem;
}
.enrollment-intro aside span {
  color: var(--muted);
  font-size: .82rem;
}
.enrollment-form {
  display: grid;
  gap: 14px;
}
.enrollment-card,
.enrollment-complete {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid #263a53;
  border-radius: 20px;
  background: rgba(13,24,40,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.enrollment-card > header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.enrollment-card > header > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: var(--blue);
  border: 1px solid rgba(21,151,255,.48);
  border-radius: 50%;
  background: rgba(21,151,255,.1);
  font-weight: 900;
}
.enrollment-card h2,
.enrollment-complete h1 {
  margin: 0;
}
.enrollment-card header p {
  margin: 3px 0 0;
  color: var(--muted);
}
.enrollment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.enrollment-card label {
  display: grid;
  gap: 7px;
}
.enrollment-card label > span {
  color: #bdcada;
  font-size: .76rem;
  font-weight: 800;
}
.enrollment-card label.is-wide {
  grid-column: 1 / -1;
}
.enrollment-card input {
  min-height: 48px;
  padding: 10px 13px;
  border-color: #31465f;
  background: #081321;
}
.enrollment-card details {
  border-top: 1px solid var(--line);
}
.enrollment-card summary {
  padding: 14px 0;
  font-weight: 850;
  cursor: pointer;
}
.enrollment-card details ul,
.enrollment-card details p {
  margin-top: 0;
  color: #b5c4d5;
  font-size: .88rem;
  line-height: 1.55;
}
.enrollment-consents {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.enrollment-consents label,
.enrollment-sepa-consent,
.enrollment-optional {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px !important;
  padding: 11px 13px;
  border: 1px solid #2a3e56;
  border-radius: 12px;
  background: rgba(7,15,27,.52);
}
.enrollment-consents input,
.enrollment-sepa-consent input,
.enrollment-optional input {
  width: 19px;
  min-height: 19px;
  margin-top: 1px;
}
.enrollment-sepa > p {
  color: #b5c4d5;
  line-height: 1.55;
}
.enrollment-mandate-meta,
.enrollment-complete dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 15px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.enrollment-mandate-meta div,
.enrollment-complete dl div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-left: 1px solid var(--line);
}
.enrollment-mandate-meta div:first-child,
.enrollment-complete dl div:first-child {
  border-left: 0;
}
.enrollment-mandate-meta dt,
.enrollment-complete dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.enrollment-mandate-meta dd,
.enrollment-complete dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: .82rem;
  font-weight: 750;
}
.enrollment-submit {
  display: flex;
  width: 100%;
  min-height: 56px;
  justify-content: space-between;
  margin-top: 18px;
  padding-inline: 20px;
  font-size: .95rem;
}
.enrollment-security {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  text-align: center;
}
.enrollment-error {
  margin-bottom: 14px;
  padding: 13px 16px;
  color: #ffd4d8;
  border: 1px solid rgba(255,92,107,.45);
  border-radius: 13px;
  background: rgba(255,92,107,.1);
}
.enrollment-complete {
  max-width: 720px;
  margin: 12vh auto 0;
  text-align: center;
}
.enrollment-check {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 0 auto 18px;
  color: #4ee5aa;
  border-radius: 50%;
  background: rgba(38,199,139,.13);
  font-size: 2rem;
}
.enrollment-complete dl {
  grid-template-columns: 1fr 1fr;
  text-align: left;
}

@media (max-width: 700px) {
  .enrollment-shell {
    width: min(100% - 20px, 620px);
    padding-top: 14px;
  }
  .enrollment-brand {
    margin-bottom: 22px;
  }
  .enrollment-brand small {
    display: none;
  }
  .enrollment-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .enrollment-intro h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }
  .enrollment-grid {
    grid-template-columns: 1fr;
  }
  .enrollment-card label.is-wide {
    grid-column: auto;
  }
  .enrollment-mandate-meta,
  .enrollment-complete dl {
    grid-template-columns: 1fr;
  }
  .enrollment-mandate-meta div,
  .enrollment-complete dl div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .enrollment-mandate-meta div:first-child,
  .enrollment-complete dl div:first-child {
    border-top: 0;
  }
}

.readiness-dialog { width: min(820px, calc(100vw - 30px)); }
.readiness-dialog form { max-height: calc(100dvh - 40px); }
.readiness-dialog h2 { margin-bottom: 6px; }
.readiness-dialog .readiness-sliders { grid-template-columns: repeat(2, 1fr); }

/* Program builder: header, toolbar and board share one fixed viewport. */
body.program-view .program-workspace {
  height: 100%;
  min-height: 0;
}
body.program-view .builder-rail {
  height: 100%;
  min-height: 0;
  grid-auto-rows: max-content;
  overflow-y: auto;
}
body.program-view .builder-canvas {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 18px 14px 12px;
  overflow: hidden;
}
body.program-view .builder-header {
  align-items: center;
  margin-bottom: 8px;
}
body.program-view .builder-header .eyebrow { margin-bottom: 4px; }
body.program-view .builder-header h1 { font-size: clamp(1.9rem, 2.7vw, 3.2rem); }
body.program-view .builder-header .lead {
  margin: 5px 0 0;
  font-size: .86rem;
  line-height: 1.35;
}
body.program-view .builder-library-count strong { font-size: 1.1rem; }
body.program-view .week-toolbar { margin-bottom: 8px; }
.program-board-scroll { height: 100%; min-height: 0; }
.program-board { height: 100%; min-height: 0; padding-bottom: 0; }
.day-column { height: 100%; min-height: 0; }
.day-content { scrollbar-width: thin; }
.day-actions {
  position: relative;
  flex: 0 0 auto;
  margin-top: -5px;
  color: var(--muted);
  font-size: .66rem;
  text-align: center;
}
.day-content:has(.day-actions) > .day-actions { margin-top: auto; }
.day-content:has(.day-actions) > .add-session-button { margin-top: 0; }
.day-actions summary { padding: 4px; cursor: pointer; list-style: none; }
.day-actions summary:hover { color: white; }
.day-actions button {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  color: #b9ddff;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101a28;
  font: inherit;
  cursor: pointer;
}
.period-switcher { position: relative; min-width: 230px; text-align: center; }
.period-switcher summary {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 32px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.period-switcher summary:hover, .period-switcher[open] summary {
  border-color: var(--line);
  background: var(--panel);
}
.period-switcher summary::after {
  position: absolute;
  right: 13px;
  top: 17px;
  content: "⌄";
  color: var(--muted);
}
.period-switcher summary span { color: var(--muted); font-size: .7rem; }
.period-switcher nav {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 50%;
  display: grid;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #111a28;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  transform: translateX(-50%);
}
.period-switcher nav a {
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: .75rem;
  text-align: left;
  text-decoration: none;
}
.period-switcher nav a:hover, .period-switcher nav a.is-active {
  color: white;
  background: rgba(21,151,255,.11);
}

/* A six-row month always fits in the available board area. */
.month-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekdays { gap: 6px; padding: 0 0 5px; color: var(--muted); font-size: .66rem; text-align: center; }
.month-grid { grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.month-day {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8,13,22,.68);
  overflow: hidden;
}
.month-day.is-outside { opacity: .42; }
.month-day.is-today { border-color: var(--blue); background: rgba(21,151,255,.08); }
.month-day > header { display: flex; justify-content: space-between; color: var(--muted); font-size: .65rem; }
.month-day > header strong { color: var(--text); font-size: .76rem; }
.month-sessions { display: grid; gap: 3px; margin-top: 5px; }
.month-session {
  display: flex;
  min-width: 0;
  gap: 5px;
  align-items: center;
  padding: 4px 5px;
  overflow: hidden;
  color: #dcecff;
  border: 0;
  border-radius: 5px;
  background: #16263a;
  font: inherit;
  font-size: .6rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.month-session span { color: var(--blue); font-size: .52rem; font-weight: 900; }
.month-add {
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
.month-day:hover .month-add { color: white; background: rgba(21,151,255,.15); }

/* CrossFit is chosen like navigation, then only relevant details appear. */
.wod-flow { display: grid; gap: 12px; }
.wod-flow-heading { display: flex; gap: 10px; align-items: center; }
.wod-flow-heading > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #07111c;
  border-radius: 50%;
  background: var(--blue);
  font-size: .72rem;
  font-weight: 900;
}
.wod-flow-heading > div { display: grid; gap: 2px; }
.wod-flow-heading small { color: var(--muted); font-size: .7rem; }
.wod-format-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.wod-format-menu button {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 11px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1320;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wod-format-menu button:hover, .wod-format-menu button.is-active {
  border-color: var(--blue);
  background: rgba(21,151,255,.1);
}
.wod-format-menu small { color: var(--muted); font-size: .65rem; line-height: 1.3; }
.wod-selected-format {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(21,151,255,.35);
  border-radius: 9px;
  background: rgba(21,151,255,.08);
}
.wod-selected-format span { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.wod-selected-format strong { flex: 1; }
.wod-selected-format button { color: #9dd3ff; border: 0; background: transparent; cursor: pointer; }
.wod-details { display: grid; gap: 12px; }
.wod-template-picker { color: var(--muted); font-size: .72rem; }
.wod-template-picker summary { cursor: pointer; }
.wod-template-picker label { margin-top: 9px; }
.wod-block-format { display: grid; gap: 10px; }
.wod-block-format-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wod-block-format-menu button { min-height: 66px; }
#wod-block-dialog { width: min(660px, calc(100vw - 30px)); }
.wod-block-catalog { display: grid; gap: 10px; }
.wod-block-collection-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.wod-block-collection-tabs button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #0b1320;
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
.wod-block-collection-tabs button:hover,
.wod-block-collection-tabs button.is-active {
  color: white;
  border-color: rgba(21,151,255,.55);
  background: rgba(21,151,255,.12);
}
.wod-block-template-search { position: relative; }
.wod-block-template-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(390px, 50dvh);
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #34506e;
  border-radius: 11px;
  background: #0b1422;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
}
.wod-block-template-results > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid rgba(38,53,74,.65);
  border-radius: 7px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wod-block-template-results > button:hover,
.wod-block-template-results > button:focus-visible {
  outline: none;
  background: rgba(21,151,255,.12);
}
.wod-block-template-results > button > span { display: grid; min-width: 0; gap: 3px; }
.wod-block-template-results > button strong { font-size: .83rem; }
.wod-block-template-results > button small {
  overflow: hidden;
  color: var(--muted);
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wod-block-template-results > button b {
  padding: 4px 7px;
  color: #b7dcff;
  border-radius: 99px;
  background: rgba(21,151,255,.12);
  font-size: .58rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.wod-block-template-results .catalog-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: .76rem;
  text-align: center;
}
.wod-block-template-selected {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(73,234,123,.38);
  border-radius: 11px;
  background: rgba(73,234,123,.07);
}
.wod-block-template-selected > header { align-items: center; }
.wod-block-template-selected > header > div { display: grid; gap: 3px; }
.wod-block-template-selected > header span {
  color: var(--green);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.wod-block-template-selected > header strong { font-size: 1rem; }
.wod-block-template-selected > header small { color: var(--muted); font-size: .68rem; }
.wod-block-template-selected > header button {
  color: #b9ddff;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
.wod-block-template-selected .wod-template-prescription {
  max-height: 150px;
  overflow-y: auto;
}
.wod-block-template-variant { margin-top: -2px; }
.wod-block-custom { display: grid; gap: 14px; }
.wod-block-choice-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.wod-block-choice-divider::before,
.wod-block-choice-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.wod-format-guidance {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(21,151,255,.28);
  border-radius: 9px;
  background: rgba(21,151,255,.07);
}
.wod-format-guidance strong { font-size: .78rem; }
.wod-format-guidance span, .wod-movement-hint { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.wod-block-details [hidden] { display: none; }
.wod-movement-hint { margin: -2px 0 0; }
.wod-movement-metric-hint {
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid rgba(91,119,150,.3);
  border-radius: 9px;
  background: rgba(8,13,22,.4);
  font-size: .72rem;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .wod-block-format-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-draft-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .ai-draft-dialog > .ai-draft-shell { max-height: calc(100dvh - 18px); }
  .ai-draft-header { padding: 16px 16px 13px; }
  .ai-draft-content { padding: 14px 16px 16px; }
  .ai-draft-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); padding: 12px 16px; }
  .ai-draft-actions .button { min-width: 0; padding-inline: 10px; font-size: .82rem; }
  .official-wod-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .official-wod-dialog > .official-wod-dialog-shell { max-height: calc(100dvh - 18px); }
  .official-wod-dialog-header { padding: 16px 16px 13px; }
  .official-wod-dialog-content { padding: 16px; }
  .official-wod-dialog-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 16px;
  }
  .official-wod-dialog-actions .button,
  .official-wod-dialog-actions .button.dialog-close { width: 100%; min-width: 0; padding-inline: 6px; font-size: .68rem; white-space: nowrap; }
  .official-wod-detail-meta { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .official-wod-detail-meta::-webkit-scrollbar { display: none; }
  .official-wod-detail-meta span { flex: 0 0 auto; padding: 2px 6px; font-size: .52rem; }
}

.is-optimistic { opacity: .65; pointer-events: none; }
.save-state-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  padding: 10px 14px;
  color: white;
  border: 1px solid rgba(21,151,255,.45);
  border-radius: 9px;
  background: #11243a;
  box-shadow: 0 12px 45px rgba(0,0,0,.4);
  font-size: .75rem;
}

@media (max-width: 1180px) {
  .app-frame { grid-template-columns: 78px minmax(0, 1fr); }
  .app-sidebar-resizer { display: none; }
  .app-sidebar { padding-inline: 10px; }
  .sidebar-club-context { display: none; }
  .sidebar-brand > span:last-child, .sidebar-nav a span, .sidebar-nav p, .sidebar-ai > div, .sidebar-ai .soon-pill, .sidebar-profile > span:nth-child(2), .sidebar-profile b { display: none; }
  .sidebar-brand { justify-content: center; padding-inline: 0; }
  .sidebar-nav a { justify-content: center; padding: 0; }
  .sidebar-nav svg { width: 21px; }
  .sidebar-ai { display: grid; grid-template-columns: 1fr; place-items: center; padding: 14px 0; }
  .sidebar-profile { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 7px 0; }
  .program-workspace { --builder-rail-width: 250px; }
  .exercise-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-wod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .official-wod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .dashboard-hero { grid-template-columns: 1fr; align-items: start; }
  .dashboard-hero h1 { white-space: normal; }
}
@media (max-width: 760px) {
  html { font-size: 16px; }
  .app-frame { display: block; }
  .app-sidebar { display: none; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(8,13,22,.92); }
  .mobile-header nav { display: flex; gap: 6px; }
  .mobile-header nav a { padding: 7px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 750; }
  .mobile-header .brand { font-size: .9rem; }
  .mobile-header .brand-logo { width: 31px; height: 38px; flex-basis: 31px; }
  .shell { padding-top: 28px; }
  .compact-hero { gap: 18px; margin-bottom: 24px; }
  .compact-hero h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .compact-hero .lead { font-size: .95rem; line-height: 1.5; }
  .upload-form { width: calc(100% + 16px); margin-inline: -8px; padding: 14px; gap: 18px; border-radius: 16px; }
  .capture-mode-tab { min-height: 46px; padding-inline: 10px; font-size: .82rem; }
  .camera-stage { min-height: min(58dvh, 520px); border-radius: 12px; }
  .camera-stage video { max-height: 62dvh; }
  .camera-placeholder { padding: 20px; }
  .camera-placeholder strong { font-size: .98rem; }
  .camera-countdown { min-width: 108px; min-height: 108px; font-size: 2.8rem; }
  .camera-status-row { display: grid; gap: 4px; }
  .camera-actions { grid-template-columns: 1fr; }
  .camera-actions .button { min-height: 54px; }
  .capture-review > header { display: grid; align-items: start; }
  .capture-review video { max-height: 58dvh; }
  .video-review-controls { display: grid; grid-template-columns: 1fr; }
  .video-scrubber { grid-column: 1; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 7px; }
  .video-scrubber output { min-width: 0; font-size: .66rem; }
  .playback-rates, .frame-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .frame-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: stretch; }
  .video-card.is-expanded .video-review-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .video-card.is-expanded .video-scrubber { grid-column: 1 / -1; }
  .video-card.is-expanded .playback-rates, .video-card.is-expanded .frame-controls { display: flex; justify-self: auto; }
  .video-review-controls button { min-width: 0; min-height: 44px; padding-inline: 8px; }
  .dropzone { min-height: 210px; }
  .form-grid { gap: 13px; }
  .time-fields { grid-template-columns: 1fr; }
  .form-grid, .guide-grid, .strength-grid, .priority-grid, .two-column, .coach-review-grid, .profile-grid { grid-template-columns: 1fr; }
  .athlete-lift-grid { grid-template-columns: 1fr; }
  .profile-lifts-header { display: grid; align-items: start; }
  .profile-metric-grid { grid-template-columns: 1fr; }
  .profile-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; }
  .profile-tabs button { grid-template-columns: auto minmax(0, 1fr); min-width: 0; min-height: 58px; column-gap: 7px; padding: 8px; }
  .profile-tabs button > span { width: 28px; height: 28px; }
  .profile-tabs button strong { align-self: center; overflow-wrap: anywhere; font-size: .78rem; line-height: 1.1; }
  .profile-tabs button small { display: none; }
  .profile-lifts-empty { grid-template-columns: auto 1fr; }
  .profile-import-layout { grid-template-columns: 1fr; }
  .profile-lifts-empty .button { grid-column: 1 / -1; }
  .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-form-grid { grid-template-columns: 1fr; }
  .dashboard-hero, .compact-hero { display: grid; align-items: start; }
  .dashboard-hero h1 { white-space: normal; font-size: clamp(2.7rem, 13vw, 4rem); }
  .week-strip { gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .week-strip::-webkit-scrollbar { display: none; }
  .onboarding-banner { grid-template-columns: 36px 1fr; }
  .onboarding-banner > b { grid-column: 2; }
  .week-strip a { min-width: 72px; }
  .workout-summary-head { align-items: start; }
  .progress-ring { width: 75px; height: 75px; flex-basis: 75px; }
  .exercise-card { padding: 18px; }
  .exercise-head { grid-template-columns: 38px 1fr auto; gap: 9px; }
  .exercise-head h2 { font-size: 1.75rem; }
  .set-labels { display: none; }
  .set-row { grid-template-columns: 27px 43px repeat(3, minmax(0, 1fr)) 34px 34px; gap: 5px; font-size: .78rem; }
  .set-row input { min-width: 0; padding: 9px 5px; }
  .icon-button { width: 32px; height: 32px; }
  .complete-toggle span { width: 31px; height: 31px; }
  .set-comment { grid-column: 3 / 8; }
  .save-state { grid-column: 7; }
  .history-sets > div { grid-template-columns: 70px 1fr; }
  .builder-header { display: grid; align-items: start; }
  .program-workspace { display: block; }
  .builder-rail { position: static; min-height: 0; padding: 18px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .builder-rail-resizer { display: none; }
  .rail-intro p, .rail-tip, .rail-ai-section .rail-section-body { display: none; }
  .builder-canvas { padding: 24px 12px 60px; }
  .builder-actions { display: grid; grid-template-columns: 1fr; }
  .builder-actions label { min-width: 0; }
  .week-toolbar { justify-content: space-between; gap: 6px; }
  .week-toolbar > div { min-width: 0; font-size: .85rem; }
  .program-board-scroll { overflow-x: auto; }
  .program-board { grid-template-columns: repeat(7, minmax(290px, 86vw)); width: max-content; min-width: 100%; overflow: visible; scroll-snap-type: x mandatory; }
  .day-column { height: min(620px, calc(100vh - 150px)); }
  .day-column { scroll-snap-align: start; }
  .exercise-fields { grid-template-columns: repeat(2, 1fr); }
  .two-fields { grid-template-columns: 1fr; }
  .result-header { display: grid; align-items: start; }
  .quality-banner { display: grid; }
  .downloads { grid-template-columns: 1fr; }
  .download-links { grid-template-columns: 1fr; }
  .timeline > div { grid-template-columns: 18px 1fr auto; }
  .timeline small { display: none; }
  .exercise-library-grid { grid-template-columns: 1fr; }
  .saved-wod-header { display: grid; align-items: start; }
  .saved-wod-header-actions { justify-items: stretch; width: 100%; }
  .saved-wod-header-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .saved-wod-header-actions > small { text-align: right; }
  .saved-wod-header .button { width: 100%; }
  .saved-wod-grid { grid-template-columns: 1fr; }
  .official-wod-heading { display: grid; align-items: start; }
  .official-wod-heading .saved-wod-header-actions {
    justify-items: stretch;
    width: 100%;
  }
  .official-wod-heading .saved-wod-header-actions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .official-wod-heading .saved-wod-header-actions > small { text-align: right; }
  .official-wod-heading .saved-wod-header-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    font-size: .7rem;
  }
  .official-wod-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .wod-visible-count { align-self: end; }
  .official-wod-grid { grid-template-columns: 1fr; }
  .saved-wod-movement-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-wod-movement-row > button { align-self: end; }
  .library-stat { width: 100%; }
}

.builder-session.is-wod {
  border-color: rgba(70, 240, 164, .32);
  background: linear-gradient(155deg, rgba(12, 41, 45, .96), rgba(12, 24, 42, .98));
}

.wod-badges,
.wod-prescription-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .45rem;
}

.wod-badges span,
.wod-prescription-meta span {
  border: 1px solid rgba(70, 240, 164, .32);
  border-radius: 999px;
  color: #65f0ad;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: .25rem .5rem;
}

.wod-session-fields {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(9, 20, 36, .72);
}

.wod-template-prescription {
  display: grid;
  gap: .35rem;
  margin: .8rem 0;
  padding: .85rem 1rem;
  border-left: 3px solid #65f0ad;
  border-radius: 8px;
  background: rgba(70, 240, 164, .07);
  color: var(--text);
  font-size: .82rem;
  line-height: 1.45;
}

.wod-template-prescription span {
  display: block;
}

.wod-template-prescription a {
  color: #65f0ad;
  font-weight: 800;
}

.wod-runner,
.wod-result-card {
  max-width: 1080px;
  width: 100%;
}

.wod-runner-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.wod-movement-run-list {
  display: grid;
  gap: .55rem;
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.wod-movement-run-list li {
  align-items: center;
  background: rgba(7, 17, 31, .62);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: .8rem;
  padding: .85rem 1rem;
}

.wod-movement-run-list li > span {
  color: var(--accent);
  font-weight: 900;
}

.wod-movement-run-list strong,
.wod-movement-run-list small {
  display: block;
}

.wod-movement-run-list small {
  color: var(--muted);
  margin-top: .2rem;
}

.wod-movement-run-list p {
  color: var(--muted);
  margin: .35rem 0 0;
}

.wod-clock {
  align-items: center;
  background: #050c16;
  border: 1px solid rgba(31, 154, 255, .45);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  justify-content: center;
  padding: 1.4rem;
  text-align: center;
}

.wod-clock > span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.wod-clock > strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-variant-numeric: tabular-nums;
  line-height: .95;
}

.wod-runner.time-up .wod-clock {
  border-color: #ff5d73;
  box-shadow: 0 0 0 4px rgba(255, 93, 115, .08);
}

.wod-result-card form {
  display: grid;
  gap: 1rem;
}

.wod-complete-check {
  align-items: center;
  display: flex;
  gap: .6rem;
}

.wod-complete-check input {
  height: 1.2rem;
  width: 1.2rem;
}

@media (max-width: 720px) {
  .wod-runner-head {
    flex-direction: column;
  }
}

.benchmark-badge {
  border-color: rgba(255, 199, 80, .5) !important;
  color: #ffd36e !important;
}

.benchmark-history {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(220px, .7fr) 1.3fr;
  max-width: 1080px;
  width: 100%;
}

.benchmark-results {
  display: grid;
  gap: .55rem;
}

.benchmark-results a {
  align-items: center;
  background: rgba(7, 17, 31, .62);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: inherit;
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr auto auto;
  padding: .75rem .9rem;
  text-decoration: none;
}

.benchmark-results a:hover {
  border-color: var(--accent);
}

.benchmark-results small,
.empty-benchmark {
  color: var(--muted);
}

.empty-benchmark {
  border: 1px dashed var(--border);
  border-radius: 11px;
  padding: 1rem;
}

.wod-split-list {
  display: grid;
  gap: .35rem;
  list-style: none;
  margin: .4rem 0 0;
  max-width: 420px;
  padding: 0;
  width: 100%;
}

.wod-split-list li {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: .3rem .5rem;
}

.wod-split-list strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.readiness-card {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(250px, .65fr) 1.35fr;
  margin-bottom: 1rem;
}

.readiness-intro h2 {
  margin-bottom: .35rem;
}

.readiness-score {
  align-items: baseline;
  display: flex;
  gap: .4rem;
  margin-top: 1rem;
}

.readiness-score strong {
  color: #65f0ad;
  font-size: 2.2rem;
}

.readiness-score span {
  color: var(--muted);
}

.readiness-sliders {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: .8rem;
}

.readiness-sliders label {
  background: rgba(7, 17, 31, .55);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .75rem;
}

.readiness-sliders label > div {
  align-items: center;
  display: grid;
  gap: .4rem;
  grid-template-columns: auto 1fr auto auto;
}

.readiness-sliders small {
  color: var(--muted);
  font-size: .65rem;
}

.readiness-sliders output {
  color: var(--accent);
  font-weight: 900;
  min-width: 1ch;
}

@media (max-width: 820px) {
  .benchmark-history,
  .readiness-card {
    grid-template-columns: 1fr;
  }

  .readiness-sliders {
    grid-template-columns: 1fr;
  }
}

.community-profile-grid {
  align-items: stretch;
}

.community-enable {
  align-items: center;
  background: rgba(31, 154, 255, .08);
  border: 1px solid rgba(31, 154, 255, .28);
  border-radius: 12px;
  display: flex !important;
  gap: .8rem;
  padding: .9rem;
}

.community-enable input {
  height: 1.25rem;
  width: 1.25rem;
}

.community-enable span,
.community-enable small {
  display: block;
}

.input-prefix {
  align-items: center;
  display: flex;
}

.input-prefix > span {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  padding: .78rem .7rem;
}

.input-prefix input {
  border-radius: 0 9px 9px 0 !important;
}

.community-hero {
  margin-bottom: 1rem;
}

.community-onboarding {
  margin-bottom: 1rem;
}

.community-feed {
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  max-width: 960px;
}

.community-tabs {
  padding: .35rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: rgba(15, 25, 40, .82);
  display: flex;
  gap: .25rem;
  margin-bottom: 1.35rem;
  overflow-x: auto;
}

.community-tabs a {
  border: 1px solid transparent;
  border-radius: .65rem;
  color: var(--muted);
  font-weight: 850;
  padding: .8rem 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.community-tabs a:hover,
.community-tabs a.is-active {
  border-color: rgba(21, 151, 255, .45);
  color: white;
  background: rgba(21, 151, 255, .14);
}

.community-tabs a.is-active {
  background: #102f4a;
  box-shadow: inset 0 0 0 1px rgba(21, 151, 255, .2);
}

.community-section {
  margin-bottom: 1.35rem;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading h2,
.community-person-card p {
  margin-bottom: 0;
}

.community-people-grid,
.community-card-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.community-person-card {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  gap: .8rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 1rem;
}

.community-person-card > div:nth-child(2) span,
.community-person-card > div:nth-child(2) small {
  color: var(--muted);
  display: block;
  font-size: .75rem;
}

.community-person-card .person-actions {
  align-items: center;
  display: flex;
  gap: .55rem;
  grid-column: 1 / -1;
}

.person-actions .button {
  flex: 1;
}

.text-button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.danger-text {
  color: #ff788a;
}

.community-network-columns,
.community-create-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-people-list {
  display: grid;
  gap: .7rem;
  margin-top: .8rem;
}

.leaderboard-panel {
  margin: 0 auto;
  max-width: 980px;
}

.leaderboard-list,
.mini-leaderboard {
  display: grid;
}

.leaderboard-list > div,
.mini-leaderboard > div {
  align-items: center;
  border-top: 1px solid var(--border);
  display: grid;
  gap: .8rem;
  grid-template-columns: 2.5rem 1fr auto;
  padding: .8rem 0;
}

.leaderboard-list > div > b {
  color: var(--accent);
  font-size: 1.2rem;
}

.leaderboard-list span small {
  color: var(--muted);
  display: block;
}

.community-create-layout {
  grid-template-columns: minmax(340px, .75fr) minmax(0, 1.25fr);
}

.community-create-layout.is-locked {
  grid-template-columns: minmax(0, 720px);
}

.club-overview {
  display: grid;
  gap: 1rem;
}

.club-overview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.club-overview-heading h2,
.club-overview-heading p {
  margin-bottom: 0;
}

.club-overview-heading h2 {
  margin-top: .25rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.club-overview-heading > div > p:last-child {
  max-width: 640px;
  color: var(--muted);
}

.club-create-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.community-create-layout form {
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr);
  position: sticky;
  top: 1rem;
}

.community-create-layout form > *,
.community-create-layout .save-state {
  grid-column: 1;
}

.club-card,
.challenge-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 240px;
}

.club-card .button,
.challenge-card .button {
  margin-top: auto;
}

.club-card .button {
  margin-top: 0;
}

.club-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.club-membership-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.club-role-badge {
  padding: .35rem .65rem;
  color: #c7d8ea;
  border: 1px solid #30465f;
  border-radius: 999px;
  background: rgba(15, 28, 45, .72);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.club-card-actions {
  display: grid;
  gap: .55rem;
  margin-top: .2rem;
}

.club-card-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.club-card-tools > :only-child {
  grid-column: 1 / -1;
}

.club-tool-button {
  display: inline-flex;
  min-width: 0;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: .65rem .75rem;
  color: #dce8f5;
  border: 1px solid #30465f;
  border-radius: 12px;
  background: rgba(8, 18, 31, .42);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.club-tool-button:hover,
.club-tool-button:focus-visible {
  border-color: var(--blue);
  background: rgba(21, 151, 255, .1);
}

.club-invitation-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .55rem;
  padding: .75rem;
  border: 1px solid rgba(73, 234, 123, .3);
  border-radius: 12px;
  background: rgba(73, 234, 123, .06);
}

.club-invitation-actions p,
.club-invitation-actions small {
  display: grid;
  margin: 0;
}

.club-card .club-member-invite {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, .6fr) auto;
  align-items: end;
  gap: .55rem;
  margin-top: .5rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}

.club-card .club-member-invite > * {
  grid-column: auto;
}

.club-card .club-member-invite .save-state {
  grid-column: 1 / -1;
  margin: 0;
}

.club-sent-invitations {
  display: grid;
  gap: .35rem;
}

.club-sent-invitations span {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem 0;
  border-top: 1px solid var(--border);
}

.club-sent-invitations small {
  color: var(--muted);
}

.mini-leaderboard {
  margin-top: .5rem;
}

.club-requests {
  border-top: 1px solid var(--border);
  display: grid;
  gap: .55rem;
  margin-top: .4rem;
  padding-top: .8rem;
}

.club-requests > div {
  align-items: center;
  display: grid;
  gap: .45rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.club-requests small {
  color: var(--muted);
  display: block;
}

.community-locked-action {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.community-locked-action .button {
  margin-top: auto;
}

.community-feedback {
  background: #17243a;
  border: 1px solid var(--accent);
  border-radius: 10px;
  bottom: 1rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .4);
  color: var(--text);
  font-weight: 800;
  max-width: min(420px, calc(100vw - 2rem));
  padding: .85rem 1rem;
  position: fixed;
  right: 1rem;
  z-index: 100;
}

.community-feedback[data-kind="error"] {
  border-color: #ff788a;
}

.kudos-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.community-card > header {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: auto 1fr auto;
}

.community-card > header strong,
.community-card > header span {
  display: block;
}

.community-card > header span {
  color: var(--muted);
  font-size: .78rem;
}

.community-avatar {
  align-items: center;
  background: linear-gradient(145deg, var(--accent, var(--blue)), #55edac);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #06101c;
  display: flex;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.community-format {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  font-weight: 850;
  padding: .3rem .55rem;
}

.community-workout {
  align-items: end;
  display: grid;
  gap: .8rem;
  grid-template-columns: 1fr auto;
  padding: 1rem 0;
}

.community-workout .eyebrow {
  margin-bottom: .45rem;
}

.community-workout h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.12;
}

.community-workout h2 + p {
  margin: .55rem 0 0;
  color: var(--muted);
}

.community-score {
  color: #65f0ad;
  font-size: 2.4rem;
  line-height: .9;
  text-align: right;
}

.community-score small {
  color: var(--muted);
  display: block;
  font-size: .7rem;
  margin-top: .45rem;
}

.community-actions {
  align-items: center;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: .7rem 0;
}

.community-actions a {
  color: var(--muted);
  text-decoration: none;
}

.community-report-button {
  margin-left: auto;
  padding: 5px 0;
  color: #7f90a6;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
}

.community-report-button:hover { color: #ff9ba2; }

.kudos-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.kudos-button.is-active {
  color: #ffd36e;
}

.community-comments {
  padding-top: .8rem;
}

.community-comment-list {
  display: grid;
  gap: .55rem;
  margin-bottom: .7rem;
}

.community-comment-list > div {
  align-items: start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.community-comment-list button {
  background: none;
  border: 0;
  color: #ff788a;
  cursor: pointer;
}

.community-comment-form {
  display: grid;
  gap: .55rem;
  grid-template-columns: 1fr auto;
}

.auth-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #080d16;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
}

.auth-story {
  display: grid;
  align-content: space-between;
  gap: 50px;
  padding: clamp(32px, 5vw, 76px);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 10% 20%, rgba(21,151,255,.19), transparent 36%),
    linear-gradient(145deg, #0b1726, #080d16 72%);
}

.auth-brand { width: fit-content; }
.auth-story > div { max-width: 620px; }
.auth-story h1 { max-width: 600px; margin: 12px 0 22px; font-size: clamp(3.5rem, 6vw, 7.4rem); line-height: .89; }
.auth-story > div > p:not(.eyebrow) { max-width: 560px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.auth-story > small { color: #6e819a; }

.auth-benefits {
  display: grid;
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.auth-benefits li {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 760;
}

.auth-benefits span { color: var(--blue); font-size: .72rem; letter-spacing: .12em; }

.auth-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: clamp(28px, 6vw, 100px);
  background: radial-gradient(circle at 90% 0, rgba(56,239,125,.07), transparent 28%);
}

.auth-panel > * { width: min(100%, 540px); }
.auth-panel-copy h2 { margin: 8px 0; font-size: clamp(2rem, 3.4vw, 3.4rem); }
.auth-panel-copy > p:last-child { color: var(--muted); }

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0a1321;
}

.auth-switch a {
  padding: 11px;
  color: var(--muted);
  border-radius: 9px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.auth-switch a.is-active { color: white; background: #16253a; box-shadow: inset 0 -2px var(--blue); }

.auth-flow {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #233751;
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(20, 35, 55, .98), rgba(11, 21, 35, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  opacity: .55;
  transition: opacity .2s ease;
}

.auth-flow.is-ready { opacity: 1; }
.auth-flow.is-busy { cursor: wait; }
.auth-flow [hidden] { display: none !important; }

.auth-google,
.auth-submit,
.auth-back,
.auth-resend {
  font: inherit;
}

.auth-google,
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.auth-google {
  border: 1px solid #314661;
  color: var(--ink);
  background: #101c2d;
}

.auth-google:hover {
  border-color: #55708f;
  background: #14243a;
  transform: translateY(-1px);
}

.auth-google svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #7f93ad;
  font-size: .84rem;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #273a52;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 9px;
}

.auth-field > span {
  color: #bfd0e5;
  font-size: .9rem;
  font-weight: 800;
}

.auth-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #30445e;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #081321;
  font: inherit;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input::placeholder { color: #637791; }

.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 151, 255, .14);
}

.auth-code-input {
  height: 66px;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: .36em;
  padding-left: calc(16px + .36em);
}

.auth-submit {
  border: 1px solid #25a4ff;
  color: white;
  background: linear-gradient(120deg, #168ff2, #1aa4ff);
  box-shadow: 0 10px 28px rgba(21, 151, 255, .2);
}

.auth-submit:hover {
  background: linear-gradient(120deg, #28a5ff, #168ff2);
  transform: translateY(-1px);
}

.auth-submit span:last-child {
  margin-left: auto;
  padding-right: 4px;
  font-size: 1.2rem;
}

.auth-submit span:first-child { margin-left: auto; }

.auth-google:disabled,
.auth-submit:disabled,
.auth-back:disabled,
.auth-resend:disabled,
.auth-input:disabled {
  cursor: wait;
  opacity: .58;
}

.auth-captcha:empty { display: none; }
.auth-captcha { display: grid; justify-content: center; overflow: hidden; }

.auth-verify {
  display: grid;
  gap: 22px;
}

.auth-back,
.auth-resend {
  width: fit-content;
  padding: 0;
  border: 0;
  color: #8fc8f5;
  background: none;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
}

.auth-back:hover,
.auth-resend:hover { color: white; }

.auth-verify-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  align-items: start;
}

.auth-mail-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(21, 151, 255, .42);
  border-radius: 50%;
  color: var(--blue);
  background: rgba(21, 151, 255, .12);
}

.auth-verify-heading h3 {
  margin: 0 0 5px;
  font-size: 1.35rem;
}

.auth-verify-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-verify-heading strong {
  color: #dbeaff;
  overflow-wrap: anywhere;
}

.auth-resend { justify-self: center; margin-top: 2px; }

.auth-message {
  padding: 12px 14px;
  border: 1px solid rgba(255, 98, 116, .35);
  border-radius: 10px;
  color: #ffadb7;
  background: rgba(255, 71, 93, .09);
  font-size: .9rem;
  font-weight: 720;
  line-height: 1.5;
}

.auth-message[data-kind="success"] {
  border-color: rgba(56, 239, 125, .32);
  color: #9ff9bf;
  background: rgba(56, 239, 125, .08);
}

.auth-secure {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #7388a2;
  font-size: .76rem;
  text-align: center;
}

.auth-secure span { color: var(--green); font-size: .58rem; }

@media (max-width: 620px) {
  .community-workout {
    grid-template-columns: 1fr;
  }

  .community-score {
    text-align: left;
  }

  .community-comment-form {
    grid-template-columns: 1fr;
  }

  .community-network-columns,
  .community-create-layout {
    grid-template-columns: 1fr;
  }

  .community-create-layout form {
    position: static;
  }

  .club-card .club-member-invite,
  .club-invitation-actions,
  .admin-community-create {
    grid-template-columns: 1fr;
  }

  .club-overview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .club-overview-heading > .button {
    width: 100%;
  }

  .club-create-hint {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding-bottom: 38px; }
  .auth-story h1 { font-size: clamp(3rem, 14vw, 5.4rem); }
  .auth-story .auth-benefits, .auth-story > small { display: none; }
  .auth-panel { min-height: 58vh; padding-block: 48px; }
}

/* Mobile/PWA contract: natural vertical flow with a compact app shell. */
@media (max-width: 760px) {
  html,
  body {
    min-height: 100%;
    height: auto;
    overflow-x: clip;
  }

  body.dashboard-view,
  body.program-view {
    overflow-x: clip;
    overflow-y: auto;
  }

  body.dashboard-view .app-frame,
  body.program-view .app-frame,
  body.dashboard-view .app-content,
  body.program-view .app-content {
    display: block;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  body.dashboard-view .shell,
  body.program-view .shell {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .mobile-header {
    position: sticky;
    z-index: 90;
    top: 0;
    display: flex;
    min-height: 60px;
    padding: max(9px, env(safe-area-inset-top)) 16px 9px;
    border-bottom: 1px solid rgba(38, 53, 74, .9);
    background: rgba(8, 13, 22, .94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
  }

  .mobile-header .brand {
    min-width: 0;
    font-size: 1rem;
  }

  .mobile-header .brand-logo {
    width: 31px;
    height: 38px;
    flex-basis: 31px;
  }

  .mobile-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .35rem;
  }

  .language-switcher.is-compact {
    display: inline-grid;
    grid-template-columns: repeat(2, auto);
  }

  .language-switcher.is-compact a {
    min-height: 1.65rem;
    padding-inline: .4rem;
  }

  .notification-center {
    position: relative;
  }

  .notification-center > summary {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #c9d8e9;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    list-style: none;
  }

  .notification-center > summary::-webkit-details-marker {
    display: none;
  }

  .notification-center > summary svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .notification-center[open] > summary {
    color: #fff;
    border-color: rgba(21, 151, 255, .4);
    background: rgba(21, 151, 255, .12);
  }

  .notification-count {
    position: absolute;
    top: 3px;
    right: 1px;
    display: grid;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    place-items: center;
    color: #fff;
    border: 2px solid #080d16;
    border-radius: 999px;
    background: #ff4d6d;
    font-size: .58rem;
    line-height: 1;
  }

  .notification-panel {
    position: absolute;
    z-index: 130;
    top: calc(100% + 8px);
    right: -50px;
    display: grid;
    width: min(360px, calc(100vw - 24px));
    max-height: min(70dvh, 560px);
    overflow: hidden;
    border: 1px solid #30445d;
    border-radius: 16px;
    background: #101b2b;
    box-shadow: 0 22px 58px rgba(0, 0, 0, .5);
  }

  .notification-panel > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .notification-panel h2 {
    margin: .1rem 0 0;
    font-size: 1.2rem;
  }

  .notification-panel > header > span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
  }

  .notification-list {
    display: grid;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .notification-item {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(42, 60, 82, .68);
    text-decoration: none;
  }

  .notification-item:hover {
    background: rgba(21, 151, 255, .08);
  }

  .notification-item-icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    color: #91d1ff;
    border: 1px solid rgba(21, 151, 255, .32);
    border-radius: .75rem;
    background: rgba(21, 151, 255, .1);
    font-size: .72rem;
    font-weight: 850;
  }

  .notification-item > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: .15rem;
  }

  .notification-item strong,
  .notification-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notification-item strong {
    font-size: .8rem;
  }

  .notification-item small {
    color: var(--muted);
    font-size: .68rem;
  }

  .notification-item > b {
    color: #7290ad;
    font-size: 1.2rem;
  }

  .notification-empty {
    display: grid;
    min-height: 10rem;
    padding: 1.25rem;
    place-content: center;
    justify-items: center;
    color: var(--muted);
    text-align: center;
  }

  .notification-empty > span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .55rem;
    place-items: center;
    color: #65f0ad;
    border-radius: 999px;
    background: rgba(73, 234, 123, .1);
  }

  .notification-empty strong {
    color: var(--text);
  }

  .notification-empty p {
    max-width: 15rem;
    margin: .35rem 0 0;
    font-size: .72rem;
  }

  .notification-inbox-link {
    display: flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1rem;
    color: #91d1ff;
    border-top: 1px solid var(--line);
    background: #0d1725;
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-profile-link {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 13px;
    text-decoration: none;
  }

  .mobile-profile-link.is-active {
    border-color: rgba(21, 151, 255, .4);
    background: rgba(21, 151, 255, .12);
  }

  .mobile-profile-link .profile-avatar {
    width: 34px;
    height: 34px;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 64px;
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(38, 53, 74, .95);
    background: #080d16;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, .34);
  }

  .mobile-tabbar--athlete {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-tabbar--coach {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-tabbar > a,
  .mobile-more-menu > summary {
    display: grid;
    min-width: 0;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #8191a5;
    border-radius: 11px;
    text-decoration: none;
    touch-action: manipulation;
  }

  .mobile-tabbar > a.is-active,
  .mobile-more-menu > summary.is-active,
  .mobile-more-menu[open] > summary {
    color: #fff;
    background: rgba(21, 151, 255, .13);
  }

  .mobile-tabbar:has(.mobile-more-menu[open]) > a.is-active {
    color: #8191a5;
    background: transparent;
  }

  .mobile-tabbar > a svg,
  .mobile-more-menu > summary svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tabbar > a > span,
  .mobile-more-menu > summary > span {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(.56rem, 2.55vw, .68rem);
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-support-link {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #91d1ff;
    border: 1px solid rgba(21, 151, 255, .28);
    border-radius: 12px;
    background: rgba(21, 151, 255, .08);
  }

  .mobile-support-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-support-link.is-active {
    color: #fff;
    border-color: var(--blue);
    background: rgba(21, 151, 255, .18);
  }

  .app-content {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  body.dashboard-view .shell {
    padding: 20px 16px 28px;
  }

  .dashboard-page {
    display: grid;
    grid-template-rows: none;
    gap: 18px;
    height: auto;
    min-width: 0;
  }

  .dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
  }

  .dashboard-hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11.5vw, 3.35rem);
    line-height: .98;
    letter-spacing: -.05em;
    overflow-wrap: normal;
  }

  .dashboard-hero .lead {
    margin-top: 14px;
    font-size: .98rem;
    line-height: 1.55;
  }

  .dashboard-quick-actions {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
    width: 100%;
    gap: 9px;
    white-space: normal;
  }

  .dashboard-quick-actions .button {
    min-width: 0;
    min-height: 48px;
    padding-inline: 12px;
    font-size: .84rem;
    text-align: center;
  }

  .dashboard-view .week-strip {
    display: flex;
    width: calc(100% + 32px);
    max-width: none;
    margin-inline: -16px;
    padding: 2px 16px 5px;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
  }

  .dashboard-view .week-strip a {
    flex: 0 0 76px;
    min-width: 76px;
    min-height: 66px;
    padding: 8px 6px;
    scroll-snap-align: center;
  }

  .dashboard-view .week-strip small {
    font-size: .66rem;
  }

  .dashboard-sessions {
    min-width: 0;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .dashboard-view .workout-summary {
    min-width: 0;
    padding: 20px 16px 18px;
    border-radius: 16px;
  }

  .workout-summary-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .dashboard-view .workout-summary h2 {
    font-size: clamp(1.65rem, 8vw, 2.1rem);
    line-height: 1.05;
  }

  .workout-summary-head .muted {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
  }

  .progress-ring {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .progress-ring strong {
    font-size: .85rem;
  }

  .progress-ring small {
    max-width: 52px;
    overflow: hidden;
    font-size: .58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-view .movement-list {
    margin-top: 16px;
  }

  .dashboard-view .movement-list a {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    min-width: 0;
    min-height: 66px;
    padding: 10px 0;
  }

  .dashboard-view .movement-list a > span:nth-child(2) {
    min-width: 0;
  }

  .dashboard-view .movement-list strong,
  .dashboard-view .movement-list small {
    overflow-wrap: anywhere;
  }

  .dashboard-view .movement-list .movement-done {
    align-self: center;
    font-size: .7rem;
  }

  .dashboard-view .movement-list a > b {
    display: none;
  }

  .dashboard-view .movement-index {
    width: 36px;
    height: 36px;
  }

  .dashboard-view .button.full {
    min-height: 48px;
    margin-top: 14px;
  }

  .readiness-dialog {
    width: calc(100vw - 24px);
  }

  .readiness-dialog form {
    max-height: calc(100dvh - 24px);
    padding: 22px 18px;
  }

  .readiness-dialog .readiness-sliders {
    grid-template-columns: 1fr;
  }
}

/* Unified responsive page contract. */
.app-view:not(.dashboard-view):not(.program-view) .app-content {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.app-view:not(.dashboard-view):not(.program-view) .shell {
  flex: 1 0 auto;
}

.app-view .site-footer {
  display: grid;
  min-height: 64px;
  padding: 16px 24px;
  place-items: center;
}

.app-view .site-footer p {
  margin: 0;
}

.app-view .compact-hero {
  margin-bottom: 28px;
}

.app-view .compact-hero h1 {
  font-size: clamp(2.35rem, 4.3vw, 4.25rem);
}

.app-view .compact-hero .lead {
  margin: 14px 0 0;
  font-size: clamp(.95rem, 1.35vw, 1.12rem);
  line-height: 1.5;
}

.community-empty,
.community-search-empty {
  display: grid;
  min-height: clamp(250px, 36vh, 410px);
  place-content: center;
  justify-items: center;
}

.community-discover-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: end;
  gap: 28px;
  margin-bottom: 18px;
}

.community-discover-heading h2 {
  margin-bottom: 0;
}

.community-search {
  display: grid;
  gap: 7px;
}

.community-search > label {
  color: var(--muted);
  font-size: .76rem;
}

.community-search > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.community-search .button {
  min-height: 48px;
}

.community-search-empty {
  grid-column: 1 / -1;
  width: 100%;
}

.community-search-empty h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.8vw, 2.4rem);
}

.community-visibility-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 13, 22, .45);
}

.community-visibility-status.is-visible {
  border-color: rgba(73, 234, 123, .38);
  background: rgba(73, 234, 123, .07);
}

.community-visibility-status > div {
  display: grid;
  gap: 3px;
}

.community-visibility-status small {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.community-visibility-status strong {
  font-size: 1rem;
}

.community-visibility-status p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

/* Analysis is a single-screen desktop workspace; mobile keeps natural flow. */
@media (min-width: 761px) {
  body.profile-view .shell {
    padding: 24px clamp(24px, 3vw, 48px) 32px;
  }

  .profile-view .compact-hero {
    align-items: center;
    margin-bottom: 16px;
  }

  .profile-view .compact-hero h1 {
    font-size: clamp(2.25rem, 3.4vw, 3.5rem);
  }

  .profile-view .compact-hero .eyebrow {
    margin-bottom: 7px;
  }

  .profile-view .compact-hero .lead {
    max-width: 980px;
    margin-top: 8px;
    font-size: .9rem;
    line-height: 1.4;
  }

  .profile-view .profile-tabs {
    margin-bottom: 14px;
    padding: 4px;
  }

  .profile-view .profile-tabs button {
    min-height: 60px;
    padding: 8px 12px;
  }

  .profile-view .profile-grid {
    gap: 16px;
  }

  .profile-view #community-profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 22px;
  }

  .profile-view #community-profile-form > .eyebrow,
  .profile-view #community-profile-form > h2,
  .profile-view #community-profile-form > p,
  .profile-view #community-profile-form > .community-enable:first-of-type,
  .profile-view #community-profile-form > button {
    grid-column: 1 / -1;
  }

  .profile-view #community-profile-form > h2 {
    margin-bottom: 2px;
    font-size: 1.7rem;
  }

  .profile-view #community-profile-form > p {
    margin-block: 0;
    font-size: .82rem;
    line-height: 1.4;
  }

  .profile-view #community-profile-form label {
    gap: 5px;
    font-size: .78rem;
  }

  .profile-view #community-profile-form input,
  .profile-view #community-profile-form textarea {
    padding: 10px 11px;
    font-size: .84rem;
  }

  .profile-view #community-profile-form textarea {
    min-height: 76px;
    max-height: 100px;
  }

  .profile-view #community-profile-form .community-enable {
    min-height: 62px;
    padding: 10px;
  }

  .profile-view #community-profile-form > .community-enable:not(:first-of-type) {
    grid-column: auto;
  }

  .profile-view #community-profile-form > button {
    min-height: 46px;
  }

  .profile-view #profile-panel-community .relationship-card {
    padding: 22px;
  }

  .profile-view #profile-panel-community .relationship-card h2 {
    margin-bottom: 14px;
    font-size: 1.8rem;
  }

  .profile-view #profile-panel-community .community-visibility-status {
    margin-bottom: 10px;
    padding: 11px;
  }

  .profile-view #profile-panel-community .profile-facts > div {
    padding-block: 10px;
  }

  .profile-view #profile-panel-community .button.full {
    min-height: 44px;
    margin-top: 12px;
  }

  body.analysis-view {
    overflow: hidden;
  }

  body.analysis-view .app-frame,
  body.analysis-view .app-content {
    height: 100dvh;
    min-height: 0;
  }

  body.analysis-view .site-footer {
    display: none;
  }

  body.analysis-view .shell {
    height: 100%;
    min-height: 0;
    padding: 22px clamp(22px, 3vw, 48px);
    overflow: hidden;
  }

  .analysis-workspace {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 14px;
    height: 100%;
    min-height: 0;
  }

  .analysis-hero {
    align-items: center;
    margin: 0 !important;
  }

  .analysis-hero h1 {
    font-size: clamp(2rem, 3vw, 3.35rem) !important;
  }

  .analysis-hero .lead {
    max-width: 1050px;
    margin-top: 8px !important;
    font-size: .88rem !important;
    line-height: 1.35 !important;
  }

  .analysis-view .upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    gap: 12px 16px;
    padding: 16px;
    overflow: hidden;
  }

  .analysis-view .capture-mode-tabs {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .analysis-view .capture-mode-tab {
    min-height: 42px;
  }

  .analysis-view .capture-panel,
  .analysis-view .capture-review {
    grid-column: 1;
    grid-row: 2 / 4;
    min-height: 0;
    overflow: auto;
  }

  .analysis-view .camera-stage,
  .analysis-view .dropzone {
    min-height: 0;
    height: clamp(250px, 42vh, 470px);
  }

  .analysis-view .camera-stage video {
    max-height: 100%;
  }

  .analysis-view .camera-status-row {
    font-size: .78rem;
  }

  .analysis-view .form-grid {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 3px;
  }

  .analysis-view .form-grid label {
    gap: 5px;
    font-size: .76rem;
  }

  .analysis-view .form-grid input,
  .analysis-view .form-grid select {
    padding: 10px 11px;
    font-size: .84rem;
  }

  .analysis-view .time-fields {
    grid-column: 1 / -1;
  }

  .analysis-view #form-error {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
  }

  .analysis-view .analyze-submit {
    grid-column: 2;
    grid-row: 3;
    min-height: 46px;
  }

  .analysis-view #form-error:not([hidden]) + .analyze-submit {
    margin-top: 58px;
  }

  .analysis-view .capture-guide {
    display: none;
  }

  .analysis-view .upload-form {
    display: flex;
    flex-direction: column;
    width: min(100%, 960px);
    margin-inline: auto;
    overflow-y: auto;
  }

  .analysis-view [data-analysis-panel="camera"],
  .analysis-view [data-analysis-panel="upload"],
  .analysis-view [data-analysis-panel="settings"] {
    min-height: 0;
  }

  .analysis-view .capture-panel,
  .analysis-view .capture-review {
    min-height: 0;
    overflow: auto;
  }

  .analysis-view [data-analysis-panel="settings"] .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .analysis-view .capture-submit-actions {
    margin-top: 14px;
  }

  .analysis-submit-state {
    min-height: 0;
    height: 100%;
  }
}

@media (max-width: 760px) {
  .app-view:not(.dashboard-view):not(.program-view) .app-content {
    display: block;
    min-height: 100dvh;
  }

  .app-view:not(.dashboard-view):not(.program-view) .shell {
    min-height: calc(100dvh - 60px - 68px);
    padding: 20px 16px 32px;
  }

  .app-view .compact-hero {
    margin-bottom: 22px;
  }

  .app-view .compact-hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.15rem);
  }

  .wod-library-hero h1 {
    white-space: normal;
  }

  .app-view .compact-hero > .button,
  .app-view .compact-hero > a.button {
    width: 100%;
  }

  .community-discover-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .community-search > div {
    grid-template-columns: 1fr;
  }

  .community-search .button {
    width: 100%;
  }

  .community-tabs {
    width: 100%;
    margin-inline: 0;
    padding: 5px;
    scrollbar-width: none;
  }

  .community-tabs::-webkit-scrollbar {
    display: none;
  }

  .community-tabs a {
    min-height: 44px;
    padding: 11px 13px;
    font-size: .78rem;
  }

  .community-person-card,
  .community-card {
    min-width: 0;
  }

  .community-person-card .person-actions {
    display: flex;
    width: 100%;
    gap: .4rem;
  }

  .community-person-card .person-actions .button,
  .community-person-card .person-actions .text-button {
    flex: 1 1 0;
    width: 100%;
    min-height: 40px;
    padding: .45rem .3rem;
    font-size: .68rem;
    white-space: nowrap;
  }

  .analysis-workspace {
    min-width: 0;
  }
}
/* Logbook: planned work and performed training remain visually distinct. */
.logbook-page {
  --accent: var(--blue);
  --border: var(--line);
  --surface: var(--panel);
}

.logbook-page .surface-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(22, 34, 53, .9), rgba(13, 22, 35, .94));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .16);
}

.logbook-page .logbook-stats .surface-card,
.logbook-page .logbook-analysis,
.logbook-page .import-card {
  padding: 1.25rem;
}

.logbook-heading,
.import-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logbook-heading {
  align-items: flex-end;
}

.logbook-heading > div:first-child {
  max-width: 48rem;
}

.logbook-heading h1 {
  font-size: clamp(2.7rem, 6vw, 4.6rem);
}

.logbook-heading p:not(.eyebrow) {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.logbook-heading-actions {
  display: flex;
  gap: .65rem;
  flex-shrink: 0;
}

.logbook-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.logbook-stats article {
  display: grid;
  gap: .25rem;
}

.logbook-stats strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.next-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-color: rgba(21, 151, 255, .38) !important;
}

.next-session-copy {
  min-width: 0;
}

.next-session-copy h2 {
  margin: .25rem 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.next-session-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.logbook-section {
  margin-top: 2rem;
}

.logbook-analysis {
  margin: 0 0 2rem;
}

.logbook-insights {
  margin-top: 2rem;
  overflow: hidden;
}

.logbook-insights > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  list-style: none;
  cursor: pointer;
}

.logbook-insights > summary::-webkit-details-marker {
  display: none;
}

.logbook-insights > summary > span:first-child {
  display: grid;
  gap: .2rem;
}

.logbook-insights > summary small {
  color: var(--blue);
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .13em;
}

.logbook-insights > summary strong {
  font-size: 1rem;
}

.logbook-insights > summary > span:last-child {
  color: var(--blue);
  font-size: 1.4rem;
  transition: transform .18s ease;
}

.logbook-insights[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.logbook-insights .logbook-analysis {
  margin: 0;
  padding-top: .4rem;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.logbook-week-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(2.25rem, 1fr));
  gap: .4rem;
  align-items: end;
  min-height: 9rem;
  overflow-x: auto;
}

.logbook-week-grid > div {
  display: grid;
  gap: .25rem;
  justify-items: center;
}

.week-bars {
  height: 5.5rem;
  display: flex;
  align-items: end;
  gap: .2rem;
}

.week-bars i,
.week-bars b {
  display: block;
  width: .55rem;
  max-height: 5.5rem;
  border-radius: .3rem .3rem 0 0;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}

.week-bars b {
  background: var(--accent);
}

.logbook-week-grid small {
  font-size: .65rem;
  color: var(--muted);
}

.analysis-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.analysis-breakdown > div {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.analysis-breakdown h3 {
  flex-basis: 100%;
}

.analysis-breakdown span {
  padding: .4rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.planned-card-grid {
  display: grid;
  gap: .75rem;
}

.planned-workout-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.planned-workout-content {
  min-width: 0;
}

.planned-workout-content h3 {
  margin: .2rem 0 0;
}

.workout-card-date {
  display: grid;
  place-items: center;
  align-content: center;
  width: 4.15rem;
  min-width: 4.15rem;
  height: 4.15rem;
  padding: .45rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 1rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text);
  line-height: 1;
}

.workout-card-date strong {
  font-size: 1.5rem;
  letter-spacing: -.04em;
}

.workout-card-date span {
  margin-top: .28rem;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.workout-card-kicker {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.logbook-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.training-log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
}

.training-log-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 24rem;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
  border-top: 3px solid var(--accent) !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.training-log-card:hover {
  border-color: #36506e;
  border-top-color: var(--accent);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .26);
  transform: translateY(-2px);
}

.training-log-card--partial {
  border-top-color: #f59e0b;
}

.training-log-card--skipped {
  border-top-color: var(--muted);
}

.training-log-card-header,
.training-log-card-body,
.training-log-card-footer {
  padding-right: 1.15rem;
  padding-left: 1.15rem;
}

.training-log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding-top: 1.15rem;
}

.training-log-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.source-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .25rem .55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.source-pill--btwb {
  border-color: color-mix(in srgb, #168eea 45%, var(--border));
  background: color-mix(in srgb, #168eea 12%, transparent);
  color: #46aaf5;
}

.status-pill--completed {
  border-color: color-mix(in srgb, #27c281 38%, var(--border));
  background: color-mix(in srgb, #27c281 10%, transparent);
  color: #55d9a2;
}

.training-log-card-body {
  min-width: 0;
  padding-top: 1rem;
}

.training-log-card-body h3 {
  margin: .25rem 0 .65rem;
  font-size: 1.12rem;
  line-height: 1.3;
}

.training-log-card-body h3 a {
  color: inherit;
  text-decoration: none;
}

.training-log-card-body h3 a:hover {
  color: var(--accent);
}

.training-log-workout {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.training-log-result {
  display: grid;
  gap: .2rem;
  margin: 1rem 1.15rem 0;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: .85rem;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.training-log-result span,
.training-log-result small {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.training-log-result strong {
  overflow-wrap: anywhere;
  font-size: 1.3rem;
  line-height: 1.25;
}

.training-log-note {
  display: -webkit-box;
  margin: .8rem 1.15rem 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .82rem;
  font-style: italic;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.training-log-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: auto .8rem .8rem;
  padding: .85rem .35rem .15rem;
  border-top: 0;
}

.training-log-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: .4rem .7rem;
  color: var(--muted);
  font-size: .75rem;
}

.training-log-meta b {
  color: var(--text);
}

.log-social-action {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 2rem;
  padding: .35rem .55rem;
  color: #b8c9dc;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.log-social-action:hover,
.log-social-action[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,.035);
}

.log-social-action.is-active {
  color: #ff879a;
  border-color: rgba(255,124,145,.3);
  background: rgba(255,124,145,.08);
}

.log-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  margin: -.25rem 1.15rem 1rem;
  padding-top: .15rem;
}

.log-comment-form[hidden] { display: none; }
.log-comment-form input { min-height: 2.65rem; }
.log-comment-form .button { min-height: 2.65rem; padding-inline: .85rem; }
.log-comment-form .save-state { grid-column: 1 / -1; margin: 0; }

.shared-indicator {
  color: #55d9a2;
}

.training-log-open {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}

.training-log-open span {
  transition: transform .16s ease;
}

.training-log-open:hover span {
  transform: translateX(.2rem);
}

.training-log-grid > .empty-state {
  grid-column: 1 / -1;
}

.import-card {
  margin-top: 2rem;
}

.import-card form {
  display: grid;
  gap: .75rem;
  min-width: min(100%, 22rem);
}

.quick-log-dialog {
  width: min(42rem, calc(100vw - 2rem));
}

.quick-log-dialog > form {
  display: grid;
  gap: 1rem;
}

.quick-log-dialog .dialog-header,
.finish-training-dialog .dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.quick-log-dialog .dialog-header .icon-button,
.finish-training-dialog .dialog-header .icon-button {
  flex: 0 0 auto;
}

.quick-log-explanation {
  margin: 0;
  padding: .8rem 1rem;
  color: #bddbf3;
  border: 1px solid rgba(21, 151, 255, .24);
  border-radius: .75rem;
  background: rgba(21, 151, 255, .07);
  font-size: .8rem;
  line-height: 1.5;
}

.quick-log-primary-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.quick-log-dialog label > small {
  color: var(--muted);
  font-weight: 500;
}

.quick-log-more {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .75rem;
}

.quick-log-more summary {
  padding: .8rem 1rem;
  color: #bddbf3;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

.quick-log-more > div {
  display: grid;
  gap: .8rem;
  padding: 0 1rem 1rem;
}

.training-log-panel {
  display: grid;
  grid-template-columns: minmax(14rem, .7fr) minmax(20rem, 1.3fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

.training-log-panel > .button {
  justify-self: end;
}

.training-log-panel form {
  display: grid;
  gap: .8rem;
}

@media (max-width: 720px) {
  .logbook-heading,
  .import-card {
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
    margin: 1rem 0 1.15rem;
  }

  .training-log-panel {
    grid-template-columns: 1fr;
  }

  .logbook-actions {
    justify-content: flex-end;
  }

  .planned-workout-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .planned-workout-card .logbook-actions {
    grid-column: 1 / -1;
  }

  .training-log-card {
    min-height: 22rem;
  }

  .logbook-heading {
    gap: 1rem;
  }

  .logbook-heading h1 {
    font-size: 2.6rem;
  }

  .logbook-heading p:not(.eyebrow) {
    font-size: .86rem;
  }

  .logbook-heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logbook-heading-actions .button {
    min-width: 0;
    min-height: 46px;
    padding-inline: .7rem;
    font-size: .78rem;
  }

  .logbook-page .logbook-stats .surface-card {
    gap: .1rem;
    padding: .75rem .6rem;
    box-shadow: none;
  }

  .logbook-stats article > span,
  .logbook-stats article > small {
    overflow: hidden;
    font-size: .64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-menu {
    min-width: 0;
  }

  .mobile-more-menu > summary {
    min-height: 52px;
    list-style: none;
    cursor: pointer;
  }

  .mobile-more-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-more-panel {
    position: fixed;
    z-index: 102;
    inset:
      calc(60px + env(safe-area-inset-top))
      0
      calc(64px + env(safe-area-inset-bottom))
      0;
    display: grid;
    align-content: start;
    gap: .35rem;
    overflow-y: auto;
    padding: 1rem max(1rem, env(safe-area-inset-right)) 1.25rem max(1rem, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
    background: #08101b;
    box-shadow: none;
    overscroll-behavior: contain;
  }

  .mobile-more-panel > strong {
    padding: .4rem .55rem .25rem;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .mobile-more-panel a {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: .65rem;
    min-height: 3.6rem;
    align-items: center;
    padding: .55rem;
    color: var(--text);
    border-radius: .7rem;
    text-decoration: none;
  }

  .mobile-more-panel a:active {
    background: rgba(21, 151, 255, .1);
  }

  .mobile-more-panel a svg {
    width: 1.35rem;
    height: 1.35rem;
    justify-self: center;
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-more-panel a span {
    display: grid;
    min-width: 0;
    gap: .12rem;
  }

  .mobile-more-panel a b {
    font-size: .86rem;
  }

  .mobile-more-panel a small {
    color: var(--muted);
    font-size: .67rem;
  }

  .logbook-stats strong {
    font-size: 1.55rem;
  }

  .next-session-card {
    display: grid;
    align-items: stretch;
    padding: 1rem;
  }

  .next-session-card .logbook-actions {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }

  .next-session-card .button {
    min-height: 46px;
    padding-inline: .65rem;
  }

  .logbook-history {
    margin-top: 1.45rem;
  }

  .logbook-history .section-heading h2 {
    margin-bottom: .8rem;
    font-size: 2.2rem;
  }

  .logbook-insights {
    margin-top: 1rem;
  }

  .logbook-insights .logbook-analysis {
    padding: 1rem;
  }

  .logbook-insights .section-heading {
    display: grid;
    gap: .5rem;
  }

  .logbook-insights .section-heading h2 {
    font-size: 1.8rem;
  }

  .quick-log-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 1rem);
    margin: auto 0 0;
    border-radius: 1.1rem 1.1rem 0 0;
  }

  .quick-log-dialog > form {
    gap: .8rem;
    padding: 1rem;
  }

  .quick-log-dialog .dialog-header h2 {
    margin-bottom: 0;
    font-size: 1.6rem;
  }

  .quick-log-primary-fields {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .quick-log-dialog input,
  .quick-log-dialog select,
  .quick-log-dialog textarea {
    padding: .75rem;
  }

  .quick-log-date {
    align-items: start;
  }

  .quick-log-date input {
    width: min(12rem, 100%);
  }
}

.wod-dictation {
  display: grid;
  gap: .75rem;
}

.wod-dictation-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.wod-dictation-actions .button {
  min-width: 0;
}

.quick-log-photo-button {
  position: relative;
  cursor: pointer;
}

.quick-log-photo-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.quick-log-photo-button.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.wod-dictation-actions .is-recording {
  color: white;
  border-color: #ff5770;
  background: rgba(255, 87, 112, .16);
}

.wod-structure-preview {
  padding: .9rem;
  border: 1px solid rgba(73, 234, 123, .3);
  border-radius: .8rem;
  background: rgba(73, 234, 123, .055);
}

.wod-structure-preview header {
  align-items: center;
}

.wod-structure-preview header div,
.wod-structure-preview [data-wod-preview-lines] {
  display: grid;
  gap: .25rem;
}

.wod-structure-preview header small {
  color: var(--green);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.wod-structure-preview header > span {
  color: #b7c7d9;
  font-size: .68rem;
  text-transform: uppercase;
}

.wod-structure-preview [data-wod-preview-lines] {
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(73, 234, 123, .15);
  color: #dbe8f4;
  font-size: .78rem;
}

.wod-structure-preview > p {
  margin: .75rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}

.wod-finish-status {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}

.wod-finish-status legend {
  padding-inline: .35rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}

.wod-finish-status > label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .4rem;
}

.wod-finish-status input[type="radio"] {
  width: auto;
}

.wod-finish-status > div {
  flex-basis: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.wod-finish-status > div:not([hidden]) {
  display: grid;
}

.inline-ai-composer {
  display: grid;
  gap: .7rem;
  padding: .85rem;
  border: 1px solid rgba(140, 102, 255, .34);
  border-radius: .8rem;
  background: linear-gradient(145deg, rgba(140, 102, 255, .1), rgba(21, 151, 255, .045));
}

.inline-ai-composer > strong {
  font-size: .9rem;
}

.inline-ai-composer > p {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

.composer-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .55rem;
}

.composer-actions .button {
  min-width: 0;
}

.composer-actions .is-recording {
  color: white;
  border-color: #ff5770;
  background: rgba(255, 87, 112, .15);
}

.manual-training-fields {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .75rem;
}

.manual-training-fields > summary {
  padding: .8rem 1rem;
  color: #bddbf3;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}

.manual-training-fields > div {
  display: grid;
  gap: .85rem;
  padding: 0 .8rem .8rem;
}

.compact-number-field input {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 850;
}

.dashboard-block-label {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .2rem .45rem;
  color: #9bcfff;
  border-bottom: 1px solid var(--line);
  font-size: .66rem;
  letter-spacing: .1em;
}

.dashboard-block-label strong {
  color: var(--muted);
  font-size: .65rem;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-block-label.is-wod {
  color: var(--green);
  margin-top: .5rem;
}

.dashboard-start-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.dashboard-start-actions .button {
  min-width: 0;
}

.log-social-count {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #b8c9dc;
}

.log-social-count:first-of-type {
  color: #ff7c91;
}

.training-log-detail-page {
  background:
    radial-gradient(circle at 92% 0%, rgba(21, 151, 255, .11), transparent 32rem),
    var(--bg);
}

.log-detail-hero {
  align-items: end;
}

.log-detail-stack {
  display: grid;
  gap: 1rem;
}

.log-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr);
  gap: 1rem;
  padding: 1.25rem;
  border-color: rgba(21, 151, 255, .42);
}

.log-detail-summary > div:first-child {
  display: grid;
  align-content: center;
  gap: .25rem;
  padding: 1rem;
  border-radius: .85rem;
  background: rgba(21, 151, 255, .08);
}

.log-detail-summary > div:first-child > strong {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.log-detail-summary > div:first-child > small {
  color: var(--blue);
  font-weight: 850;
  letter-spacing: .1em;
}

.log-detail-summary dl,
.log-detail-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
}

.log-detail-summary dl > div,
.log-detail-data-grid > div {
  display: grid;
  gap: .18rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgba(6, 13, 23, .34);
}

.log-detail-summary dt,
.log-detail-data-grid dt {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.log-detail-summary dd,
.log-detail-data-grid dd {
  margin: 0;
  font-weight: 850;
}

.log-detail-section {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.log-detail-section > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.log-detail-section h2,
.log-detail-section h3,
.log-detail-section p {
  margin: 0;
}

.log-detail-workout-copy,
.log-detail-note {
  white-space: pre-line;
}

.log-detail-workout-copy {
  color: #c2d0df;
  line-height: 1.65;
}

.log-detail-prescription {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border-left: 3px solid var(--blue);
  border-radius: .35rem .7rem .7rem .35rem;
  background: rgba(21, 151, 255, .07);
}

.log-detail-movements {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-detail-movements li {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
}

.log-detail-movements li > span {
  display: grid;
  place-items: center;
  min-height: 2.7rem;
  color: var(--blue);
  border-radius: .55rem;
  background: rgba(21, 151, 255, .1);
  font-weight: 900;
}

.log-detail-movements li div {
  display: grid;
  gap: .2rem;
}

.log-detail-movements small {
  color: var(--muted);
}

.log-detail-splits,
.log-detail-comments,
.log-detail-lifts,
.log-detail-set-list {
  display: grid;
  gap: .6rem;
}

.log-detail-splits > div,
.log-detail-comments article {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem;
  border-bottom: 1px solid var(--line);
}

.log-detail-comments article {
  display: grid;
  justify-content: stretch;
  gap: .25rem;
}

.log-detail-lifts > article {
  display: grid;
  gap: .65rem;
}

.log-detail-set-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.log-detail-set-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: .55rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
}

.log-detail-set-list > div > p,
.log-detail-set-list > div > a {
  grid-column: 1 / -1;
}

.log-detail-community > header {
  align-items: center;
}

.log-detail-footer {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: 2rem;
}

.rail-section > header > strong:first-child {
  grid-column: 1 / 3;
}

@media (max-width: 720px) {
  .compact-date-field {
    align-items: start;
  }

  dialog input[type="date"],
  .quick-log-date input[type="date"] {
    width: min(12rem, 100%);
    max-width: 100%;
  }

  .composer-actions {
    grid-template-columns: 1fr;
  }

  #exercise-form .exercise-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #exercise-form .exercise-fields > label:nth-child(n+3),
  #exercise-form .calculated-load,
  #exercise-form > label:last-of-type {
    grid-column: 1 / -1;
  }

  #exercise-form .percentage-field {
    grid-column: 1 / -1;
  }

  #exercise-form .optional-range {
    grid-column: 1 / -1;
  }

  .program-view .program-workspace:not(.is-managing) .builder-rail {
    display: none;
  }

  .program-view .program-workspace.is-managing .builder-canvas {
    display: none;
  }

  .program-view .program-workspace.is-managing .builder-rail {
    display: grid;
    min-height: calc(100dvh - 8rem);
    padding: 1.25rem 1rem 6rem;
    border-bottom: 0;
  }

  .program-view .program-workspace.is-managing .rail-ai-section .rail-section-body {
    display: grid;
  }

  .mobile-manage-back {
    margin-top: .7rem;
  }

  .program-manage-link {
    width: 100%;
  }

  .program-view .builder-header {
    margin-bottom: 1rem;
  }

  .program-view .builder-header h1 {
    font-size: 2.25rem;
  }

  .program-view .week-toolbar {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto 2.5rem;
    gap: .45rem;
  }

  .program-view .period-switcher {
    min-width: 0;
  }

  .program-view .period-switcher summary strong {
    font-size: .95rem;
  }

  .program-view .period-switcher summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .66rem;
  }

  .program-view .program-board-scroll {
    overflow: visible;
  }

  .program-view .program-board {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    height: auto;
    gap: .75rem;
    overflow: visible;
    scroll-snap-type: none;
  }

  .program-view .day-column {
    height: auto;
    min-height: 0;
    scroll-snap-align: none;
  }

  .program-view .program-board.is-current-period .day-column.is-past-day {
    display: none;
  }

  .program-view .day-content {
    overflow: visible;
  }

  .program-view .empty-day {
    min-height: 7.5rem;
  }

  .program-view .day-content > .add-session-button {
    margin-top: .25rem;
  }

  .wod-dictation-actions,
  .wod-finish-status > div:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .dashboard-start-actions {
    grid-template-columns: 1fr;
  }

  .log-detail-summary,
  .log-detail-summary dl,
  .log-detail-data-grid,
  .log-detail-set-list {
    grid-template-columns: 1fr;
  }

  .log-detail-set-list > div {
    grid-template-columns: auto 1fr;
  }

  .log-detail-set-list > div > span:nth-of-type(n+2) {
    text-align: right;
  }

  .log-detail-section > header,
  .log-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final mobile overrides for the card-style set logger. */
@media (max-width: 720px) {
  .session-page .set-row.set-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
    align-items: stretch;
    padding: .75rem;
    font-size: .8rem;
  }

  .session-page .set-number {
    grid-column: 1;
    min-height: 3.2rem;
  }

  .session-page .set-target {
    grid-column: 2 / 5;
  }

  .session-page .set-actions {
    grid-column: 5 / 7;
    justify-content: flex-end;
  }

  .session-page .set-field--weight {
    grid-column: 1 / 3;
  }

  .session-page .set-field--reps {
    grid-column: 3 / 5;
  }

  .session-page .set-field--rpe {
    grid-column: 5 / 7;
  }

  .session-page .set-field input {
    width: 100%;
    min-width: 0;
    height: 2.9rem;
    padding: .55rem;
    font-size: 1rem;
  }

  .session-page .set-comment-field {
    display: grid;
    grid-column: 1 / 7;
  }

  .session-page .set-comment-field .set-comment {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: .55rem;
  }

  .session-page .set-form > .save-state {
    grid-column: 1 / 7;
    min-height: 0;
    font-size: .66rem;
    text-align: right;
  }
}

/* Focused workout execution: one block and one exercise at a time. */
.workout-runner-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.workout-runner-header {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
}
.workout-runner-header > div {
  min-width: 0;
}

.workout-runner-header h2 {
  margin: .15rem 0 0;
  overflow-wrap: anywhere;
}

.workout-runner-header > strong {
  color: var(--blue);
  font-size: .82rem;
  white-space: nowrap;
}

.workout-runner-progress {
  height: .35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #172438;
}

.workout-runner-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #44d89e);
  transition: width .25s ease;
}

.workout-runner-steps {
  display: flex;
  gap: .65rem;
  overflow-x: auto;
  padding: .1rem 0 .35rem;
  scrollbar-width: none;
}

.workout-runner-steps::-webkit-scrollbar {
  display: none;
}

.workout-runner-steps button {
  display: grid;
  grid-template-columns: auto 1fr;
  min-width: 9.5rem;
  gap: .05rem .55rem;
  padding: .65rem .8rem;
  color: #8fa0b5;
  border: 1px solid #293b53;
  border-radius: .85rem;
  background: #0d1726;
  text-align: left;
}

.workout-runner-steps button > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--blue);
  font-weight: 850;
}

.workout-runner-steps button strong {
  color: inherit;
}

.workout-runner-steps button small {
  font-size: .67rem;
}

.workout-runner-steps button.is-active {
  color: #fff;
  border-color: var(--blue);
  background: rgba(21, 151, 255, .12);
}

.workout-runner-steps button.is-complete > span {
  color: #44d89e;
}

.runner-unit {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #293b53;
  border-radius: 1rem;
  background: #0d1726;
  scroll-margin-top: 5rem;
}

.runner-unit[hidden] {
  display: none;
}

.runner-unit.is-active {
  border-color: rgba(21, 151, 255, .7);
  box-shadow: 0 0 0 1px rgba(21, 151, 255, .12);
}

.runner-unit.is-complete {
  border-color: rgba(68, 216, 158, .45);
}

.runner-unit-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  gap: .75rem;
  align-items: center;
  padding: 1rem;
  color: var(--text);
  border: 0;
  background: transparent;
  text-align: left;
}

.runner-unit-summary > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: .12rem;
}

.runner-unit-index {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--blue);
  border-radius: .7rem;
  background: rgba(21, 151, 255, .12);
  font-weight: 900;
}

.runner-unit-summary small {
  color: var(--blue);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.runner-unit-summary strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-unit-summary em {
  overflow: hidden;
  color: #92a1b4;
  font-size: .76rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-unit-summary > b {
  min-width: 3rem;
  padding: .35rem .5rem;
  color: #9aabc0;
  border-radius: 999px;
  background: #172438;
  font-size: .68rem;
  text-align: center;
}

.runner-unit.is-complete .runner-unit-summary > b {
  color: #62e4ad;
  background: rgba(68, 216, 158, .1);
}

.runner-unit-body {
  display: none;
  gap: 1rem;
  padding: 0 .75rem .75rem;
}

.runner-unit.is-active > .runner-unit-body {
  display: grid;
}

.runner-unit-body > .panel {
  margin: 0;
  box-shadow: none;
}

.runner-unit-body > .exercise-card {
  border-color: rgba(42, 61, 84, .75);
}

.workout-runner-dock {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid #2b405a;
  border-radius: 1rem;
  background: rgba(12, 22, 36, .96);
  box-shadow: 0 .8rem 2.5rem rgba(0, 0, 0, .25);
  backdrop-filter: blur(18px);
}

.workout-runner-dock .button {
  min-height: 3rem;
}

.runner-dock-back {
  height: 3rem;
  color: #b8c6d7;
  border: 1px solid #30445d;
  border-radius: .8rem;
  background: #111d2e;
  font-size: 1.35rem;
}

.runner-dock-exit {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: #b8c6d7;
  border: 1px solid #30445d;
  border-radius: .8rem;
  background: #111d2e;
}

.runner-dock-exit svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.runner-dock-exit:hover,
.runner-dock-exit:focus-visible {
  color: #fff;
  border-color: var(--blue);
  background: rgba(21, 151, 255, .12);
}

.runner-dock-back:disabled {
  opacity: .35;
}

.workout-runner-dock > span {
  color: #8798ad;
  font-size: .72rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .session-page .compact-hero {
    gap: .65rem;
    padding-bottom: .25rem;
  }

  .session-page .compact-hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .session-page .compact-hero .lead {
    display: none;
  }

  .session-page .compact-hero > .button {
    min-height: 2.5rem;
    padding: .55rem .75rem;
  }

  .session-page .session-execution-bar {
    margin: 0;
  }

  .workout-runner-header h2 {
    font-size: 1.35rem;
  }

  .workout-runner-steps button {
    min-width: 8.6rem;
  }

  .session-stack {
    gap: .65rem;
  }

  .runner-unit-summary {
    gap: .6rem;
    padding: .8rem;
  }

  .runner-unit-index {
    width: 2.45rem;
    height: 2.45rem;
  }

  .runner-unit-summary strong {
    font-size: .96rem;
  }

  .runner-unit-summary > b {
    min-width: 2.75rem;
    padding-inline: .4rem;
  }

  .runner-unit-body {
    padding: 0 .45rem .45rem;
  }

  .runner-unit-body .exercise-head {
    grid-template-columns: 1fr auto;
  }

  .runner-unit-body .exercise-head > div:first-child {
    display: none;
  }

  .runner-unit-body .exercise-head h2 {
    font-size: 1.55rem;
  }

  .runner-unit-body .wod-runner,
  .runner-unit-body .wod-result-card,
  .runner-unit-body .benchmark-history,
  .runner-unit-body .exercise-card {
    padding: 1rem;
    border-radius: .8rem;
  }

  .workout-runner-shell {
    padding-bottom: 5.75rem;
  }

  .workout-runner-dock {
    position: fixed;
    z-index: 99;
    right: .65rem;
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    left: .65rem;
    padding: .55rem;
    border-radius: .9rem;
    box-shadow: 0 -.8rem 2.5rem rgba(0, 0, 0, .42);
  }

  .workout-runner-dock .button {
    min-height: 2.8rem;
    padding-inline: .7rem;
    font-size: .8rem;
  }

  .runner-dock-back {
    height: 2.8rem;
  }

  .runner-dock-exit {
    width: 2.8rem;
    height: 2.8rem;
  }
}

/* Full-screen training runner: one decision and one input step at a time. */
.wod-runner[data-wod-phase="ready"] [data-wod-clock],
.wod-runner[data-wod-phase="scoring"] [data-wod-prescription],
.wod-runner[data-wod-phase="scoring"] [data-wod-clock],
.wod-runner[data-wod-phase="complete"] [data-wod-prescription],
.wod-runner[data-wod-phase="complete"] [data-wod-clock] {
  display: none;
}

.wod-result-card[hidden],
.set-form[hidden] {
  display: none !important;
}

.lift-set-progress {
  display: grid;
  gap: .45rem;
  margin: .2rem 0 .8rem;
  color: #a9b8ca;
  font-size: .76rem;
  font-weight: 800;
}

.lift-set-progress > div {
  height: .3rem;
  overflow: hidden;
  border-radius: 999px;
  background: #172438;
}

.lift-set-progress > div > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #44d89e;
  transition: width .2s ease;
}

.workout-runner-dock > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
}

.workout-runner-dock > div > small {
  color: #8798ad;
  font-size: .68rem;
  white-space: nowrap;
}

.set-camera-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.exercise-head--runner {
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
}

.exercise-title-row {
  position: relative;
  display: flex;
  min-width: 0;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.exercise-title-row > div {
  min-width: 0;
}

.exercise-prescription-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
  align-items: center;
}

.prescription-badge {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 1.95rem;
  align-items: center;
  justify-content: center;
  padding: .42rem .72rem;
  color: #d4deea;
  border: 1px solid #31465f;
  border-radius: 999px;
  background: #142238;
  font-size: .68rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.prescription-badge--sets {
  grid-column: 1;
  color: #fff;
}

.prescription-badge--accent {
  color: #55dfa9;
  border-color: rgba(68, 216, 158, .45);
  background: rgba(68, 216, 158, .1);
}

.prescription-badge--percentage {
  grid-column: 2;
}

.prescription-badge--weight {
  grid-column: 3;
}

.prescription-badge--muted {
  color: #9fb0c4;
  background: #101b2b;
}

.prescription-badge--max {
  grid-column: 4;
}

.exercise-header-actions {
  display: flex;
  gap: .4rem;
  align-items: flex-start;
}

.exercise-popover {
  position: static;
  align-self: start;
}

.exercise-popover > summary {
  display: inline-flex;
  min-height: 2.5rem;
  gap: .45rem;
  align-items: center;
  padding: .55rem .7rem;
  color: #c7d7e9;
  border: 1px solid #314962;
  border-radius: .75rem;
  background: #14243a;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 850;
  list-style: none;
  line-height: 1;
  white-space: nowrap;
}

.exercise-popover > summary:hover,
.exercise-popover > summary:focus-visible,
.exercise-popover[open] > summary {
  color: #fff;
  border-color: var(--blue);
  background: rgba(21, 151, 255, .12);
}

.exercise-popover > summary svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.exercise-popover > summary b {
  display: grid;
  min-width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  margin-left: .05rem;
  color: #06111e;
  border-radius: 999px;
  background: #54dda9;
  font-size: .56rem;
}

.exercise-popover > summary::-webkit-details-marker {
  display: none;
}

.lift-history-popover,
.exercise-popover-panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + .5rem);
  right: 0;
  display: grid;
  width: min(21rem, calc(100vw - 3rem));
  gap: .75rem;
  padding: .85rem;
  border: 1px solid #38506d;
  border-radius: .85rem;
  background: #0b1625;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .48);
}

.lift-cues-popover {
  width: min(23rem, calc(100vw - 2rem));
}

.lift-cues-popover > header {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: .65rem;
  border-bottom: 1px solid #24364c;
}

.lift-cues-popover > header strong {
  display: block;
  margin-top: .15rem;
}

.lift-cues-popover > header > span {
  display: grid;
  min-width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: #55dfa9;
  border-radius: 999px;
  background: rgba(68, 216, 158, .12);
  font-size: .7rem;
  font-weight: 900;
}

.lift-cue-list {
  display: grid;
  gap: .35rem;
  max-height: 15rem;
  overflow-y: auto;
}

.lift-cue-list article {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  padding: .55rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: #111f31;
}

.lift-cue-list article > span {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  color: var(--blue);
  border-radius: .5rem;
  background: rgba(21, 151, 255, .12);
  font-size: .6rem;
  font-weight: 900;
}

.lift-cue-list article > div {
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.lift-cue-list article strong {
  color: #f3f7fc;
  font-size: .78rem;
  line-height: 1.35;
}

.lift-cue-list article small {
  color: #8496ab;
  font-size: .58rem;
}

.lift-cues-empty {
  padding: .75rem;
  color: #9aacbf;
  border-radius: .65rem;
  background: #111f31;
  text-align: center;
}

.lift-cues-empty p,
.lift-cues-future {
  margin: .25rem 0 0;
  color: #7f91a7;
  font-size: .62rem;
  line-height: 1.45;
}

.lift-cues-future {
  padding-top: .55rem;
  border-top: 1px solid #24364c;
}

.lift-history-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.lift-history-metrics > span {
  display: grid;
  gap: .15rem;
  padding: .6rem;
  border-radius: .65rem;
  background: #142338;
}

.lift-history-metrics small,
.lift-history-sets small {
  color: #8395aa;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lift-history-sets {
  display: grid;
  gap: .35rem;
  max-height: 11rem;
  overflow-y: auto;
}

.lift-history-sets > span {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .55rem;
  align-items: center;
  padding: .45rem .1rem;
  border-bottom: 1px solid #24364c;
}

.lift-history-sets em {
  color: #8ea0b5;
  font-size: .65rem;
  font-style: normal;
}

.set-camera-dialog {
  width: min(44rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid #34506f;
  border-radius: 1.1rem;
  background: #0e1929;
}

.set-camera-dialog::backdrop {
  background: rgba(1, 7, 14, .82);
  backdrop-filter: blur(8px);
}

.set-camera-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-auto-rows: auto;
  max-height: calc(100dvh - 1.5rem);
  gap: .75rem;
  padding: 1rem;
  overflow-y: auto;
}

.set-camera-form > .save-state {
  grid-column: 1;
}

.set-camera-header {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
}

.set-camera-header h2 {
  margin: .15rem 0 0;
  font-size: 1.4rem;
}

@media (max-width: 720px) {
  body.session-page,
  .session-page .app-content {
    height: 100dvh;
    overflow: hidden;
  }

  body.session-page {
    --runner-top-clearance: max(2rem, calc(env(safe-area-inset-top) + .75rem));
  }

  .session-page .app-content {
    position: fixed;
    inset: 0;
  }

  .session-page .mobile-header,
  .session-page .mobile-tabbar,
  .session-page .site-footer,
  .session-page .compact-hero,
  .session-page .session-execution-bar {
    display: none;
  }

  .session-page .shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    padding: var(--runner-top-clearance) .75rem
      calc(5.4rem + env(safe-area-inset-bottom));
  }

  .session-page .workout-runner-shell {
    height: calc(100dvh - var(--runner-top-clearance) - 6.1rem);
    min-height: 0;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    align-content: stretch;
    gap: .55rem;
    padding: 0;
  }

  .session-page .workout-runner-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .55rem;
  }

  .session-page .workout-runner-header .eyebrow {
    font-size: .6rem;
  }

  .session-page .workout-runner-header h2 {
    margin: .05rem 0 0;
    font-size: 1.15rem;
    line-height: 1.18;
  }

  .session-page .workout-runner-progress {
    height: .22rem;
  }

  .session-page .workout-runner-steps {
    justify-content: center;
    gap: .4rem;
    overflow: visible;
    padding: 0;
  }

  .session-page .workout-runner-steps button {
    display: block;
    width: .55rem;
    min-width: .55rem;
    height: .55rem;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #26374d;
    color: transparent;
  }

  .session-page .workout-runner-steps button > * {
    display: none;
  }

  .session-page .workout-runner-steps button.is-active {
    width: 1.65rem;
    background: var(--blue);
  }

  .session-page .workout-runner-steps button.is-complete {
    background: #44d89e;
  }

  .session-page .session-stack {
    height: 100%;
    min-height: 0;
    gap: 0;
    overflow: hidden;
  }

  .session-page .runner-unit {
    display: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .session-page .runner-unit.is-active {
    display: block;
    height: 100%;
    min-height: 0;
  }

  .session-page .runner-unit-summary {
    display: none;
  }

  .session-page .runner-unit-body,
  .session-page .runner-unit.is-active > .runner-unit-body {
    display: grid;
    height: 100%;
    min-height: 0;
    gap: .55rem;
    padding: 0;
    overflow: hidden;
  }

  .session-page .runner-unit-body .wod-runner,
  .session-page .runner-unit-body .wod-result-card,
  .session-page .runner-unit-body .exercise-card {
    margin: 0;
    padding: .9rem;
    border: 1px solid #2a3d54;
    border-radius: 1rem;
    background: #101c2c;
  }

  .session-page .runner-wod-unit .wod-runner {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .session-page .wod-runner[data-wod-phase="scoring"],
  .session-page .wod-runner[data-wod-phase="complete"] {
    display: none;
  }

  .session-page .wod-prescription-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .session-page .wod-prescription-view:has(.wod-template-prescription)
    .wod-movement-run-list {
    display: none;
  }

  .session-page .runner-secondary {
    display: none;
  }

  .session-page .wod-runner-head {
    display: grid;
    gap: .45rem;
    margin-bottom: .6rem;
  }

  .session-page .wod-runner-head h2 {
    font-size: 1.55rem;
  }

  .session-page .wod-prescription-meta {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
  }

  .session-page .wod-prescription-meta span {
    padding: .3rem .5rem;
    font-size: .65rem;
  }

  .session-page .coach-note {
    margin: .55rem 0;
    padding: .6rem .7rem;
    font-size: .76rem;
  }

  .session-page .wod-template-prescription,
  .session-page .wod-movement-run-list {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .session-page .wod-template-prescription::-webkit-scrollbar,
  .session-page .wod-movement-run-list::-webkit-scrollbar {
    display: none;
  }

  .session-page .wod-template-prescription {
    gap: .35rem;
    padding: .65rem;
    font-size: .88rem;
  }

  .session-page .wod-movement-run-list {
    margin: .35rem 0 0;
  }

  .session-page .wod-movement-run-list li {
    min-height: 0;
    padding: .55rem 0;
  }

  .session-page .wod-clock {
    margin-top: .65rem;
    padding: .75rem;
  }

  .session-page .wod-clock > strong {
    font-size: clamp(3.2rem, 18vw, 5rem);
    line-height: .95;
  }

  .session-page .wod-clock > div {
    margin-top: .65rem;
  }

  .session-page .wod-clock #wod-clock-reset {
    display: none;
  }

  .session-page .wod-result-card h2 {
    margin-bottom: .65rem;
    font-size: 1.5rem;
  }

  .session-page #wod-result-form {
    gap: .65rem;
  }

  .session-page #wod-result-form .form-grid.two-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }

  .session-page #wod-result-form label:has(select[name="visibility"]),
  .session-page #wod-result-form > label:not(.wod-complete-check) {
    display: none;
  }

  .session-page #wod-result-form label,
  .session-page #wod-result-form fieldset {
    font-size: .7rem;
  }

  .session-page #wod-result-form input,
  .session-page #wod-result-form select {
    min-height: 3.25rem;
    font-size: 1.05rem;
  }

  .session-page #wod-result-form .dialog-actions {
    display: none;
  }

  .session-page .exercise-card .exercise-head.exercise-head--runner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
    margin-bottom: .4rem;
    padding-bottom: .65rem;
  }

  .session-page .runner-lift-unit .exercise-card {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }

  .session-page .runner-unit-body .exercise-head > .exercise-title-row {
    display: flex;
  }

  .session-page .exercise-card .exercise-head h2 {
    font-size: 1.65rem;
  }

  .session-page .exercise-title-row {
    position: relative;
    align-items: center;
  }

  .session-page .lift-history-popover,
  .session-page .exercise-popover-panel {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .session-page .lift-cue-list article strong,
  .session-page .lift-cues-future,
  .session-page .lift-history-sets > span {
    overflow-wrap: anywhere;
  }

  .session-page .exercise-popover > summary {
    min-height: 2.35rem;
    padding: .5rem .65rem;
  }

  .session-page .exercise-header-actions {
    gap: .3rem;
  }

  .session-page .exercise-popover > summary {
    font-size: .68rem;
  }

  .session-page .prescription-badge {
    grid-column: auto;
    min-height: 1.9rem;
    padding: .4rem .65rem;
    font-size: .62rem;
    text-overflow: clip;
  }

  .session-page .exercise-prescription-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .session-page .exercise-card .exercise-head p:last-child {
    margin-top: .2rem;
    font-size: .78rem;
  }

  .session-page .exercise-card .missing-rm-notice {
    display: none;
  }

  .session-page .exercise-card > .coach-note {
    font-size: .72rem;
  }

  .session-page .set-table {
    gap: 0;
  }

  .session-page .set-form.is-current-set {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem .5rem;
    padding: .75rem 0 0;
    border: 0;
    background: transparent;
  }

  .session-page .set-form .set-number {
    grid-column: 1 / 2;
    min-width: 0;
  }

  .session-page .set-form .set-target {
    grid-column: 2 / 4;
    align-self: center;
    text-align: right;
  }

  .session-page .set-form .set-field {
    grid-row: 2;
    grid-column: auto;
    min-width: 0;
  }

  .session-page .set-form .set-field span {
    font-size: .58rem;
  }

  .session-page .set-form .set-field input {
    width: 100%;
    min-width: 0;
    height: 3.5rem;
    padding: .65rem .45rem;
    font-size: 1.2rem;
    text-align: center;
  }

  .session-page .set-form .set-actions {
    grid-row: 3;
    grid-column: 1 / 4;
    justify-content: space-between;
    min-width: 0;
  }

  .session-page .set-form .complete-toggle {
    display: none;
  }

  .session-page .set-form .set-comment-field {
    display: none;
  }

  .session-page .set-form > .save-state {
    grid-row: 4;
    grid-column: 1 / 4;
    min-height: .75rem;
    text-align: center;
  }

  .session-page .workout-runner-dock {
    right: .75rem;
    bottom: max(.7rem, env(safe-area-inset-bottom));
    left: .75rem;
    grid-template-columns: 3rem 3rem minmax(0, 1fr);
    padding: .55rem;
  }

  .session-page .workout-runner-dock > div {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .session-page .workout-runner-dock .button {
    width: 100%;
    min-height: 3.2rem;
    font-size: .9rem;
  }

  .set-camera-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .set-camera-form {
    height: 100%;
    max-height: none;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    padding: max(.85rem, env(safe-area-inset-top)) .85rem
      max(1.35rem, calc(env(safe-area-inset-bottom) + .85rem));
    overflow: hidden;
  }

  .set-camera-dialog .capture-panel:not([hidden]),
  .set-camera-dialog .capture-review:not([hidden]) {
    display: grid;
    min-height: 0;
    overflow-y: auto;
  }

  .set-camera-dialog .capture-panel:not([hidden]) {
    grid-template-rows: minmax(0, 1fr) auto auto auto;
  }

  .set-camera-dialog #upload-panel:not([hidden]) {
    display: grid;
  }

  .set-camera-dialog #upload-panel .dropzone {
    height: 100%;
    min-height: 0;
  }

  .set-camera-dialog .camera-stage {
    height: 100%;
    min-height: 0;
  }

  .set-camera-dialog .capture-review video {
    max-height: 48dvh;
  }

  .set-camera-dialog .camera-actions {
    margin-bottom: .45rem;
  }
}

@media (max-width: 760px) {
  .builder-dialog {
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
  }

  .builder-dialog > form,
  .builder-dialog > div {
    width: 100%;
    height: 100%;
    max-height: none;
    padding: max(1rem, env(safe-area-inset-top)) 1rem
      max(1.25rem, calc(env(safe-area-inset-bottom) + 1rem));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .block-dialog > div {
    overflow-y: hidden;
    overscroll-behavior: none;
  }

  .builder-dialog > form > header:first-of-type,
  .builder-dialog > div > header:first-of-type,
  .builder-dialog > form > .dialog-header:first-child {
    position: sticky;
    top: 0;
    z-index: 4;
    padding-bottom: .75rem;
    background: linear-gradient(#0e1929 78%, rgba(14, 25, 41, 0));
  }

  .set-camera-dialog > .set-camera-form {
    padding: max(.85rem, env(safe-area-inset-top)) .85rem
      max(1.35rem, calc(env(safe-area-inset-bottom) + .85rem));
    overflow: hidden;
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  .block-dialog > div {
    overflow-y: auto;
    scrollbar-width: none;
  }

  .block-dialog > div::-webkit-scrollbar {
    display: none;
  }
}

/* Community messaging */
.nav-unread-badge {
  display: inline-grid;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .3rem;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: #ff4d6d;
  font-size: .62rem;
  font-style: normal;
  line-height: 1;
}

.nav-unread-badge[hidden] {
  display: none;
}

.sidebar-nav a {
  position: relative;
}

.sidebar-nav a > .nav-unread-badge {
  margin-left: auto;
}

.messages-hero {
  align-items: end;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
  min-height: min(46rem, calc(100vh - 12rem));
  gap: 1rem;
}

.conversation-inbox,
.chat-thread,
.chat-placeholder {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.conversation-inbox > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #293b53;
}

.conversation-inbox h2,
.chat-thread h2 {
  margin: .1rem 0 0;
}

.conversation-list {
  display: grid;
}

.conversation-row {
  display: grid;
  grid-template-columns: 2.85rem minmax(0, 1fr) auto;
  min-width: 0;
  gap: .7rem;
  align-items: center;
  padding: .85rem 1rem;
  color: var(--text);
  border-bottom: 1px solid rgba(42, 60, 82, .65);
  text-decoration: none;
}

.conversation-row:hover,
.conversation-row.is-active {
  background: rgba(21, 151, 255, .09);
}

.conversation-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

.conversation-row strong,
.conversation-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row small {
  color: #8fa0b5;
}

.conversation-row > b {
  display: grid;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .3rem;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: var(--blue);
  font-size: .67rem;
}

.chat-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  color: #c9eaff;
  border: 1px solid rgba(21, 151, 255, .38);
  border-radius: .85rem;
  background: rgba(21, 151, 255, .12);
  font-size: .78rem;
  font-weight: 850;
}

.conversation-empty,
.chat-start-state {
  padding: 2rem 1rem;
  color: #8fa0b5;
  text-align: center;
}

.chat-thread {
  display: grid;
  grid-template-rows: auto auto minmax(15rem, 1fr) auto;
  max-height: calc(100vh - 8rem);
}

.chat-thread-header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1rem;
  border-bottom: 1px solid #293b53;
}

.chat-thread-header h2 {
  overflow: hidden;
  font-size: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-header small {
  color: #8fa0b5;
}

.chat-back {
  display: none;
  color: #afc3d9;
  font-size: 1.3rem;
  text-decoration: none;
}

.chat-actions {
  position: relative;
}

.chat-actions summary {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #30445d;
  border-radius: .75rem;
  cursor: pointer;
  list-style: none;
}

.chat-actions summary::-webkit-details-marker {
  display: none;
}

.chat-actions > div {
  position: absolute;
  z-index: 4;
  top: calc(100% + .4rem);
  right: 0;
  display: grid;
  width: 13rem;
  padding: .4rem;
  border: 1px solid #30445d;
  border-radius: .75rem;
  background: #101b2b;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .35);
}

.chat-actions button {
  padding: .7rem;
  color: #e8eef7;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  text-align: left;
}

.chat-actions button:hover {
  background: rgba(255, 255, 255, .06);
}

.chat-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .15rem .7rem;
  margin: .65rem 1rem 0;
  padding: .65rem .8rem;
  color: var(--text);
  border: 1px solid rgba(21, 151, 255, .34);
  border-radius: .75rem;
  background: rgba(21, 151, 255, .08);
  text-decoration: none;
}

.chat-context-card > span {
  grid-column: 1 / -1;
  color: var(--blue);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.chat-context-card > b {
  color: var(--blue);
  font-size: .75rem;
}

.chat-message-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  padding: 1rem;
  overscroll-behavior: contain;
}

.chat-load-older {
  align-self: center;
  padding: .45rem .8rem;
  color: #9bcaee;
  border: 1px solid #2a405a;
  border-radius: 999px;
  background: #101c2c;
  font: inherit;
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
}

.chat-load-older:disabled { opacity: .55; }

.chat-message {
  display: flex;
  max-width: min(82%, 38rem);
  gap: .55rem;
  align-items: end;
}

.chat-message.is-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message > .chat-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: .65rem;
  font-size: .62rem;
}

.chat-message > div {
  display: grid;
  gap: .3rem;
  padding: .65rem .8rem;
  border: 1px solid #2a3d55;
  border-radius: .9rem .9rem .9rem .25rem;
  background: #152235;
}

.chat-message.is-own > div {
  border-color: rgba(21, 151, 255, .48);
  border-radius: .9rem .9rem .25rem .9rem;
  background: rgba(21, 151, 255, .16);
}

.chat-message small {
  color: #8496aa;
  font-size: .65rem;
  font-weight: 760;
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-attachment {
  display: grid;
  gap: .35rem;
  color: #91d1ff;
  text-decoration: none;
}

.chat-attachment img {
  width: min(18rem, 100%);
  max-height: 16rem;
  object-fit: cover;
  border-radius: .55rem;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .55rem;
  align-items: end;
  padding: .75rem;
  border-top: 1px solid #293b53;
  background: rgba(10, 17, 28, .97);
}

.chat-composer textarea {
  min-height: 3rem;
  max-height: 9rem;
  resize: vertical;
}

.chat-composer > details {
  position: relative;
}

.chat-composer > details > summary {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid #30445d;
  border-radius: .75rem;
  cursor: pointer;
  font-size: 1.3rem;
  list-style: none;
}

.chat-attachment-fields {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + .5rem);
  display: grid;
  width: min(22rem, 80vw);
  gap: .55rem;
  padding: .75rem;
  border: 1px solid #30445d;
  border-radius: .85rem;
  background: #101b2b;
  box-shadow: 0 -1rem 2rem rgba(0, 0, 0, .3);
}

.chat-composer > .save-state {
  grid-column: 1 / -1;
}

.chat-blocked-note {
  padding: 1rem;
  color: #f2b5bf;
  border-top: 1px solid #49303a;
  text-align: center;
}

.chat-placeholder {
  display: grid;
  place-content: center;
  padding: 2rem;
  color: #8fa0b5;
  text-align: center;
}

.chat-placeholder > span {
  color: var(--blue);
  font-size: 2rem;
}

.messages-locked,
.new-conversation {
  max-width: 48rem;
  margin-inline: auto;
}

.new-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  overflow: hidden;
}

.new-conversation-context {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.new-conversation-context > strong {
  min-width: 0;
  font-size: .92rem;
  line-height: 1.45;
}

.new-conversation fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.new-conversation legend {
  margin-bottom: .65rem;
  font-weight: 800;
}

.chat-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.chat-candidate-list > label {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  padding: .7rem;
  border: 1px solid #2a3d55;
  border-radius: .8rem;
  cursor: pointer;
}

.chat-candidate-list > label:has(input:checked) {
  border-color: var(--blue);
  background: rgba(21, 151, 255, .08);
}

.chat-candidate-list input {
  width: 1.1rem;
  height: 1.1rem;
}

.chat-candidate-list label > span:last-child {
  display: grid;
  min-width: 0;
}

.chat-candidate-list small {
  overflow: hidden;
  color: #8fa0b5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .messages-view .shell {
    padding-inline: .7rem;
  }

  .messages-hero {
    align-items: stretch;
  }

  .messages-hero .lead {
    display: none;
  }

  .messages-hero .button,
  .new-conversation > .button {
    width: 100%;
  }

  .new-conversation {
    width: 100%;
    gap: 1rem;
    padding: 1rem;
  }

  .new-conversation > label,
  .new-conversation > fieldset,
  .new-conversation input {
    min-width: 0;
    width: 100%;
  }

  .new-conversation > label {
    display: grid;
    gap: .45rem;
  }

  .new-conversation > label > small {
    display: block;
  }

  .new-conversation-context {
    padding: .8rem .9rem;
  }

  .chat-candidate-list {
    grid-template-columns: 1fr;
  }

  .chat-candidate-list > label {
    grid-template-columns: 1.2rem 2.7rem minmax(0, 1fr);
    width: 100%;
    overflow: hidden;
    padding: .75rem;
  }

  .new-conversation > .button {
    min-height: 3.2rem;
  }

  .messages-layout {
    display: block;
    min-height: 0;
  }

  .messages-layout.has-active-thread > .conversation-inbox {
    display: none;
  }

  .conversation-inbox {
    min-height: calc(100vh - 14rem);
  }

  .chat-thread {
    height: calc(100dvh - 5.4rem - env(safe-area-inset-bottom));
    max-height: none;
    margin: -.35rem -.7rem 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .chat-thread-header {
    padding: .65rem .75rem;
  }

  .chat-back {
    display: block;
  }

  .chat-thread-header > .chat-avatar {
    width: 2.35rem;
    height: 2.35rem;
  }

  .chat-message-list {
    padding: .75rem;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-message > .chat-avatar {
    display: none;
  }

  .chat-composer {
    padding: .55rem .65rem calc(.55rem + env(safe-area-inset-bottom));
  }

  .chat-composer .button {
    min-height: 3rem;
    padding-inline: .75rem;
    font-size: .78rem;
  }

  .messages-layout.has-active-thread ~ * {
    display: none;
  }

  .messages-view:has(.chat-thread) .mobile-tabbar {
    display: none;
  }

  .chat-candidate-list {
    grid-template-columns: 1fr;
  }

  .mobile-more-panel a {
    position: relative;
  }

  .mobile-more-panel .nav-unread-badge {
    position: absolute;
    right: .8rem;
  }
}

/* Platform rhythm: compact sections and single, intentional separators. */
.section-block {
  margin-top: 52px;
}

.app-view .compact-hero {
  margin-bottom: 22px;
}

.community-empty,
.community-search-empty {
  min-height: clamp(190px, 28vh, 310px);
}

.coach-hub {
  gap: 20px;
}

.logbook-section,
.logbook-insights,
.import-card {
  margin-top: 1.5rem;
}

.profile-facts {
  margin-block: 20px;
}

.profile-lifts-header {
  margin-bottom: 20px;
}

.admin-hero {
  padding-bottom: 18px;
}

.admin-tabs {
  margin-bottom: 16px;
}

.button.full {
  margin-top: 16px;
}

.admin-health-row:first-child,
.admin-worker-list > article:first-child,
.admin-audit-list article:first-child,
.admin-detail-list > div:first-child,
.admin-mini-list > a:first-child,
.coach-sent-list > span:first-child {
  border-top: 0;
}

.movement-list > a:last-child,
.history-sets > div:last-child,
.timeline > div:last-child,
.metrics > div:last-child,
.profile-facts > div:last-child,
.rm-history-list > div:last-child,
.lift-history-sets > span:last-child,
.conversation-row:last-child,
.lift-picker-list button:last-child,
.exercise-picker-options button:last-child {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .app-view .site-footer {
    display: none;
  }

  .app-view .app-content {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .app-view:not(.dashboard-view):not(.program-view):not(.session-page) .shell {
    padding: 16px 14px 18px;
  }

  body.dashboard-view .shell {
    padding: 16px 14px 18px;
  }

  .app-view .compact-hero,
  .dashboard-hero {
    gap: 12px;
    margin-bottom: 16px;
  }

  .app-view .compact-hero .eyebrow,
  .dashboard-hero .eyebrow {
    margin-bottom: 8px;
  }

  .app-view .compact-hero .lead,
  .dashboard-hero .lead {
    margin-top: 8px;
    line-height: 1.45;
  }

  .app-view .section-block {
    margin-top: 28px;
  }

  .app-view .section-heading {
    margin-bottom: .7rem;
  }

  .app-view .community-section {
    margin-bottom: 1rem;
  }

  .app-view .panel:not(.video-card):not(.progress-panel) {
    padding: 18px;
  }

  .coach-hub,
  .coach-card-grid,
  .coach-athlete-list,
  .coach-athletes-panel {
    gap: 14px;
  }

  .admin-hero {
    gap: 12px;
    padding-bottom: 14px;
  }

  .admin-tabs {
    margin-bottom: 12px;
  }

  .admin-overview-grid,
  .admin-worker-list,
  .admin-audit-preview,
  .admin-community-create {
    margin-top: 12px;
  }

  .logbook-section,
  .logbook-insights,
  .import-card {
    margin-top: 1.15rem;
  }

  .training-log-grid,
  .planned-card-grid,
  .community-people-grid,
  .community-card-grid {
    gap: .7rem;
  }

  .training-log-card {
    min-height: 0;
  }

  .training-log-card-header {
    align-items: center;
    padding-top: .9rem;
  }

  .workout-card-date {
    display: inline-flex;
    width: auto;
    min-width: 0;
    height: 2.7rem;
    gap: 0;
    padding: 0 .75rem;
    border-radius: .8rem;
    white-space: nowrap;
  }

  .workout-card-date strong,
  .workout-card-date span {
    margin: 0;
    font-size: .82rem;
    letter-spacing: .01em;
  }

  .workout-card-date strong {
    font-weight: 850;
  }

  .training-log-card-body {
    padding-top: .75rem;
  }

  .training-log-result {
    margin-top: .75rem;
  }

  .training-log-card-footer {
    margin-top: .65rem;
    padding-top: .35rem;
  }

  .community-card.panel {
    padding: 14px;
    border-radius: 16px;
  }

  .community-card > header {
    gap: .6rem;
  }

  .community-card > header > div:nth-child(2) {
    min-width: 0;
    line-height: 1.25;
  }

  .community-avatar {
    width: 38px;
    height: 38px;
    font-size: .72rem;
  }

  .community-format {
    padding: .28rem .5rem;
    font-size: .7rem;
  }

  .community-workout {
    gap: .7rem;
    padding: .85rem 0;
  }

  .community-score {
    font-size: 2.1rem;
  }

  .community-actions {
    padding: .6rem 0;
  }

  .community-comments {
    padding-top: .65rem;
  }

  .profile-facts {
    margin-block: 14px;
  }

  .profile-lifts-header {
    gap: 14px;
    margin-bottom: 14px;
  }

  .community-empty,
  .community-search-empty {
    min-height: 160px;
  }

  .builder-dialog > form,
  .builder-dialog > div {
    gap: 12px;
  }

  .builder-dialog > form {
    grid-auto-rows: max-content;
    align-content: start;
  }

  .builder-dialog > form > .dialog-actions:last-child,
  .builder-dialog > form > .button[type="submit"]:last-child {
    position: sticky;
    z-index: 5;
    bottom: calc(-1rem - env(safe-area-inset-bottom));
    margin-top: auto;
    padding: 12px 0 max(1rem, env(safe-area-inset-bottom));
    background: linear-gradient(rgba(14, 25, 41, 0), #0e1929 18%);
  }

  .builder-dialog > form > .button[type="submit"]:last-child {
    width: 100%;
    min-height: 3.25rem;
    padding-inline: 1rem;
    background: var(--blue);
  }

  .builder-dialog > form > .dialog-actions:last-child .button {
    min-width: 0;
    flex: 1 1 0;
  }

  .analysis-image-explanation {
    padding: 12px 16px;
  }

  .analysis-image-explanation p {
    font-size: .78rem;
  }

  .analysis-image-explanation small {
    font-size: .66rem;
  }
}

@media (max-width: 720px) {
  .messages-layout:not(.has-active-thread) .chat-placeholder {
    display: none;
  }

  .messages-layout:not(.has-active-thread) .conversation-inbox {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: calc(100dvh - 15.5rem - env(safe-area-inset-bottom));
  }

  .messages-layout:not(.has-active-thread) .conversation-list {
    min-height: 0;
    overflow-y: auto;
  }

  .messages-layout:not(.has-active-thread) .conversation-empty {
    display: grid;
    height: 100%;
    min-height: 12rem;
    align-content: center;
    padding: 1.25rem;
  }
}
.sport-step-list {
  display: grid;
  gap: .5rem;
  padding: .75rem 0;
}

.sport-step-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(8rem, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line, #d9d9d4);
  border-radius: .7rem;
}

.sport-step-card > span {
  color: var(--muted, #72726c);
  font-variant-numeric: tabular-nums;
}

.sport-step-card > small {
  color: var(--muted, #72726c);
}

.sport-step-editor {
  margin: 1rem 0;
}

.club-dialog {
  width: min(680px, calc(100vw - 30px));
}

.club-dialog > form {
  gap: 0;
  padding: 0;
}

.club-dialog > form > header,
.club-dialog > form > footer,
.club-dialog-body {
  padding: 1rem 1.1rem;
}

.club-dialog > form > header {
  border-bottom: 1px solid var(--line);
}

.club-dialog-body {
  display: grid;
  gap: .8rem;
  min-height: 0;
  overflow-y: auto;
}

.club-invite-dialog .club-dialog-body {
  display: flex;
  flex-direction: column;
}

.club-invite-dialog .club-dialog-body > * {
  flex: 0 0 auto;
  grid-column: auto;
  grid-row: auto;
}

.club-invite-dialog .club-dialog-body > .club-candidate-list {
  flex: 1 1 auto;
}

.club-invite-dialog .club-dialog-body > .save-state {
  grid-column: auto;
  margin: 0;
}

.club-dialog-body label {
  display: grid;
  gap: .4rem;
}

.club-dialog-body label > span small {
  color: var(--muted);
  font-weight: 500;
}

.club-selected-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.club-candidate-list {
  display: grid;
  gap: .45rem;
  min-height: 130px;
  max-height: min(42dvh, 390px);
  padding: .25rem;
  overflow-y: auto;
}

.club-candidate-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  min-height: 64px;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(7, 15, 26, .52);
  cursor: pointer;
}

.club-candidate-row.is-selected {
  border-color: var(--blue);
  background: rgba(21, 151, 255, .11);
}

.club-candidate-row input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.club-candidate-row > span:last-child {
  display: grid;
  min-width: 0;
}

.club-candidate-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-legal {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: #bfd0e5;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.45;
}

.auth-legal input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.sport-preset-picker {
  display: grid;
  gap: .75rem;
  margin: .85rem 0 1rem;
  padding: .85rem;
  border: 1px solid var(--line, #d9d9d4);
  border-radius: .85rem;
  background: rgba(69, 184, 255, .035);
}

.sport-preset-picker > div:first-child {
  display: grid;
  gap: .15rem;
}

.sport-preset-picker small {
  color: var(--muted, #72726c);
}

.sport-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: .45rem;
}

.sport-preset {
  display: grid;
  gap: .15rem;
  min-height: 4.35rem;
  padding: .65rem .75rem;
  color: var(--text, #fff);
  text-align: left;
  border: 1px solid var(--line, #d9d9d4);
  border-radius: .7rem;
  background: var(--panel-soft, rgba(255, 255, 255, .025));
}

.sport-preset small {
  font-size: .68rem;
  line-height: 1.3;
}

.sport-preset:is(:hover, :focus-visible, .is-current) {
  border-color: var(--blue, #259eff);
  background: rgba(37, 158, 255, .12);
  box-shadow: inset 0 -2px 0 var(--blue, #259eff);
}

.sport-step-editor > header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: .65rem;
}

.sport-step-editor > header small {
  display: block;
}

.sport-step-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(6rem, 1fr)) 2.5rem;
  align-items: end;
  gap: .55rem;
  margin-bottom: .55rem;
  padding: .65rem;
  border: 1px solid var(--line, #d9d9d4);
  border-radius: .7rem;
}

.sport-step-row label {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.sport-step-row label > span {
  color: var(--muted, #72726c);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sport-step-row .sport-step-name {
  grid-column: span 2;
}

.sport-step-row input,
.sport-step-row select {
  min-width: 0;
}

@media (max-width: 900px) {
  .sport-preset-grid {
    display: flex;
    margin-inline: -.2rem;
    padding: .1rem .2rem .35rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .sport-preset {
    flex: 0 0 9.25rem;
    scroll-snap-align: start;
  }

  .sport-step-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sport-step-row .sport-step-name {
    grid-column: 1 / -1;
  }

  .sport-step-row > button {
    justify-self: end;
    grid-column: 2;
  }

  .sport-step-card {
    grid-template-columns: 2rem 1fr;
  }

  .sport-step-card > small {
    grid-column: 2;
  }
}

/* Messages: use the app viewport as a real inbox and conversation surface. */
.messages-page-back {
  display: grid;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: #c8d8e9;
  border: 1px solid #30445d;
  border-radius: .8rem;
  text-decoration: none;
}

.new-conversation-title {
  display: grid;
  gap: .5rem;
}

.new-conversation-title > span,
.new-conversation legend {
  font-weight: 800;
}

.new-conversation-title small,
.new-conversation legend small {
  margin-left: .35rem;
  color: #8fa0b5;
  font-size: .72rem;
  font-weight: 550;
}

.new-conversation-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
}

.new-conversation-actions .save-state {
  min-height: 0;
  margin: 0;
}

.chat-send-icon {
  display: none;
}

@media (max-width: 720px) {
  body.messages-inbox-view .app-content,
  body.messages-new-view .app-content,
  body.messages-thread-view .app-content {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  body.messages-inbox-view .app-content,
  body.messages-new-view .app-content {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  body.messages-thread-view .app-content {
    padding-bottom: 0;
  }

  body.messages-inbox-view .shell,
  body.messages-new-view .shell,
  body.messages-thread-view .shell {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1 1 0;
    flex-direction: column;
    overflow: hidden;
  }

  body.messages-inbox-view .shell,
  body.messages-new-view .shell {
    padding: 12px 12px 10px;
  }

  body.messages-thread-view .shell {
    padding: 0;
  }

  .messages-inbox-view .messages-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    gap: .75rem;
    align-items: end;
    margin-bottom: 12px;
  }

  .messages-inbox-view .messages-hero .eyebrow {
    margin-bottom: .2rem;
  }

  .messages-inbox-view .messages-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .messages-inbox-view .messages-new-button {
    width: auto;
    min-height: 2.75rem;
    padding: .7rem .9rem;
    white-space: nowrap;
  }

  .messages-inbox-view .messages-new-button span {
    font-size: 1.1rem;
  }

  .messages-inbox-view .messages-layout {
    display: block;
    min-height: 0;
    flex: 1 1 0;
  }

  .messages-layout:not(.has-active-thread) .conversation-inbox {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 1rem;
  }

  .conversation-inbox > header {
    padding: .8rem .9rem;
  }

  .conversation-inbox h2 {
    font-size: 1.45rem;
  }

  .conversation-list {
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .conversation-row {
    grid-template-columns: 2.65rem minmax(0, 1fr) auto;
    min-height: 4.5rem;
    padding: .7rem .85rem;
  }

  .conversation-row .chat-avatar {
    width: 2.65rem;
    height: 2.65rem;
  }

  .conversation-empty {
    min-height: 100%;
    align-content: center;
  }

  .messages-thread-view .messages-hero,
  .messages-thread-view .mobile-tabbar {
    display: none;
  }

  .messages-thread-view .messages-layout,
  .messages-thread-view .chat-thread {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .messages-thread-view .messages-layout {
    flex: 1 1 0;
  }

  .messages-thread-view .chat-thread {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .chat-thread-header {
    min-height: 4.35rem;
    padding: .65rem .75rem;
    background: #101b2b;
  }

  .chat-thread-header h2 {
    font-size: 1rem;
  }

  .chat-thread-header small {
    display: block;
    overflow: hidden;
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-context-card {
    margin: .5rem .75rem 0;
  }

  .chat-message-list {
    gap: .55rem;
    padding: .75rem;
    scroll-padding-bottom: .75rem;
  }

  .chat-start-state {
    display: grid;
    min-height: 100%;
    align-content: center;
    padding: 1rem;
  }

  .chat-message > div {
    padding: .55rem .7rem;
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) 2.85rem 2.85rem;
    gap: .45rem;
    padding: .55rem .65rem max(.55rem, env(safe-area-inset-bottom));
    border-top-color: #30445d;
  }

  .chat-composer textarea {
    min-height: 2.85rem;
    max-height: 7.5rem;
    padding: .7rem .8rem;
    font-size: 16px;
    resize: none;
  }

  .chat-composer > details > summary {
    width: 2.85rem;
    height: 2.85rem;
  }

  .chat-composer .chat-send-button {
    width: 2.85rem;
    min-width: 0;
    min-height: 2.85rem;
    padding: 0;
    border-radius: .8rem;
  }

  .chat-send-label {
    display: none;
  }

  .chat-send-icon {
    display: inline;
    font-size: 1.25rem;
  }

  .chat-composer > .save-state {
    grid-column: 1 / -1;
    min-height: 0;
    margin: 0;
  }

  .chat-attachment-fields {
    right: -3.3rem;
    width: calc(100vw - 1.3rem);
  }

  .messages-new-view .messages-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    flex: 0 0 auto;
    gap: .8rem;
    align-items: center;
    margin-bottom: 12px;
  }

  .messages-new-view .messages-hero .eyebrow,
  .messages-new-view .messages-hero .lead {
    display: none;
  }

  .messages-new-view .messages-hero h1 {
    font-size: 1.85rem;
  }

  .messages-new-view .new-conversation {
    display: grid;
    width: 100%;
    min-height: 0;
    max-height: calc(100dvh - 11.5rem - env(safe-area-inset-bottom));
    flex: 0 1 auto;
    grid-template-rows: auto auto auto;
    gap: .75rem;
    padding: .85rem;
    overflow-y: auto;
    border-radius: 1rem;
  }

  .messages-new-view .new-conversation:has(.new-conversation-context) {
    grid-template-rows: auto auto auto auto;
  }

  .messages-new-view .new-conversation-title {
    min-width: 0;
  }

  .messages-new-view .new-conversation-title > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
  }

  .messages-new-view .new-conversation-title small,
  .messages-new-view .new-conversation legend small {
    margin-left: 0;
  }

  .messages-new-view .new-conversation input {
    min-width: 0;
    width: 100%;
    font-size: 16px;
  }

  .messages-new-view .new-conversation fieldset {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .messages-new-view .new-conversation legend {
    width: 100%;
    margin-bottom: .55rem;
  }

  .messages-new-view .chat-candidate-list {
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    max-height: min(42dvh, 25rem);
    flex: 0 1 auto;
    gap: .5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .messages-new-view .chat-candidate-list > label {
    min-height: 0;
    grid-template-columns: 1.35rem 2.7rem minmax(0, 1fr);
    column-gap: .8rem;
    padding: .65rem .75rem;
  }

  .messages-new-view .chat-candidate-list input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
  }

  .new-conversation-actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
    padding-top: .7rem;
    border-top: 1px solid #293b53;
  }

  .new-conversation-actions .button {
    width: 100%;
    max-width: none;
    min-height: 3.1rem;
  }

  .new-conversation-actions .save-state:empty {
    display: none;
  }

  .new-conversation-actions .save-state {
    order: 2;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .exercise-detail-dialog,
  .exercise-detail-dialog .fullscreen-dialog-shell {
    width: 100vw;
    max-width: none;
  }

  .exercise-detail-shell {
    padding: 14px 1rem;
  }

  .exercise-detail-content {
    gap: 12px;
    padding-top: 12px;
  }

  .exercise-detail-maxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exercise-detail-maxes > div {
    min-height: 64px;
    padding: 10px;
  }

  .exercise-detail-rm-form {
    gap: 10px;
    padding: 12px;
  }

  .exercise-detail-rm-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exercise-detail-rm-fields label:last-child {
    grid-column: 1 / -1;
  }

  .exercise-detail-rm-form > .button {
    width: 100%;
    justify-self: stretch;
  }

  .exercise-detail-history article {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 9px;
  }

  .exercise-detail-history article > span {
    grid-column: 1 / -1;
  }

  .library-toolbar {
    gap: 12px;
    padding: 14px;
  }

  .library-exercise {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .library-exercise .library-source {
    display: none;
  }

  .analysis-layer-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0;
  }

  .analysis-layer-controls > span {
    grid-column: 1 / -1;
  }

  .analysis-layer-controls label {
    justify-content: center;
  }

  .club-dialog {
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .club-dialog > form {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    padding: 0;
    overflow: hidden;
  }

  .club-dialog > form > header,
  .club-dialog > form > footer,
  .club-dialog-body {
    padding-inline: 1rem;
  }

  .club-dialog > form > header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .club-dialog-body {
    width: 100%;
    min-width: 0;
    padding-block: .8rem;
    overflow-x: hidden;
  }

  .club-dialog-body > *,
  .club-dialog-body label,
  .club-dialog-body input,
  .club-dialog-body textarea,
  .club-dialog-body select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .club-invite-dialog .club-dialog-body {
    display: flex;
    flex-direction: column;
    gap: .7rem;
  }

  .club-invite-dialog .club-dialog-body > * {
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
  }

  .club-invite-dialog .club-dialog-body > .club-candidate-list {
    flex: 1 1 auto;
    min-height: 9rem;
  }

  .club-invite-dialog .club-dialog-body > .save-state {
    width: 100%;
    grid-column: auto;
    margin: 0;
  }

  .club-selected-summary {
    min-height: 2.2rem;
  }

  .club-selected-summary > * {
    width: auto;
  }

  .club-candidate-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1.35rem 2.65rem minmax(0, 1fr);
    column-gap: .9rem;
    row-gap: .35rem;
    padding: .6rem .7rem;
  }

  .club-candidate-row input {
    width: 1.25rem;
    height: 1.25rem;
    justify-self: start;
  }

  .club-candidate-row .community-avatar {
    margin-left: .1rem;
  }

  .club-dialog > form > footer {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: .65rem;
  }

  .club-dialog > form > footer .button {
    width: 100%;
    min-width: 0;
  }

  .club-dialog > form > .dialog-actions:last-child {
    position: static;
    margin: 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: #0e1929;
    border-top: 1px solid var(--line);
  }

  .club-candidate-list {
    max-height: none;
  }

  body.messages-thread-view {
    height: 100dvh;
    overflow: hidden;
  }

  body.messages-thread-view .app-frame,
  body.messages-thread-view .app-content {
    height: 100dvh;
    min-height: 0;
  }

  body.messages-thread-view .app-frame {
    display: flex;
    flex-direction: column;
  }

  body.messages-thread-view .app-content {
    height: auto;
    flex: 1 1 0;
  }

  body.messages-thread-view .site-footer {
    display: none;
  }

  .messages-thread-view .messages-layout {
    display: grid;
    flex: 1 1 0;
    overflow: hidden;
  }

  .messages-thread-view .chat-thread {
    align-self: stretch;
    min-height: 0;
    background: #101b2b;
  }

  .messages-thread-view .chat-message-list {
    min-height: 0;
  }

  .messages-thread-view .chat-start-state {
    min-height: 0;
    margin: auto;
  }

  .messages-thread-view .chat-composer {
    position: relative;
    z-index: 2;
  }

  .club-overview .club-card {
    gap: .7rem;
    padding: 1rem;
  }

  .club-overview .club-card > h2,
  .club-overview .club-card > p {
    margin-block: 0;
  }

  .club-card-actions {
    margin-top: .1rem;
  }

  .club-buddy-action {
    min-height: 3.15rem;
  }

  .club-card-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Logbook scopes: personal history, club gym and public PACK71 world. */
.logbook-scope-tabs {
  display: grid;
  max-width: 860px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 1.25rem 0 .25rem;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 20, 34, .78);
}

.logbook-scope-tabs a {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: .7rem;
  padding: .65rem .8rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
}

.logbook-scope-tabs a > span:first-child {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  color: #8bb8dc;
  border-radius: 9px;
  background: rgba(81, 122, 164, .12);
  font-weight: 900;
}

.logbook-scope-tabs a > span:last-child {
  display: grid;
  min-width: 0;
  gap: .08rem;
}

.logbook-scope-tabs strong {
  color: inherit;
  font-size: .82rem;
}

.logbook-scope-tabs small {
  overflow: hidden;
  font-size: .62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logbook-scope-tabs a.is-active {
  color: white;
  border-color: rgba(21, 151, 255, .5);
  background: linear-gradient(135deg, rgba(21, 151, 255, .22), rgba(21, 151, 255, .08));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.logbook-scope-tabs a.is-active > span:first-child {
  color: white;
  background: var(--blue);
}

.logbook-social-feed .section-heading p:last-child {
  max-width: 46rem;
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.logbook-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.logbook-social-card {
  min-height: 0;
  padding: 1rem !important;
  border-top-width: 1px !important;
}

.logbook-social-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
}

.logbook-social-card-header > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.logbook-social-card-header small {
  overflow: hidden;
  color: var(--muted);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logbook-social-card-body {
  display: grid;
  gap: .55rem;
  padding: .9rem 0 .8rem;
}

.logbook-social-card-body h3,
.logbook-social-card-body p {
  margin: 0;
}

.logbook-social-card-body h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}

.logbook-social-card-body > p:not(.eyebrow) {
  color: var(--muted);
  font-size: .8rem;
}

.logbook-social-score {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-top: .15rem;
  color: #57e8ae;
  font-size: 1.85rem;
  letter-spacing: -.035em;
}

.logbook-social-score small {
  color: var(--muted);
  font-size: .62rem;
  letter-spacing: .08em;
}

.logbook-social-actions {
  display: flex;
  gap: .35rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
}

.logbook-social-card .log-comment-form {
  margin: .7rem 0 0;
}

.logbook-social-status {
  min-height: 0;
  margin: .35rem 0 0;
}

.logbook-social-status:empty {
  display: none;
}

.logbook-social-empty {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .community-network-columns {
    gap: .7rem;
  }

  .community-network-columns > .panel {
    padding: .8rem;
  }

  .community-people-list {
    gap: .55rem;
    margin-top: .6rem;
  }

  .community-person-card {
    gap: .6rem;
    padding: .75rem;
  }

  .logbook-scope-tabs {
    width: 100%;
    gap: .3rem;
    margin-top: 1rem;
    padding: .3rem;
    border-radius: 14px;
  }

  .logbook-heading-actions > :only-child {
    grid-column: 1 / -1;
  }

  .logbook-scope-tabs a {
    min-height: 54px;
    justify-content: center;
    gap: .4rem;
    padding: .5rem .35rem;
    text-align: left;
  }

  .logbook-scope-tabs a > span:first-child {
    width: 1.7rem;
    height: 1.7rem;
  }

  .logbook-scope-tabs strong {
    font-size: .72rem;
  }

  .logbook-scope-tabs small {
    font-size: .54rem;
  }

  .logbook-social-feed {
    margin-top: 1.25rem;
  }

  .logbook-social-card {
    padding: .8rem !important;
  }

  .logbook-social-card-header {
    gap: .55rem;
  }

  .logbook-social-card-header .source-pill {
    min-height: 1.45rem;
    padding: .18rem .4rem;
    font-size: .55rem;
  }

  .logbook-social-card-body {
    padding-block: .75rem .65rem;
  }

  .logbook-social-score {
    font-size: 1.55rem;
  }
}
/* Feedback R1: capability profiles and a read-only training schedule. */
.workspace-profile-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: .35rem 0 1rem;
  padding: 0;
  border: 0;
}

.workspace-profile-picker legend {
  grid-column: 1 / -1;
  margin-bottom: .1rem;
  color: #dce8f6;
  font-size: .82rem;
  font-weight: 900;
}

.workspace-profile-picker legend small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
}

.workspace-profile-picker label {
  position: relative;
  min-width: 0;
}

.workspace-profile-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workspace-profile-picker label > span {
  display: grid;
  min-height: 5.2rem;
  align-content: center;
  gap: .25rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #0b1422;
  cursor: pointer;
}

.workspace-profile-picker label > span small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

.workspace-profile-picker input:checked + span {
  border-color: var(--blue);
  background: rgba(21, 151, 255, .12);
  box-shadow: 0 0 0 1px rgba(21, 151, 255, .24);
}

.program-workspace.is-schedule .builder-rail,
.program-workspace.is-schedule .program-manage-link,
.program-workspace.is-schedule .plain-icon,
.program-workspace.is-schedule .block-actions,
.program-workspace.is-schedule .add-exercise-button,
.program-workspace.is-schedule .add-training-block,
.program-workspace.is-schedule .add-session-button,
.program-workspace.is-schedule .day-actions,
.program-workspace.is-schedule .builder-session-footer {
  display: none !important;
}

.program-workspace.is-schedule {
  grid-template-columns: minmax(0, 1fr);
}

.program-workspace.is-schedule .builder-session {
  cursor: default;
}

.mobile-day-nav {
  display: none;
}

.schedule-open-training {
  width: auto;
  margin: .65rem;
}

.schedule-month-session {
  text-decoration: none;
}

@media (max-width: 720px) {
  .workspace-profile-picker {
    grid-template-columns: 1fr;
  }

  body.dashboard-view .dashboard-hero,
  body.dashboard-view .onboarding-banner {
    display: none;
  }

  body.dashboard-view .shell {
    padding-top: max(.55rem, env(safe-area-inset-top));
  }

  body.dashboard-view .dashboard-page {
    gap: .65rem;
  }

  body.dashboard-view .week-strip {
    display: none;
  }

  body.dashboard-view .mobile-day-nav {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr) 2.8rem;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0 .55rem;
    text-align: center;
    background: linear-gradient(#080f1a 78%, rgba(8, 15, 26, 0));
  }

  body.dashboard-view .mobile-day-nav a {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 1px solid #2a415e;
    border-radius: .8rem;
    color: #f5f8fc;
    background: #101c2c;
    text-decoration: none;
  }

  body.dashboard-view .mobile-day-nav :is(div, .mobile-day-picker) {
    position: relative;
    display: grid;
    gap: .08rem;
    min-width: 0;
    cursor: pointer;
  }

  body.dashboard-view .mobile-day-picker input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  body.dashboard-view .mobile-day-nav small {
    color: var(--blue);
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .12em;
  }

  body.dashboard-view .mobile-day-nav strong {
    font-size: .95rem;
  }

  .program-schedule-view .builder-header .lead {
    display: none;
  }

  .program-schedule-view .builder-header {
    margin-bottom: .45rem;
  }

  .program-schedule-view .builder-header h1 {
    font-size: 1.6rem;
  }

  .program-schedule-view .training-block-stack,
  .program-schedule-view .builder-session > .training-block {
    display: none;
  }

  .program-schedule-view .builder-session {
    padding: .75rem;
  }

  .program-schedule-view .builder-session-head h2 {
    font-size: 1.15rem;
  }

  .program-schedule-view .session-notes {
    display: -webkit-box;
    margin: .35rem 0 0;
    overflow: hidden;
    font-size: .72rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .program-schedule-view .schedule-open-training {
    min-height: 2.7rem;
    margin: .6rem 0 0;
  }
}

/* Feedback R1: compact WOD prescription and a true gym-floor timer. */
.wod-title-line {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.wod-title-line h2 {
  margin: 0;
}

.wod-title-time {
  padding: .28rem .52rem;
  border: 1px solid rgba(68, 216, 158, .45);
  border-radius: 999px;
  color: #7ce8bb;
  background: rgba(68, 216, 158, .08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  font-weight: 900;
}

.wod-prescription-view {
  position: relative;
}

.wod-info {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
}

.wod-info > summary {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #34506f;
  border-radius: 999px;
  color: #9dcfff;
  background: #122036;
  font-family: Georgia, serif;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.wod-info > summary::-webkit-details-marker {
  display: none;
}

.wod-info[open] {
  width: min(26rem, calc(100vw - 3rem));
}

.wod-info[open] > summary {
  margin-left: auto;
}

.wod-info .coach-note {
  margin: .45rem 0 0;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
}

#wod-clock-context {
  min-height: 1.25em;
  color: #71eab7;
  font-size: clamp(.82rem, 2vw, 1.05rem);
  letter-spacing: .08em;
}

#wod-clock-cue {
  min-height: 1.5rem;
  color: #fff;
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 950;
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(.3rem);
  transition: opacity .18s ease, transform .18s ease;
}

#wod-clock-cue.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wod-runner[data-interval-phase="rest"] .wod-clock {
  border-color: #ffb84d;
}

@media (max-width: 720px) {
  .session-page .wod-runner-head {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
    margin-bottom: .25rem;
    padding-right: 2.35rem;
  }

  .session-page .wod-title-line {
    gap: .4rem;
  }

  .session-page .wod-title-line h2 {
    font-size: 1.35rem;
  }

  .session-page .wod-title-time {
    padding: .22rem .44rem;
    font-size: .64rem;
  }

  .session-page .wod-prescription-meta {
    margin-top: .1rem;
  }

  .session-page .wod-info {
    top: -.05rem;
  }

  .session-page .wod-info .coach-note {
    max-height: 12rem;
    overflow-y: auto;
    background: #101b2b;
  }

  .session-page .wod-movement-run-list {
    flex: 0 1 auto;
    grid-auto-rows: max-content;
    align-content: start;
    margin-top: .15rem;
  }

  .session-page .wod-movement-run-list li {
    padding: .42rem 0;
  }

  .session-page .runner-wod-unit .runner-unit-body:has(.wod-runner[data-wod-phase="ready"]) {
    grid-auto-rows: max-content;
    align-content: start;
  }

  .session-page .runner-wod-unit .wod-runner[data-wod-phase="ready"] {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .session-page .runner-wod-unit .wod-runner[data-wod-phase="ready"] .wod-prescription-view {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.session-page.wod-timer-active .workout-runner-header,
  body.session-page.wod-timer-active .workout-runner-progress,
  body.session-page.wod-timer-active .workout-runner-steps,
  body.session-page.wod-timer-active .workout-runner-dock {
    display: none !important;
  }

  body.session-page.wod-timer-active .shell {
    padding: 0;
  }

  body.session-page.wod-timer-active .workout-runner-shell,
  body.session-page.wod-timer-active .session-stack,
  body.session-page.wod-timer-active .runner-unit,
  body.session-page.wod-timer-active .runner-unit-body {
    width: 100%;
    height: 100dvh;
    min-height: 0;
  }

  .session-page .wod-runner[data-wod-phase="countdown"],
  .session-page .wod-runner[data-wod-phase="countdown_paused"],
  .session-page .wod-runner[data-wod-phase="running"],
  .session-page .wod-runner[data-wod-phase="paused"],
  .session-page .wod-runner[data-wod-phase="timeup"] {
    position: fixed;
    z-index: 250;
    inset: 0;
    display: grid;
    width: 100vw;
    height: 100dvh;
    grid-template-areas:
      "clock"
      "workout";
    grid-template-rows: minmax(45%, auto) minmax(0, 1fr);
    gap: .5rem;
    padding:
      max(.7rem, env(safe-area-inset-top))
      .7rem
      max(.7rem, env(safe-area-inset-bottom));
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 50% 15%, rgba(21, 151, 255, .2), transparent 40%),
      #060c15;
  }

  .session-page .wod-runner[data-wod-phase="countdown"] .wod-clock,
  .session-page .wod-runner[data-wod-phase="countdown_paused"] .wod-clock,
  .session-page .wod-runner[data-wod-phase="running"] .wod-clock,
  .session-page .wod-runner[data-wod-phase="paused"] .wod-clock,
  .session-page .wod-runner[data-wod-phase="timeup"] .wod-clock {
    position: relative;
    grid-area: clock;
    min-height: 0;
    margin: 0;
    padding: .75rem;
    overflow: hidden;
    border-radius: 1.1rem;
    background:
      conic-gradient(
        rgba(21, 151, 255, .28) calc(var(--wod-progress, 0) * 1turn),
        transparent 0
      ),
      #07111f;
  }

  .session-page .wod-runner[data-wod-phase="countdown"] .wod-prescription-view,
  .session-page .wod-runner[data-wod-phase="countdown_paused"] .wod-prescription-view,
  .session-page .wod-runner[data-wod-phase="running"] .wod-prescription-view,
  .session-page .wod-runner[data-wod-phase="paused"] .wod-prescription-view,
  .session-page .wod-runner[data-wod-phase="timeup"] .wod-prescription-view {
    grid-area: workout;
    min-height: 0;
    padding: .6rem .75rem;
    overflow-y: auto;
    border: 1px solid #263b54;
    border-radius: 1rem;
    background: #0d1828;
  }

  .session-page .wod-clock > strong {
    font-size: clamp(5.3rem, 27vw, 10rem);
    letter-spacing: -.08em;
    line-height: .82;
  }

  .session-page .wod-clock > strong.is-countdown {
    font-size: clamp(8rem, 42vw, 15rem);
    letter-spacing: -.04em;
  }

  .session-page .wod-clock > div {
    display: grid;
    width: min(34rem, 100%);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .4rem;
    margin-top: .35rem;
  }

  .session-page .wod-clock > div .button {
    min-height: 2.65rem;
    padding: .45rem .35rem;
    font-size: .72rem;
  }

  .session-page .wod-clock #wod-clock-reset {
    display: inline-flex;
  }

  .session-page .wod-runner[data-wod-phase="paused"] .wod-clock::after,
  .session-page .wod-runner[data-wod-phase="countdown_paused"] .wod-clock::after {
    position: absolute;
    top: .65rem;
    right: .65rem;
    padding: .3rem .5rem;
    border-radius: 999px;
    color: #ffd27a;
    background: rgba(255, 184, 77, .16);
    content: "GEPAUZEERD";
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .1em;
  }

  .session-page .wod-runner[data-wod-phase="timeup"] {
    background:
      radial-gradient(circle at 50% 15%, rgba(255, 76, 99, .3), transparent 48%),
      #10070c;
  }

  .session-page .wod-runner[data-wod-phase="timeup"] .wod-clock {
    border-color: #ff4c63;
    animation: wod-timeup-pulse .8s ease-in-out 3;
  }

  body.session-page:not(.wod-timer-active) .workout-runner-dock {
    grid-template-columns: 2.45rem 2.45rem minmax(0, 1fr);
    gap: .4rem;
    padding: .35rem;
    border-radius: .8rem;
  }

  body.session-page:not(.wod-timer-active) .runner-dock-back,
  body.session-page:not(.wod-timer-active) .runner-dock-exit {
    width: 2.45rem;
    height: 2.45rem;
  }

  body.session-page:not(.wod-timer-active) .workout-runner-dock .button {
    min-height: 2.55rem;
    padding-block: .45rem;
  }
}

@keyframes wod-timeup-pulse {
  50% {
    box-shadow: inset 0 0 0 .35rem rgba(255, 76, 99, .4), 0 0 3rem rgba(255, 76, 99, .28);
  }
}

/* Feedback R2: denser commerce workspace and a reusable activity-based roster. */
.commerce-view .admin-hero h1 {
  font-size: clamp(1.9rem, 2.7vw, 3rem);
}

.commerce-view .admin-hero > div > p:last-child,
.commerce-view .admin-section > header p {
  font-size: .82rem;
}

.commerce-view .button {
  min-height: 36px;
  padding: 6px 12px;
  font-size: .76rem;
}

.commerce-view .commerce-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commerce-view .commerce-report-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.commerce-view .commerce-report-metrics article {
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
}

.commerce-view .commerce-report-metrics strong { font-size: 1.12rem; }

.commerce-view .commerce-metrics article {
  min-height: 72px;
  padding: 10px 14px;
}

.commerce-view .commerce-metrics article span {
  display: none;
}

.commerce-view .commerce-metrics strong {
  font-size: 1.35rem;
}

.commerce-product-row {
  position: relative;
  grid-template-columns: minmax(180px, 1fr) auto auto auto auto;
}

.commerce-member-row {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.commerce-row-editor {
  position: relative;
}

.commerce-row-editor > summary {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #2b4562;
  border-radius: 9px;
  color: #a8c5df;
  background: #101c2c;
  cursor: pointer;
  list-style: none;
}

.commerce-row-editor > summary::-webkit-details-marker {
  display: none;
}

.commerce-row-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid #34506f;
  border-radius: 13px;
  background: #101c2c;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .5);
}

.commerce-row-popover > p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: .75rem;
}

.commerce-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.commerce-plan-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0c1726;
}

.commerce-plan-card > div {
  display: grid;
}

.commerce-plan-card small {
  color: var(--muted);
  font-size: .68rem;
}

.commerce-activity-palette {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #091422;
}

.commerce-activity-palette > div {
  display: grid;
  min-width: 100px;
  align-content: center;
  padding-inline: 6px;
}

.commerce-activity-palette > div small,
.commerce-activity-chip span {
  color: var(--muted);
  font-size: .62rem;
}

.commerce-activity-chip {
  display: grid;
  min-width: 150px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--event-color) 60%, #263b54);
  border-left: 4px solid var(--event-color);
  border-radius: 9px;
  color: var(--text);
  background: #122036;
  text-align: left;
  cursor: grab;
}

.commerce-activity-chip.is-dragging {
  opacity: .45;
}

.commerce-calendar-day {
  position: relative;
}

.commerce-calendar-track {
  min-height: var(--calendar-track-height, 900px);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--grid-slot-percent, 2.9412%) - 1px),
      rgba(82, 111, 143, .13) calc(var(--grid-slot-percent, 2.9412%) - 1px),
      rgba(82, 111, 143, .13) var(--grid-slot-percent, 2.9412%)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--grid-hour-percent, 5.8824%) - 1px),
      rgba(108, 143, 180, .28) calc(var(--grid-hour-percent, 5.8824%) - 1px),
      rgba(108, 143, 180, .28) var(--grid-hour-percent, 5.8824%)
    );
}

.commerce-time-axis {
  position: relative;
  border-right: 1px solid var(--line);
  color: #8296aa;
  background: #0a1421;
}

.commerce-time-axis > header {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 32, 50, .92);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.commerce-time-axis > div {
  position: relative;
  min-height: var(--calendar-track-height, 900px);
}

.commerce-time-axis > div span {
  position: absolute;
  right: 7px;
  transform: translateY(-50%);
  font-size: .58rem;
  font-variant-numeric: tabular-nums;
}

.commerce-time-axis > div span:first-child {
  transform: translateY(0);
}

.commerce-time-axis > div span:last-child {
  transform: translateY(-100%);
}

.commerce-calendar-day.is-holiday > header {
  background: linear-gradient(135deg, rgba(214, 157, 54, .24), rgba(69, 48, 18, .38));
}

.commerce-calendar-day.is-holiday > header span {
  display: grid;
  justify-items: end;
  color: #f4c46c;
}

.commerce-calendar-day.is-holiday > header em {
  max-width: 120px;
  overflow: hidden;
  font-size: .5rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-calendar-day.is-holiday .commerce-calendar-track {
  background-color: rgba(196, 133, 36, .055);
}

.commerce-holiday-settings {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.commerce-holiday-settings > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.commerce-holiday-settings .commerce-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.commerce-series-choice {
  display: flex;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #31516f;
  border-radius: 11px;
  background: rgba(21, 151, 255, .06);
}

.commerce-series-choice[hidden] { display: none; }
.commerce-series-choice label { display: flex; align-items: center; gap: 7px; }
.commerce-series-choice input { width: auto; }

.commerce-movement-builder {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #294c6b;
  border-radius: 11px;
  background: rgba(5, 14, 25, .46);
}

.commerce-movement-builder > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.commerce-movement-builder > header div { display: grid; }
.commerce-movement-builder > header small { color: var(--muted); }
.commerce-movement-builder [data-wod-movements] { display: grid; gap: 7px; }
.commerce-movement-builder [data-wod-movement] {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) 80px 90px minmax(150px, 1fr) 36px;
  gap: 6px;
}

.messages-layout [data-messages-thread-slot] {
  transition: opacity .12s ease, transform .12s ease;
}

.messages-layout.is-switching-thread [data-messages-thread-slot] {
  opacity: .55;
  transform: translateY(2px);
  pointer-events: none;
}
.commerce-movement-builder [data-wod-movement] button {
  border: 1px solid #65404a;
  border-radius: 8px;
  color: #ff9ba4;
  background: #25151d;
}

body.is-schedule-plan-mode { overflow: hidden; }
.commerce-plan-mode-exit { display: none; }
body.is-schedule-plan-mode :is(.commerce-schedule-board, .commerce-programming-board) {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 18px 20px;
  border: 0;
  border-radius: 0;
  background: #08121f;
  box-shadow: none;
}

body.is-schedule-plan-mode .commerce-week-calendar {
  border-radius: 0;
}
body.is-schedule-plan-mode .commerce-plan-mode-exit {
  display: inline-flex;
  flex: 0 0 auto;
  border-color: color-mix(in srgb, var(--management-accent, var(--blue)) 55%, var(--line));
  background: color-mix(in srgb, var(--management-accent, var(--blue)) 16%, #0a1422);
}
body.is-schedule-plan-mode :is(.commerce-schedule-board, .commerce-programming-board) > header {
  flex: 0 0 auto;
  padding-block: 4px;
}
body.is-schedule-plan-mode .commerce-schedule-board > header .eyebrow,
body.is-schedule-plan-mode .commerce-schedule-board > header p:last-child,
body.is-schedule-plan-mode .commerce-schedule-board > header h2 {
  display: none;
}
body.is-schedule-plan-mode .commerce-activity-palette,
body.is-schedule-plan-mode .commerce-calendar-toolbar {
  flex: 0 0 auto;
}
body.is-schedule-plan-mode .commerce-calendar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  cursor: default;
  overscroll-behavior: contain;
}
body.is-schedule-plan-mode .commerce-calendar-scroll.is-panning {
  cursor: grabbing;
  user-select: none;
}
body.is-schedule-plan-mode .commerce-programming-board {
  display: flex;
  flex-direction: column;
}
body.is-schedule-plan-mode .commerce-programming-board .commerce-programming-week {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  border-radius: 0;
}
body.is-schedule-plan-mode .commerce-calendar-event {
  min-height: 48px;
  padding: 6px 8px;
  border-left-width: 5px;
  background: color-mix(in srgb, var(--activity-color) 20%, #0d1a2b);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .34);
}
body.is-schedule-plan-mode .commerce-calendar-event.is-draft { opacity: .92; }
body.is-schedule-plan-mode .commerce-calendar-event > span,
body.is-schedule-plan-mode .commerce-calendar-event > small {
  color: #c2d2e3;
  font-size: .72rem;
  line-height: 1.2;
}
body.is-schedule-plan-mode .commerce-calendar-event > strong {
  font-size: .86rem;
  line-height: 1.2;
}
body.is-schedule-plan-mode .commerce-calendar-event .commerce-event-trainer {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  margin: 0;
  font-size: .64rem;
}
body.is-schedule-plan-mode .commerce-calendar-event > span { padding-right: 34px; }

@media (max-width: 760px) {
  .commerce-holiday-settings > div { grid-template-columns: 1fr; }
  .commerce-movement-builder [data-wod-movement] {
    grid-template-columns: minmax(0, 1fr) 72px 82px 36px;
  }

  html:has(.mobile-more-menu[open]),
  body:has(.mobile-more-menu[open]) {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .commerce-movement-builder [data-field="notes"] { grid-column: 1 / -1; }
  .commerce-series-choice { display: grid; gap: 8px; }
}

.commerce-calendar-day.is-drop-target::after {
  position: absolute;
  z-index: 20;
  top: calc(42px + var(--drop-position));
  right: 3px;
  left: 3px;
  height: 2px;
  background: #24a5ff;
  box-shadow: 0 0 10px rgba(36, 165, 255, .8);
  content: "";
  pointer-events: none;
}

.commerce-calendar-day.is-drop-target::before {
  position: absolute;
  z-index: 21;
  top: calc(28px + var(--drop-position));
  left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: #147dca;
  content: attr(data-drop-time);
  font-size: .6rem;
  font-weight: 900;
  pointer-events: none;
}

.commerce-context-menu {
  position: fixed;
  z-index: 100;
  width: 180px;
  padding: 6px;
  border: 1px solid #34506f;
  border-radius: 10px;
  background: #101c2c;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .55);
}

.commerce-context-menu[hidden] {
  display: none;
}

.commerce-context-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.commerce-context-menu button:hover {
  background: rgba(21, 151, 255, .13);
}

.commerce-context-menu button.is-danger {
  color: #ff98a2;
}

.commerce-color-field {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: #0b1625;
  cursor: pointer;
}

.commerce-color-field > span {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 7px;
  background: var(--selected-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--selected-color) 18%, transparent);
}

.commerce-color-field code {
  color: #d8e8f6;
  font: 800 .75rem/1 var(--font-body);
}

.commerce-color-field b {
  margin-left: auto;
  color: #77c8ff;
  font-size: .7rem;
}

.commerce-color-dialog {
  width: min(430px, calc(100vw - 32px));
}

.commerce-color-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.commerce-color-swatches button {
  aspect-ratio: 1.5;
  border: 2px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  background: var(--swatch);
  cursor: pointer;
}

.commerce-color-swatches button:is(:hover, :focus-visible) {
  border-color: #fff;
  transform: translateY(-1px);
}

.commerce-schedule-workspace {
  min-width: 0;
}

.commerce-schedule-board {
  min-width: 0;
  padding-top: 16px;
}

.commerce-schedule-board > header {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.commerce-schedule-heading {
  display: grid;
  flex: 1 1 320px;
  gap: 2px;
  min-width: 260px;
}

.commerce-schedule-heading > :is(.eyebrow, h2, p) {
  margin: 0;
}

.commerce-activity-search {
  display: flex;
  flex: 0 1 360px;
  align-self: center;
  min-width: 220px;
  margin-inline: auto;
}

.commerce-activity-search input {
  width: 100%;
  min-height: 38px;
  padding-block: 7px;
}

.commerce-clear-week-form { margin-left: auto; }

.commerce-calendar-zoom {
  display: none;
  align-items: center;
  gap: 4px;
}

body.is-schedule-plan-mode .commerce-calendar-zoom { display: inline-flex; }

.commerce-calendar-zoom button,
.commerce-calendar-zoom output {
  display: grid;
  min-width: 30px;
  min-height: 26px;
  place-items: center;
  padding: 3px 7px;
  border: 1px solid #34506f;
  border-radius: 7px;
  color: #dcecff;
  background: #101e30;
  font: 800 .64rem/1 var(--font-body);
}

.commerce-calendar-zoom button { cursor: pointer; }
.commerce-calendar-zoom button:last-child { min-width: auto; }
.commerce-coach-notes { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.commerce-coach-notes > summary { color: var(--management-accent, var(--blue)); font-size: .72rem; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.commerce-coach-notes > label { display: block; margin-top: 10px; }
.commerce-coach-notes textarea { width: 100%; }

.commerce-program-import-dialog { width: min(820px, calc(100vw - 32px)); }
.commerce-file-picker { display: flex; align-items: center; gap: 10px; }
.commerce-file-picker small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.commerce-import-preview { display: grid; gap: 10px; }
.commerce-import-preview > header { align-items: end; margin: 0; }
.commerce-import-preview > div {
  display: grid;
  max-height: 300px;
  gap: 7px;
  overflow: auto;
}
.commerce-import-preview article {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1726;
}
.commerce-import-preview article :is(span, small) { color: var(--muted); }
.commerce-import-preview article em { color: #f0c86d; font-size: .7rem; font-style: normal; }

.commerce-activity-empty {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
}

.commerce-schedule-board > header h2 {
  margin-block: 2px;
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
}

.commerce-schedule-board > header > div > p:last-child {
  margin-block: 2px 0;
}

.commerce-publish-menu {
  position: relative;
}

.commerce-publish-menu > summary {
  list-style: none;
  cursor: pointer;
}

.commerce-publish-menu > summary::-webkit-details-marker {
  display: none;
}

.commerce-publish-menu > form {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  padding: 14px;
  border: 1px solid #34506f;
  border-radius: 12px;
  background: #101c2c;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .5);
}

.commerce-activity-palette > .commerce-activity-actions {
  display: flex;
  min-width: max-content;
  margin-left: auto;
  gap: 6px;
  padding-inline: 0;
}

.commerce-activity-actions .button {
  white-space: nowrap;
}

.commerce-activity-chip {
  border-color: color-mix(in srgb, var(--activity-color) 60%, #263b54);
  border-left-color: var(--activity-color);
}

.commerce-activity-chip span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.commerce-activity-chip em {
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--trainer-color) 70%, white);
  border-radius: 99px;
  color: #fff;
  background: color-mix(in srgb, var(--trainer-color) 38%, #0a1421);
  font-size: .58rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

.commerce-event-trainer {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--trainer-color) 72%, white);
  border-radius: 50%;
  color: #fff;
  background: color-mix(in srgb, var(--trainer-color) 48%, #0a1421);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .24);
  font-size: .62rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}

.commerce-calendar-event,
.commerce-calendar-event.is-personal_training,
.commerce-calendar-event.is-open_gym,
.commerce-calendar-event.is-workshop {
  border-color: var(--activity-color);
  border-left-color: var(--activity-color);
  background: color-mix(in srgb, var(--activity-color) 13%, #101d2f);
}

.commerce-event-trainer {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  justify-self: end;
}

.commerce-event-program {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 99px;
  color: #7dd3ff;
  background: rgba(4, 17, 30, .76);
  font-size: .5rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .04em;
}

.commerce-calendar-event.is-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 1px;
  padding-block: 4px;
}

.commerce-calendar-event.is-compact > span {
  grid-column: 1;
  grid-row: 1;
}

.commerce-calendar-event.is-compact > strong {
  grid-column: 1 / -1;
  grid-row: 2;
}

.commerce-calendar-event.is-compact .commerce-event-trainer {
  grid-column: 2;
  grid-row: 1;
  width: 23px;
  height: 23px;
  font-size: .54rem;
}

.commerce-schedule-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid #385575;
  border-radius: 18px;
  color: var(--text);
  background: #101c2c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .72);
}

.app-modal {
  color: var(--text);
  border: 1px solid #385575;
  border-radius: 18px;
  background: #101c2c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .72);
}

.app-modal::backdrop {
  background: rgba(2, 8, 16, .78);
  backdrop-filter: blur(5px);
}

.app-modal-header {
  display: flex;
  position: sticky;
  z-index: 8;
  top: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(56, 85, 117, .7);
  background: #101c2c;
}

.app-modal-header h2 { margin: 2px 0 0; }

.app-modal-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #b7c9dc;
  background: #0b1625;
  font-size: 1.35rem;
  cursor: pointer;
}

.commerce-schedule-dialog::backdrop {
  background: rgba(2, 8, 16, .78);
  backdrop-filter: blur(5px);
}

.commerce-schedule-dialog > form {
  gap: 12px;
  padding: 22px;
}

.commerce-schedule-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.commerce-schedule-dialog h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.commerce-dialog-close {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #b7c9dc;
  background: #0b1625;
  font-size: 1.35rem;
  cursor: pointer;
}

.commerce-schedule-dialog details {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.commerce-schedule-dialog details > summary {
  color: #bdd1e5;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.commerce-schedule-dialog details > div:first-of-type {
  margin-top: 12px;
}

.commerce-schedule-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.commerce-schedule-dialog footer .danger {
  margin-right: auto;
  color: #ff98a2;
  border-color: rgba(255, 93, 103, .34);
  background: rgba(255, 93, 103, .08);
}

.commerce-copy-dialog {
  width: min(440px, calc(100vw - 32px));
}

.commerce-dialog-message {
  min-height: 18px;
  margin: 0;
  color: #9fd6ff;
  font-size: .72rem;
}

.commerce-staff-color {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 800;
}

.commerce-staff-color input {
  width: 38px;
  min-height: 30px;
  padding: 2px;
}

.commerce-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-left: auto;
}

.commerce-edit-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #2b4562;
  border-radius: 9px;
  color: #b9d4ec;
  background: #101c2c;
  cursor: pointer;
}

.commerce-edit-trigger:is(:hover, :focus-visible),
.commerce-editable-row:hover .commerce-edit-trigger {
  color: #fff;
  border-color: #1597ff;
  background: rgba(21, 151, 255, .13);
}

.commerce-editable-row {
  transition: border-color .16s ease, background .16s ease;
}

.commerce-editable-row:hover {
  border-color: #35587a;
  background: rgba(21, 151, 255, .04);
}

.commerce-record-dialog,
.commerce-source-dialog {
  overflow: auto;
}

.commerce-record-dialog > header {
  margin: 0;
  padding: 22px 22px 0;
}

.commerce-record-dialog > .commerce-row-popover,
.commerce-record-dialog > form.commerce-row-popover {
  position: static;
  width: auto;
  margin: 0;
  padding: 18px 22px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.commerce-record-dialog > .commerce-row-popover > form {
  margin-top: 14px;
}

.commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) > strong,
.commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) > p {
  grid-column: 1 / -1;
}

.commerce-record-dialog .commerce-contract-actions {
  grid-column: 1;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  border: 0;
}

.commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) > form:not(.commerce-contract-actions) {
  grid-column: 2;
  margin: 0;
}

.commerce-source-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
}

.commerce-source-dialog-close {
  position: sticky;
  z-index: 5;
  top: 16px;
  float: right;
  margin: 16px 16px -52px 0;
}

.commerce-source-dialog > .commerce-modal-panel {
  display: block;
  width: auto;
  margin: 0;
  padding: 22px;
  border: 0;
  background: transparent;
}

.commerce-source-dialog > .app-modal-header + .commerce-modal-panel { padding-top: 18px; }
.commerce-source-dialog > .app-modal-header + .commerce-modal-panel > header:first-child { display: none; }
.commerce-source-dialog > .commerce-modal-panel.commerce-publish-menu { display: grid; gap: 12px; }
.commerce-source-dialog > .commerce-modal-panel.commerce-publish-menu > form {
  position: static;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1929;
  box-shadow: none;
}

.commerce-source-dialog > .commerce-modal-panel > header {
  padding-right: 48px;
}

.commerce-box-settings-modal > form + form,
.commerce-box-settings-modal > div + form {
  margin-top: 16px;
}

.commerce-modalized-layout {
  grid-template-columns: minmax(0, 1fr);
}

.commerce-modalized-layout > article:first-child {
  grid-column: 1 / -1;
}

.commerce-source-dialog > details.commerce-modal-panel > summary {
  display: none;
}

.commerce-source-dialog > details.commerce-modal-panel > .commerce-details-body {
  padding: 0;
}

.commerce-order-list article:has(.commerce-edit-trigger) {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.commerce-confirm-dialog {
  width: min(440px, calc(100vw - 32px));
}

.commerce-confirm-content {
  padding: 24px;
}

.commerce-confirm-content h2 {
  margin: 3px 0 8px;
}

.commerce-confirm-content > p:not(.eyebrow) {
  color: var(--muted);
}

.commerce-confirm-content footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.commerce-confirm-content .danger {
  color: #fff;
  border-color: #d94d5b;
  background: #b83240;
}

.commerce-planning-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1422;
}

.commerce-schedule-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.commerce-grid-step {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 4px 5px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0a1422;
}

.commerce-grid-step > span {
  color: var(--muted);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.commerce-grid-step select {
  width: auto;
  min-height: 32px;
  padding: 5px 28px 5px 8px;
  border: 0;
  background-color: #12253a;
  font-size: .72rem;
}

.commerce-planning-tabs a {
  padding: 8px 18px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 850;
  text-decoration: none;
}

.commerce-planning-tabs a.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--management-accent, #8a3ee4) 72%, #fff 8%);
  background: color-mix(in srgb, var(--management-accent, #8a3ee4) 34%, #102038);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--management-accent, #8a3ee4) 62%, transparent);
}

.commerce-programming-board {
  overflow: hidden;
}

.commerce-programming-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 480px;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #08121f;
}

.commerce-programming-day {
  min-width: 132px;
  border-left: 1px solid var(--line);
}

.commerce-programming-day:first-child {
  border-left: 0;
}

.commerce-programming-day > header {
  align-items: center;
  margin: 0;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #101c2c;
}

.commerce-programming-day.is-today > header {
  background: rgba(21, 151, 255, .14);
}

.commerce-programming-day > header > div {
  display: grid;
  gap: 1px;
}

.commerce-programming-day > header span {
  color: var(--muted);
  font-size: .65rem;
}

.commerce-programming-day > header button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #2d4d6b;
  border-radius: 8px;
  color: #9fd6ff;
  background: #0b1726;
  cursor: pointer;
}

.commerce-programming-day-content {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.commerce-program-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #2a425d;
  border-left: 3px solid #6f8296;
  border-radius: 11px;
  background: #101c2c;
  cursor: context-menu;
}

.commerce-program-card.is-coach {
  border-left-color: #f0ad45;
}

.commerce-program-card.is-published {
  border-left-color: #39d798;
}

.commerce-program-card > header {
  align-items: center;
  margin: 0;
}

.commerce-program-card .commerce-edit-trigger {
  width: 28px;
  height: 28px;
}

.commerce-program-card-actions {
  display: flex;
  gap: 4px;
}

.commerce-program-card-actions > a {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #2b4562;
  border-radius: 8px;
  color: #9fd6ff;
  background: #0b1726;
  text-decoration: none;
}

.commerce-program-card > strong,
.commerce-program-card > small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.commerce-program-card > small {
  color: var(--muted);
  font-size: .62rem;
}

.commerce-program-block-preview {
  display: grid;
  gap: 5px;
  margin-top: 3px;
}

.commerce-program-block-preview span {
  display: grid;
  gap: 1px;
  overflow: hidden;
  color: #a9bace;
  font-size: .61rem;
  line-height: 1.35;
}

.commerce-program-block-preview b {
  color: #25a7ff;
  font-size: .55rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.commerce-program-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px dashed #29425d;
  border-radius: 11px;
  color: #72869a;
  background: transparent;
  font-size: .65rem;
  cursor: pointer;
}

.commerce-program-empty span {
  color: #1597ff;
  font-size: 1.2rem;
}

.commerce-program-dialog {
  width: min(980px, calc(100vw - 32px));
}

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

.commerce-program-dialog textarea {
  resize: vertical;
}

.commerce-wod-builder {
  display: grid;
  gap: 12px;
  margin: 4px 0 0;
  padding: 16px;
  border: 1px solid #236ca3;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(21, 151, 255, .1), rgba(9, 20, 34, .72));
}

.commerce-wod-builder legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 7px;
}

.commerce-wod-builder legend span {
  color: #25a7ff;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .12em;
}

.commerce-wod-builder legend strong {
  font-size: 1rem;
}

.commerce-wod-builder > p {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

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

.commerce-wod-library-picker {
  position: relative;
  display: grid;
  gap: 5px;
}

.commerce-wod-library-picker > small {
  color: var(--muted);
}

.commerce-wod-library-picker [data-program-wod-results],
.commerce-movement-builder [data-exercise-results] {
  position: absolute;
  z-index: 30;
  top: calc(100% - 20px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #34506f;
  border-radius: 10px;
  background: #0d1928;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

.commerce-wod-library-picker [data-program-wod-results][hidden],
.commerce-movement-builder [data-exercise-results][hidden] {
  display: none;
}

.commerce-wod-library-picker [data-program-wod-results] button,
.commerce-movement-builder [data-exercise-results] button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #24384f;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.commerce-wod-library-picker [data-program-wod-results] button:hover,
.commerce-movement-builder [data-exercise-results] button:hover {
  background: rgba(21, 151, 255, .12);
}

.commerce-wod-library-picker [data-program-wod-results] span,
.commerce-wod-library-picker [data-program-wod-results] strong {
  display: block;
}

.commerce-wod-library-picker [data-program-wod-results] b {
  color: #35adff;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.commerce-movement-builder [data-wod-movement] {
  position: relative;
}

.commerce-movement-builder [data-exercise-results] {
  top: 100%;
  right: auto;
  left: 0;
  width: min(520px, 100%);
}

.commerce-program-dialog > form > header h2,
.commerce-schedule-dialog > form > header h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.wod-start-button {
  border-color: #1597ff;
  color: #fff;
  background: #1597ff;
}

.wod-start-button:hover {
  background: #35aaff;
}

.commerce-input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1625;
}

.commerce-input-suffix input {
  border: 0;
}

.commerce-input-suffix span {
  padding-right: 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
}

.member-daily-program {
  grid-column: 1 / -1;
  border: 1px solid #285075;
  border-radius: 11px;
  background: rgba(21, 151, 255, .06);
}

.member-daily-program > summary {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.member-daily-program > summary::-webkit-details-marker {
  display: none;
}

.member-daily-program > summary span,
.member-daily-program section > span {
  color: #25a7ff;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.member-daily-program > div {
  display: grid;
  gap: 9px;
  padding: 0 12px 12px;
}

.member-daily-program p {
  margin: 3px 0 0;
  color: #c3d1df;
  white-space: pre-line;
}

.commerce-wod-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.commerce-wod-meta b {
  padding: 4px 8px;
  border: 1px solid #2d6d9d;
  border-radius: 999px;
  color: #bfe4ff;
  background: rgba(21, 151, 255, .12);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.commerce-wod-scaling {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(107, 143, 180, .28);
  color: #b8c9da;
  font-size: .78rem;
  line-height: 1.45;
  white-space: pre-line;
}

.commerce-wod-movements {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.commerce-wod-movements li {
  display: grid;
  grid-template-columns: minmax(85px, auto) minmax(140px, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(70, 110, 149, .4);
  border-radius: 9px;
  background: rgba(4, 12, 22, .34);
}

.commerce-wod-movements li > strong { color: #23a7ff; }
.commerce-wod-movements li > small { color: var(--muted); }

.commerce-wod-scaling b {
  color: #25a7ff;
  font-size: .62rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.member-daily-program section {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.commerce-whiteboard-view {
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0, rgba(21, 151, 255, .18), transparent 38%),
    #060c15;
}

.commerce-whiteboard-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 18px 28px;
  border-bottom: 1px solid #263b52;
  background: rgba(7, 14, 24, .9);
}

.commerce-whiteboard-header > div {
  display: grid;
  gap: 2px;
}

.commerce-whiteboard-header > div span,
.commerce-whiteboard-header time {
  color: var(--muted);
}

.commerce-whiteboard-main {
  width: min(1500px, calc(100vw - 48px));
  margin: 0 auto;
  padding: clamp(28px, 5vh, 64px) 0;
}

.commerce-whiteboard-title h1 {
  max-width: 1100px;
  margin: 4px 0 8px;
  font-size: clamp(2.7rem, 6vw, 6rem);
  line-height: .98;
}

.commerce-whiteboard-title > p:not(.eyebrow) {
  max-width: 900px;
  color: #b8c9da;
  font-size: clamp(1rem, 2vw, 1.55rem);
}

.commerce-whiteboard-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(24px, 4vh, 48px);
}

.commerce-whiteboard-blocks article {
  min-height: 180px;
  padding: clamp(18px, 2vw, 30px);
  border: 1px solid #2b4562;
  border-radius: 18px;
  background: linear-gradient(145deg, #132238, #0c1726);
}

.commerce-whiteboard-blocks article.is-wod {
  grid-column: span 2;
  border-color: #1597ff;
  background: linear-gradient(145deg, #123352, #0d1d30);
}

.commerce-whiteboard-blocks article > span {
  color: #25a7ff;
  font-size: clamp(.72rem, 1.2vw, 1rem);
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.commerce-whiteboard-blocks article > p {
  margin: 14px 0 0;
  color: #f4f7fb;
  font-size: clamp(1.1rem, 2.1vw, 2rem);
  font-weight: 760;
  line-height: 1.35;
  white-space: pre-line;
}

.commerce-whiteboard-blocks .commerce-wod-meta b {
  font-size: clamp(.68rem, 1vw, .9rem);
}

.commerce-whiteboard-blocks .commerce-wod-scaling {
  font-size: clamp(.9rem, 1.25vw, 1.15rem);
}

@media (max-width: 760px) {
  .commerce-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) {
    grid-template-columns: 1fr;
  }

  .commerce-record-dialog .commerce-contract-actions,
  .commerce-record-dialog > .commerce-row-popover:has(.commerce-contract-actions) > form:not(.commerce-contract-actions) {
    grid-column: 1;
  }

  .commerce-record-dialog .commerce-contract-actions { flex-wrap: wrap; }

  .commerce-source-dialog,
  .commerce-record-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .commerce-programming-board {
    margin-inline: -3px;
    padding-inline: 10px;
  }

  .commerce-programming-week {
    grid-template-columns: repeat(7, 170px);
    min-height: 400px;
  }

  .commerce-program-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .commerce-program-block-grid {
    grid-template-columns: 1fr;
  }

  .commerce-wod-settings {
    grid-template-columns: 1fr;
  }

  .commerce-schedule-header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .commerce-activity-search {
    flex-basis: 100%;
    width: 100%;
    margin-inline: 0;
  }

  .commerce-whiteboard-header {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .commerce-whiteboard-header > div {
    display: none;
  }

  .commerce-whiteboard-main {
    width: calc(100vw - 28px);
  }

  .commerce-whiteboard-blocks {
    grid-template-columns: 1fr;
  }

  .commerce-whiteboard-blocks article.is-wod {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .commerce-view .commerce-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.member-portal-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #091422;
}

/* Unified club theming: platform admin stays PACK71 blue; club and coach workspaces inherit the box. */
body.has-active-club.athlete-mode:not(.admin-view),
body.has-active-club.commerce-view,
body.has-active-club.club-operations-view {
  --blue: var(--club-original-accent, var(--club-accent));
  --blue-strong: var(--club-original-accent, var(--club-accent));
}

body.has-active-club:is(.coach-mode, .coach-view, .coach-athlete-view, .coach-review-page) {
  --blue: var(--coach-accent, var(--club-accent));
  --blue-strong: var(--coach-accent, var(--club-accent));
}

body.has-active-club.coach-mode .sidebar-nav a.is-active {
  border-color: color-mix(in srgb, var(--coach-accent, var(--club-accent)) 32%, transparent);
  background: color-mix(in srgb, var(--coach-accent, var(--club-accent)) 10%, transparent);
  box-shadow: inset 3px 0 var(--coach-accent, var(--club-accent));
}

body.has-active-club:not(.admin-view) :is(.eyebrow, .compact-hero strong, .dashboard-hero strong),
body.has-active-club:is(.commerce-view, .club-operations-view) .eyebrow {
  color: var(--blue);
}

body.has-active-club:not(.admin-view) :is(.button.primary, button.primary) {
  border-color: color-mix(in srgb, var(--blue) 72%, #fff 8%);
  background: var(--blue);
}

/* Planning keeps its header calm; operational controls live in the fixed action rail. */
.commerce-page-actions-source { display: none !important; }
.commerce-action-list .commerce-page-action {
  width: 100%;
  min-width: 0;
}
.commerce-action-list form.commerce-page-action { display: grid; gap: 6px; }
.commerce-action-list .commerce-page-action :is(.button, button) { width: 100%; justify-content: flex-start; }
.commerce-action-list details.commerce-page-action { position: relative; }
.commerce-action-list details.commerce-page-action > summary { width: 100%; justify-content: flex-start; }
.commerce-action-list details.commerce-page-action[open] {
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--management-accent) 38%, var(--line));
  border-radius: 11px;
  background: #101b2b;
}
.commerce-schedule-board > header {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: stretch;
}

body.has-active-club.athlete-mode .sidebar-nav a.is-active {
  border-color: color-mix(in srgb, var(--club-original-accent, var(--club-accent)) 38%, transparent);
  background: color-mix(in srgb, var(--club-original-accent, var(--club-accent)) 12%, transparent);
  box-shadow: inset 3px 0 var(--club-original-accent, var(--club-accent));
}
.commerce-schedule-board > header .commerce-schedule-header-actions { justify-self: end; }
.commerce-schedule-board > header .commerce-planning-tabs { min-width: 250px; }
.commerce-schedule-header-actions { gap: 0; }
.commerce-schedule-header-actions .commerce-planning-tabs { border-radius: 11px 0 0 11px; }
.commerce-schedule-header-actions .commerce-plan-mode-exit { min-height: 46px; border-left: 0; border-radius: 0 11px 11px 0; }
.commerce-clear-week-form { order: 99; }

/* Booking triage: scan first, open details only when needed. */
.commerce-booking-overview,
.commerce-cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.commerce-booking-overview article,
.commerce-cost-summary article {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 15, 27, .58);
}
.commerce-booking-overview small,
.commerce-cost-summary small { color: var(--muted); font-size: .68rem; font-weight: 820; text-transform: uppercase; }
.commerce-booking-overview strong,
.commerce-cost-summary strong { color: var(--management-accent, var(--blue)); font-size: 1.2rem; }
.commerce-booking-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.commerce-booking-toolbar > label { flex: 1 1 260px; max-width: 430px; }
.commerce-booking-toolbar input { min-height: 38px; }
.commerce-booking-toolbar > div { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #0b1523; }
.commerce-booking-toolbar button { min-height: 30px; padding: 4px 10px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: .68rem; font-weight: 850; cursor: pointer; }
.commerce-booking-toolbar button:is(:hover, .is-active) { color: #fff; background: color-mix(in srgb, var(--management-accent) 20%, #122136); }
.commerce-schedule-card[data-booking-card] { align-content: start; padding: 12px; }
.commerce-booking-participants { border-top: 1px solid var(--line); }
.commerce-booking-participants > summary { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; color: var(--muted); cursor: pointer; list-style: none; font-size: .7rem; }
.commerce-booking-participants > summary::-webkit-details-marker { display: none; }
.commerce-booking-participants > summary b { color: var(--management-accent, var(--blue)); }
.commerce-booking-empty { padding: 7px 0; border: 0; text-align: left; }

/* Financial views: one compact period bar, one data grid, no duplicated controls. */
.commerce-report-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 7px; }
.commerce-domain-hero { align-items: center; padding-block: 2px 12px; }
.commerce-domain-hero > div { display: grid; gap: 3px; }
.commerce-domain-hero .eyebrow { color: var(--management-accent, var(--blue)); font-size: .86rem; }
.commerce-domain-hero > div > p:last-child { display: block; }
.commerce-financial-dashboard > header,
.commerce-costs-page > header,
.commerce-report-page > header { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: start; }
.commerce-report-toolbar { display: grid; grid-template-columns: 132px 142px 142px auto auto; }
.commerce-report-toolbar label { display: grid; gap: 3px; }
.commerce-report-toolbar label > span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.commerce-report-toolbar :is(input, select) { min-height: 36px; padding-block: 5px; }
.commerce-report-preset select { min-width: 132px; }
.commerce-report-toolbar input[type="date"] { width: 142px; }
.commerce-financial-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.commerce-financial-hero article { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(140deg, color-mix(in srgb, var(--management-accent) 12%, #111f32), #101b2b); }
.commerce-financial-hero small { color: var(--muted); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.commerce-financial-hero strong { font-size: clamp(1.55rem, 2.3vw, 2.2rem); }
.commerce-financial-hero strong.is-positive { color: #67dda0; }
.commerce-financial-hero strong.is-negative { color: #ff8790; }
.commerce-financial-hero span { color: var(--muted); font-size: .75rem; }
.commerce-cost-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commerce-cost-grid { display: grid; margin-inline: 2px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.commerce-cost-row { display: grid; grid-template-columns: minmax(150px, 1.45fr) minmax(90px, .9fr) 70px 78px 112px 90px 142px; min-width: 830px; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.commerce-cost-row:first-child { border-top: 0; }
.commerce-cost-row.is-header { color: var(--muted); background: #0a1421; font-size: .64rem; font-weight: 850; text-transform: uppercase; }
.commerce-cost-row > span { display: grid; min-width: 0; gap: 2px; font-size: .75rem; }
.commerce-cost-row small { color: var(--muted); font-size: .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commerce-cost-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.commerce-cost-actions form { margin: 0; }
.commerce-cost-actions .icon-button { border: 1px solid color-mix(in srgb, #ff6675 42%, var(--line)); background: color-mix(in srgb, #ff6675 10%, #0b1523); }
[data-cost-edit-dialog] .commerce-modal-panel { display: block; }
.commerce-invoice-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.commerce-invoice-actions .commerce-row-editor { order: 3; }

/* Platform-only cockpit stays blue and deliberately denser than club operations. */
body.admin-view:not(.commerce-view):not(.club-operations-view) .admin-metric-grid article { gap: 2px; min-height: 0; padding: 13px 16px; border-radius: 13px; }
body.admin-view:not(.commerce-view):not(.club-operations-view) .admin-metric-grid strong { font-size: 1.65rem; }

/* Messages are a viewport workspace: only the inbox and conversation panes scroll. */
body.messages-view { height: 100dvh; overflow: hidden; }
body.messages-view :is(.app-frame, .app-content) { height: 100dvh; min-height: 0; overflow: hidden; }
body.messages-view .site-footer { display: none; }
body.messages-view .app-content > .shell {
  display: grid;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: var(--workspace-page-top) var(--workspace-page-gutter) 14px !important;
  overflow: hidden;
}
body.messages-view .messages-hero { min-height: 0; margin: 0; }
body.messages-view .messages-layout { min-height: 0; height: 100%; gap: 12px; overflow: hidden; }
body.messages-view :is(.conversation-inbox, .chat-thread, .chat-placeholder) { height: 100%; min-height: 0; }
body.messages-view .conversation-inbox { display: grid; grid-template-rows: auto minmax(0, 1fr); }
body.messages-view .conversation-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
body.messages-view .chat-thread { grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: none; overflow: hidden; }
body.messages-view .chat-message-list { min-height: 0; overflow-y: auto; }
body.messages-view .chat-composer { position: relative; inset: auto; flex: none; margin: 0; }
body.messages-view .chat-actions { width: 2.5rem; justify-self: start; }
body.messages-view .chat-actions > div { right: auto; left: 0; }

@media (max-width: 1100px) {
  .commerce-schedule-board > header { grid-template-columns: 1fr; align-items: stretch; }
  .commerce-schedule-board > header .commerce-schedule-header-actions { justify-self: stretch; }
  .commerce-booking-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-booking-toolbar { align-items: stretch; flex-direction: column; }
  .commerce-booking-toolbar > label { flex-basis: auto; max-width: none; }
  .commerce-financial-dashboard > header,
  .commerce-costs-page > header,
  .commerce-report-page > header { grid-template-columns: 1fr; }
  .commerce-report-toolbar { display: flex; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .commerce-financial-hero,
  .commerce-cost-summary { grid-template-columns: 1fr; }
  .commerce-platform-grid .commerce-metrics-grid { grid-template-columns: 1fr; }
  body.messages-view .app-content > .shell { display: block; padding: 0 !important; }
  body.messages-view .messages-layout { height: 100%; }
}

.member-mobile-credit { display: none; }

.member-schedule-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.member-portal-tabs a {
  flex: 1 0 auto;
  padding: 8px 12px;
  border-radius: 8px;
  color: #a9bfd4;
  font-size: .76rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.member-portal-tabs a:hover,
.member-portal-tabs a.is-active {
  color: #fff;
  background: rgba(21, 151, 255, .13);
}

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

.member-schedule-page {
  margin-top: 10px;
}

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

.member-class-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c1726;
}

.member-class-card.is-booked {
  border-color: rgba(82, 221, 162, .46);
  box-shadow: inset 0 0 0 1px rgba(82, 221, 162, .08);
}

.member-class-date {
  display: grid;
  align-self: stretch;
  align-content: center;
  justify-items: center;
  min-height: 82px;
  padding: 7px 4px;
  border: 1px solid rgba(143, 209, 255, .16);
  border-radius: 11px;
  color: #fff;
  background: #14253a;
  text-decoration: none;
}

.member-class-date span,
.member-class-date small {
  color: #8fd1ff;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}

.member-class-date strong {
  margin: 3px 0;
  font-size: 1.7rem;
  line-height: 1;
}

.member-class-summary {
  min-width: 0;
}

.member-class-time {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #8fd1ff;
  line-height: 1;
}

.member-class-time strong {
  font-size: 1.15rem;
}

.member-class-time span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.member-class-summary h3 {
  overflow: hidden;
  margin: 6px 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.member-class-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  color: #a9bfd4;
  background: rgba(169, 191, 212, .09);
  font-size: .62rem;
  font-weight: 800;
}

.member-class-action {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.member-class-action form {
  margin: 0;
}

.member-class-action .button {
  min-height: 34px;
  padding: 7px 10px;
}

.member-booking-opens {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.member-booking-opens strong {
  color: #8fd1ff;
  white-space: nowrap;
}

.member-class-card .member-daily-program {
  grid-column: 1 / -1;
  width: 100%;
}

.member-shop {
  margin-top: 12px;
}

.member-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.member-product-grid > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0c1726;
}

.member-product-grid > article > div {
  display: grid;
}

.member-product-grid small {
  color: var(--muted);
  font-size: .68rem;
}

.member-product-grid form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 64px 1fr;
  gap: 7px;
}

.member-product-grid input {
  min-height: 36px;
  padding: 6px 8px;
}

@media (max-width: 1260px) {
  .member-class-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .member-contract-grid,
  .commerce-booking-grid {
    grid-template-columns: 1fr;
  }
}

.commerce-contract-addons {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.commerce-contract-addons > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(21, 151, 255, .05);
}

.commerce-contract-addons form {
  display: flex;
  gap: 6px;
}

.commerce-addon-editor {
  margin-top: 8px;
}

.commerce-addon-editor > summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.commerce-addon-editor form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 560px) {
  .commerce-view:has(.member-schedule-page) .admin-hero,
  .commerce-view:has(.member-schedule-page) .member-portal-tabs,
  .commerce-view:has(.member-schedule-page) .commerce-metrics { display: none; }
  .commerce-view:has(.member-schedule-page) .shell { padding-top: .65rem; }
  .member-mobile-credit {
    display: flex;
    width: max-content;
    min-height: 2.15rem;
    align-items: center;
    gap: .45rem;
    margin: 0 0 0 auto;
    padding: .35rem .65rem;
    border: 1px solid rgba(21, 151, 255, .38);
    border-radius: 999px;
    color: #9bd4ff;
    background: rgba(21, 151, 255, .09);
    font-size: .66rem;
    font-weight: 850;
  }
  .member-mobile-credit strong { color: #fff; font-size: .95rem; }
  .member-schedule-page,
  .member-schedule-page .admin-section { margin-top: 0; }
  .member-schedule-page .admin-section { padding: .8rem; }
  .member-schedule-page .admin-section > header,
  .member-schedule-page .admin-section > header > div,
  .member-schedule-title-row { width: 100%; min-width: 0; }
  .member-schedule-page .admin-section > header { margin-bottom: .55rem; }
  .member-schedule-page .admin-section > header .eyebrow,
  .member-schedule-page .admin-section > header p:not(.eyebrow) { display: none; }
  .member-schedule-page .admin-section > header h2 { margin: 0; font-size: 1.45rem; }
  .member-class-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px;
  }

  .member-class-date {
    min-height: 76px;
  }

  .member-class-action {
    grid-column: 3;
    grid-row: 1;
    justify-content: end;
    justify-items: end;
  }
  .member-class-action .button { min-width: 4.25rem; min-height: 3rem; }
  .member-class-summary h3 { margin-block: .25rem .35rem; }
  .member-class-card .member-daily-program { grid-column: 1 / -1; }
}

.commerce-contract-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.commerce-contract-upload > div {
  display: grid;
}

.commerce-contract-upload small {
  color: var(--muted);
}

.commerce-contract-upload label {
  cursor: pointer;
}

.commerce-contract-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.enrollment-contract-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(21, 151, 255, .48);
  border-radius: 12px;
  color: var(--text);
  background: rgba(21, 151, 255, .09);
  text-decoration: none;
}

.enrollment-contract-link > span {
  padding: 7px;
  border-radius: 7px;
  color: #fff;
  background: #e04555;
  font-size: .68rem;
  font-weight: 950;
}

.enrollment-contract-link > div {
  display: grid;
}

.enrollment-contract-link small {
  color: var(--muted);
  font-size: .7rem;
}

.enrollment-contract-link > b {
  color: var(--blue);
  font-size: .72rem;
}

/* Compact log-first history: twenty useful rows before any secondary detail. */
.logbook-page .shell {
  width: 100%;
  max-width: none;
}

.logbook-page .logbook-heading {
  align-items: center;
  margin-bottom: .55rem;
}

.logbook-page .logbook-heading > div:first-child {
  display: grid;
  gap: .2rem;
}

.logbook-page .logbook-heading .eyebrow,
.logbook-page .logbook-heading p {
  margin: 0;
}

.logbook-page .logbook-heading h1 {
  margin: .1rem 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.logbook-page .logbook-heading p:not(.eyebrow) {
  font-size: .8rem;
  line-height: 1.4;
}

.logbook-loose-wod {
  color: #9bcfff;
  border-style: dashed;
  background: rgba(21, 151, 255, .05);
}

.logbook-page .logbook-scope-tabs {
  max-width: 660px;
  gap: .3rem;
  margin-top: .65rem;
  padding: .28rem;
  border-radius: 12px;
}

.logbook-page .logbook-scope-tabs a {
  min-height: 44px;
  gap: .45rem;
  padding: .4rem .55rem;
  border-radius: 9px;
}

.logbook-page .logbook-scope-tabs a > span:first-child {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 7px;
  font-size: .72rem;
}

.logbook-page .logbook-section {
  margin-top: 1rem;
}

.logbook-history .section-heading {
  margin-bottom: .55rem;
}

.logbook-history .section-heading h2 {
  font-size: 1.45rem;
}

.logbook-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .45rem;
  margin-bottom: .65rem;
}

.logbook-search label {
  min-width: 0;
}

.logbook-search input {
  width: 100%;
  min-height: 38px;
  padding: .55rem .75rem;
}

.training-log-grid.is-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}

.training-log-grid.is-compact .training-log-card {
  display: grid;
  min-height: 0;
  grid-template-columns: 108px minmax(0, 1fr) minmax(135px, auto) minmax(150px, auto);
  align-items: center;
  overflow: visible;
  border-top: 1px solid var(--line) !important;
  border-left: 3px solid var(--accent) !important;
  border-radius: 12px;
}

.training-log-grid.is-compact .training-log-card:hover {
  transform: none;
}

.training-log-grid.is-compact .training-log-card-header {
  display: grid;
  grid-column: 1;
  gap: .35rem;
  padding: .65rem .45rem .65rem .7rem;
}

.training-log-grid.is-compact .workout-card-date {
  display: flex;
  width: auto;
  min-width: 0;
  height: 36px;
  gap: .1rem;
  padding: .35rem .5rem;
  border-radius: 8px;
}

.training-log-grid.is-compact .workout-card-date strong {
  font-size: .9rem;
}

.training-log-grid.is-compact .workout-card-date span {
  margin: 0;
  font-size: .62rem;
}

.training-log-grid.is-compact .date-separator {
  font-style: normal;
}

.training-log-grid.is-compact .training-log-badges {
  justify-content: flex-start;
  gap: .25rem;
}

.training-log-grid.is-compact .source-pill,
.training-log-grid.is-compact .status-pill {
  min-height: 1.3rem;
  padding: .12rem .38rem;
  font-size: .52rem;
}

.training-log-grid.is-compact .training-log-card-body {
  grid-column: 2;
  padding: .65rem .75rem;
}

.training-log-grid.is-compact .training-log-card-body h3 {
  margin: .12rem 0 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: .95rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.training-log-grid.is-compact .workout-card-kicker {
  display: block;
  overflow: hidden;
  font-size: .57rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-log-grid.is-compact .training-log-workout,
.training-log-grid.is-compact .training-log-note {
  display: none;
}

.training-log-grid.is-compact .training-log-result {
  grid-column: 3;
  min-width: 0;
  margin: .45rem;
  overflow: hidden;
  padding: .5rem .65rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.training-log-grid.is-compact .training-log-result span,
.training-log-grid.is-compact .training-log-result small {
  font-size: .52rem;
}

.training-log-grid.is-compact .training-log-result strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1rem;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.training-log-grid.is-compact .training-log-card-footer {
  grid-column: 4;
  margin: 0;
  padding: .55rem .7rem;
}

.training-log-grid.is-compact .log-social-action {
  min-height: 1.75rem;
  padding: .2rem .4rem;
  font-size: .64rem;
}

.training-log-grid.is-compact .training-log-meta {
  font-size: .62rem;
}

.training-log-grid.is-compact .training-log-open {
  white-space: nowrap;
}

.training-log-grid.is-compact .log-comment-form {
  grid-column: 1 / -1;
}

.logbook-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .85rem;
}

.logbook-load-more small,
.logbook-result-count {
  color: var(--muted);
  font-size: .68rem;
}

.logbook-result-count {
  margin: .65rem 0 0;
  text-align: right;
}

@media (max-width: 720px) {
  .logbook-page .shell {
    padding-top: .7rem;
  }

  .logbook-page .logbook-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
  }

  .logbook-page .logbook-heading .eyebrow,
  .logbook-page .logbook-heading p:not(.eyebrow) {
    display: none;
  }

  .logbook-page .logbook-heading h1 {
    font-size: 1.65rem;
  }

  .logbook-heading-actions {
    gap: .3rem;
  }

  .logbook-heading-actions .button {
    min-height: 34px;
    padding: .4rem .55rem;
    font-size: .65rem;
  }

  .logbook-page .logbook-scope-tabs {
    margin-top: .25rem;
  }

  .logbook-page .logbook-scope-tabs a {
    min-height: 38px;
    padding: .35rem .25rem;
  }

  .logbook-page .logbook-scope-tabs a > span:first-child,
  .logbook-page .logbook-scope-tabs small {
    display: none;
  }

  .logbook-page .logbook-scope-tabs strong {
    font-size: .68rem;
  }

  .logbook-history .section-heading {
    display: none;
  }

  .logbook-search {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: .55rem;
  }

  .logbook-search .button { min-height: 38px; }
  .logbook-social-feed .logbook-social-heading { display: none; }

  .logbook-search a {
    display: none;
  }

  .training-log-grid.is-compact .training-log-card {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    min-height: 86px;
  }

  .training-log-grid.is-compact .training-log-card-header {
    grid-row: 1 / 3;
    gap: .2rem;
    padding: .45rem .3rem .45rem .5rem;
  }

  .training-log-grid.is-compact .workout-card-date {
    display: grid;
    width: 52px;
    height: 42px;
    gap: 0;
    padding: .28rem;
  }

  .training-log-grid.is-compact .workout-card-date strong {
    font-size: .82rem;
  }

  .training-log-grid.is-compact .workout-card-date span {
    font-size: .5rem;
  }

  .training-log-grid.is-compact .date-separator {
    display: none;
  }

  .training-log-grid.is-compact .training-log-badges {
    display: none;
  }

  .training-log-grid.is-compact .training-log-card-body {
    grid-row: 1;
    min-width: 0;
    padding: .55rem .35rem .2rem;
  }

  .training-log-grid.is-compact .training-log-card-body h3 {
    font-size: .82rem;
    line-height: 1.25;
  }

  .training-log-grid.is-compact .training-log-result {
    grid-column: 3;
    grid-row: 1;
    max-width: min(38vw, 9.5rem);
    margin: .35rem .35rem .15rem 0;
    padding: .3rem .45rem;
  }

  .training-log-grid.is-compact .training-log-result > span,
  .training-log-grid.is-compact .training-log-result > small {
    display: none;
  }

  .training-log-grid.is-compact .training-log-result strong {
    font-size: .78rem;
    line-height: 1.25;
  }

  .training-log-grid.is-compact .training-log-card-footer {
    position: static;
    grid-row: 2;
    grid-column: 2 / 4;
    min-width: 0;
    margin: 0;
    padding: 0 .35rem .4rem;
    pointer-events: auto;
  }

  .training-log-grid.is-compact .training-log-meta {
    display: flex;
    gap: .15rem;
    overflow: hidden;
  }

  .training-log-grid.is-compact .training-log-open {
    width: 1.7rem;
    height: 1.7rem;
    justify-content: center;
    color: var(--blue);
    pointer-events: auto;
  }

  .training-log-grid.is-compact .training-log-open {
    font-size: 0;
  }

  .training-log-grid.is-compact .training-log-open span {
    position: static;
    font-size: .7rem;
  }

  .logbook-load-more {
    display: grid;
    justify-items: center;
  }
}

/* Log detail R4: result first, performed work second, explanation on demand. */
.training-log-detail-page .shell {
  width: min(100%, 1040px);
}

.training-log-detail-page .log-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  margin-bottom: 1rem;
}

.log-detail-back {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  color: #bcd0e4;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(13, 24, 39, .72);
  font-size: 1.2rem;
  text-decoration: none;
}

.training-log-detail-page .log-detail-hero h1 {
  margin: .15rem 0 .25rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.training-log-detail-page .log-detail-hero .lead {
  margin: 0;
  font-size: .85rem;
}

.training-log-detail-page .log-detail-summary {
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  padding: .85rem;
}

.training-log-detail-page .log-detail-summary > div:first-child {
  padding: .85rem;
}

.training-log-detail-page .log-detail-summary dl > div {
  padding: .65rem .7rem;
}

.training-log-detail-page .log-detail-section {
  gap: .75rem;
  padding: 1rem;
}

.training-log-detail-page .log-detail-section h2 {
  font-size: 1.55rem;
}

.log-detail-info,
.log-movement-info {
  position: relative;
}

.log-detail-info > summary,
.log-movement-info > summary {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #9bcfff;
  border: 1px solid rgba(21, 151, 255, .42);
  border-radius: 50%;
  background: rgba(21, 151, 255, .08);
  font-family: Georgia, serif;
  font-size: .85rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.log-detail-info > summary::-webkit-details-marker,
.log-movement-info > summary::-webkit-details-marker {
  display: none;
}

.log-detail-info[open] > summary,
.log-movement-info[open] > summary {
  color: #fff;
  background: rgba(21, 151, 255, .22);
}

.log-detail-info > div,
.log-movement-info > p {
  position: absolute;
  z-index: 5;
  top: calc(100% + .45rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  margin: 0;
  padding: .8rem;
  color: #c2d0df;
  border: 1px solid #31445d;
  border-radius: .75rem;
  background: #0d1827;
  box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .38);
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-line;
}

.log-detail-info > div {
  display: grid;
  gap: .35rem;
}

.log-detail-info > div p {
  margin: 0;
}

.training-log-detail-page .log-detail-movements li {
  grid-template-columns: 2.7rem minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.training-log-detail-page .log-detail-movements li div {
  min-width: 0;
}

.training-log-detail-page .log-detail-movements li strong,
.training-log-detail-page .log-detail-movements li small {
  overflow-wrap: anywhere;
}

.log-detail-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.log-detail-community .log-detail-comments {
  gap: .25rem;
}

.log-detail-community .log-detail-comments article {
  padding: .65rem .25rem;
}

.log-detail-comment-form {
  margin: 0;
}

.log-detail-share-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border: 1px dashed var(--line);
  border-radius: .75rem;
}

.log-detail-share-prompt p {
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 720px) {
  .training-log-detail-page .shell {
    padding-top: .7rem;
  }

  .training-log-detail-page .log-detail-hero {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: .6rem;
    margin-bottom: .75rem;
  }

  .log-detail-back {
    width: 2.4rem;
    height: 2.4rem;
  }

  .training-log-detail-page .log-detail-hero h1 {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
    line-height: 1.06;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .training-log-detail-page .log-detail-hero .eyebrow {
    font-size: .6rem;
  }

  .training-log-detail-page .log-detail-hero .lead {
    font-size: .72rem;
  }

  .training-log-detail-page .log-detail-stack {
    gap: .65rem;
  }

  .training-log-detail-page .log-detail-summary {
    grid-template-columns: 1fr;
    gap: .55rem;
    padding: .7rem;
  }

  .training-log-detail-page .log-detail-summary > div:first-child {
    padding: .75rem;
  }

  .training-log-detail-page .log-detail-summary > div:first-child > strong {
    font-size: 1.65rem;
    overflow-wrap: anywhere;
  }

  .training-log-detail-page .log-detail-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
  }

  .training-log-detail-page .log-detail-summary dl > div {
    min-width: 0;
    padding: .55rem;
  }

  .training-log-detail-page .log-detail-summary dd {
    overflow-wrap: anywhere;
    font-size: .83rem;
  }

  .training-log-detail-page .log-detail-section {
    padding: .85rem;
  }

  .training-log-detail-page .log-detail-section > header {
    flex-direction: row;
    align-items: center;
  }

  .training-log-detail-page .log-detail-section h2 {
    font-size: 1.3rem;
  }

  .training-log-detail-page .log-detail-movements li {
    grid-template-columns: 2.35rem minmax(0, 1fr) auto;
    gap: .6rem;
    padding: .65rem;
  }

  .training-log-detail-page .log-detail-movements li > span {
    min-height: 2.35rem;
  }

  .log-detail-info > div,
  .log-movement-info > p {
    position: fixed;
    z-index: 110;
    top: auto;
    right: 1rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    left: 1rem;
    width: auto;
    max-height: 45dvh;
    overflow-y: auto;
  }

  .log-detail-community > header {
    display: grid;
    gap: .55rem;
  }

  .log-detail-social-actions {
    width: 100%;
  }

  .log-detail-social-actions .log-social-action {
    flex: 1;
    justify-content: center;
    border-color: var(--line);
  }

  .log-detail-share-prompt,
  .log-detail-footer {
    display: grid;
  }

  .log-detail-share-prompt .button {
    width: 100%;
  }
}
/* Mobile support rounds: private screenshots, editable notes and PDF handoff. */
.support-feedback-page .shell { width: min(100%, 980px); }
.support-feedback-heading { align-items: end; }
.support-create-button { width: 2.65rem; min-width: 2.65rem; padding-inline: 0; font-size: 1.2rem; }
.support-report-grid,
.support-item-list { display: grid; gap: .75rem; }
.support-report-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .35rem .8rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
}
.support-report-card strong,
.support-report-card small { grid-column: 1; }
.support-report-card small { color: var(--muted); }
.support-report-card > b { grid-column: 2; grid-row: 1 / 3; color: var(--blue); }
.support-editor { overflow: hidden; padding: 0; }
.support-editor > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.support-editor > header h2 { margin: .1rem 0 0; }
.support-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}
.support-icon-action {
  display: grid;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
}
.support-icon-action svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.support-editor-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, auto);
  gap: .65rem;
  padding: 1rem 1rem 0;
}
.support-editor-controls input,
.support-editor-controls select { width: 100%; }
.support-share-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  margin: .75rem 1rem 0;
}
.support-share-result[hidden] { display: none; }
.support-share-result input { width: 100%; }
.support-photo-picker {
  display: grid;
  margin: 1rem;
  padding: 1rem;
  place-items: center;
  border: 1px dashed rgba(21, 151, 255, .48);
  border-radius: .85rem;
  color: #9bd4ff;
  background: rgba(21, 151, 255, .06);
  cursor: pointer;
}
.support-photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.support-photo-picker span { font-weight: 900; }
.support-photo-picker small { margin-top: .25rem; color: var(--muted); }
.support-editor > .save-state { padding: 0 1rem; }
.support-item-list { padding: 0 1rem 1rem; }
.support-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(14rem, .8fr) minmax(0, 1.2fr);
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: #0b1624;
}
.support-item-number {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}
.support-item img {
  width: 100%;
  max-height: 28rem;
  object-fit: contain;
  border-radius: .65rem;
  background: #050a12;
}
.support-item label,
.support-item textarea { min-width: 0; width: 100%; height: 100%; }
.support-item textarea { min-height: 10rem; resize: vertical; }
.support-item .button { grid-column: 2; justify-self: end; }
.support-editor > footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(9, 20, 34, .97);
}
.support-empty { min-height: 10rem; place-content: center; text-align: center; }

@media (max-width: 720px) {
  .support-feedback-page .shell { padding: .75rem .7rem 1rem; }
  .support-feedback-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    margin-bottom: .75rem;
  }
  .support-feedback-heading .eyebrow,
  .support-feedback-heading p:not(.eyebrow) { display: none; }
  .support-feedback-heading h1 { margin: 0; font-size: 1.6rem; }
  .support-feedback-heading .button { min-height: 2.5rem; padding: .55rem .7rem; font-size: .72rem; }
  .support-feedback-heading .support-create-button { padding: 0; font-size: 1.15rem; }
  .support-editor > header {
    position: sticky;
    z-index: 3;
    top: 0;
    padding: .7rem;
    background: #0b1624;
  }
  .support-editor > header .eyebrow { display: none; }
  .support-editor > header h2 {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .support-editor > header .button { padding: .5rem; font-size: .64rem; }
  .support-editor > header .support-icon-action { padding: 0; }
  .support-editor-actions { flex-wrap: nowrap; }
  .support-share-result { grid-template-columns: 1fr; margin: .75rem .75rem 0; }
  .support-editor-controls,
  .support-item { grid-template-columns: 1fr; }
  .support-photo-picker { margin: .75rem; }
  .support-item-list { padding: 0 .75rem .75rem; }
  .support-item { gap: .6rem; padding: .6rem; }
  .support-item img { max-height: 55dvh; }
  .support-item textarea { min-height: 7rem; }
  .support-item .button { grid-column: 1; }
  .support-editor > footer .button { width: 100%; }
}

/* Feedback R4: compact WOD scoring, full workout overlay and one-scroll quick log. */
.wod-info-button {
  position: static;
  z-index: 4;
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  place-items: center;
  border: 1px solid #3b6388;
  border-radius: 999px;
  color: #b9dcf8;
  background: #172438;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.wod-runner-tools {
  display: flex;
  max-width: 64%;
  align-items: flex-start;
  justify-content: flex-end;
  gap: .6rem;
}

.wod-runner-tools .wod-prescription-meta {
  justify-content: flex-end;
  margin-top: 0;
}
.wod-info-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(48rem, calc(100dvh - 2rem));
  padding: 0;
  overflow: hidden;
}
.wod-info-dialog > .dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.wod-info-dialog > .dialog-header h2 { margin: .1rem 0 0; }
.wod-info-dialog-body {
  display: grid;
  gap: 1rem;
  max-height: calc(100dvh - 8rem);
  padding: 1rem;
  overflow-y: auto;
}
.wod-info-dialog-body .coach-note { margin: 0; }
.wod-adaptation {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.wod-adaptation summary {
  padding: .7rem .8rem;
  color: #b9dcf8;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}
.wod-adaptation label { display: block; padding: 0 .8rem .8rem; }
.wod-adaptation textarea { width: 100%; min-height: 4.5rem; }
.quick-log-dialog { max-height: min(48rem, calc(100dvh - 2rem)); overflow: hidden; padding: 0; }
.quick-log-dialog > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0;
  max-height: min(48rem, calc(100dvh - 2rem));
  overflow: hidden;
}
.quick-log-dialog .dialog-header { padding: 1rem; border-bottom: 1px solid var(--line); }
.quick-log-scroll { display: grid; gap: .85rem; padding: 1rem; overflow-y: auto; }
.quick-log-dialog > .form-status,
.quick-log-dialog form > .form-status { margin: 0; padding: 0 1rem; }
.quick-log-dialog > form > .dialog-actions {
  padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.log-detail-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.log-detail-footer .button { width: 100%; }

@media (max-width: 720px) {
  .session-page .wod-runner-head { padding-right: 0; }
  .wod-runner-tools {
    width: 100%;
    max-width: none;
    align-items: center;
    justify-content: space-between;
  }
  .wod-runner-tools .wod-prescription-meta { justify-content: flex-start; }
  .wod-info-button { width: 2rem; height: 2rem; }
  .wod-info-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .wod-info-dialog-body { max-height: calc(100dvh - 4.8rem); padding-bottom: 5rem; }
  .session-page #wod-result-form .wod-score-fields { grid-template-columns: minmax(0, 1fr); }
  .session-page #wod-result-form .wod-adaptation { display: block; }
  .session-page #wod-result-form .wod-adaptation[hidden] { display: none; }
  .session-page #wod-result-form textarea { min-height: 4rem; }
  .session-page .runner-unit-body .wod-result-card {
    height: 100%;
    min-height: 0;
    align-self: stretch;
    padding: .75rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .session-page #wod-result-form .wod-finish-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    padding: .65rem;
  }
  .session-page #wod-result-form .wod-finish-status label {
    min-height: 2.8rem;
    align-items: center;
    padding: .45rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
  }
  .session-page #wod-result-form .wod-result-variant select {
    min-height: 2.7rem;
    padding-block: .45rem;
  }
  .session-page #wod-result-form .wod-result-outcome,
  .session-page #wod-result-form .wod-result-time {
    grid-column: 1 / -1;
  }
  .quick-log-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .quick-log-dialog > form { height: 100dvh; max-height: none; padding: 0; }
  .quick-log-dialog .dialog-header { padding: .75rem; }
  .quick-log-scroll { padding: .75rem; gap: .65rem; }
  .quick-log-explanation { padding: .65rem .75rem; }
  .quick-log-dialog .wod-dictation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-log-dialog .wod-dictation-actions [data-wod-structure] {
    grid-column: 1 / -1;
  }
  .quick-log-dialog textarea[name="workout"] { min-height: 5.25rem; }
  .quick-log-dialog [data-wod-ai-status]:empty { display: none; }
  .quick-log-dialog .quick-log-identity-fields {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    align-items: end;
  }
  .quick-log-dialog .quick-log-identity-fields input { width: 100%; min-width: 0; }
  .quick-log-dialog > form > .dialog-actions { display: grid; }
  .quick-log-dialog > form > .dialog-actions { grid-template-columns: 1fr; width: 100%; }
  .quick-log-dialog > form > .dialog-actions .button { width: 100%; }
  .log-detail-footer { grid-template-columns: 1fr; }
}

html.is-soft-navigating main.shell {
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 120ms ease;
}

html.is-soft-navigating::after {
  content: "";
  position: fixed;
  z-index: 10000;
  inset: 0 auto auto 0;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1597ff, #4eff91, transparent);
  animation: pack71-soft-navigation 780ms ease-in-out infinite;
}

@keyframes pack71-soft-navigation {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}
.club-operations-view .shell{max-width:1600px}.operations-hero{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:.75rem}.operations-hero h1{margin:.12rem 0;font-size:clamp(1.85rem,2.8vw,2.8rem)}.operations-hero>div>p:last-child{font-size:.82rem}.operations-tabs{display:flex;gap:.35rem;padding:.35rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);margin-bottom:.75rem}.operations-tabs a{padding:.62rem .9rem;border-radius:8px;color:var(--muted);font-size:.78rem;font-weight:800;text-decoration:none}.operations-tabs a.is-active{background:var(--blue-deep);color:#fff}.operations-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-bottom:.75rem}.operations-metrics a{display:grid;gap:.2rem;padding:.9rem;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.operations-metrics span,.operations-metrics small{color:var(--muted)}.operations-metrics strong{font-size:1.65rem}.operations-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:.75rem;align-items:start}.operations-panel{border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden}.operations-panel>header{display:flex;justify-content:space-between;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--line)}.operations-panel h2{margin:.12rem 0;font-size:clamp(1.2rem,1.8vw,1.55rem)}.operations-panel>header p:last-child{margin:.2rem 0 0;color:var(--muted);font-size:.76rem}.operations-count{display:grid;place-items:center;min-width:2.4rem;height:2.4rem;border:1px solid var(--blue);border-radius:50%;color:var(--blue)}.lead-list{display:grid}.lead-card{display:grid;grid-template-columns:8.5rem minmax(130px,.7fr) minmax(180px,1fr);align-items:center;gap:.75rem;padding:.9rem 1rem;border-bottom:1px solid var(--line);color:inherit}.lead-card:hover,.lead-card.is-selected{background:rgba(21,151,255,.09)}.lead-card.is-selected{box-shadow:inset 3px 0 var(--blue)}.lead-card>div{display:grid;gap:.18rem}.lead-card small,.lead-next time{color:var(--muted);font-size:.78rem}.lead-status{width:max-content;padding:.25rem .5rem;border-radius:999px;background:#243247;color:#dce8f6;font-size:.7rem;font-weight:900;text-transform:uppercase}.status-new,.status-contact_due{background:#183b57;color:#86d1ff}.status-trial_scheduled,.status-trial_attended{background:#173e32;color:#72e9bd}.status-no_show{background:#57331f;color:#ffbc84}.lead-next time{font-weight:800}.lead-detail{position:sticky;top:1rem}.lead-form{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;padding:1rem}.lead-form label{display:grid;gap:.35rem}.lead-form label>span{color:var(--muted);font-size:.75rem;font-weight:900;text-transform:uppercase}.lead-form input,.lead-form select,.lead-form textarea{width:100%;box-sizing:border-box}.lead-form-wide{grid-column:1/-1}.lead-convert{display:flex;align-items:center;gap:.75rem;padding:0 1rem 1rem}.lead-convert small{color:var(--muted)}.lead-timeline{padding:1rem;border-top:1px solid var(--line)}.lead-timeline article{display:grid;grid-template-columns:.7rem 1fr;gap:.65rem;padding:.55rem 0}.lead-timeline article>span{width:.5rem;height:.5rem;margin-top:.3rem;border-radius:50%;background:var(--blue)}.lead-timeline article div{display:grid}.lead-timeline small{color:var(--muted)}.operations-empty{padding:2rem;text-align:center;color:var(--muted)}
@media(max-width:900px){.operations-layout{grid-template-columns:1fr}.lead-detail{position:static}.operations-metrics{grid-template-columns:1fr 1fr}.lead-card{grid-template-columns:7rem 1fr}.lead-next{grid-column:2}}
@media(max-width:600px){.operations-hero{align-items:start;flex-direction:column}.operations-metrics{grid-template-columns:1fr}.lead-card{grid-template-columns:1fr}.lead-next{grid-column:1}.lead-form{grid-template-columns:1fr}.lead-form-wide{grid-column:1}}
.operations-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.operations-overview-card { display: grid; align-content: start; gap: .55rem; padding: 1rem; }
.operations-overview-card > :is(h2, p) { margin: 0; }
.operations-quick-links { display: grid; gap: .4rem; margin-top: .35rem; }
.operations-quick-links a { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; color: inherit; }
.operations-quick-links a:hover { border-color: color-mix(in srgb, var(--management-accent, var(--blue)) 70%, var(--line)); background: color-mix(in srgb, var(--management-accent, var(--blue)) 10%, transparent); }
.lead-list.is-compact .lead-card { grid-template-columns: 7.5rem 1fr; padding: .65rem 0; border-bottom: 1px solid var(--line); }
@media(max-width:900px){.operations-overview-grid{grid-template-columns:1fr}}
.communication-summary{display:grid;grid-template-columns:.7fr .7fr 1.6fr;gap:.75rem;margin-bottom:.75rem}.communication-summary article{display:grid;gap:.25rem;padding:1rem;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.communication-summary strong{font-size:1.45rem}.communication-summary span,.communication-summary small{color:var(--muted)}.communication-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;align-items:start}.automation-list,.template-list{display:grid}.automation-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,.5fr) auto auto;gap:.75rem;align-items:end;padding:1rem;border-bottom:1px solid var(--line)}.automation-row>div,.automation-row label{display:grid;gap:.3rem}.automation-row small,.automation-row label span{color:var(--muted);font-size:.75rem}.toggle-label{display:flex!important;align-items:center;gap:.4rem!important;padding-bottom:.65rem}.template-editor{border-bottom:1px solid var(--line)}.template-editor summary{display:flex;justify-content:space-between;gap:.75rem;padding:1rem;cursor:pointer}.template-editor summary>span{display:grid}.template-editor summary small{color:var(--muted)}.template-editor form{display:grid;gap:.75rem;padding:0 1rem 1rem}.template-editor label:not(.toggle-label){display:grid;gap:.35rem}.template-editor label>span{color:var(--muted);font-size:.75rem;font-weight:800}.template-actions{display:flex;gap:.5rem}.template-preview{white-space:pre-wrap;padding:1rem;border-radius:10px;background:#09111d;color:var(--text)}.communication-history{margin-top:.75rem}.communication-table article{display:grid;grid-template-columns:7rem 1fr auto;gap:.75rem;align-items:center;padding:.8rem 1rem;border-bottom:1px solid var(--line)}.communication-table article>div{display:grid}.communication-table small,.communication-table time{color:var(--muted);font-size:.78rem}
.communication-summary article{padding:.8rem .9rem}.communication-summary strong{font-size:1.2rem}.automation-row{padding:.8rem .9rem}.template-editor summary{padding:.8rem .9rem}.template-editor form{padding:0 .9rem .9rem}
@media(max-width:900px){.communication-grid{grid-template-columns:1fr}.automation-row{grid-template-columns:1fr 1fr}.communication-summary{grid-template-columns:1fr 1fr}.communication-summary article:last-child{grid-column:1/-1}}
@media(max-width:600px){.communication-summary{grid-template-columns:1fr}.communication-summary article:last-child{grid-column:1}.automation-row{grid-template-columns:1fr}.communication-table article{grid-template-columns:1fr}.template-actions{flex-direction:column}}

@media (max-width: 1450px) and (min-width: 761px) {
  .commerce-workspace { grid-template-columns: var(--commerce-action-rail-width) minmax(0, 1fr); gap: 0; }
  .commerce-action-rail { padding-inline: 10px; }
  .commerce-view .commerce-report-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .commerce-workspace { grid-template-columns: 1fr; }
  .commerce-action-rail {
    position: static;
    min-height: 0;
    padding: 7px;
  }
  .commerce-action-rail > header { display: none; }
  .commerce-action-list {
    display: flex;
    gap: 6px;
    padding-top: 0;
    overflow-x: auto;
  }
  .commerce-action-list .commerce-modal-trigger {
    display: inline-grid;
    grid-template-columns: 20px auto;
    width: auto;
    min-width: max-content;
  }
  .commerce-action-rail .commerce-modal-trigger span { display: inline; }
  .commerce-view .commerce-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.schedule-undo-banner{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border:1px solid rgba(68,224,162,.35);border-radius:12px;background:rgba(34,154,108,.11);margin:.75rem 0}.schedule-undo-banner>div{display:grid}.schedule-undo-banner span{color:var(--muted);font-size:.82rem}.schedule-check-dialog{width:min(520px,calc(100vw - 2rem));padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text)}.schedule-check-dialog::backdrop{background:rgba(1,5,10,.72)}.schedule-check-dialog header,.schedule-check-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem;border-bottom:1px solid var(--line)}.schedule-check-dialog footer{border-top:1px solid var(--line);border-bottom:0}.schedule-check-dialog [data-schedule-check-result]{padding:1rem}.schedule-check-list{display:grid;gap:.5rem;margin:.75rem 0 0;padding:0;list-style:none}.schedule-check-list li{padding:.65rem;border-radius:8px;background:rgba(255,177,75,.1);color:#ffd29b}.schedule-check-ready{padding:1rem;border-radius:10px;background:rgba(68,224,162,.1);color:#8af0c6}
.movement-search-form{display:grid;grid-template-columns:minmax(280px,1fr) auto auto;gap:.75rem;align-items:end;padding:1rem;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-bottom:.75rem}.movement-search-form label{display:grid;gap:.35rem}.movement-search-form label>span{color:var(--muted);font-size:.75rem;font-weight:900;text-transform:uppercase}.movement-search-form details{position:relative}.movement-search-form summary{cursor:pointer;padding:.7rem 1rem;border:1px solid var(--line);border-radius:9px;font-weight:800}.movement-search-form details>div{position:absolute;right:0;z-index:5;display:grid;grid-template-columns:1fr 1fr;gap:.75rem;width:min(560px,calc(100vw - 3rem));padding:1rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-elevated);box-shadow:0 18px 50px rgba(0,0,0,.35)}.movement-summary{display:grid;grid-template-columns:1.2fr .5fr 1fr;gap:.75rem;margin-bottom:.75rem}.movement-summary article{display:grid;gap:.2rem;padding:1rem;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.movement-summary span,.movement-summary small{color:var(--muted)}.movement-summary strong{font-size:1.35rem}.movement-history-list{display:grid;gap:.55rem}.movement-history-card{display:grid;grid-template-columns:5.5rem 1fr auto;align-items:center;gap:1rem;padding:1rem;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:inherit}.movement-history-card:hover{border-color:var(--blue);transform:translateY(-1px)}.movement-history-card time{display:grid;text-align:center;padding:.5rem;border-radius:9px;background:var(--surface-soft)}.movement-history-card time strong{font-size:1.7rem}.movement-history-card time span,.movement-history-card p,.movement-history-card small{color:var(--muted)}.movement-history-card h2{margin:.25rem 0}.movement-search-empty{margin-top:1rem;border:1px dashed var(--line);border-radius:14px}
@media(max-width:760px){.movement-search-form{grid-template-columns:1fr}.movement-search-form details>div{position:static;width:auto;grid-template-columns:1fr}.movement-summary{grid-template-columns:1fr}.movement-history-card{grid-template-columns:4.5rem 1fr}.movement-history-card>span:last-child{grid-column:2}}

/* Shared workspace density: bounded collapsible navigation and calm page rhythm. */
:root {
  --workspace-page-gutter: clamp(14px, 1.15vw, 22px);
  --workspace-page-top: clamp(18px, 1.4vw, 26px);
  --workspace-page-bottom: clamp(32px, 4vw, 64px);
  --workspace-title-size: clamp(2rem, 2.45vw, 2.75rem);
  --workspace-section-title-size: clamp(1.3rem, 1.65vw, 1.75rem);
}

.app-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding-block: 16px 12px;
  overflow: hidden;
}

.sidebar-brand,
.sidebar-club-context,
.sidebar-account {
  flex: 0 0 auto;
}

.sidebar-nav {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.sidebar-panel {
  min-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #203048;
  border-radius: 11px;
  background: rgba(7, 15, 26, .44);
}

.sidebar-panel[open] {
  display: flex;
  min-height: 42px;
  flex: 0 1 auto;
  flex-direction: column;
}

.sidebar-panel > summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  color: #7186a2;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.sidebar-panel > summary::-webkit-details-marker { display: none; }
.sidebar-panel > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.sidebar-panel[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.sidebar-panel > summary:hover { color: #b6c7db; background: rgba(255, 255, 255, .025); }

.sidebar-panel-body {
  display: grid;
  min-height: 0;
  flex: 0 1 auto;
  align-content: start;
  gap: 3px;
  padding: 2px 4px 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #2a405b transparent;
  scrollbar-width: thin;
}

.sidebar-panel-body::-webkit-scrollbar { width: 4px; }
.sidebar-panel-body::-webkit-scrollbar-thumb { border-radius: 999px; background: #2a405b; }
.sidebar-nav a { min-height: 39px; padding-inline: 9px; font-size: .8rem; }
.sidebar-nav svg { width: 17px; flex: 0 0 17px; }

.sidebar-utility-panel {
  max-height: min(244px, 42vh);
  flex: 0 1 auto;
}
.sidebar-utility-panel[open] { flex: 0 1 auto; }
.sidebar-utility-panel .sidebar-panel-body { gap: 6px; padding: 4px 5px 6px; }
.sidebar-utility-panel .sidebar-ai { padding: 8px; }
.sidebar-utility-panel .language-switcher,
.sidebar-utility-panel .workspace-mode-switch { grid-column: auto; }

body.app-view:not(.program-view):not(.messages-thread-view) .app-content > .shell {
  padding: var(--workspace-page-top) var(--workspace-page-gutter) var(--workspace-page-bottom) !important;
}

body.app-view .app-content > .shell h1 {
  font-size: var(--workspace-title-size) !important;
  line-height: 1.02;
  letter-spacing: -.035em;
}

body.app-view .app-content > .shell h2 {
  font-size: var(--workspace-section-title-size);
  line-height: 1.08;
  letter-spacing: -.025em;
}

body.app-view .app-content > .shell .lead {
  font-size: clamp(.9rem, 1vw, 1rem);
  line-height: 1.48;
}

body.app-view .admin-hero,
body.app-view .dashboard-hero,
body.app-view .compact-hero,
body.app-view .operations-hero {
  margin-bottom: 16px;
  padding-top: 0;
  padding-bottom: 0;
}

body.app-view .admin-overview-grid h2,
body.app-view .admin-audit-preview h2,
body.app-view .admin-section h2,
body.app-view .operations-panel h2 {
  margin-block: 2px 10px;
}

@media (max-width: 1180px) and (min-width: 761px) {
  .sidebar-panel > summary { justify-content: center; padding-inline: 0; }
  .sidebar-panel > summary span { display: none; }
  .sidebar-panel-body { padding-inline: 3px; }
  .sidebar-utility-panel .language-switcher,
  .sidebar-utility-panel .workspace-mode-switch { display: none; }
}

@media (max-width: 760px) {
  :root {
    --workspace-page-gutter: 14px;
    --workspace-page-top: 16px;
    --workspace-page-bottom: 20px;
    --workspace-title-size: clamp(1.85rem, 9.5vw, 2.35rem);
    --workspace-section-title-size: clamp(1.25rem, 6vw, 1.6rem);
  }
}

/* Management information architecture: one club identity and focused domains. */
body.has-active-club.club-operations-view {
  background:
    radial-gradient(circle at 76% -12%, color-mix(in srgb, var(--club-accent) 17%, transparent), transparent 34rem),
    var(--bg);
}

body.commerce-view .commerce-workspace-main {
  background: radial-gradient(circle at 76% -12%, color-mix(in srgb, var(--management-accent) 17%, transparent), transparent 34rem);
}

body.commerce-view .commerce-workspace :is(.eyebrow, .commerce-organization-list > a > b) {
  color: var(--management-accent);
}

body.has-active-club.club-operations-view :is(.eyebrow, .commerce-organization-list > a > b) {
  color: var(--club-accent);
}

body.commerce-view .commerce-workspace .admin-tabs a.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--management-accent) 48%, transparent);
  background: color-mix(in srgb, var(--management-accent) 19%, #0b1625);
  box-shadow: inset 0 -2px var(--management-accent);
}

body.has-active-club.club-operations-view .admin-tabs a.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--club-accent) 48%, transparent);
  background: color-mix(in srgb, var(--club-accent) 19%, #0b1625);
  box-shadow: inset 0 -2px var(--club-accent);
}

body.commerce-view .commerce-workspace :is(.button.primary, .commerce-brand-preview-card button) {
  border-color: color-mix(in srgb, var(--management-accent) 70%, #fff 8%);
  background: var(--management-accent);
}

body.has-active-club.club-operations-view .button.primary {
  border-color: color-mix(in srgb, var(--club-accent) 70%, #fff 8%);
  background: var(--club-accent);
}

body.commerce-view .commerce-workspace .admin-avatar {
  color: color-mix(in srgb, var(--management-accent) 72%, #fff);
  border-color: color-mix(in srgb, var(--management-accent) 55%, transparent);
  background: color-mix(in srgb, var(--management-accent) 16%, #0b1625);
}

body.has-active-club.club-operations-view .admin-avatar {
  color: color-mix(in srgb, var(--club-accent) 72%, #fff);
  border-color: color-mix(in srgb, var(--club-accent) 55%, transparent);
  background: color-mix(in srgb, var(--club-accent) 16%, #0b1625);
}

body.commerce-view .commerce-organization-list > a:is(:hover, .is-active) {
  border-color: color-mix(in srgb, var(--management-accent) 55%, transparent);
  background: color-mix(in srgb, var(--management-accent) 10%, transparent);
}

body.commerce-view .commerce-action-rail-mark {
  color: var(--management-accent);
  border-color: color-mix(in srgb, var(--management-accent) 45%, transparent);
  background: color-mix(in srgb, var(--management-accent) 12%, transparent);
}

.management-subtabs {
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px;
  border-radius: 12px;
}

.management-subtabs a {
  min-width: 0;
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: .78rem;
}

.admin-tabs a:not(.is-active):is(:hover, :focus-visible) {
  color: #fff;
  border-color: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 42%, transparent);
  background: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 11%, transparent);
}

:where(button, .button, a.button):not(:disabled) {
  transition: filter .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease;
}

:where(button, .button, a.button):not(:disabled):hover {
  filter: brightness(1.14);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 54%, transparent), 0 7px 18px rgba(0, 0, 0, .2);
}

:where(button, .button, a.button):focus-visible,
.admin-tabs a:focus-visible,
.sidebar-nav a:focus-visible {
  outline: 2px solid var(--management-accent, var(--club-accent, var(--blue)));
  outline-offset: 2px;
}

.commerce-boxes-overview {
  grid-template-columns: minmax(0, 1fr);
}

.commerce-boxes-overview > .admin-section:first-child {
  width: 100%;
  min-height: calc(100dvh - 190px);
}

.commerce-boxes-overview .commerce-organization-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.commerce-branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 14px;
  align-items: start;
}

.commerce-branding-form > header,
.commerce-brand-preview > header {
  align-items: center;
}

.commerce-branding-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
  padding: 0;
  border: 0;
}

.commerce-branding-toggles legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0;
}

.commerce-cost-actions {
  align-items: center;
}

.commerce-cost-actions form {
  display: contents;
}

.commerce-branding-toggles label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 15, 27, .5);
  cursor: pointer;
}

.commerce-branding-toggles label:hover {
  border-color: color-mix(in srgb, var(--club-accent, var(--blue)) 46%, transparent);
  background: color-mix(in srgb, var(--club-accent, var(--blue)) 8%, rgba(7, 15, 27, .5));
}

.commerce-branding-toggles input { margin-top: 3px; }
.commerce-branding-toggles span { display: grid; gap: 3px; }
.commerce-branding-toggles small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.commerce-form-wide { grid-column: 1 / -1; }
.commerce-branding-form input[type="color"] { width: 100%; min-height: 44px; padding: 5px; }

.commerce-brand-preview {
  position: sticky;
  top: 14px;
}

.commerce-brand-preview-card {
  min-height: 390px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--preview-accent) 48%, #29384d);
  border-radius: 16px;
  background: var(--preview-primary);
  color: var(--preview-secondary);
}

.commerce-brand-cover {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.commerce-brand-preview-copy {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.commerce-brand-preview-copy > :is(img, span) {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.commerce-brand-preview-copy > span {
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--preview-primary);
  background: var(--preview-accent);
  font-weight: 950;
}

.commerce-brand-preview-copy p { margin: 0; opacity: .72; }
.commerce-brand-preview-copy strong { font-size: 1.8rem; }
.commerce-brand-preview-card button {
  width: max-content;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--preview-accent);
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-weight: 850;
  background: var(--preview-accent);
}

.commerce-state-card { max-width: 920px; }

@media (max-width: 980px) {
  .commerce-branding-layout { grid-template-columns: 1fr; }
  .commerce-brand-preview { position: static; }
  .commerce-branding-toggles { grid-template-columns: 1fr; }
}

/* Commerce uses a true second left rail, attached to the primary workspace navigation. */
@media (min-width: 761px) {
  body.app-view.commerce-view:not(.member-portal-view):not(.program-view):not(.messages-thread-view) .app-content > .shell {
    padding: 0 !important;
  }

  body.commerce-view .commerce-workspace {
    min-height: 100dvh;
    align-items: start;
    gap: 0;
  }

  body.commerce-view .commerce-action-rail {
    position: sticky;
    top: 0;
    height: 100dvh;
    min-height: 100dvh;
    align-self: start;
    padding: 16px 12px;
    border-width: 0 1px 0 0;
    border-color: #202f43;
    border-radius: 0;
    background: linear-gradient(180deg, #0c1421 0%, #0a111c 100%);
  }

  body.commerce-view .commerce-workspace-main {
    padding: var(--workspace-page-top) var(--workspace-page-gutter) var(--workspace-page-bottom);
  }

  body.commerce-view .commerce-action-rail-resizer { right: -5px; }
}

@media (min-width: 761px) and (max-width: 1450px) {
  body.commerce-view .commerce-workspace { gap: 0; }
}

@media (max-width: 760px) {
  body.app-view .app-sidebar { display: none; }
  body.app-view .app-content { width: 100%; min-width: 0; }
  body.app-view .mobile-header {
    position: sticky;
    z-index: 90;
    top: 0;
    width: 100%;
    min-width: 0;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  body.app-view.commerce-view:not(.program-view):not(.messages-thread-view) .app-content > .shell {
    padding: var(--workspace-page-top) var(--workspace-page-gutter) var(--workspace-page-bottom) !important;
  }
  body.commerce-view .commerce-workspace { width: 100%; min-height: 0; gap: 10px; }
  body.commerce-view .commerce-workspace-main { padding: 0; }
  body.commerce-view .commerce-action-rail {
    position: sticky;
    z-index: 45;
    top: calc(59px + env(safe-area-inset-top));
    height: auto;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  body.commerce-view .commerce-action-list {
    display: flex;
    max-width: 100%;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  body.commerce-view .commerce-action-list::-webkit-scrollbar { display: none; }
  body.commerce-view .commerce-action-list > * { flex: 0 0 auto; }
  body.commerce-view .commerce-action-list .commerce-page-action,
  body.commerce-view .commerce-action-list .commerce-page-action :is(.button, button, summary) {
    width: auto;
    min-width: max-content;
  }
  body.commerce-view .commerce-action-list .commerce-page-action :is(.button, button, summary) {
    min-height: 40px;
    padding: 7px 10px;
    justify-content: center;
    white-space: nowrap;
  }

  body.commerce-view .commerce-schedule-board > header {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  body.commerce-view .commerce-schedule-board > header > *,
  body.commerce-view .commerce-schedule-heading,
  body.commerce-view .commerce-activity-search,
  body.commerce-view .commerce-schedule-header-actions,
  body.commerce-view .commerce-planning-tabs {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    justify-self: stretch;
  }
  body.commerce-view .commerce-activity-search input { min-width: 0; }
  body.commerce-view .commerce-planning-tabs a { min-width: 0; }
  body.commerce-view .commerce-activity-palette {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

/* Final viewport contract: keep messaging identical before and after soft thread switches. */
body.app-view.messages-view .app-content > .shell {
  display: grid;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: var(--workspace-page-top) var(--workspace-page-gutter) 14px !important;
  overflow: hidden;
}
body.app-view.messages-view .messages-layout { min-height: 0; height: 100%; overflow: hidden; }
body.app-view.messages-view .chat-thread { min-height: 0; height: 100%; max-height: none; overflow: hidden; }
body.app-view.messages-view .chat-thread:not(:has(> .chat-context-card)) { grid-template-rows: auto minmax(0, 1fr) auto; }

/* Dense, viewport-aware workspaces: keep controls visible while long collections scroll locally. */
.session-page .session-execution-bar { margin: 0 0 1rem; }
.commerce-programming-week { height: clamp(440px, calc(100dvh - 270px), 720px); min-height: 0; }
.commerce-programming-day { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.commerce-programming-day-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.commerce-program-card { min-height: 0; max-height: 13rem; overflow: hidden; }

body.community-view .app-content > .shell { width: 100%; max-width: none; }
body.community-view .community-hero { align-items: center; min-height: 38px; margin-bottom: 10px; }
body.community-view .community-hero .eyebrow { margin: 0; }
body.community-view .community-tabs { margin-bottom: 12px; }
body.community-view .community-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: none; align-items: stretch; gap: 12px; }
body.community-view .community-card { display: flex; min-width: 0; min-height: 310px; flex-direction: column; padding: .9rem; }
body.community-view .community-card > header span { font-size: .68rem; }
body.community-view .community-avatar { width: 36px; height: 36px; font-size: .68rem; }
body.community-view .community-format { padding: .22rem .45rem; font-size: .62rem; }
body.community-view .community-workout { align-items: center; padding-block: .65rem; }
body.community-view .community-workout h2 { font-size: clamp(1.08rem, 1.55vw, 1.4rem); line-height: 1.12; }
body.community-view .community-workout h2 + p { margin-top: .35rem; font-size: .76rem; line-height: 1.4; }
body.community-view .community-score { color: var(--blue); font-size: 1.55rem; }
body.community-view .community-actions { margin-top: auto; padding: .5rem 0; font-size: .72rem; }
body.community-view .community-comments { padding-top: .5rem; }
body.community-view .community-comments > summary { display: flex; min-height: 34px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .7rem; font-weight: 850; cursor: pointer; list-style: none; }
body.community-view .community-comments > summary::-webkit-details-marker { display: none; }
body.community-view .community-comments > summary span { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 99px; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
body.community-view .community-comment-list { max-height: 7rem; overflow-y: auto; padding-top: .3rem; font-size: .72rem; }
body.community-view .community-comment-form { margin-top: .35rem; }
body.community-view .leaderboard-panel { width: 100%; max-width: none; min-height: calc(100dvh - 215px); }
body.community-view .community-create-layout { min-height: calc(100dvh - 215px); grid-template-columns: minmax(320px, .6fr) minmax(0, 1.4fr); }
body.community-view .community-create-layout form { position: static; align-content: start; gap: .55rem; }
body.community-view .community-create-layout form label { gap: .3rem; }
body.community-view .community-create-layout .community-card-grid { align-content: start; }

body.messages-new-view .new-conversation { width: 100%; max-width: none; height: 100%; min-height: 0; margin: 0; grid-template-rows: auto minmax(0, 1fr) auto; padding: 1rem; }
body.messages-new-view .new-conversation:has(.new-conversation-context) { grid-template-rows: auto auto minmax(0, 1fr) auto; }
body.messages-new-view .new-conversation fieldset { min-height: 0; overflow: hidden; }
body.messages-new-view .chat-candidate-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
body.messages-new-view .chat-candidate-list > label { min-height: 3.6rem; padding: .55rem .65rem; }
body.messages-new-view .new-conversation-actions { grid-template-columns: minmax(0, 1fr) auto; }
body.messages-new-view .new-conversation-actions .button { grid-column: 2; min-width: 12rem; }

@media (max-width: 1050px) {
  body.community-view .community-feed { grid-template-columns: 1fr; }
  body.messages-new-view .chat-candidate-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .profile-view .shell { padding-top: .75rem; }
  .profile-utility-row { margin-bottom: .55rem; }
  .profile-view .profile-tabs button { place-content: center; text-align: center; }
  .profile-view .profile-grid { gap: .75rem; }
  .profile-view .profile-grid > .panel { padding: 1rem; }
  .profile-view .relationship-card { gap: .75rem; }
  .profile-view .relationship-card > p { margin-block: 0; line-height: 1.45; }
  .profile-view .coach-invite-form { margin-top: .5rem; }
  .profile-view .relationship-card > .button.full { margin-top: 0; }
  .profile-avatar-editor { grid-template-columns: auto minmax(0, 1fr); }
  .profile-avatar-editor > label { grid-column: 1 / -1; width: 100%; text-align: center; }
  .profile-avatar-editor .save-message { grid-column: 1 / -1; }
  .commerce-programming-week { height: auto; min-height: 400px; }
  .commerce-programming-day-content { max-height: 65dvh; }
  body.community-view .community-card { min-height: 0; padding: .85rem; }
  body.community-view .community-create-layout { min-height: 0; grid-template-columns: 1fr; }
  body.messages-new-view .new-conversation { height: auto; }
  body.messages-new-view .chat-candidate-list { grid-template-columns: 1fr; }
  body.messages-new-view .new-conversation-actions { display: flex; }
  body.messages-new-view .new-conversation-actions .button { min-width: 0; }
  .profile-club-card { align-items: stretch; flex-direction: column; }
}
body.app-view.messages-view .chat-actions { position: relative; width: 2.5rem; }
body.app-view.messages-view .chat-actions > div { right: auto; left: 0; }

/* Workspace boundaries and reusable programming library. */
.commerce-program-library > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34rem);
  align-items: end;
  gap: 1rem;
}

.commerce-program-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: stretch;
  gap: .75rem;
}

.commerce-program-library-grid .commerce-program-card {
  min-height: 10.5rem;
  max-height: none;
  cursor: default;
}

.commerce-occurrence-program > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}

.commerce-occurrence-program small {
  color: var(--muted);
  font-size: .7rem;
}

/* Athlete pages keep the box accent, regardless of the last coach or admin route. */
body.workspace-surface-athlete.has-active-club {
  --blue: var(--club-original-accent, var(--club-accent));
  --blue-strong: var(--club-original-accent, var(--club-accent));
}

.program-schedule-view .builder-session-head h2 {
  font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.program-schedule-view .schedule-open-training {
  justify-self: start;
  width: auto;
  min-height: 2.35rem;
  margin: .55rem 0 0;
  padding: .5rem .8rem;
  font-size: .72rem;
}

.logbook-page .shell {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - var(--mobile-tab-height, 0px));
}

body.community-view .community-tabs {
  align-items: center;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

body.community-view .community-tabs a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .55rem .8rem;
}

body.community-view .community-tabs a:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  background: color-mix(in srgb, var(--blue) 9%, transparent);
}

body.community-view .community-tabs a.is-active {
  border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
  background: color-mix(in srgb, var(--blue) 18%, #0b1625);
  box-shadow: inset 0 -2px var(--blue);
}

body.community-view .community-profile-link {
  margin-left: auto;
  color: #fff;
  background: var(--blue);
}

body.community-view .community-card {
  min-height: 255px;
}

@media (min-width: 901px) {
  body.community-view:has(.leaderboard-panel) {
    overflow: hidden;
  }

  body.community-view:has(.leaderboard-panel) .app-content,
  body.community-view:has(.leaderboard-panel) .app-content > .shell {
    min-height: 0;
    height: 100dvh;
    overflow: hidden;
  }

  body.community-view:has(.leaderboard-panel) .app-content > .shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }

  body.community-view .leaderboard-panel {
    min-height: 0;
    height: 100%;
    overflow: auto;
  }
}

@media (max-width: 760px) {
  body.app-view.messages-view .app-content > .shell { display: block; padding: 0 !important; }
}

@media (max-width: 720px) {
  .commerce-program-library > header { grid-template-columns: 1fr; }
  .commerce-program-library-grid { grid-template-columns: 1fr; }
  .commerce-occurrence-program > div { grid-template-columns: 1fr; }
  body.community-view .community-profile-link { margin-left: 0; }
}

/* Final interface rhythm: secondary navigation and action rails share one control language. */
:where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #0b1625) 88%, #07101c);
  box-shadow: none;
  scrollbar-width: none;
}

:where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs)::-webkit-scrollbar {
  display: none;
}

:where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) > a {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

:where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) > a:is(:hover, :focus-visible) {
  color: #fff;
  border-color: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 32%, transparent);
  background: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 9%, transparent);
}

:where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) > a.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 42%, transparent);
  background: color-mix(in srgb, var(--management-accent, var(--club-accent, var(--blue))) 17%, #0b1625);
  box-shadow: inset 0 -2px var(--management-accent, var(--club-accent, var(--blue)));
}

.commerce-action-list .commerce-action-control,
.commerce-action-list .commerce-modal-trigger {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  text-align: left;
}

.commerce-action-list .commerce-action-control[hidden],
.commerce-action-list .commerce-modal-trigger[hidden],
.commerce-action-list .commerce-page-action[hidden] {
  display: none !important;
}

.commerce-action-list .commerce-action-control svg,
.commerce-action-list .commerce-modal-trigger svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.commerce-action-list .commerce-action-control > span,
.commerce-action-list .commerce-modal-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.member-portal-view .admin-hero,
body.member-portal-view .member-portal-tabs,
body.member-portal-view .admin-metric-grid {
  margin-bottom: 12px;
}

body.member-portal-view .member-schedule-page { margin-top: 0; }
body.member-portal-view .admin-section { padding: clamp(16px, 1.35vw, 22px); }

@media (max-width: 760px) {
  :where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  :where(.admin-tabs, .member-portal-tabs, .commerce-planning-tabs, .operations-tabs) > a {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 40px;
    padding-inline: 12px;
  }

  body.commerce-view .commerce-action-list .commerce-action-control,
  body.commerce-view .commerce-action-list .commerce-modal-trigger {
    width: auto;
    min-width: max-content;
    grid-template-columns: 18px auto;
    padding-inline: 10px;
  }

  body.commerce-view .commerce-action-list form.commerce-page-action {
    display: contents;
  }

  body.is-schedule-plan-mode :is(.commerce-schedule-board, .commerce-programming-board) {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  body.is-schedule-plan-mode .commerce-schedule-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.is-schedule-plan-mode .commerce-plan-mode-exit {
    width: auto;
    min-width: max-content;
  }
}
