/* SplitTrack app design system
   Desktop mirrors the wide coach workspace. Phone layouts use the iOS visual language. */

:root {
  color-scheme: light;
  --st-blue: #3a6df0;
  --st-blue-ink: #2a54d6;
  --st-blue-dark: #243fc4;
  --st-blue-light: #5184ff;
  --st-blue-tint: color-mix(in srgb, var(--st-blue) 10%, #fff);
  --st-blue-soft: color-mix(in srgb, var(--st-blue) 16%, transparent);
  --st-selected-ink: var(--st-blue-ink);
  --st-gradient: linear-gradient(150deg, #5184ff 0%, #2e5be6 58%, #243fc4 100%);
  --st-text: #11151f;
  --st-text-2: #6b7480;
  --st-text-3: #667085;
  --st-bg: #f4f6fa;
  --st-card: #fff;
  --st-line: rgba(17, 21, 31, 0.08);
  --st-line-strong: rgba(17, 21, 31, 0.14);
  --st-slate: #3a4254;
  --st-slate-tint: #edeff3;
  --st-success: #18a55a;
  --st-success-tint: #e6f7ee;
  --st-warning: #c9821e;
  --st-warning-ink: #795100;
  --st-warning-tint: #fbf1dc;
  --st-danger: #d83a4f;
  --st-danger-tint: #fdecee;
  --st-orange: #e2683a;
  --st-orange-tint: #fdeee6;
  --st-purple: #7a5af8;
  --st-purple-ink: #5b36d6;
  --st-purple-tint: #efeafe;
  /* The desktop header grows by the same 22pt used for the sheet overlap, so
     the content begins at its previous position while the gradient remains
     visible behind the rounded sheet. */
  --st-topbar-height: 98px;
  --st-accent-height: 5px;
  --st-shell-corner: 26px;
  --st-shell-overlap: 22px;
  --st-sidebar-width: 240px;
  --st-sidebar-compact: 76px;
  --st-master-width: 380px;
  --st-radius-sm: 10px;
  --st-radius: 12px;
  --st-radius-lg: 16px;
  --st-radius-xl: 18px;
  --st-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, sans-serif;
  --st-shadow-xs: 0 1px 2px rgba(17, 21, 31, 0.05);
  --st-shadow-sm: 0 2px 10px rgba(17, 21, 31, 0.055);
  --st-shadow-md: 0 8px 24px rgba(17, 21, 31, 0.1);
  --st-shadow-lg: 0 16px 44px rgba(17, 21, 31, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* Team colors may change the brand accent, but the readable accent foreground
   must continue to follow the active appearance. */
html[data-appearance="light"] .app-shell,
html:not([data-appearance]) .app-shell {
  --st-blue-ink: var(--st-team-blue-ink, #2a54d6);
}

@media (prefers-color-scheme: light) {
  html[data-appearance="system"] .app-shell {
    --st-blue-ink: var(--st-team-blue-ink, #2a54d6);
  }
}

.form-action-spacer { flex: 1; }

.task-options {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-bg);
}

.task-options > legend {
  padding-inline: 6px;
  background: var(--st-bg);
}

.checkbox-row.compact { align-self: end; min-height: 44px; }

.task-input-list { display: grid; gap: 8px; margin-top: 12px; }
.task-input-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-bg);
  color: var(--st-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.task-input-list > button.active { border-color: var(--st-blue); background: var(--st-blue-tint); color: var(--st-selected-ink); }
.task-range { width: 100%; accent-color: var(--st-blue); margin: 16px 0; }
.task-upload { margin-top: 12px; }
.submission-page { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--st-line); }
.submission-page > span { flex: 1; font-weight: 700; }
.submission-page > small { color: var(--st-text-3); }
.submission-status { display: grid; gap: 3px; padding: 14px 16px; border-radius: 14px; color: var(--st-warning-ink); background: var(--st-warning-tint); }
.submission-status.accepted, .submission-status.received_offline { color: var(--st-success); background: var(--st-success-tint); }
.submission-status.needs_changes { color: var(--st-danger); background: var(--st-danger-tint); }
.submission-status span { font-size: 13px; }

.runner-suggestion-action { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.runner-target-phase { margin-top: 14px; padding: 14px; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card); }
.runner-target-grid { display: grid; gap: 8px; margin-top: 10px; }
.runner-target-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(110px, 170px); align-items: center; gap: 12px; color: var(--st-text-2); font-size: 13px; font-weight: 700; }
.runner-target-row.excluded { opacity: .58; }
.runner-phase-toggle { display: flex; align-items: center; gap: 9px; min-height: 38px; border-radius: 9px; }
.runner-phase-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--st-blue); }
.runner-phase-toggle:focus-within { outline: 3px solid color-mix(in srgb, var(--st-blue) 45%, transparent); outline-offset: 2px; }
.runner-review-actions { display: flex; justify-content: flex-start; }
.live-runner-card.resting { border-color: var(--st-warning); background: var(--st-warning-tint); }
.runner-picker label:focus-within,
.role-picker label:focus-within,
.candidate-picker label:focus-within,
.task-input-list > button:focus-visible { outline: 3px solid color-mix(in srgb, var(--st-blue) 45%, transparent); outline-offset: 2px; }

.onboarding-page { height: 100dvh; min-height: 0; overflow-y: auto; align-items: safe center; }
.onboarding-card { margin-block: auto; }
.candidate-picker { max-height: min(45dvh, 430px); overflow-y: auto; }
.back-link { min-height: 44px; min-width: 44px; }

@media (max-width: 767px) {
  .runner-target-row { grid-template-columns: 1fr 112px; }
  .section-runner-actions { width: 100%; justify-content: stretch; }
  .section-runner-actions .compact-select { flex: 1 1 150px; width: auto; }
  .onboarding-page { height: 100dvh; min-height: 0; overflow-y: auto; }
  .onboarding-card { margin-block: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom)); }
}

/* Live data controls added to the full web workspace. */
.section-runner-row {
  gap: 12px;
}

.section-runner-row .workout-step-copy {
  min-width: 0;
  flex: 1;
}

.section-runner-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.section-runner-actions .compact-select { width: min(210px, 100%); min-height: 34px; padding-block: 5px; }
.approval-group { margin-bottom: 18px; }
.approval-tile { border-color: var(--st-warning); background: var(--st-warning-tint); }
.approval-profile { display: flex; align-items: center; gap: 14px; padding: 6px 0 12px; }
.approval-profile > div { display: grid; gap: 3px; }
.approval-profile strong { color: var(--st-text); font-size: 18px; }
.approval-profile span { color: var(--st-text-3); font-size: 13px; }
.store-thumb { display: grid; place-items: center; color: #fff; background: var(--st-gradient); }
.store-thumb svg { width: 24px; height: 24px; }
.store-detail-content { padding-bottom: 64px; }
.store-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px; border-radius: 16px; background: var(--st-blue-tint); }
.store-status.open { background: var(--st-success-tint); }
.store-status.closed { background: var(--st-danger-tint); }
.store-status.hidden { background: var(--st-bg); }
.store-status-icon,
.store-action-icon,
.store-shopper-icon { display: grid; place-items: center; color: var(--st-blue); background: var(--st-card); }
.store-status-icon { width: 48px; height: 48px; border-radius: 14px; }
.store-status.open .store-status-icon { color: var(--st-success); }
.store-status.closed .store-status-icon { color: var(--st-danger); }
.store-status h3,
.store-status p,
.store-step-heading h3,
.store-step-heading p,
.store-shopper h3,
.store-shopper p { margin: 0; }
.store-status h3 { color: var(--st-text); font-size: 16px; font-weight: 850; letter-spacing: -0.02em; }
.store-status p { max-width: 62ch; margin-top: 3px; color: var(--st-text-2); font-size: 13px; font-weight: 570; line-height: 1.4; }
.store-status .button { white-space: nowrap; }
.team-store-card { display: grid; gap: 16px; margin-top: 12px; padding: 18px; border-radius: 16px; background: var(--st-bg); }
.store-step-heading { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 11px; }
.store-step-heading > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 999px; color: #fff; background: var(--st-gradient); font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.store-step-heading h3 { color: var(--st-text); font-size: 16px; font-weight: 850; letter-spacing: -0.02em; }
.store-step-heading p { max-width: 68ch; margin-top: 4px; color: var(--st-text-2); font-size: 13px; font-weight: 560; line-height: 1.45; }
.store-action-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--st-blue) 28%, var(--st-line)); border-radius: 14px; color: var(--st-blue); background: var(--st-blue-tint); text-align: left; cursor: pointer; transition: border-color 150ms ease-out, background 150ms ease-out, transform 150ms ease-out; }
.store-action-row:hover { border-color: color-mix(in srgb, var(--st-blue) 62%, var(--st-line)); background: color-mix(in srgb, var(--st-blue-tint) 84%, var(--st-card)); transform: translateY(-1px); }
.store-action-row:focus-visible { outline: 3px solid color-mix(in srgb, var(--st-blue) 38%, transparent); outline-offset: 2px; }
.store-action-icon { width: 46px; height: 46px; border-radius: 13px; }
.store-action-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.store-action-row strong { color: var(--st-blue); font-size: 15px; font-weight: 850; }
.store-action-row small { color: color-mix(in srgb, var(--st-blue) 64%, var(--st-text-2)); font-size: 12.5px; font-weight: 620; }
.store-url-field { position: relative; display: flex; align-items: center; }
.store-url-field > svg { position: absolute; z-index: 1; left: 13px; width: 19px; height: 19px; color: var(--st-text-3); pointer-events: none; }
.store-url-field .form-input { padding-right: 66px; padding-left: 42px; }
.store-url-field button { position: absolute; right: 7px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--st-blue); background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.store-url-field button:hover { background: var(--st-blue-tint); }
.store-validation { display: flex; align-items: center; gap: 6px; margin: -8px 0 0; font-size: 12.5px; font-weight: 670; }
.store-validation.error { color: var(--st-danger); }
.store-validation.success { color: var(--st-success); }
.store-toggle-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 0; cursor: pointer; }
.store-toggle-row + .store-toggle-row { padding-top: 13px; border-top: 1px solid var(--st-line); }
.store-toggle-row > span:first-child { display: grid; gap: 3px; }
.store-toggle-row strong { color: var(--st-text); font-size: 14px; font-weight: 800; }
.store-toggle-row small { color: var(--st-text-2); font-size: 12.5px; font-weight: 560; line-height: 1.35; }
.store-toggle-row.disabled { cursor: not-allowed; opacity: 0.48; }
.store-switch { position: relative; width: 46px; height: 28px; flex: 0 0 46px; }
.store-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.store-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--st-line-strong); transition: background 160ms ease-out; }
.store-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(17, 21, 31, 0.2); transition: transform 180ms cubic-bezier(.2, .78, .24, 1); }
.store-switch input:checked + i { background: var(--st-blue); }
.store-switch input:checked + i::after { transform: translateX(18px); }
.store-switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--st-blue) 40%, transparent); outline-offset: 3px; }
.store-deadline { padding-top: 12px; border-top: 1px solid var(--st-line); }
.store-deadline .form-label { display: flex; align-items: center; gap: 6px; }
.store-save-button { width: 100%; margin-top: 16px; }
.store-provider-note { margin: 9px 4px 0; color: var(--st-text-3); font-size: 12px; font-weight: 560; text-align: center; }
.store-shopper { display: grid; justify-items: center; gap: 10px; min-height: 360px; padding: clamp(46px, 9vw, 84px) 24px; border-radius: 16px; background: var(--st-bg); text-align: center; }
.store-shopper-icon { width: 88px; height: 88px; margin-bottom: 6px; border-radius: 26px; box-shadow: 0 16px 38px color-mix(in srgb, var(--st-blue) 18%, transparent); }
.store-shopper h3 { max-width: 20ch; color: var(--st-text); font-size: 24px; font-weight: 900; letter-spacing: -0.035em; }
.store-shopper p { max-width: 44ch; color: var(--st-text-2); font-size: 14px; font-weight: 580; line-height: 1.5; }
.store-shopper .button { margin-top: 10px; }
.store-shopper small { max-width: 54ch; margin-top: 4px; color: var(--st-text-3); font-size: 12px; line-height: 1.45; }
.store-unavailable .store-shopper-icon { color: var(--st-text-3); box-shadow: none; }
.store-browser-modal { width: min(1060px, 100%) !important; max-height: calc(100dvh - 32px); }
.store-browser-modal .modal-body { display: grid; max-height: calc(100dvh - 124px); gap: 12px; overflow: hidden; padding: 14px; }
.store-browser-toolbar { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; }
.store-browser-toolbar p,
.store-browser-help { margin: 0; color: var(--st-text-2); font-size: 12px; font-weight: 600; }
.store-browser-toolbar .button { text-decoration: none; white-space: nowrap; }
.store-browser-frame { height: min(68dvh, 720px); overflow: hidden; border-radius: 13px; background: var(--st-bg); }
.store-browser-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.store-browser-help { text-align: center; }
.store-builder-handoff { width: min(560px, 100%) !important; }
.store-builder-handoff .modal-body { overflow-y: auto; }
.store-builder-launch { display: grid; min-height: 330px; justify-items: center; align-content: center; gap: 10px; padding: 30px 22px 44px; text-align: center; }
.store-builder-launch h3,
.store-builder-launch p { margin: 0; }
.store-builder-launch h3 { color: var(--st-text); font-size: 22px; font-weight: 900; letter-spacing: -0.035em; }
.store-builder-launch p { max-width: 48ch; color: var(--st-text-2); font-size: 14px; font-weight: 580; line-height: 1.5; }
.store-builder-launch .button { margin-top: 12px; text-decoration: none; }
@media (max-width: 767px) {
  .store-detail-content { padding-bottom: calc(42px + var(--safe-bottom)); }
  .store-status { grid-template-columns: auto minmax(0, 1fr); }
  .store-status .button { grid-column: 1 / -1; width: 100%; }
  .team-store-card { padding: 16px; }
  .store-step-heading { grid-template-columns: 28px minmax(0, 1fr); }
  .store-step-heading > span { width: 28px; height: 28px; }
  .store-toggle-row { gap: 12px; }
  .store-browser-modal .modal-body { max-height: calc(92dvh - 132px - var(--safe-top)); padding: 12px; }
  .store-browser-toolbar { align-items: stretch; flex-direction: column; }
  .store-browser-toolbar .button { width: 100%; }
  .store-browser-frame { height: min(62dvh, 640px); }
}
.image-actions { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.image-actions label.button { cursor: pointer; }
.settings-group-list { display: grid; gap: 6px; }
.settings-group-row { display: flex; align-items: center; gap: 6px; min-height: 42px; padding-block: 5px; border-bottom: 1px solid var(--st-line); }
.settings-group-row > span { min-width: 0; flex: 1; color: var(--st-text); font-size: 13px; font-weight: 750; }
.settings-group-row > .form-input { min-width: 120px; flex: 1; }
.settings-group-row > .settings-group-order { display: flex; flex: 0 0 auto; gap: 3px; }
.settings-group-order button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px solid var(--st-line); border-radius: 9px; background: var(--st-card); color: var(--st-text-2); font: inherit; font-weight: 850; }
.settings-group-order button:disabled { opacity: 0.35; }
.settings-group-row > .settings-group-count { flex: 0 0 auto; color: var(--st-text-3); font-size: 12px; }
.settings-archived-groups { display: grid; gap: 6px; margin-top: 16px; }
.settings-group-row.archived > span:first-child { flex: 1; color: var(--st-text-2); }
.group-members-dialog { display: grid; gap: 14px; }
.group-member-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
.group-member-tabs .filter-chip { flex: 0 0 auto; }
.group-members-heading { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; color: var(--st-text-3); font-size: 11px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.group-members-list { display: grid; max-height: min(52dvh, 520px); overflow-y: auto; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card); }
.group-member-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 64px; align-items: center; gap: 12px; padding: 9px 11px 9px 14px; border: 0; border-bottom: 1px solid var(--st-line); background: transparent; color: var(--st-text); text-align: left; }
.group-member-row:last-child { border-bottom: 0; }
.group-member-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.group-member-row strong, .group-member-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-member-row strong { font-size: 14px; }
.group-member-row small { color: var(--st-text-3); font-size: 11.5px; font-weight: 650; }
.group-member-row.candidate { width: 100%; cursor: pointer; font: inherit; }
.group-member-row.candidate.active { background: var(--st-blue-tint); color: var(--st-selected-ink); }
.group-member-row.candidate.active small { color: color-mix(in srgb, var(--st-selected-ink) 75%, transparent); }
.group-member-check { color: var(--st-blue-ink); font-size: 24px; font-weight: 850; }
.group-member-row.candidate.active .group-member-check { color: var(--st-selected-ink); }
.group-member-remove { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: var(--st-danger-tint); color: var(--st-danger); cursor: pointer; font-size: 24px; font-weight: 800; }
.guardian-add { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.guardian-add .form-select { flex: 1; }

@media (max-width: 767px) {
  .settings-group-row { flex-wrap: wrap; }
  .settings-group-row > .form-input { order: -1; flex-basis: calc(100% - 76px); }
  .settings-group-row > .settings-group-order { order: -2; }
  .settings-group-row > .settings-group-count { margin-left: auto; }
}

.attendance-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin-top: 16px;
  overflow: auto;
}

.attendance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  color: var(--st-text);
  font-size: 13px;
  font-weight: 700;
}

.attendance-row .form-select {
  min-height: 36px;
  padding: 6px 30px 6px 9px;
}

.candidate-picker {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.candidate-picker label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--st-line-strong);
  border-radius: 13px;
  background: var(--st-card);
  cursor: pointer;
}

.candidate-picker label.active {
  border-color: var(--st-blue);
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
}

.candidate-picker label > span {
  display: grid;
  gap: 2px;
}

.candidate-picker small {
  color: var(--st-text-2);
}

.coach-note + .coach-note {
  padding-top: 12px;
  border-top: 1px solid var(--st-line);
}

.coach-note p {
  margin: 0 0 4px;
  white-space: pre-wrap;
}

.coach-note small {
  color: var(--st-text-3);
}

.note-composer {
  display: grid;
  justify-items: end;
  gap: 10px;
  margin-top: 16px;
}

.note-composer .form-textarea {
  width: 100%;
}

.runner-error {
  position: relative;
  z-index: 3;
  width: min(760px, calc(100% - 28px));
  margin: 12px auto 0;
}

.runner-progress-copy {
  margin-right: auto;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 800;
}

.live-runner-card.running {
  border-color: var(--st-blue);
  box-shadow: 0 10px 24px var(--st-blue-soft);
}

.live-runner-card.complete {
  border-color: #b8e5cf;
  background: #f0fbf6;
}

.result-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.result-button:hover {
  background: var(--st-blue-tint);
}

@media (max-width: 767px) {
  .attendance-row {
    grid-template-columns: minmax(0, 1fr) 122px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--st-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--st-font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--st-blue-ink);
  text-decoration: none;
}

a:hover {
  color: var(--st-blue);
}

::selection {
  background: rgba(58, 109, 240, 0.2);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(17, 21, 31, 0.16);
  background-clip: padding-box;
}

#app-root,
.app-root {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

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

.mobile-only {
  display: none !important;
}

.numeric,
.event-time,
.stat-value,
.tile-count,
.unread-badge,
.split-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

:focus-visible {
  outline: 3px solid rgba(58, 109, 240, 0.32);
  outline-offset: 2px;
}

/* Authentication */
.auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  padding: max(28px, var(--safe-top)) max(24px, var(--safe-right)) max(28px, var(--safe-bottom)) max(24px, var(--safe-left));
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 255, 255, 0.34), transparent 26%),
    radial-gradient(circle at 88% 85%, rgba(16, 37, 113, 0.26), transparent 34%),
    var(--st-gradient);
}

.auth-home-link {
  position: absolute;
  z-index: 3;
  top: max(22px, var(--safe-top));
  left: max(24px, var(--safe-left));
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.auth-home-link img {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(16, 31, 93, 0.22);
}

.auth-home-link:hover img {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.auth-home-link img {
  transition: filter 140ms ease, transform 140ms ease;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(390px, 500px);
  align-items: center;
  gap: clamp(44px, 8vw, 120px);
  width: min(1120px, 100%);
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  margin: 0 auto;
}

.auth-brand {
  color: #fff;
}

.auth-brand-mark,
.auth-logo {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(16, 31, 93, 0.25);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.auth-brand-mark img,
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-kicker {
  margin: 24px 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-brand h1,
.auth-brand-title {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 840;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-brand p,
.auth-brand-copy {
  max-width: 580px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 570;
  line-height: 1.55;
}

.auth-panel,
.auth-card {
  width: 100%;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 80px rgba(12, 24, 75, 0.28);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
}

.auth-title {
  margin: 0;
  font-size: 30px;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.auth-subtitle {
  margin: 7px 0 0;
  color: var(--st-text-2);
  font-size: 15px;
  font-weight: 560;
}

.auth-development-code {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(58, 109, 240, 0.22);
  border-radius: 14px;
  background: rgba(58, 109, 240, 0.08);
  color: var(--st-blue);
  text-align: center;
}

.auth-development-code span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-development-code strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
}

.auth-form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
}

.auth-field,
.form-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.auth-label,
.form-label {
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.auth-input,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--st-line-strong);
  border-radius: 13px;
  outline: 0;
  background: var(--st-card);
  box-shadow: inset 0 1px 2px rgba(17, 21, 31, 0.025);
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 610;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.auth-input,
.form-input,
.form-select {
  height: 48px;
  padding: 0 14px;
}

.form-textarea {
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
}

.auth-input:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(58, 109, 240, 0.64);
  box-shadow: 0 0 0 4px rgba(58, 109, 240, 0.11);
}

.auth-input::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--st-text-3);
  font-weight: 540;
}

.auth-error,
.form-error,
.error-banner {
  border: 1px solid rgba(216, 58, 79, 0.2);
  border-radius: 12px;
  background: var(--st-danger-tint);
  color: #ad2438;
  font-size: 13.5px;
  font-weight: 650;
}

.auth-error,
.error-banner {
  padding: 11px 13px;
}

.form-error {
  border: 0;
  background: transparent;
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.auth-help,
.auth-footer {
  margin: 18px 0 0;
  color: var(--st-text-2);
  font-size: 13.5px;
  font-weight: 580;
  text-align: center;
}

/* Application shell */
.app-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  /* Match the desktop header and accent strip through the rounded sheet
     corners. Mobile applies its contrast-safe header treatment below. */
  background: var(--st-gradient);
}

.accent-strip,
.top-accent {
  position: relative;
  z-index: 40;
  width: 100%;
  height: var(--st-accent-height);
  flex: 0 0 var(--st-accent-height);
  background: var(--st-gradient);
}

.topbar,
.app-topbar {
  position: relative;
  z-index: 40;
  display: flex;
  height: var(--st-topbar-height);
  flex: 0 0 var(--st-topbar-height);
  align-items: center;
  gap: 20px;
  /* The content sheet overlaps the bottom of the bar. Reserving that same
     space here centers the identity and profile in the visible blue area. */
  padding: 0 24px var(--st-shell-overlap);
  border: 0;
  background: var(--st-gradient);
  color: #fff;
}

.topbar .team-name,
.topbar .coach-name,
.app-topbar .team-name,
.app-topbar .coach-name {
  color: #fff;
}

.topbar .team-season,
.topbar .team-role,
.topbar .coach-role,
.app-topbar .team-season,
.app-topbar .team-role,
.app-topbar .coach-role {
  color: rgba(255, 255, 255, 0.84);
}

.topbar .team-season option,
.app-topbar .team-season option {
  color: var(--st-text);
}

.topbar .coach-avatar,
.app-topbar .coach-avatar {
  box-shadow: 0 0 0 3px #fff, 0 3px 12px rgba(10, 20, 70, 0.3);
}

.assistant-help-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(10, 20, 70, 0.15);
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.mobile-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Assistant Coach */
.modal.assistant-modal {
  display: flex;
  height: min(760px, calc(100dvh - 48px));
  flex-direction: column;
}

.assistant-modal .modal-header {
  flex: 0 0 auto;
}

.assistant-modal .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
  overflow: hidden;
}

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

.assistant-transcript {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 2px 4px 8px;
}

.assistant-welcome,
.assistant-thinking,
.assistant-proposal header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-welcome {
  padding: 8px 2px;
}

.assistant-welcome h3,
.assistant-proposal h3 {
  margin: 0;
  color: var(--st-text);
  font-size: 19px;
  font-weight: 850;
}

.assistant-welcome p,
.assistant-proposal p {
  margin: 4px 0 0;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.assistant-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--st-gradient);
  color: #fff;
}

.assistant-mark svg {
  width: 19px;
  height: 19px;
}

.assistant-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.assistant-suggestions button {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--st-line);
  border-radius: 15px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  text-align: left;
}

.assistant-suggestions button svg {
  width: 18px;
  flex: 0 0 18px;
  color: var(--st-blue-ink);
}

.assistant-suggestions button span:last-child {
  margin-left: auto;
  color: var(--st-text-3);
}

.assistant-suggestions.compact {
  grid-template-columns: 1fr;
}

.assistant-suggestions.compact button {
  min-height: 46px;
}

.assistant-message {
  display: flex;
}

.assistant-message span {
  max-width: min(82%, 620px);
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
  color: var(--st-text);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.5;
  white-space: pre-wrap;
}

.assistant-message.user {
  justify-content: flex-end;
}

.assistant-message.user span {
  background: var(--st-gradient);
  color: #fff;
}

.assistant-thinking {
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 650;
}

.assistant-thinking .assistant-mark {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
}

.assistant-thinking .spinner {
  width: 18px;
  height: 18px;
}

.assistant-proposal {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--st-line);
  border-radius: 17px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-md);
}

.assistant-proposal.destructive {
  border-color: rgba(216, 58, 79, 0.25);
}

.assistant-proposal dl {
  margin: 0;
  overflow: hidden;
  border-radius: 13px;
  background: var(--st-bg);
}

.assistant-proposal dl div {
  display: grid;
  grid-template-columns: minmax(80px, 0.3fr) 1fr;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--st-line);
}

.assistant-proposal dl div:last-child {
  border-bottom: 0;
}

.assistant-proposal dt {
  color: var(--st-text-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.assistant-proposal dd {
  margin: 0;
  color: var(--st-text);
  font-size: 13px;
  font-weight: 650;
}

.assistant-proposal-actions {
  display: flex;
  gap: 12px;
}

.assistant-proposal-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--st-text-2);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.assistant-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--st-line);
  border-radius: 17px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-sm);
}

.assistant-composer .form-textarea {
  min-height: 42px;
  max-height: 120px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.invite-share-surface {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.invite-share-surface section {
  display: grid;
  min-width: 0;
  min-height: 150px;
  overflow: hidden;
  place-content: center;
  gap: 8px;
  border-radius: 20px;
  background: var(--st-blue-tint);
  color: var(--st-text-3);
  text-align: center;
  text-transform: uppercase;
}

.invite-share-surface section span {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.invite-share-surface section strong {
  max-width: 100%;
  color: var(--st-blue-ink);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.invite-share-link {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
  color: var(--st-text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-identity,
.topbar-team {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.team-selector-trigger {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.team-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.team-selector-chevron {
  flex: 0 0 auto;
  opacity: 0.76;
  transform: rotate(90deg);
  transition: opacity 140ms ease, transform 180ms ease;
}

.team-selector-trigger:hover .team-selector-chevron {
  opacity: 1;
}

.team-selector-trigger[aria-expanded="true"] .team-selector-chevron {
  transform: rotate(-90deg);
}

.team-identity.has-picker {
  position: relative;
}

.team-season-placeholder {
  visibility: hidden;
}

.team-identity.has-picker > .team-season {
  position: absolute;
  z-index: 2;
  bottom: 2px;
  left: 58px;
}

.team-logo,
.team-badge {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 21, 31, 0.05), 0 2px 8px rgba(10, 20, 70, 0.16);
}

.team-logo img,
.team-badge img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.team-copy {
  min-width: 0;
}

.team-name {
  overflow: hidden;
  color: var(--st-text);
  font-size: 17.5px;
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-season,
.team-role {
  margin-top: 3px;
  overflow: hidden;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-spacer {
  flex: 1;
}

.topbar-actions,
.coach-profile {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.search > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coach-copy,
.coach-meta {
  text-align: right;
}

.coach-name {
  color: var(--st-text);
  font-size: 15px;
  font-weight: 760;
}

.coach-role {
  margin-top: 1px;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 640;
}

.coach-avatar,
.avatar-photo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--st-blue-tint);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--st-blue-soft), var(--st-shadow-xs);
}

.coach-avatar img,
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-body,
.shell-body {
  position: relative;
  z-index: 42;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  margin-top: calc(-1 * var(--st-shell-overlap));
  overflow: hidden;
  border-radius: var(--st-shell-corner) var(--st-shell-corner) 0 0;
  background: var(--st-bg);
}

.offline-banner + .app-body,
.offline-banner + .shell-body {
  margin-top: 0;
}

.sidebar,
.app-sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  width: var(--st-sidebar-width);
  min-width: var(--st-sidebar-width);
  min-height: 0;
  flex-direction: column;
  padding: 14px 10px;
  border-right: 1px solid var(--st-line);
  background: var(--st-card);
  transition: width 180ms ease, min-width 180ms ease;
}

.sidebar-nav,
.nav-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 3px;
}

.sidebar-item,
.nav-item {
  display: flex;
  width: 100%;
  height: 50px;
  flex: 0 0 50px;
  align-items: center;
  gap: 13px;
  padding: 0 15px;
  border-radius: 12px;
  background: transparent;
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-align: left;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.sidebar-item:hover,
.nav-item:hover {
  background: var(--st-slate-tint);
  color: var(--st-text);
}

.sidebar-item:active,
.nav-item:active {
  transform: scale(0.98);
}

.sidebar-item.active,
.sidebar-item[aria-current="page"],
.nav-item.active,
.nav-item[aria-current="page"] {
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
  font-weight: 800;
}

.sidebar-icon,
.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
}

.sidebar-icon svg,
.nav-icon svg {
  width: 23px;
  height: 23px;
}

.sidebar-label,
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace,
.app-workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: var(--st-bg);
}

.master-detail,
.split-view {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.master-pane,
.master-list {
  display: flex;
  width: var(--st-master-width);
  min-width: var(--st-master-width);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--st-bg);
}

.master-pane.master-narrow,
.master-list.master-narrow,
.chat-master {
  width: 330px;
  min-width: 330px;
}

.detail-pane,
.detail-view {
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border-left: 1px solid var(--st-line);
  background: var(--st-card);
}

.master-header {
  flex: 0 0 auto;
  padding: 20px 18px 14px;
}

.master-heading,
.master-title-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.master-title-group {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.master-title {
  margin: 0;
  overflow: hidden;
  color: var(--st-text);
  font-size: 25px;
  font-weight: 830;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-count,
.count-label {
  flex: 0 0 auto;
  color: var(--st-text-3);
  font-size: 14px;
  font-weight: 750;
}

.master-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

.master-scroll,
.master-content {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 24px;
}

.detail-scroll {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-content {
  width: min(100%, 836px);
  padding: 24px 28px 44px;
}

.detail-content.wide {
  width: min(100%, 1036px);
}

.detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-heading {
  min-width: 260px;
  flex: 1 1 300px;
}

.detail-eyebrow {
  margin-bottom: 10px;
}

.detail-title {
  margin: 0;
  color: var(--st-text);
  font-size: 31px;
  font-weight: 830;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.detail-subtitle {
  margin: 7px 0 0;
  color: var(--st-text-2);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.event-actions {
  position: relative;
  flex: 0 0 auto;
}

.event-actions-trigger {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--st-blue) 18%, var(--st-line));
  border-radius: 50%;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
}

.event-actions-trigger:hover,
.event-actions-trigger[aria-expanded="true"] {
  background: color-mix(in srgb, var(--st-blue-tint) 70%, var(--st-card));
  color: var(--st-text);
}

.event-actions-trigger:active {
  transform: scale(.96);
}

.event-actions-trigger:disabled {
  cursor: default;
  opacity: .48;
  transform: none;
}

.event-actions-trigger:focus-visible,
.event-actions-menu button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--st-blue) 34%, transparent);
  outline-offset: 2px;
}

.event-actions-trigger svg {
  width: 22px;
  height: 22px;
}

.event-actions-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 188px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-lg);
  animation: modal-in 150ms cubic-bezier(.2, .78, .24, 1) both;
}

.event-actions-menu button {
  display: grid;
  min-height: 44px;
  grid-template-columns: 21px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 740;
  text-align: left;
}

.event-actions-menu button:hover {
  background: var(--st-bg);
}

.event-actions-menu button.danger {
  color: var(--st-danger);
}

.event-actions-menu svg {
  width: 19px;
  height: 19px;
}

.mobile-detail-header,
.detail-overflow-menu {
  display: none;
}

.detail-back svg,
.detail-close svg {
  width: 22px;
  height: 22px;
}

.detail-overflow-menu summary {
  list-style: none;
}

.detail-overflow-menu summary::-webkit-details-marker {
  display: none;
}

.detail-overflow-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: min(244px, calc(100vw - 32px));
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-lg);
  animation: modal-in 150ms cubic-bezier(.2, .78, .24, 1) both;
}

.detail-overflow-popover .button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--st-text);
  text-align: left;
}

.detail-overflow-popover .button.btn-danger {
  color: var(--st-danger);
}

.detail-overflow-popover .button:hover {
  background: var(--st-bg);
}

.detail-back,
.detail-close {
  display: none;
}

.mobile-header,
.mobile-tabbar,
.bottom-tabbar {
  display: none;
}

/* Buttons and controls */
.btn,
.button {
  position: relative;
  display: inline-flex;
  min-width: 0;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
  color: var(--st-text);
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 120ms ease, box-shadow 140ms ease, background 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.btn:hover,
.button:hover {
  background: #f9fafc;
  box-shadow: 0 3px 9px rgba(17, 21, 31, 0.08);
}

.btn:active,
.button:active {
  transform: scale(0.975);
}

.btn-primary,
.button.primary,
.btn.primary {
  border-color: transparent;
  background: var(--st-gradient);
  box-shadow: 0 5px 14px rgba(46, 91, 230, 0.23);
  color: #fff;
}

.btn-primary:hover,
.button.primary:hover,
.btn.primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  border-color: rgba(58, 109, 240, 0.14);
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--st-text-2);
}

.btn-ghost:hover {
  background: var(--st-slate-tint);
  box-shadow: none;
  color: var(--st-text);
}

.btn-danger {
  border-color: rgba(216, 58, 79, 0.14);
  background: var(--st-danger-tint);
  color: var(--st-danger);
}

.btn-sm,
.button.small,
.btn.small {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-lg {
  height: 50px;
  padding: 0 23px;
  border-radius: 14px;
  font-size: 16px;
}

.btn-icon,
.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.btn svg,
.button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn:disabled,
.button:disabled,
.icon-button:disabled {
  cursor: default;
  filter: none;
  opacity: 0.48;
  transform: none;
}

.search,
.search-control,
.search-box {
  display: flex;
  height: 42px;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--st-card);
  box-shadow: 0 1px 3px rgba(17, 21, 31, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search:focus-within,
.search-control:focus-within,
.search-box:focus-within {
  border-color: rgba(58, 109, 240, 0.38);
  box-shadow: 0 0 0 4px rgba(58, 109, 240, 0.09);
}

.search-icon {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  color: var(--st-text-3);
}

.search-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--st-text);
  font-size: 15px;
  font-weight: 600;
}

.search-input::placeholder {
  color: var(--st-text-3);
}

.search-reveal {
  animation: search-reveal-in 160ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.search-filter-tools {
  gap: 9px;
}

.search-filter-options {
  min-width: 0;
  flex: 1;
}

.search-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--st-line);
  border-radius: 50%;
  background: var(--st-card);
  box-shadow: 0 2px 8px rgba(17, 21, 31, 0.06);
  color: var(--st-blue);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.search-toggle:hover {
  border-color: color-mix(in srgb, var(--st-blue) 35%, var(--st-line));
  background: var(--st-blue-tint);
}

.search-toggle:active {
  transform: scale(0.95);
}

.search-toggle.active {
  border-color: transparent;
  background: var(--st-gradient);
  box-shadow: 0 6px 16px -5px color-mix(in srgb, var(--st-blue) 55%, transparent);
  color: #fff;
}

.search-toggle > svg {
  width: 20px;
  height: 20px;
}

.filter-row,
.chip-row,
.training-filters {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar,
.chip-row::-webkit-scrollbar,
.training-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip,
.segmented-button {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 750;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease, transform 120ms ease;
}

.filter-chip:hover,
.segmented-button:hover {
  background: color-mix(in srgb, var(--st-slate-tint) 72%, var(--st-text-2));
  color: var(--st-text);
}

.filter-chip:active,
.segmented-button:active {
  transform: scale(0.96);
}

.filter-chip.active,
.filter-chip[aria-pressed="true"],
.segmented-button.active,
.segmented-button[aria-selected="true"] {
  background: var(--st-gradient);
  box-shadow: 0 5px 14px -4px rgba(58, 109, 240, 0.34);
  color: #fff;
}

.chip,
.status-chip,
.type-chip {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
}

.chip.large,
.chip-lg {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.chip-neutral {
  background: var(--st-slate-tint);
  color: var(--st-slate);
}

.chip-success {
  background: var(--st-success-tint);
  color: var(--st-success);
}

.chip-warning {
  background: var(--st-warning-tint);
  color: var(--st-warning);
}

.chip-danger {
  background: var(--st-danger-tint);
  color: var(--st-danger);
}

.chip-orange {
  background: var(--st-orange-tint);
  color: var(--st-orange);
}

.chip-purple {
  background: var(--st-purple-tint);
  color: var(--st-purple-ink);
}

/* Tiles, cards and data display */
.tile,
.list-tile {
  position: relative;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-sm);
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.tile:hover,
.list-tile:hover {
  z-index: 1;
  box-shadow: 0 5px 16px rgba(17, 21, 31, 0.1);
  transform: translateY(-1px);
}

.tile:active,
.list-tile:active {
  transform: scale(0.992);
}

.tile.active,
.tile.is-selected,
.tile[aria-selected="true"],
.list-tile.active,
.list-tile.is-selected {
  background: var(--st-blue-tint);
  box-shadow: 0 0 0 1.5px rgba(42, 84, 214, 0.2), var(--st-shadow-sm);
  transform: none;
}

.tile-row,
.tile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.tile-copy {
  min-width: 0;
  flex: 1;
}

.tile-header,
.tile-meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.tile-title {
  min-width: 0;
  overflow: hidden;
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 760;
  letter-spacing: -0.018em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-subtitle,
.tile-meta {
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: var(--st-text-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-count,
.tile-trailing {
  flex: 0 0 auto;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 750;
}

.section-label,
.card-title,
.eyebrow {
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-label {
  margin: 18px 4px 9px;
}

.card,
.detail-card,
.content-card {
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  background: var(--st-bg);
}

.card + .card,
.detail-card + .detail-card,
.content-card + .content-card {
  margin-top: 12px;
}

.card-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-action {
  flex: 0 0 auto;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 750;
}

.stats-grid,
.stat-grid,
.runner-metric-grid,
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card,
.stat {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--st-bg);
}

.card .stat-card,
.card .stat {
  background: var(--st-card);
}

.stat-label {
  overflow: hidden;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-value {
  margin-top: 4px;
  overflow: hidden;
  color: var(--st-text);
  font-size: 27px;
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card.accent .stat-value,
.stat-value.accent {
  color: var(--st-blue-ink);
}

.stat-card.success .stat-value,
.stat-value.success {
  color: var(--st-success);
}

.stat-card.warning .stat-value,
.stat-value.warning {
  color: var(--st-warning);
}

.stat-sub,
.stat-caption {
  margin-top: 2px;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 600;
}

.kv-list {
  display: grid;
}

.kv-row {
  display: grid;
  grid-template-columns: 20px minmax(92px, 120px) minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--st-line);
}

/* Key/value rows may include an icon, or may begin directly with a label. */
.kv-row:not(:has(.kv-icon)) {
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr) auto;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-icon {
  color: var(--st-text-3);
}

.kv-label {
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 650;
}

.kv-value {
  min-width: 0;
  overflow: hidden;
  color: var(--st-text);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress,
.progress-track {
  position: relative;
  height: 7px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 21, 31, 0.09);
}

.progress-bar,
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--st-gradient);
  transition: width 260ms ease;
}

.progress-label {
  flex: 0 0 auto;
  color: var(--st-text-2);
  font-size: 12.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.avatar,
.person-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-color, var(--st-blue));
  box-shadow: var(--st-shadow-xs);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.avatar img,
.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.sm {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 11px;
}

.avatar.lg {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  font-size: 24px;
}

.divider {
  height: 1px;
  border: 0;
  background: var(--st-line);
}

/* Forms */
.form,
.form-stack {
  display: grid;
  gap: 17px;
}

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

.event-program-editor {
  gap: 14px;
}

.event-program-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-program-heading > span {
  display: grid;
  gap: 2px;
}

.event-program-heading small {
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 650;
}

.event-program-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
}

.event-program-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.event-program-row + .event-program-row {
  border-top: 1px solid var(--st-line);
}

.event-program-row.track {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.45fr);
  align-items: center;
}

.event-program-row.track:not(.selected) {
  opacity: 0.58;
}

.event-program-row .form-group {
  gap: 5px;
}

.form-group.full,
.form-span-full {
  grid-column: 1 / -1;
}

.form-hint {
  color: var(--st-text-3);
  font-size: 12.5px;
  font-weight: 560;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
}

.checkbox-row,
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 620;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--st-blue);
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: #cbd1da;
  cursor: pointer;
  transition: background 150ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 21, 31, 0.24);
  transition: transform 160ms ease;
}

.switch.active,
.switch[aria-checked="true"] {
  background: var(--st-blue);
}

.switch.active::after,
.switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 11px 14px;
  background: var(--st-bg);
  color: var(--st-text-3);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--st-line);
  color: var(--st-text);
  font-weight: 620;
}

.data-table tbody tr:hover {
  background: rgba(58, 109, 240, 0.035);
}

/* Schedule */
.day-group {
  margin: 0 0 8px;
}

.day-heading,
.day-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 4px 10px;
}

.day-label {
  flex: 0 0 auto;
  color: var(--st-text);
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

.day-divider {
  height: 1.5px;
  min-width: 20px;
  flex: 1 1 auto;
  border-radius: 999px;
  background: var(--st-line);
}

.day-date {
  flex: 0 0 auto;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.event-tile {
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 20px;
}

.filter-chip-count {
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.schedule-needs-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--st-warning) 38%, transparent);
  border-radius: 999px;
  background: var(--st-warning-tint);
  color: var(--st-warning-ink);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.capture-invite-main .schedule-needs-action {
  width: max-content;
  margin-top: 4px;
}

.capture-invite-card {
  margin: 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(49, 109, 244, 0.25);
  border-radius: 14px;
  background: var(--st-blue-tint);
  box-shadow: 0 5px 18px rgba(31, 64, 133, 0.06);
}

.capture-invite-card.accepted {
  border-color: rgba(30, 159, 111, 0.25);
  background: rgba(30, 159, 111, 0.08);
}

.capture-invite-main {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 13px;
  border: 0;
  background: transparent;
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
}

.capture-invite-main:focus-visible {
  outline: 3px solid rgba(58, 109, 240, 0.22);
  outline-offset: -3px;
}

.capture-invite-kicker {
  color: var(--st-blue-ink);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.capture-invite-main strong {
  font-size: 14px;
}

.capture-invite-main small {
  color: var(--st-text-2);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

.capture-invite-actions {
  display: flex;
  gap: 7px;
  padding: 0 13px 13px;
}

.capture-invite-error {
  margin: 10px 12px;
}

.event-time-block {
  display: grid;
  width: 62px;
  flex: 0 0 62px;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.event-time {
  color: var(--st-text);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-period {
  color: var(--st-blue-ink);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.event-accent {
  width: 2.5px;
  height: 70px;
  flex: 0 0 2.5px;
  border-radius: 999px;
  background: var(--st-blue);
}

.event-accent.practice,
.event-tile.practice .event-accent {
  background: var(--st-blue);
}

.event-accent.meet,
.event-accent.race,
.event-tile.meet .event-accent,
.event-tile.race .event-accent {
  background: var(--st-purple);
}

.event-accent.strength,
.event-accent.lift,
.event-tile.strength .event-accent,
.event-tile.lift .event-accent {
  background: var(--st-slate);
}

.event-accent.meeting,
.event-tile.meeting .event-accent {
  background: var(--st-warning);
}

.event-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 7px;
}

.event-topline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.event-type-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-type-pill svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  stroke-width: 2.2;
}

.event-type-pill.lift {
  background: var(--st-slate-tint);
  color: var(--st-slate);
}

.event-type-pill.meeting {
  background: var(--st-warning-tint);
  color: var(--st-warning);
}

.event-status-badge {
  overflow: hidden;
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-status-badge.action,
.event-status-badge.progress,
.event-status-badge.maybe {
  background: var(--st-warning-tint);
  color: var(--st-warning-ink);
}

.event-status-badge.complete,
.event-status-badge.going {
  background: var(--st-success-tint);
  color: var(--st-success);
}

.event-status-badge.out {
  background: var(--st-danger-tint);
  color: var(--st-danger);
}

.event-tile .tile-title {
  display: block;
  font-size: 15.5px;
  font-weight: 780;
  line-height: 1.15;
}

.event-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--st-text-2);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
}

.event-meta-item {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.event-meta-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-meta-item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 2;
}

.event-rsvp {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.event-disclosure {
  display: grid;
  width: 18px;
  height: 28px;
  flex: 0 0 18px;
  place-items: center;
  color: var(--st-text-3);
}

.event-disclosure svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.event-tile.race,
.event-tile.race.active,
.event-tile.race[aria-selected="true"] {
  background: var(--st-gradient);
  box-shadow: 0 8px 20px var(--st-blue-soft);
}

.event-tile.race .event-time,
.event-tile.race .tile-title,
.event-tile.race .event-type-pill {
  color: #fff;
}

.event-tile.race .event-period,
.event-tile.race .event-meta,
.event-tile.race .event-disclosure {
  color: rgba(255, 255, 255, 0.76);
}

.event-tile.race .event-accent {
  background: rgba(255, 255, 255, 0.46);
}

.event-tile.race .event-type-pill {
  background: rgba(255, 255, 255, 0.18);
}

.event-tile.race.active,
.event-tile.race[aria-selected="true"] {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72), 0 0 0 4px var(--st-blue-soft), 0 8px 20px var(--st-blue-soft);
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.calendar-day {
  display: grid;
  min-width: 44px;
  min-height: 58px;
  place-items: center;
  border-radius: 14px;
  background: var(--st-card);
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 700;
}

.calendar-day strong {
  color: var(--st-text);
  font-size: 18px;
}

.calendar-day.active {
  background: var(--st-gradient);
  box-shadow: 0 6px 16px var(--st-blue-soft);
  color: rgba(255, 255, 255, 0.75);
}

.calendar-day.active strong {
  color: #fff;
}

/* Tasks */
.task-tile {
  display: block;
}

.schedule-task-tile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-task-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.schedule-task-check {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 2px solid var(--st-line-strong);
  background: var(--st-card);
  cursor: pointer;
}

.schedule-meet-unit {
  display: grid;
  margin-bottom: 8px;
}

.schedule-meet-unit > .event-tile {
  margin-bottom: 7px;
}

.schedule-meet-assignment {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px 18px;
  padding: 8px 10px;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.schedule-meet-confirm {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 2px solid var(--st-line-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.schedule-meet-confirm.confirmed {
  border-color: var(--st-success);
  background: var(--st-success);
  color: #fff;
}

.schedule-meet-confirm .spinner {
  width: 16px;
  height: 16px;
}

.schedule-meet-assignment-main {
  display: flex;
  min-width: 0;
  min-height: 44px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.schedule-meet-assignment-main > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.schedule-meet-assignment-main strong,
.schedule-meet-assignment-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-meet-assignment-main strong { font-size: 13px; }
.schedule-meet-assignment-main small { color: var(--st-text-3); font-size: 11px; font-weight: 650; }

.schedule-meet-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 8px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.schedule-meet-icon svg { width: 15px; height: 15px; }

.schedule-confirmed {
  color: var(--st-success);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.task-head,
.task-meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.task-cadence {
  color: var(--st-text-3);
  font-size: 12.5px;
  font-weight: 700;
}

.task-completion {
  margin-left: auto;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.task-description {
  margin-top: 8px;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 590;
  line-height: 1.55;
}

.task-check {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 2px solid #cbd1da;
  border-radius: 50%;
  color: transparent;
}

.task-check.complete {
  border-color: var(--st-success);
  background: var(--st-success);
  color: #fff;
}

/* Roster and runner profiles */
.roster-group {
  margin: 0;
}

.roster-group-heading {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 12px 4px 8px;
}

.roster-group-name {
  color: var(--st-text);
  font-size: 14.5px;
  font-weight: 800;
}

.roster-group-count {
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 650;
}

.athlete-tile,
.runner-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.profile-hero,
.runner-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.profile-copy,
.runner-hero-copy {
  min-width: 220px;
  flex: 1;
}

.profile-name,
.runner-name {
  margin: 0;
  overflow: hidden;
  color: var(--st-text);
  font-size: 31px;
  font-weight: 830;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta,
.runner-meta {
  margin-top: 5px;
  color: var(--st-text-2);
  font-size: 16px;
  font-weight: 600;
}

.profile-actions,
.runner-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.runner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.runner-card {
  min-width: 0;
  padding: 16px;
  border-radius: 17px;
  background: var(--st-bg);
}

.runner-card-title {
  color: var(--st-text);
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.runner-card-subtitle {
  margin-top: 3px;
  color: var(--st-text-2);
  font-size: 13.5px;
  font-weight: 590;
}

.split-table,
.splits-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
}

.race-result-list {
  display: grid;
  gap: 12px;
}

.race-result-card summary {
  list-style: none;
  cursor: pointer;
}

.race-result-card summary::-webkit-details-marker {
  display: none;
}

.race-result-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.race-result-summary > span:first-child {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.race-result-summary strong {
  overflow: hidden;
  color: var(--st-text);
  font-size: 14.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-result-summary small {
  overflow: hidden;
  color: var(--st-text-3);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-result-mark {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--st-text);
  font-size: 17px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.race-result-card details > summary::after {
  content: "›";
  margin-left: 8px;
  color: var(--st-text-3);
  font-size: 20px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.race-result-card details[open] > summary::after {
  transform: rotate(90deg);
}

.race-result-splits {
  margin-top: 12px;
  border-top: 1px solid var(--st-line);
}

.split-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(74px, auto) minmax(74px, auto);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--st-line);
}

.split-row:last-child {
  border-bottom: 0;
}

.split-row.header {
  min-height: 38px;
  background: var(--st-bg);
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.split-label {
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 650;
}

.split-time {
  color: var(--st-text);
  font-size: 15px;
  font-weight: 780;
  text-align: right;
}

/* Chat */
.chat-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chat-thread,
.chat-detail {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  background: var(--st-card);
}

.conversation-tile,
.chat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 11px;
  padding-bottom: 11px;
}

.conversation-icon,
.chat-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.conversation-icon.announcement {
  background: var(--st-gradient);
  color: #fff;
}

.conversation-icon.event {
  background: var(--st-warning-tint);
  color: var(--st-warning);
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.conversation-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 760;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-time {
  flex: 0 0 auto;
  color: var(--st-text-3);
  font-size: 12.5px;
  font-weight: 650;
}

.conversation-preview {
  margin-top: 2px;
  overflow: hidden;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-tile.unread .conversation-name,
.conversation-tile.unread .conversation-preview {
  color: var(--st-text);
  font-weight: 800;
}

.unread-badge {
  display: grid;
  min-width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--st-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 820;
}

.chat-header {
  display: flex;
  min-height: 75px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-card) 96%, transparent);
}

.chat-header-copy {
  min-width: 0;
  flex: 1;
}

.chat-header-title {
  overflow: hidden;
  color: var(--st-text);
  font-size: 18px;
  font-weight: 810;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header-subtitle {
  overflow: hidden;
  color: var(--st-text-3);
  font-size: 13.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-actions-menu {
  position: relative;
  margin-left: auto;
}

.chat-actions-menu > summary {
  display: grid;
  min-width: 42px;
  place-items: center;
  list-style: none;
}

.chat-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.chat-actions-menu > summary svg {
  width: 20px;
  height: 20px;
}

.chat-messages,
.message-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  scrollbar-gutter: stable;
}

.chat-messages > .loading-state {
  min-height: 0;
  flex: 1;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.message-row.mine,
.message-row.is-me {
  flex-direction: row-reverse;
}

.message-content {
  max-width: min(72%, 520px);
}

.message-author {
  margin: 0 0 3px 4px;
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 750;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 16px 16px 16px 5px;
  background: var(--st-bg);
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.mine .message-bubble,
.is-me .message-bubble,
.message-bubble.mine {
  border-radius: 16px 16px 5px 16px;
  background: var(--st-gradient);
  color: #fff;
}

.message-time {
  margin: 0;
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 650;
}

.message-meta {
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 4px;
  padding: 1px 3px 0;
}

.mine .message-meta,
.is-me .message-meta {
  justify-content: flex-end;
}

.message-actions-trigger {
  display: grid;
  width: 28px;
  height: 24px;
  place-items: center;
  padding: 0 0 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--st-text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1px;
  line-height: 1;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}

.message-row:hover .message-actions-trigger,
.message-actions-trigger:focus-visible,
.message-actions-trigger[aria-expanded="true"] {
  background: var(--st-bg);
  color: var(--st-text-2);
  opacity: 1;
}

.chat-composer {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 24px max(18px, var(--safe-bottom));
  border-top: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-card) 97%, transparent);
}

.chat-input {
  min-width: 0;
  min-height: 42px;
  max-height: 130px;
  flex: 1;
  padding: 10px 17px;
  overflow-y: auto;
  border: 1px solid var(--st-line);
  border-radius: 21px;
  outline: 0;
  background: var(--st-bg);
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  resize: none;
}

.chat-input:focus {
  border-color: rgba(58, 109, 240, 0.4);
  box-shadow: 0 0 0 4px rgba(58, 109, 240, 0.08);
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--st-gradient);
  box-shadow: 0 4px 12px var(--st-blue-soft);
  color: #fff;
  cursor: pointer;
  transition: filter 140ms ease, transform 120ms ease;
}

.send-button:hover {
  filter: brightness(1.06);
}

.send-button:active {
  transform: scale(0.92);
}

/* Training and workouts */
.training-tile,
.workout-tile {
  display: block;
}

.training-meta,
.workout-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.training-duration,
.workout-duration {
  margin-left: auto;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 750;
}

.training-focus,
.workout-focus {
  color: var(--st-text-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.training-block,
.workout-block {
  padding: 18px;
  border-radius: 18px;
  background: var(--st-bg);
}

.training-block + .training-block,
.workout-block + .workout-block {
  margin-top: 12px;
}

.training-step,
.workout-step {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 41px;
  padding: 8px 0;
  border-bottom: 1px solid var(--st-line);
}

.training-step:last-child,
.workout-step:last-child {
  border-bottom: 0;
}

.training-step-number,
.workout-step-number {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 11.5px;
  font-weight: 820;
}

.training-step-copy,
.workout-step-copy {
  color: var(--st-text);
  font-size: 15.5px;
  font-weight: 650;
}

.group-workouts {
  display: grid;
  gap: 12px;
}

.group-workouts-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 4px 0;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.group-workouts-heading strong {
  font: inherit;
}

.group-workout-list {
  display: grid;
  gap: 14px;
}

.group-workout-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--st-line) 74%, transparent);
  border-radius: 20px;
  background: var(--st-card);
  box-shadow: 0 9px 24px -22px rgba(17, 21, 31, .48);
}

.group-workout-card-header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.group-workout-badge,
.group-workout-action-icon,
.workout-picker-row-icon {
  display: grid;
  place-items: center;
  color: var(--st-blue-ink);
  background: var(--st-blue-tint);
}

.group-workout-badge {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 900;
}

.group-workout-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.group-workout-title strong {
  overflow: hidden;
  color: var(--st-text);
  font-size: 17px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-workout-title small,
.group-workout-choose small,
.group-workout-assignment-main small,
.workout-picker-row small,
.workout-picker-current small,
.workout-picker-feedback small {
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.35;
}

.group-workout-choose,
.group-workout-assignment-main {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 12px;
  border-radius: 15px;
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms ease;
}

.group-workout-choose {
  border: 1.5px dashed color-mix(in srgb, var(--st-blue) 32%, var(--st-line));
  background: color-mix(in srgb, var(--st-blue-tint) 70%, transparent);
}

.group-workout-assignment-main {
  border: 1px solid color-mix(in srgb, var(--st-blue) 20%, var(--st-line));
  background: var(--st-blue-tint);
}

.group-workout-choose:hover,
.group-workout-assignment-main:hover {
  border-color: color-mix(in srgb, var(--st-blue) 58%, var(--st-line));
  background: color-mix(in srgb, var(--st-blue-tint) 78%, var(--st-card));
}

.group-workout-choose:active,
.group-workout-assignment-main:active {
  transform: scale(.99);
}

.group-workout-choose > span:nth-child(2),
.group-workout-assignment-main > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.group-workout-choose strong,
.group-workout-assignment-main strong {
  overflow: hidden;
  color: var(--st-blue-ink);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-workout-action-icon,
.workout-picker-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--st-card);
}

.group-workout-action-icon svg,
.workout-picker-row-icon svg {
  width: 21px;
  height: 21px;
}

.group-workout-chevron {
  width: 18px;
  height: 18px;
  color: var(--st-blue-ink);
}

.group-workout-assignment {
  display: grid;
  gap: 9px;
}

.group-workout-assignment-footer {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 4px;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 720;
}

.group-workout-assignment-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.group-workouts-loading {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 650;
}

.group-workouts-error {
  margin: 0;
}

.workout-picker {
  display: grid;
  gap: 16px;
}

.workout-picker-source {
  width: 100%;
}

.workout-picker-source > button {
  min-height: 42px;
  font-size: 14px;
}

.workout-picker-explainer {
  margin: 0;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.45;
}

.workout-picker-current {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  color: var(--st-success);
  background: var(--st-success-tint);
}

.workout-picker-current > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.workout-picker-current > span {
  display: grid;
  gap: 1px;
}

.workout-picker-current strong {
  color: var(--st-text);
  font-size: 13px;
}

.workout-picker-filters {
  margin: 0;
}

.workout-picker-list {
  display: grid;
  max-height: min(360px, 42dvh);
  gap: 8px;
  overflow-y: auto;
}

.workout-picker-row {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--st-line);
  border-radius: 15px;
  background: var(--st-bg);
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms ease;
}

.workout-picker-row:hover {
  border-color: color-mix(in srgb, var(--st-blue) 35%, var(--st-line));
}

.workout-picker-row:active {
  transform: scale(.99);
}

.workout-picker-row.selected {
  border-color: color-mix(in srgb, var(--st-blue) 52%, var(--st-line));
  background: var(--st-blue-tint);
}

.workout-picker-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workout-picker-row strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-picker-check {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.workout-picker-row.selected .workout-picker-check {
  background: var(--st-gradient);
}

.workout-picker-check svg {
  width: 15px;
  height: 15px;
}

.workout-picker-feedback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-bg);
}

.workout-picker-feedback > span {
  display: grid;
  gap: 2px;
}

.workout-picker-feedback strong {
  color: var(--st-text);
  font-size: 14px;
}

.workout-picker-create {
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
}

.workout-picker-create svg {
  width: 17px;
  height: 17px;
}

.coach-workout-results-modal .modal-body {
  padding: 0;
}

.coach-workout-results-modal .athlete-workout {
  border: 0;
  border-radius: 0;
}

.workout-builder {
  display: grid;
  gap: 12px;
}

.workout-builder-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
}

.drag-handle {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--st-text-3);
  cursor: grab;
}

/* Photos */
.photo-grid,
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.photo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #dfe4ec;
  box-shadow: var(--st-shadow-sm);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.photo-card img,
.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.photo-card:hover img {
  transform: scale(1.025);
}

.photo-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 34px 12px 11px;
  background: linear-gradient(transparent, rgba(8, 12, 25, 0.72));
  color: #fff;
}

.photo-caption {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-upload,
.upload-dropzone {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  border: 1.5px dashed rgba(58, 109, 240, 0.32);
  border-radius: 18px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 730;
  text-align: center;
}

.photo-viewer,
.lightbox {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(24px, var(--safe-top)) max(24px, var(--safe-right)) max(24px, var(--safe-bottom)) max(24px, var(--safe-left));
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.photo-viewer img,
.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  object-fit: contain;
}

/* Overlays, feedback and loading */
.modal-backdrop,
.dialog-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(24px, var(--safe-top)) max(24px, var(--safe-right)) max(24px, var(--safe-bottom)) max(24px, var(--safe-left));
  background: rgba(17, 21, 31, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdrop-in 160ms ease both;
}

.modal,
.dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid var(--st-line-strong);
  border-radius: 22px;
  background: var(--st-card);
  box-shadow: 0 30px 90px rgba(17, 21, 31, 0.24);
  animation: modal-in 180ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.modal.large,
.dialog.large {
  width: min(780px, 100%);
}

.modal-header,
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 16px;
  border-bottom: 1px solid var(--st-line);
}

.modal-title,
.dialog-title {
  margin: 0;
  color: var(--st-text);
  font-size: 22px;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.modal-subtitle,
.dialog-subtitle {
  margin: 4px 0 0;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 580;
}

.modal-body,
.dialog-body {
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
  padding: 20px 22px;
}

.modal-footer,
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 22px 19px;
  border-top: 1px solid var(--st-line);
  background: rgba(244, 246, 250, 0.62);
}

.team-switcher {
  display: grid;
  min-height: 390px;
}

.team-switcher-list {
  display: grid;
  align-content: start;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-switcher-list > li {
  min-width: 0;
}

.team-switcher-row-wrap {
  position: relative;
  min-width: 0;
}

.team-switcher-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 30px;
  width: 100%;
  min-height: 72px;
  align-items: center;
  gap: 13px;
  padding: 10px 52px 10px 12px;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
  color: var(--st-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
}

.team-switcher-actions-trigger {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 9px;
  display: grid;
  width: 40px;
  height: 44px;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--st-text-2);
  cursor: pointer;
  transform: translateY(-50%);
}

.team-switcher-actions-trigger:hover,
.team-switcher-actions-trigger[aria-expanded="true"] {
  background: var(--st-slate-tint);
  color: var(--st-text);
}

.team-switcher-actions-trigger svg {
  width: 21px;
  height: 21px;
}

.team-switcher-actions {
  position: absolute;
  z-index: 12;
  top: 60px;
  right: 8px;
  display: grid;
  width: 190px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-lg);
}

.team-switcher-actions button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 720;
  text-align: left;
}

.team-switcher-actions button:hover {
  background: var(--st-bg);
}

.team-switcher-actions button.danger {
  color: var(--st-danger);
}

.team-switcher-actions svg {
  width: 18px;
  height: 18px;
}

.team-switcher-row:hover:not(:disabled) {
  border-color: rgba(58, 109, 240, 0.24);
  background: var(--st-blue-tint);
}

.team-switcher-row:active:not(:disabled) {
  transform: scale(0.992);
}

.team-switcher-row:disabled {
  cursor: default;
  opacity: 1;
}

.team-switcher-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: var(--team-row-gradient, var(--st-gradient));
  box-shadow: 0 5px 14px rgba(17, 21, 31, 0.16);
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.team-switcher-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-switcher-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.team-switcher-copy strong,
.team-switcher-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-switcher-copy strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.team-switcher-copy span {
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 620;
}

.team-switcher-status {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--st-blue);
}

.team-switcher-status.active {
  background: var(--st-blue);
  box-shadow: 0 5px 14px var(--st-blue-soft);
  color: #fff;
}

.team-switcher-status svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.team-switcher-status .spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.team-switcher-create {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  align-self: end;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--st-gradient);
  box-shadow: 0 14px 30px var(--st-blue-soft);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 820;
  transition: filter 140ms ease, transform 120ms ease;
}

.team-switcher-create:hover {
  filter: brightness(1.04);
}

.team-switcher-create:active {
  transform: scale(0.99);
}

.team-switcher-create svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.team-switcher-form {
  align-content: start;
}

.toast-stack {
  position: fixed;
  z-index: 1200;
  top: calc(18px + var(--safe-top));
  right: calc(18px + var(--safe-right));
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--st-shadow-md);
  color: var(--st-text);
  font-size: 14px;
  font-weight: 650;
  pointer-events: auto;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  animation: toast-in 220ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.toast.success {
  border-left: 4px solid var(--st-success);
}

.toast.error {
  border-left: 4px solid var(--st-danger);
}

.toast.warning {
  border-left: 4px solid var(--st-warning);
}

.empty-state,
.empty-detail {
  display: flex;
  width: 100%;
  min-height: 320px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 32px;
  color: var(--st-text-3);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--st-bg);
  color: #b8c0cc;
}

.empty-title {
  color: var(--st-text);
  font-size: 17px;
  font-weight: 770;
}

.empty-copy {
  max-width: 360px;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 580;
}

.loading-screen,
.loading-state {
  display: grid;
  width: 100%;
  min-height: 260px;
  place-items: center;
  color: var(--st-text-2);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(58, 109, 240, 0.16);
  border-top-color: var(--st-blue);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e6e9ef;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.offline-banner,
.sync-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 16px;
  background: var(--st-warning-tint);
  color: #956011;
  font-size: 12.5px;
  font-weight: 720;
}

.fab,
.floating-action {
  position: fixed;
  z-index: 55;
  right: 22px;
  bottom: 24px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--st-gradient);
  box-shadow: 0 12px 24px -5px var(--st-blue-soft), 0 6px 16px rgba(16, 24, 40, 0.24);
  color: #fff;
  cursor: pointer;
  transition: transform 130ms ease, filter 140ms ease;
}

.fab::before,
.floating-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.28), transparent 48%);
}

.fab > *,
.floating-action > * {
  position: relative;
  z-index: 1;
}

.fab:hover,
.floating-action:hover {
  filter: brightness(1.07);
}

.fab:active,
.floating-action:active {
  transform: scale(0.9);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes search-reveal-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Exact primitives used by the React app */
.button-primary {
  border-color: transparent;
  background: var(--st-gradient);
  box-shadow: 0 5px 14px rgba(46, 91, 230, 0.23);
  color: #fff;
}

.button-primary:hover {
  background: var(--st-gradient);
  filter: brightness(1.06);
}

.button-secondary {
  border-color: rgba(58, 109, 240, 0.14);
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.button-secondary:hover {
  background: color-mix(in srgb, var(--st-blue-tint) 72%, var(--st-blue));
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--st-text-2);
}

.button-quiet:hover {
  background: var(--st-slate-tint);
  box-shadow: none;
  color: var(--st-text);
}

.button-danger {
  border-color: rgba(216, 58, 79, 0.15);
  background: var(--st-danger-tint);
  color: var(--st-danger);
}

.button-dark {
  border-color: transparent;
  background: var(--st-text);
  color: #fff;
}

.button-compact {
  height: 38px;
  padding: 0 15px;
  font-size: 14px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--st-line);
  border-radius: 50%;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
  color: var(--st-text-2);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, transform 120ms ease;
}

.icon-button:hover {
  background: var(--st-bg);
  color: var(--st-text);
}

.icon-button:active {
  transform: scale(0.92);
}

.avatar-small {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 11px;
}

.avatar-medium {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.avatar-large {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  font-size: 24px;
}

.pill {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
}

.pill-blue { background: var(--st-blue-tint); color: var(--st-blue-ink); }
.pill-green { background: var(--st-success-tint); color: var(--st-success); }
.pill-orange { background: var(--st-orange-tint); color: var(--st-orange); }
.pill-purple { background: var(--st-purple-tint); color: var(--st-purple-ink); }
.pill-gray { background: var(--st-slate-tint); color: var(--st-slate); }
.pill-red { background: var(--st-danger-tint); color: var(--st-danger); }

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--st-gradient);
  transition: width 260ms ease;
}

.search-field {
  display: flex;
  width: 100%;
  height: 42px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--st-card);
  box-shadow: 0 1px 3px rgba(17, 21, 31, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-field:focus-within {
  border-color: rgba(58, 109, 240, 0.38);
  box-shadow: 0 0 0 4px rgba(58, 109, 240, 0.09);
}

.search-field > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: var(--st-text-3);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-field > input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--st-text);
  font-size: 15px;
  font-weight: 600;
}

.search-field > input::placeholder {
  color: var(--st-text-3);
}

.search-field > button {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.segmented {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border-radius: 15px;
  background: var(--st-slate-tint);
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segmented > button {
  min-height: 32px;
  flex: 1 0 auto;
  padding: 0 12px;
  border-radius: 11px;
  background: transparent;
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 730;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.segmented > button.active,
.segmented > button[aria-selected="true"] {
  background: var(--st-gradient);
  box-shadow: 0 5px 14px -4px color-mix(in srgb, var(--st-blue) 48%, transparent);
  color: #fff;
}

.tile.active > .chip:not(.chip-success, .chip-orange, .chip-purple, .chip-neutral, .chip-danger),
.tile[aria-selected="true"] > .chip:not(.chip-success, .chip-orange, .chip-purple, .chip-neutral, .chip-danger) {
  color: var(--st-selected-ink);
}

.empty-state h3 {
  margin: 0;
  color: var(--st-text);
  font-size: 17px;
  font-weight: 770;
}

.empty-state p {
  max-width: 360px;
  margin: -5px 0 4px;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 580;
}

.skeleton-list {
  display: grid;
  gap: 8px;
}

.skeleton-row {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.skeleton-dot,
.skeleton-lines i {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e6e9ef;
}

.skeleton-dot::after,
.skeleton-lines i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.skeleton-dot {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
}

.skeleton-lines {
  display: grid;
  flex: 1;
  gap: 8px;
}

.skeleton-lines i {
  height: 11px;
  border-radius: 6px;
}

.skeleton-lines i:last-child {
  width: 64%;
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid var(--st-line-strong);
  border-radius: 22px;
  background: var(--st-card);
  box-shadow: 0 30px 90px rgba(17, 21, 31, 0.24);
  animation: modal-in 180ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.modal-card.modal-wide {
  width: min(780px, 100%);
}

.modal-header h2 {
  margin: 0;
  color: var(--st-text);
  font-size: 22px;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--st-text-2);
  font-size: 14px;
  font-weight: 580;
}

.error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.error-banner > button {
  flex: 0 0 auto;
  padding: 3px 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
}

.toast-success {
  border-left: 4px solid var(--st-success);
}

.toast-error {
  border-left: 4px solid var(--st-danger);
}

.stat-card > span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 600;
}

.content-section {
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  background: var(--st-bg);
}

.content-section + .content-section {
  margin-top: 12px;
}

.section-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h3 {
  margin: 0;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.auth-code-input,
.invite-code-input {
  font-size: 22px;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.demo-role-picker {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-bg);
}

.demo-role-picker > span {
  color: var(--st-text-3);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.demo-role-picker > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.demo-role-picker .button {
  width: 100%;
  padding-right: 8px;
  padding-left: 8px;
}

/* Onboarding */
.onboarding-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow-y: auto;
  padding: max(28px, var(--safe-top)) max(22px, var(--safe-right)) max(28px, var(--safe-bottom)) max(22px, var(--safe-left));
  background:
    radial-gradient(circle at 8% 8%, rgba(58, 109, 240, 0.16), transparent 31%),
    radial-gradient(circle at 94% 92%, rgba(122, 90, 248, 0.12), transparent 30%),
    var(--st-bg);
}

.onboarding-brand {
  position: fixed;
  top: max(20px, var(--safe-top));
  left: max(24px, var(--safe-left));
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--st-text);
  font-size: 18px;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.onboarding-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: var(--st-shadow-sm);
}

.onboarding-card {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--st-line-strong);
  border-radius: 26px;
  background: color-mix(in srgb, var(--st-card) 94%, transparent);
  box-shadow: 0 22px 70px rgba(35, 52, 94, 0.14);
}

.onboarding-step {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 11px;
  font-weight: 830;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.onboarding-card > h1 {
  margin: 13px 0 0;
  color: var(--st-text);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 840;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.onboarding-copy {
  margin: 9px 0 25px;
  color: var(--st-text-2);
  font-size: 15.5px;
  font-weight: 580;
  line-height: 1.5;
}

.back-link {
  display: block;
  margin: -7px 0 16px;
  padding: 6px 0;
  background: transparent;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 730;
}

.onboarding-form {
  display: grid;
  gap: 17px;
}

.onboarding-form > .button {
  width: 100%;
}

.create-flow {
  display: grid;
  gap: 18px;
}

.create-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.create-progress > span {
  height: 5px;
  border-radius: 999px;
  background: var(--st-line-strong);
}

.create-progress > span.active {
  background: var(--create-gradient);
}

.create-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
}

.create-pill-group legend {
  width: 100%;
}

.create-pill-group button {
  min-height: 42px;
  flex: 1 1 110px;
  padding: 0 14px;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  background: var(--st-bg);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 760;
}

.create-pill-group button.active {
  border-color: transparent;
  background: var(--create-gradient);
  box-shadow: 0 7px 18px var(--st-blue-soft);
  color: #fff;
}

.create-groups {
  display: grid;
  gap: 9px;
}

.create-groups > p,
.create-chat-options > p {
  margin: 0 0 3px;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.create-groups > div:not(.create-group-add) {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 0 6px 0 13px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-bg);
}

.create-groups > div > span {
  display: grid;
  place-items: center;
  color: var(--st-text-3);
}

.create-groups > div > span svg,
.create-groups > div > button svg {
  width: 18px;
  height: 18px;
}

.create-groups > div > input,
.create-group-add > input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--st-text);
  font: inherit;
  font-size: 14px;
  font-weight: 720;
}

.create-groups > div > button:not(.button) {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: transparent;
  color: var(--st-danger);
  cursor: pointer;
}

.create-group-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-left: 13px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
}

.create-theme-layout {
  display: grid;
  grid-template-columns: 114px minmax(0, 1fr);
  gap: 14px;
}

.create-logo-picker {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}

.create-logo-picker > span {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  border: 2px dashed color-mix(in srgb, var(--st-blue) 38%, transparent);
  border-radius: 23px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.create-logo-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.create-theme-grid button {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 760;
}

.create-theme-grid button > span {
  height: 29px;
  border-radius: 8px;
}

.create-theme-grid button > svg {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 50%;
  background: #fff;
  color: var(--st-blue-ink);
}

.create-theme-grid button.active,
.create-custom-color.active {
  border-color: var(--st-blue);
  box-shadow: 0 0 0 3px var(--st-blue-soft);
  color: var(--st-text);
}

.create-custom-color {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 1px 11px;
  padding: 10px 12px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  cursor: pointer;
}

.create-custom-color input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.create-custom-color > span {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--st-line-strong);
}

.create-custom-color strong {
  font-size: 13px;
}

.create-custom-color small {
  color: var(--st-text-3);
  font-size: 11px;
}

.create-chat-options {
  display: grid;
  gap: 9px;
}

.create-chat-options > button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-bg);
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
}

.create-chat-options > button.active {
  border-color: var(--st-blue);
  background: var(--st-blue-tint);
  box-shadow: 0 0 0 3px var(--st-blue-soft);
}

.create-chat-options > button > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--st-card);
  color: var(--st-blue-ink);
}

.create-chat-options > button > div {
  display: grid;
  gap: 4px;
}

.create-chat-options strong {
  font-size: 14px;
}

.create-chat-options small {
  color: var(--st-text-2);
  font-size: 11.5px;
  line-height: 1.35;
}

.create-chat-options i {
  width: 19px;
  height: 19px;
  border: 2px solid var(--st-line-strong);
  border-radius: 50%;
}

.create-invite {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--st-line);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--st-blue-tint), var(--st-card));
  text-align: center;
}

.create-invite-badge {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 21px;
  background: var(--create-gradient);
  box-shadow: var(--st-shadow-md);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.create-invite-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-invite h2,
.create-invite p {
  margin: 0;
}

.create-invite p {
  color: var(--st-text-2);
  font-size: 13px;
}

.create-invite-code {
  display: grid;
  width: min(340px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  margin-top: 5px;
  padding: 12px;
  border-radius: 14px;
  background: var(--st-card);
  text-align: left;
}

.create-invite-code > span {
  color: var(--st-text-3);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.create-invite-code > strong {
  grid-column: 1;
  font-size: 21px;
  letter-spacing: 0.08em;
}

.create-invite-code > .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.create-flow-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-back {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--st-slate-tint);
  color: var(--st-text);
  cursor: pointer;
}

.create-primary {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: var(--create-gradient);
  color: #fff;
}

.form-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-add-choice-grid {
  grid-template-columns: minmax(0, 1fr);
}

.team-add-modal .onboarding-choice {
  min-height: 104px;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border-radius: 16px;
}

.team-add-modal .choice-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  margin: 0;
  border-radius: 14px;
}

.team-add-modal .onboarding-choice:nth-child(2) .choice-icon {
  background: var(--st-blue-tint);
  box-shadow: none;
  color: var(--st-blue);
}

.team-add-choice-copy {
  min-width: 0;
  flex: 1;
}

.team-add-modal .onboarding-choice p {
  margin: 4px 0 0;
}

.team-add-choice-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--st-text-3);
}

.week-schedule {
  display: grid;
  gap: 12px;
}

.week-selector {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.week-selector > span {
  display: grid;
  gap: 2px;
  text-align: center;
}

.week-selector strong { color: var(--st-text); font-size: 14px; }
.week-selector small { color: var(--st-text-3); font-size: 11.5px; font-weight: 650; }
.week-chevron.previous { transform: rotate(180deg); }

.week-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(64dvh, 720px);
  overflow-y: auto;
  padding: 1px;
}

.week-day-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--st-line);
  border-radius: 18px;
  background: var(--st-card);
}

.week-day-card > header {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.week-day-card > header span {
  color: var(--st-text-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.week-day-card > header span.today { color: var(--st-blue-ink); }
.week-day-card > header small { color: var(--st-text-3); font-size: 11.5px; font-weight: 700; }
.week-day-card > header em { margin-left: auto; color: var(--st-text-3); font-size: 9px; font-style: normal; font-weight: 850; text-transform: uppercase; }
.week-planned-list { display: grid; gap: 7px; }

.week-event,
.week-add-empty {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--st-line);
  border-radius: 15px;
  background: var(--st-bg);
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.week-event > span:nth-child(2),
.week-add-empty > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.week-event strong,
.week-event small,
.week-add-empty strong,
.week-add-empty small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-event strong,
.week-add-empty strong { font-size: 13px; }
.week-event small,
.week-add-empty small { color: var(--st-text-3); font-size: 10.5px; font-weight: 650; }

.week-event-icon,
.week-add-empty > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.week-event-icon.race { background: var(--st-purple-tint); color: var(--st-purple); }
.week-event-icon.meeting { background: var(--st-orange-tint); color: var(--st-orange); }
.week-event-icon.lift { background: var(--st-slate-tint); color: var(--st-slate); }
.week-event-icon svg,
.week-add-empty svg { width: 17px; height: 17px; }

.week-add-empty {
  border-color: var(--st-blue-soft);
  border-style: dashed;
  background: var(--st-blue-tint);
}

.week-add-empty > span:first-child { background: var(--st-card); }

.week-add-another {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--st-blue-ink);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
}

.week-add-another svg { width: 14px; height: 14px; }

.training-builder-form {
  gap: 16px;
}

.training-builder-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--st-line);
  border-radius: 18px;
  background: var(--st-bg);
}

.training-step-list,
.practice-phase-list,
.practice-phase-items {
  display: grid;
  gap: 10px;
}

.training-step-editor {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--st-line);
  border-radius: 15px;
  background: var(--st-card);
}

.training-step-editor > header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.training-step-editor > header strong {
  min-width: 0;
  flex: 1;
  color: var(--st-text);
  font-size: 13.5px;
}

.training-step-editor > header > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 9.5px;
  font-weight: 850;
  text-transform: uppercase;
}

.training-builder-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice-chip {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.choice-chip.active {
  border-color: var(--st-blue-soft);
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.form-divider::after {
  height: 1px;
  flex: 1;
  background: var(--st-line);
  content: "";
}

.practice-phase {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--st-line);
  border-radius: 18px;
  background: var(--st-card);
}

.practice-phase > header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.practice-phase > header > span {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.practice-phase > header strong {
  color: var(--st-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.practice-phase > header small,
.practice-phase > p {
  margin: 0;
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.practice-phase > header em {
  color: var(--st-text-3);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.practice-phase-items > article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--st-bg);
}

.practice-phase-items > article > span {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.practice-phase-items strong { color: var(--st-text); font-size: 12.5px; }
.practice-phase-items small { color: var(--st-text-3); font-size: 10px; font-weight: 650; }
.practice-phase-items article > div { display: flex; gap: 3px; }

.practice-phase-items button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--st-card);
  color: var(--st-text-2);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.practice-phase-items button:disabled { cursor: default; opacity: .35; }

.practice-phase-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

@media (max-width: 767px) {
  .week-days { grid-template-columns: minmax(0, 1fr); max-height: 67dvh; }
  .training-builder-actions { grid-template-columns: minmax(0, 1fr); }
  .training-step-editor { padding: 12px; }
}

.onboarding-choice {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--st-line);
  border-radius: 18px;
  background: var(--st-bg);
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.onboarding-choice:hover {
  border-color: rgba(58, 109, 240, 0.26);
  background: var(--st-blue-tint);
  box-shadow: var(--st-shadow-md);
  transform: translateY(-2px);
}

.choice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--st-gradient);
  box-shadow: 0 6px 14px var(--st-blue-soft);
  color: #fff;
  font-size: 24px;
  font-weight: 450;
}

.onboarding-choice strong {
  font-size: 17px;
  font-weight: 790;
  letter-spacing: -0.02em;
}

.onboarding-choice p {
  flex: 1;
  margin: 5px 0 16px;
  color: var(--st-text-2);
  font-size: 13.5px;
  font-weight: 580;
  line-height: 1.45;
}

.role-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.role-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.role-picker label {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-card);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 13.5px;
  text-align: center;
}

.role-picker label.active {
  border-color: rgba(58, 109, 240, 0.32);
  background: var(--st-blue-tint);
  box-shadow: 0 0 0 2px rgba(58, 109, 240, 0.09);
  color: var(--st-selected-ink);
}

.role-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Compact desktop */
@media (max-width: 1180px) and (min-width: 768px) {
  .sidebar,
  .app-sidebar {
    width: var(--st-sidebar-compact);
    min-width: var(--st-sidebar-compact);
    align-items: center;
  }

  .sidebar-item,
  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .sidebar-label,
  .nav-label {
    display: none;
  }

  .master-pane,
  .master-list {
    width: 360px;
    min-width: 360px;
  }

  .master-pane.master-narrow,
  .master-list.master-narrow,
  .chat-master {
    width: 320px;
    min-width: 320px;
  }

  .coach-copy,
  .coach-meta {
    display: none;
  }

  .detail-content {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 900px) and (min-width: 768px) {
  .master-pane,
  .master-list {
    width: 330px;
    min-width: 330px;
  }

  .master-pane.master-narrow,
  .master-list.master-narrow,
  .chat-master {
    width: 300px;
    min-width: 300px;
  }

  .btn-label.optional,
  .desktop-optional {
    display: none;
  }

  .detail-title,
  .profile-name,
  .runner-name {
    font-size: 27px;
  }

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

/* Phone: iOS-style app surface */
@media (max-width: 767px) {
  :root {
    --st-mobile-tab-height: 66px;
    /* Keep the title-to-sheet rhythm native-tight at every safe-area size. */
    --st-mobile-header-height: calc(164px + var(--safe-top));
  }

  body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  ::-webkit-scrollbar {
    display: none;
  }

  .desktop-only,
  .hide-mobile,
  .accent-strip,
  .top-accent {
    display: none !important;
  }

  .mobile-only {
    display: initial !important;
  }

  .app-shell {
    isolation: isolate;
    background: var(--st-header-gradient, var(--st-gradient));
  }

  .topbar,
  .app-topbar,
  .mobile-header {
    position: relative;
    z-index: 20;
    display: flex;
    height: var(--st-mobile-header-height);
    min-height: var(--st-mobile-header-height);
    flex: 0 0 var(--st-mobile-header-height);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow: hidden;
    padding: calc(var(--safe-top) + 11px) 20px 0;
    border: 0;
    background: var(--st-header-gradient, var(--st-gradient));
    color: #fff;
  }

  .topbar::after,
  .app-topbar::after,
  .mobile-header::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, transparent 56%, rgba(10, 16, 40, 0.18));
    pointer-events: none;
  }

  .mobile-header-row,
  .topbar-row {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .team-identity,
  .topbar-team {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 55px;
    padding-right: 64px;
  }

  .team-selector-trigger {
    max-width: 100%;
  }

  .team-logo,
  .team-badge {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 3px 10px rgba(10, 20, 70, 0.27);
  }

  .team-name {
    color: #fff;
    font-size: 19px;
    font-weight: 820;
  }

  .team-season,
  .team-role {
    color: rgba(255, 255, 255, 0.84);
    font-size: 13.5px;
  }

  .topbar-spacer {
    display: none;
  }

  .topbar-actions,
  .coach-profile {
    position: absolute;
    z-index: 2;
    top: calc(var(--safe-top) + 14px);
    right: 20px;
  }

  .coach-copy,
  .coach-meta {
    display: none;
  }

  .coach-avatar,
  .avatar-photo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border: 3px solid #fff;
    box-shadow: 0 3px 12px rgba(10, 20, 70, 0.3);
  }

  .mobile-title,
  .topbar-title,
  .screen-title {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    margin: 14px 0 0;
    color: #fff;
    font-size: 36px;
    font-weight: 840;
    letter-spacing: -0.055em;
    line-height: 1;
  }

  .app-body,
  .shell-body {
    position: relative;
    z-index: 22;
    display: block;
    margin-top: calc(-1 * var(--st-shell-overlap));
    overflow: visible;
    border-radius: var(--st-shell-corner) var(--st-shell-corner) 0 0;
    background: var(--st-bg);
  }

  .workspace,
  .app-workspace {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--st-shell-corner) var(--st-shell-corner) 0 0;
    background: var(--st-bg);
  }

  .sidebar,
  .app-sidebar {
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: calc(12px + var(--safe-bottom));
    left: 12px;
    display: flex;
    width: auto;
    min-width: 0;
    height: var(--st-mobile-tab-height);
    min-height: var(--st-mobile-tab-height);
    flex-direction: row;
    padding: 7px 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 33px;
    background: rgba(252, 253, 255, 0.7);
    box-shadow: 0 10px 34px rgba(20, 30, 60, 0.2), 0 2px 8px rgba(20, 30, 60, 0.1), inset 1px 1px 1px rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
  }

  .sidebar-nav,
  .nav-list {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 0;
  }

  .sidebar-item,
  .nav-item {
    position: relative;
    display: flex;
    width: auto;
    min-width: 0;
    height: 52px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 2px;
    border-radius: 18px;
    background: transparent;
    color: #9aa0ac;
    font-size: 9.5px;
    font-weight: 560;
    line-height: 1;
    text-align: center;
  }

  .sidebar-item:hover,
  .nav-item:hover {
    background: transparent;
    color: #9aa0ac;
  }

  .sidebar-item.active,
  .sidebar-item[aria-current="page"],
  .nav-item.active,
  .nav-item[aria-current="page"] {
    background: var(--st-blue-soft);
    color: var(--st-selected-ink);
    font-weight: 760;
  }

  .sidebar-icon,
  .nav-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
  }

  .sidebar-icon svg,
  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .sidebar-label,
  .nav-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tabbar,
  .bottom-tabbar {
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: calc(12px + var(--safe-bottom));
    left: 12px;
    display: flex;
    height: var(--st-mobile-tab-height);
    align-items: center;
    justify-content: space-around;
    padding: 7px 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 33px;
    background: rgba(252, 253, 255, 0.7);
    box-shadow: 0 10px 34px rgba(20, 30, 60, 0.2), 0 2px 8px rgba(20, 30, 60, 0.1), inset 1px 1px 1px rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
  }

  .mobile-tabbar .tab-item,
  .bottom-tabbar .tab-item {
    display: flex;
    min-width: 0;
    height: 52px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 2px;
    border-radius: 18px;
    background: transparent;
    color: #9aa0ac;
    cursor: pointer;
    font-size: 9.5px;
    font-weight: 560;
    line-height: 1;
  }

  .mobile-tabbar .tab-item.active,
  .mobile-tabbar .tab-item[aria-current="page"],
  .bottom-tabbar .tab-item.active,
  .bottom-tabbar .tab-item[aria-current="page"] {
    background: var(--st-blue-soft);
    color: var(--st-selected-ink);
    font-weight: 760;
  }

  .master-detail,
  .split-view {
    display: block;
    height: 100%;
    overflow: hidden;
  }

  .master-pane,
  .master-list,
  .master-pane.master-narrow,
  .master-list.master-narrow,
  .chat-master {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding-bottom: calc(86px + var(--safe-bottom));
    background: var(--st-bg);
  }

  .master-header {
    padding: 16px 16px 12px;
  }

  .master-title {
    font-size: 24px;
  }

  .master-heading.mobile-hidden-title .master-title,
  .master-title-row.mobile-hidden-title .master-title {
    display: none;
  }

  .master-tools {
    margin-top: 10px;
  }

  .master-scroll,
  .master-content {
    -webkit-overflow-scrolling: touch;
    padding: 4px 14px calc(110px + var(--safe-bottom));
  }

  .detail-pane,
  .detail-view {
    position: fixed;
    z-index: 90;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    border: 0;
    background: var(--st-header-gradient, var(--st-gradient));
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(0.2, 0.78, 0.24, 1), opacity 120ms ease;
  }

  .detail-pane.is-open,
  .detail-view.is-open,
  .master-detail.is-detail-open .detail-pane,
  .master-detail.is-detail-open .detail-view,
  .master-detail[data-detail-open="true"] .detail-pane,
  .master-detail[data-detail-open="true"] .detail-view,
  .split-view.is-detail-open .detail-pane,
  .split-view.is-detail-open .detail-view {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .detail-scroll {
    -webkit-overflow-scrolling: touch;
    padding-top: 0;
    background: var(--st-header-gradient, var(--st-gradient));
  }

  .detail-content,
  .detail-content.wide {
    width: 100%;
    min-height: calc(100% - 108px - var(--safe-top));
    max-width: none;
    margin-top: calc(108px + var(--safe-top));
    padding: 18px 16px calc(34px + var(--safe-bottom));
    border-radius: 30px 30px 0 0;
    background: var(--st-card);
    box-shadow: 0 -10px 30px rgba(10, 16, 40, .1);
  }

  .detail-back,
  .detail-close {
    position: fixed;
    z-index: 95;
    top: calc(32px + var(--safe-top));
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 5px 16px rgba(10, 16, 40, .14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  .detail-back {
    left: calc(16px + var(--safe-left));
  }

  .detail-close {
    right: calc(12px + var(--safe-right));
  }

  .detail-header {
    position: fixed;
    z-index: 94;
    top: calc(32px + var(--safe-top));
    right: calc(68px + var(--safe-right));
    left: calc(68px + var(--safe-left));
    display: grid;
    min-height: 44px;
    align-items: center;
    justify-content: stretch;
    justify-items: center;
    margin: 0;
    pointer-events: none;
    text-align: center;
  }

  .detail-header::before {
    content: "";
    position: fixed;
    z-index: -1;
    top: 0;
    right: 0;
    left: 0;
    height: calc(108px + var(--safe-top));
    background: var(--st-header-gradient, var(--st-gradient));
    pointer-events: none;
  }

  .mobile-detail-header {
    display: grid;
  }

  .event-actions {
    position: fixed;
    z-index: 96;
    top: calc(32px + var(--safe-top));
    right: calc(16px + var(--safe-right));
    pointer-events: auto;
  }

  .event-actions-trigger {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 5px 16px rgba(10, 16, 40, .14);
    color: #fff;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  .event-actions-menu {
    top: calc(100% + 9px);
  }

  .detail-heading {
    min-width: 0;
    max-width: 100%;
  }

  .detail-title {
    overflow: hidden;
    color: #fff;
    font-size: 21px;
    font-weight: 830;
    letter-spacing: -0.025em;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-name,
  .runner-name {
    font-size: 27px;
    letter-spacing: -0.045em;
  }

  .detail-subtitle {
    margin-top: 4px;
    overflow: hidden;
    color: rgba(255, 255, 255, .84);
    font-size: 14px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-eyebrow {
    display: none;
  }

  .detail-actions {
    display: none;
  }

  .detail-overflow-menu {
    position: fixed;
    z-index: 96;
    top: calc(32px + var(--safe-top));
    right: calc(16px + var(--safe-right));
    display: block;
    pointer-events: auto;
    text-align: left;
  }

  .detail-overflow-menu > summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 5px 16px rgba(10, 16, 40, .14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  .detail-overflow-menu > summary svg {
    width: 22px;
    height: 22px;
  }

  .profile-detail-hero {
    justify-content: center;
    margin-bottom: 14px;
  }

  .profile-detail-hero .profile-copy,
  .profile-inline-edit {
    display: none;
  }

  .profile-actions,
  .runner-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 15px;
  }

  .detail-actions .btn,
  .profile-actions .btn,
  .runner-actions .btn {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
  }

  .tile,
  .list-tile {
    min-height: 68px;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .tile:hover,
  .list-tile:hover {
    box-shadow: var(--st-shadow-sm);
    transform: none;
  }

  .tile:active,
  .list-tile:active {
    opacity: 0.92;
    transform: scale(0.985);
  }

  .card,
  .detail-card,
  .content-card,
  .training-block,
  .workout-block {
    padding: 15px;
    border-radius: 17px;
  }

  .stats-grid,
  .stat-grid,
  .runner-metric-grid,
  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-card,
  .stat {
    min-height: 90px;
    padding: 12px 13px;
  }

  .stat-value {
    font-size: 24px;
  }

  .kv-row {
    grid-template-columns: 20px minmax(76px, 102px) minmax(0, 1fr);
    gap: 9px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-program-row,
  .event-program-row.track {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .event-program-row > .btn {
    justify-self: end;
  }

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

  .form-actions .btn {
    width: 100%;
  }

  .fab,
  .floating-action {
    right: calc(20px + var(--safe-right));
    bottom: calc(96px + var(--safe-bottom));
  }

  .fab.hidden-in-detail,
  .is-detail-open ~ .fab,
  [data-detail-open="true"] ~ .fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.88);
  }

  .chat-header {
    position: relative;
    z-index: 2;
    min-height: calc(108px + var(--safe-top));
    padding: calc(16px + var(--safe-top)) 16px 34px;
    overflow: hidden;
    border: 0;
    background: var(--st-header-gradient, var(--st-gradient));
  }

  .chat-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(10, 16, 40, 0.2));
    pointer-events: none;
  }

  .chat-header > * {
    position: relative;
    z-index: 1;
  }

  .chat-header > .detail-back {
    position: fixed;
  }

  .chat-header .conversation-icon {
    display: none;
  }

  .chat-header-copy {
    position: absolute;
    top: calc(32px + var(--safe-top));
    right: 68px;
    left: 68px;
    text-align: center;
  }

  .chat-header > .chat-actions-menu {
    position: fixed;
    top: calc(32px + var(--safe-top));
    right: calc(16px + var(--safe-right));
    margin: 0;
  }

  .chat-header-title {
    color: #fff;
  }

  .chat-header-subtitle {
    color: rgba(255, 255, 255, 0.84);
  }

  .chat-header summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border-color: rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .chat-header summary svg {
    width: 22px;
    height: 22px;
  }

  .chat-messages,
  .message-list {
    position: relative;
    z-index: 3;
    margin-top: calc(-1 * var(--st-shell-overlap));
    padding: 18px 14px;
    border-radius: var(--st-shell-corner) var(--st-shell-corner) 0 0;
    background: var(--st-bg);
  }

  .message-content {
    max-width: 82%;
  }

  .message-bubble {
    padding: 9px 12px;
    border-radius: 18px 18px 18px 5px;
    background: var(--st-card);
    font-size: 15px;
  }

  .mine .message-bubble,
  .is-me .message-bubble,
  .message-bubble.mine {
    border-radius: 18px 18px 5px 18px;
    background: var(--st-gradient);
  }

  .chat-composer {
    padding: 10px 12px calc(10px + var(--safe-bottom));
  }

  .message-actions-trigger {
    opacity: 0.72;
  }

  .photo-grid,
  .photos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-card {
    border-radius: 13px;
  }

  .modal-backdrop,
  .dialog-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal,
  .dialog,
  .modal-card,
  .modal.large,
  .dialog.large {
    width: 100%;
    max-height: calc(92vh - var(--safe-top));
    max-height: calc(92dvh - var(--safe-top));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
    animation-name: sheet-in;
  }

  .modal::before,
  .dialog::before,
  .modal-card::before {
    content: "";
    display: block;
    width: 38px;
    height: 5px;
    margin: 9px auto 0;
    border-radius: 999px;
    background: rgba(17, 21, 31, 0.16);
  }

  .modal-header,
  .dialog-header {
    padding: 14px 18px 13px;
  }

  .modal-body,
  .dialog-body {
    max-height: calc(92vh - 160px - var(--safe-top));
    max-height: calc(92dvh - 160px - var(--safe-top));
    padding: 17px 18px;
  }

  .modal-footer,
  .dialog-footer {
    padding: 13px 18px calc(13px + var(--safe-bottom));
  }

  .team-switcher {
    min-height: min(520px, calc(92dvh - 144px));
  }

  .team-switcher-row {
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    min-height: 68px;
    padding: 9px 50px 9px 10px;
  }

  .team-switcher-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .team-switcher-create {
    min-height: 60px;
    margin-top: 18px;
  }

  .profile-menu {
    top: calc(var(--safe-top) + 75px);
    right: calc(var(--safe-right) + 16px);
    width: min(286px, calc(100vw - 32px));
  }

  .toast-stack {
    top: auto;
    right: calc(12px + var(--safe-right));
    bottom: calc(94px + var(--safe-bottom));
    left: calc(12px + var(--safe-left));
    width: auto;
  }

  .auth-page {
    padding: max(20px, var(--safe-top)) max(16px, var(--safe-right)) max(20px, var(--safe-bottom)) max(16px, var(--safe-left));
  }

  .auth-home-link {
    top: max(14px, var(--safe-top));
    left: max(16px, var(--safe-left));
  }

  .auth-home-link span {
    display: none;
  }

  .auth-shell {
    display: flex;
    min-height: calc(100vh - 40px);
    min-height: calc(100dvh - 40px);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
  }

  .auth-brand {
    text-align: center;
  }

  .auth-brand-mark,
  .auth-logo {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    border-radius: 16px;
  }

  .auth-kicker {
    margin-top: 15px;
  }

  .auth-brand h1,
  .auth-brand-title {
    margin: 0 auto;
    font-size: 38px;
  }

  .auth-brand p,
  .auth-brand-copy {
    display: none;
  }

  .auth-panel,
  .auth-card {
    padding: 25px 20px;
    border-radius: 24px;
  }

  .auth-logo.mobile-only {
    display: grid !important;
    margin: 0 auto 16px;
  }

  .demo-role-picker > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .onboarding-page {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    padding: max(76px, calc(var(--safe-top) + 62px)) max(14px, var(--safe-right)) max(22px, var(--safe-bottom)) max(14px, var(--safe-left));
  }

  .onboarding-brand {
    top: calc(12px + var(--safe-top));
    left: calc(16px + var(--safe-left));
  }

  .onboarding-brand img {
    width: 36px;
    height: 36px;
  }

  .onboarding-card {
    padding: 25px 20px;
    border-radius: 23px;
  }

  .onboarding-card > h1 {
    font-size: 30px;
  }

  .onboarding-copy {
    margin-bottom: 21px;
  }

  .form-grid.two-column,
  .onboarding-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .onboarding-choice {
    min-height: 146px;
  }

  .create-theme-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-logo-picker {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .create-logo-picker > span {
    width: 72px;
    height: 72px;
    grid-row: 1;
  }

  .create-logo-picker > strong {
    grid-column: 2;
    grid-row: 1;
  }

  .create-theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .create-custom-color {
    grid-column: auto;
  }

  .role-picker {
    grid-template-columns: minmax(0, 1fr);
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 430px) {
  .topbar,
  .app-topbar,
  .mobile-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar-actions,
  .coach-profile {
    right: 16px;
  }

  .team-name {
    max-width: calc(100vw - 155px);
    font-size: 18px;
  }

  .mobile-title,
  .topbar-title,
  .screen-title {
    font-size: 34px;
  }

  .master-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .master-heading,
  .master-title-row {
    gap: 8px;
  }

  .master-header .btn-sm,
  .master-header .button.small,
  .master-header .btn.small {
    padding: 0 12px;
  }

  .sidebar,
  .app-sidebar,
  .mobile-tabbar,
  .bottom-tabbar {
    right: 9px;
    bottom: calc(9px + var(--safe-bottom));
    left: 9px;
  }

  .sidebar-item,
  .nav-item,
  .mobile-tabbar .tab-item,
  .bottom-tabbar .tab-item {
    font-size: 9px;
  }

  .detail-content,
  .detail-content.wide {
    padding-right: 14px;
    padding-left: 14px;
  }

  .profile-hero,
  .runner-hero {
    gap: 13px;
  }

  .avatar.lg {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .profile-name,
  .runner-name {
    font-size: 25px;
  }

  .event-time-block {
    width: 42px;
    flex-basis: 42px;
  }

  .event-tile {
    gap: 10px;
  }

  .stats-grid,
  .stat-grid,
  .runner-metric-grid,
  .profile-stat-grid {
    gap: 8px;
  }

  .stat-card,
  .stat {
    padding: 11px 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .split-row {
    grid-template-columns: minmax(70px, 1fr) minmax(62px, auto) minmax(62px, auto);
    gap: 8px;
    padding: 0 11px;
  }
}

/* Account-scoped appearance, matching the native System / Light / Dark choice. */
html[data-appearance="dark"] {
  color-scheme: dark;
  --st-text: #f6f7fb;
  --st-text-2: #c3c9d4;
  --st-text-3: #929baa;
  --st-bg: #11141b;
  --st-card: #1a1e27;
  --st-blue-ink: #9ab3ff;
  --st-blue-tint: color-mix(in srgb, var(--st-blue) 24%, #151c2e);
  --st-blue-soft: color-mix(in srgb, var(--st-blue) 30%, transparent);
  --st-selected-ink: #fff;
  --st-line: rgba(255, 255, 255, 0.08);
  --st-line-strong: rgba(255, 255, 255, 0.15);
  --st-slate: #c3c9d4;
  --st-slate-tint: #282e3a;
  --st-success: #5bd48e;
  --st-success-tint: #153425;
  --st-warning: #efb85d;
  --st-warning-ink: #ffd58a;
  --st-warning-tint: #3a2b16;
  --st-danger: #ff7183;
  --st-danger-tint: #3d1d25;
  --st-orange: #ff9a72;
  --st-orange-tint: #3d271f;
  --st-purple: #ad98ff;
  --st-purple-ink: #c2b5ff;
  --st-purple-tint: #2d2747;
}

@media (prefers-color-scheme: dark) {
  html[data-appearance="system"] {
    color-scheme: dark;
    --st-text: #f6f7fb;
    --st-text-2: #c3c9d4;
    --st-text-3: #929baa;
    --st-bg: #11141b;
    --st-card: #1a1e27;
    --st-blue-ink: #9ab3ff;
    --st-blue-tint: color-mix(in srgb, var(--st-blue) 24%, #151c2e);
    --st-blue-soft: color-mix(in srgb, var(--st-blue) 30%, transparent);
    --st-selected-ink: #fff;
    --st-line: rgba(255, 255, 255, 0.08);
    --st-line-strong: rgba(255, 255, 255, 0.15);
    --st-slate: #c3c9d4;
    --st-slate-tint: #282e3a;
    --st-success: #5bd48e;
    --st-success-tint: #153425;
    --st-warning: #efb85d;
    --st-warning-ink: #ffd58a;
    --st-warning-tint: #3a2b16;
    --st-danger: #ff7183;
    --st-danger-tint: #3d1d25;
    --st-orange: #ff9a72;
    --st-orange-tint: #3d271f;
    --st-purple: #ad98ff;
    --st-purple-ink: #c2b5ff;
    --st-purple-tint: #2d2747;
  }
}

@media (max-width: 767px) {
  html[data-appearance="dark"] .mobile-tabbar,
  html[data-appearance="dark"] .bottom-tabbar,
  html[data-appearance="dark"] .sidebar,
  html[data-appearance="dark"] .app-sidebar {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(26, 30, 39, 0.82);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42), inset 1px 1px 1px rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 767px) and (prefers-color-scheme: dark) {
  html[data-appearance="system"] .mobile-tabbar,
  html[data-appearance="system"] .bottom-tabbar,
  html[data-appearance="system"] .sidebar,
  html[data-appearance="system"] .app-sidebar {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(26, 30, 39, 0.82);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42), inset 1px 1px 1px rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 360px) {
  .sidebar-label,
  .nav-label,
  .mobile-tabbar .tab-label,
  .bottom-tabbar .tab-label {
    font-size: 8.5px;
  }

  .detail-actions,
  .profile-actions,
  .runner-actions,
  .form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-grid,
  .stat-grid,
  .runner-metric-grid,
  .profile-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (hover: none) and (pointer: coarse) {
  .tile:hover,
  .list-tile:hover,
  .photo-card:hover img {
    box-shadow: var(--st-shadow-sm);
    transform: none;
  }

  .btn,
  .button,
  .sidebar-item,
  .nav-item,
  .filter-chip {
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    position: static;
    overflow: visible;
    background: #fff;
  }

  .accent-strip,
  .top-accent,
  .sidebar,
  .app-sidebar,
  .mobile-tabbar,
  .bottom-tabbar,
  .fab,
  .floating-action,
  .toast-stack,
  .detail-actions,
  .event-actions,
  .master-header .btn {
    display: none !important;
  }

  #app-root,
  .app-root,
  .app-shell,
  .app-body,
  .shell-body,
  .workspace,
  .app-workspace,
  .master-detail,
  .split-view,
  .detail-pane,
  .detail-view,
  .detail-scroll {
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .master-pane,
  .master-list {
    display: none;
  }

  .detail-pane,
  .detail-view {
    position: static;
    border: 0;
    opacity: 1;
    transform: none;
  }
}

/* App-specific integrations */
.team-name,
.team-season,
.team-role,
.coach-name,
.coach-role,
.tile-title,
.tile-subtitle,
.tile-meta,
.event-time,
.event-period,
.conversation-name,
.conversation-preview,
.stat-label,
.stat-value {
  display: block;
}

.app-shell > .fab {
  display: none;
}

.coach-profile {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.startup-page {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow-y: auto;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(58, 109, 240, 0.16), transparent 32%),
    radial-gradient(circle at 90% 88%, rgba(122, 90, 248, 0.12), transparent 30%),
    var(--st-bg);
  text-align: center;
}

.startup-logo,
.startup-card > img {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border-radius: 18px;
  box-shadow: var(--st-shadow-md);
}

.startup-page > p {
  margin: 14px 0 0;
  color: var(--st-text-2);
  font-weight: 650;
}

.startup-card {
  width: min(520px, 100%);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 70px rgba(35, 52, 94, 0.14);
}

.startup-card h1 {
  margin: 8px 0;
  font-size: 31px;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.startup-card > p {
  margin: 10px 0 22px;
  color: var(--st-text-2);
  line-height: 1.6;
}

.startup-card > a {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
}

.startup-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.demo-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-tabbar .tab-icon {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.mobile-tabbar .tab-icon svg {
  width: 23px;
  height: 23px;
}

.tab-badge {
  position: absolute;
  top: -5px;
  right: -10px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--st-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.btn-dark {
  border-color: transparent;
  background: #151a27;
  color: #fff;
}

.detail-notes {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--st-line);
  color: var(--st-text-2);
  font-weight: 580;
  line-height: 1.6;
  white-space: pre-wrap;
}

.rsvp-card .card-header p {
  margin: 3px 0 0;
  color: var(--st-text-2);
  font-size: 14px;
}

.rsvp-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rsvp-button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  color: var(--st-text-2);
  cursor: pointer;
  font-weight: 730;
}

.rsvp-button.active {
  border-color: rgba(58, 109, 240, 0.25);
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
  box-shadow: inset 0 0 0 1px rgba(58, 109, 240, 0.08);
}

.response-list {
  display: grid;
  margin-top: 15px;
}

.task-detail-kv .kv-row {
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr);
}

.task-detail-kv .kv-value {
  text-align: right;
}

.task-completion-summary {
  display: block;
  margin-top: 7px;
  color: var(--st-text);
  font-size: 16px;
}

.athlete-invite-button {
  width: 100%;
  margin: 10px 0 4px;
}

.athlete-groups-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.athlete-groups-row:not(:disabled) {
  cursor: pointer;
}

.task-response-list {
  margin-top: 10px;
}

.response-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--st-line);
}
.response-row.response-button { width: 100%; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; background: transparent; }
.response-row.response-button:hover { color: var(--st-blue-ink); }
.response-row.response-button:focus-visible { position: relative; z-index: 1; outline: 3px solid color-mix(in srgb, var(--st-blue) 42%, transparent); outline-offset: -2px; }
.response-row:disabled { opacity: 1; color: inherit; background: transparent; }
.submission-review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 14px; }
.submission-review-grid a { display: grid; gap: 7px; color: var(--st-text-2); font-size: 12px; font-weight: 750; text-decoration: none; }
.submission-review-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-bg); }

.response-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-weight: 680;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.response-preview { max-width: 42%; overflow: hidden; color: var(--st-text-3); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

.empty-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 11px 0 0;
  color: var(--st-text-3);
  font-size: 14px;
  font-weight: 620;
}

.empty-inline svg {
  width: 18px;
  height: 18px;
}

.media-tile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.media-gallery {
  display: grid;
  gap: 16px;
  padding-bottom: 76px;
}

.master-pane.has-media-gallery {
  position: relative;
}

.media-gallery-heading {
  display: grid;
  gap: 3px;
  padding: 4px 2px 0;
}

.media-gallery-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.media-gallery-title-row h2 {
  margin: 0;
  color: var(--st-text);
  font-size: 19px;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.media-gallery-title-row span {
  color: var(--st-blue-ink);
  font-size: 14px;
  font-weight: 800;
}

.media-gallery-heading p {
  margin: 0;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 620;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.media-grid-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--st-card);
  color: #fff;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms cubic-bezier(.2, .78, .24, 1);
}

.media-grid-item:hover {
  z-index: 1;
  filter: brightness(1.05);
  transform: scale(1.018);
}

.media-grid-item:active {
  transform: scale(.97);
}

.media-grid-item.active {
  z-index: 2;
  outline: 3px solid var(--st-blue);
  outline-offset: -3px;
}

.media-grid-item:focus-visible {
  z-index: 3;
  outline: 3px solid var(--st-blue);
  outline-offset: 2px;
}

.media-grid-thumb,
.media-grid-thumb img,
.media-grid-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-grid-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.media-grid-thumb img {
  z-index: 1;
  object-fit: cover;
}

.media-grid-fallback {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .86);
}

.media-grid-fallback svg {
  width: 28px;
  height: 28px;
}

.media-video-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(15, 23, 42, .62);
  box-shadow: 0 5px 14px rgba(15, 23, 42, .24);
  color: #fff;
}

.media-video-mark svg {
  width: 20px;
  height: 20px;
  transform: translateX(1px);
}

.media-video-mark svg circle {
  display: none;
}

.media-gallery-fab {
  position: absolute;
  z-index: 8;
  right: 20px;
  bottom: 22px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--st-gradient);
  box-shadow: 0 10px 22px rgba(22, 50, 150, .28);
  color: #fff;
  cursor: pointer;
  transition: filter 140ms ease, transform 130ms ease;
}

.media-gallery-fab:hover { filter: brightness(1.07); }
.media-gallery-fab:active { transform: scale(.92); }
.media-gallery-fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--st-blue) 42%, transparent); outline-offset: 3px; }
.media-gallery-fab:disabled { cursor: wait; filter: saturate(.5); opacity: .6; }
.media-gallery-fab svg { width: 24px; height: 24px; }

.media-thumb {
  display: grid;
  width: 58px;
  height: 48px;
  flex: 0 0 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--st-gradient);
  color: rgba(255, 255, 255, 0.9);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-detail {
  display: grid;
  width: 100%;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: var(--st-gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 720;
}

.media-detail img,
.media-detail video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.media-detail > svg {
  width: 42px;
  height: 42px;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 0;
}

.message-action-row {
  flex-wrap: wrap;
  overflow: visible;
}

.message-reactions span {
  padding: 2px 7px;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  background: var(--st-card);
  font-size: 12px;
}

.composer-error {
  position: absolute;
  right: 70px;
  bottom: 61px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--st-danger-tint);
  color: var(--st-danger);
  font-size: 12px;
  font-weight: 700;
}

.announcement-readonly {
  padding: 15px 24px max(18px, var(--safe-bottom));
  border-top: 1px solid var(--st-line);
  background: var(--st-bg);
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.secondary-filter {
  min-height: 29px;
  padding: 0 11px;
  font-size: 12px;
}

.instruction-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 24px;
  color: var(--st-text-2);
  line-height: 1.55;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
  border: 0;
}

/* Settings */
.profile-menu-dismiss {
  position: fixed;
  z-index: 1040;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.profile-menu {
  position: fixed;
  z-index: 1050;
  top: 76px;
  right: 22px;
  width: 286px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  background: color-mix(in srgb, var(--st-card) 92%, transparent);
  box-shadow: var(--st-shadow-lg);
  color: var(--st-text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: modal-in 160ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.profile-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-menu-identity {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
}

.profile-menu-identity:hover,
.profile-menu-action:hover {
  background: var(--st-bg);
}

.profile-menu-identity .avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.profile-menu-identity > span:not(.avatar) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-menu-identity strong,
.profile-menu-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-identity strong {
  font-size: 15px;
  font-weight: 820;
}

.profile-menu-identity small {
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 640;
}

.profile-menu-identity > svg {
  color: var(--st-text-3);
}

.profile-menu-divider {
  height: 1px;
  background: var(--st-line);
}

.profile-menu-divider.inset {
  margin-left: 51px;
}

.profile-menu-action {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  font-size: 15px;
  font-weight: 700;
}

.profile-menu-action svg {
  width: 19px;
  height: 19px;
}

.profile-menu-action small {
  color: var(--st-text-3);
  font-size: 11px;
}

.profile-menu-action.danger {
  color: var(--st-danger);
}

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

.my-profile-portrait {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 8px 0 5px;
}

.my-profile-portrait .avatar {
  width: 88px;
  height: 88px;
  flex-basis: 88px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--st-blue-soft), var(--st-shadow-md);
  font-size: 27px;
}

.profile-card > h3,
.settings-card-block > h3,
.danger-zone > strong {
  margin: 0 0 7px;
  color: var(--st-text-3);
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-card > div,
.settings-card-block,
.settings-link-list,
.danger-zone {
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.profile-info-row {
  display: grid;
  grid-template-columns: 24px minmax(90px, 1fr) minmax(0, auto);
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--st-line);
}

.profile-info-row:last-child {
  border-bottom: 0;
}

.profile-info-row svg {
  width: 17px;
  height: 17px;
  color: var(--st-text-3);
}

.profile-info-row strong {
  font-size: 14px;
}

.profile-info-row > span:last-child {
  overflow: hidden;
  color: var(--st-text-2);
  font-size: 13.5px;
  font-weight: 620;
  text-align: right;
  text-overflow: ellipsis;
}

.settings-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 460px;
  margin: -20px -22px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 12px;
  border-right: 1px solid var(--st-line);
  background: var(--st-bg);
}

.settings-nav button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  background: transparent;
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.settings-nav button.active {
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
  font-weight: 800;
}

.settings-content {
  min-width: 0;
  padding: 22px;
}

.settings-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 3px;
}

.settings-section-heading > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
}

.settings-section-heading svg {
  width: 21px;
  height: 21px;
}

.settings-section-heading h3,
.settings-section-heading p {
  margin: 0;
}

.settings-section-heading h3 {
  font-size: 20px;
  letter-spacing: -0.025em;
}

.settings-section-heading p {
  margin-top: 3px;
  color: var(--st-text-2);
  font-size: 13px;
}

.settings-static-row,
.settings-link-list > a,
.settings-link-list > div {
  display: grid;
  grid-template-columns: 24px minmax(100px, 1fr) minmax(0, auto);
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--st-line);
  color: var(--st-text);
  text-decoration: none;
}

.settings-link-list > :last-child {
  border-bottom: 0;
}

.settings-static-row,
.settings-link-list {
  border: 1px solid var(--st-line);
  border-radius: 14px;
}

.settings-static-row svg,
.settings-link-list svg {
  width: 18px;
  height: 18px;
  color: var(--st-text-3);
}

.settings-static-row strong,
.settings-link-list strong {
  font-size: 14px;
}

.settings-static-row > span,
.settings-link-list > a > span,
.settings-link-list > div > span {
  overflow: hidden;
  color: var(--st-text-2);
  font-size: 12.5px;
  font-weight: 620;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-link-list > a:hover {
  background: var(--st-bg);
}

.appearance-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
}

.appearance-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.appearance-picker label {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 730;
}

.appearance-picker label.active {
  border-color: var(--st-blue);
  background: var(--st-blue-tint);
  box-shadow: 0 0 0 3px var(--st-blue-soft);
  color: var(--st-selected-ink);
}

.appearance-picker input {
  position: absolute;
  opacity: 0;
}

.danger-zone {
  padding: 14px;
  border-color: color-mix(in srgb, var(--st-danger) 20%, transparent);
}

.danger-zone > button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 0 0;
  border-top: 1px solid var(--st-line);
  background: transparent;
  color: var(--st-danger);
  cursor: pointer;
  text-align: left;
}

.danger-zone > button > svg {
  width: 22px;
  height: 22px;
}

.danger-zone > button > span {
  display: grid;
  gap: 3px;
}

.danger-zone b {
  font-size: 14px;
}

.danger-zone small {
  color: var(--st-text-3);
  font-size: 12px;
}

.team-settings {
  gap: 14px;
}

.settings-card-block {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-card-block > h3 {
  margin-bottom: -3px;
}

.custom-theme-option input[type="color"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 4px;
}

.settings-profile > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.settings-profile strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.settings-profile span:not(.chip) {
  max-width: 100%;
  overflow: hidden;
  color: var(--st-text-2);
  font-size: 13px;
  text-overflow: ellipsis;
}

.compact-role-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
}

.theme-picker legend {
  width: 100%;
  margin-bottom: 7px;
}

.theme-picker label {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--st-line);
  border-radius: 11px;
  cursor: pointer;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 700;
}

.theme-picker label.active {
  border-color: var(--st-blue);
  box-shadow: 0 0 0 3px var(--st-blue-soft);
  color: var(--st-text);
}

.theme-picker input {
  position: absolute;
  opacity: 0;
}

.theme-picker label > span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.invite-settings,
.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invite-settings p {
  margin: 3px 0 0;
  color: var(--st-text-2);
  font-size: 13px;
}

.invite-result {
  display: flex;
  gap: 8px;
}

.notification-row {
  min-height: 64px;
  border-bottom: 1px solid var(--st-line);
}

.notification-row > span {
  display: flex;
  flex-direction: column;
}

.notification-row small {
  margin-top: 2px;
  color: var(--st-text-2);
  font-size: 12.5px;
}

.notification-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--st-blue);
}

.browser-note {
  padding: 12px;
  border-radius: 12px;
  background: var(--st-bg);
  color: var(--st-text-2);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Full-screen live timing */
.runner-overlay {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--st-bg);
}

.runner-topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: max(16px, var(--safe-top)) max(22px, var(--safe-right)) 16px max(22px, var(--safe-left));
  background: var(--st-card);
  box-shadow: 0 1px 0 var(--st-line);
}

.runner-topbar h2 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.runner-live-label {
  color: var(--st-blue-ink);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.runner-setup,
.runner-review,
.live-runner {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 26px max(24px, calc((100vw - 1100px) / 2)) max(26px, var(--safe-bottom));
}

.runner-setup-copy {
  margin: 6px 0 22px;
  text-align: center;
}

.runner-setup-copy > svg {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  color: var(--st-blue);
}

.runner-setup-copy h3 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.runner-setup-copy p {
  max-width: 520px;
  margin: 6px auto 0;
  color: var(--st-text-2);
}

.runner-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 9px;
}

.runner-picker label {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
  cursor: pointer;
  font-weight: 690;
}

.runner-picker label.active {
  border-color: rgba(58, 109, 240, 0.38);
  background: var(--st-blue-tint);
  color: var(--st-selected-ink);
}

.runner-picker input {
  position: absolute;
  opacity: 0;
}

.runner-picker span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-picker svg {
  width: 18px;
  height: 18px;
  opacity: 0;
}

.runner-picker label.active svg {
  opacity: 1;
}

.runner-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.live-runner {
  display: flex;
  flex-direction: column;
}

.live-clock {
  color: var(--st-text);
  font-size: clamp(52px, 8vw, 98px);
  font-weight: 820;
  letter-spacing: -0.07em;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.live-clock-label {
  margin: 8px 0 24px;
  color: var(--st-text-2);
  font-weight: 650;
  text-align: center;
}

.live-runner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.live-runner-lane {
  position: relative;
  min-width: 0;
}

.live-runner-card {
  display: flex;
  width: 100%;
  min-height: 142px;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-sm);
  cursor: pointer;
  transition: transform 100ms ease, background 100ms ease;
}

.live-runner-actions {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
}

.live-runner-actions summary {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(17, 21, 31, 0.09);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(17, 21, 31, 0.08);
  color: var(--st-text-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1px;
  list-style: none;
  place-items: center;
}

.live-runner-actions summary::-webkit-details-marker {
  display: none;
}

.live-runner-actions summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--st-blue) 45%, transparent);
  outline-offset: 2px;
}

.live-runner-actions > div {
  position: absolute;
  top: 39px;
  right: 0;
  display: grid;
  width: max-content;
  min-width: 158px;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-md);
}

.live-runner-actions button {
  min-height: 42px;
  padding: 9px 13px;
  border: 0;
  border-bottom: 1px solid var(--st-line);
  background: var(--st-card);
  color: var(--st-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
}

.live-runner-actions button:last-child {
  border-bottom: 0;
}

.live-runner-actions button:hover,
.live-runner-actions button:focus-visible {
  background: var(--st-blue-tint);
  color: var(--st-blue-ink);
  outline: 0;
}

.live-runner-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.live-runner-card:active {
  background: var(--st-blue-tint);
  transform: scale(0.96);
}

.live-runner-name {
  font-size: 17px;
  font-weight: 800;
}

.live-runner-card strong {
  margin-top: 7px;
  color: var(--st-blue-ink);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.live-runner-card > span:last-child {
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 700;
}

.runner-results-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-card);
}

/* Meet event program and live capture */
.event-detail-tabs {
  margin-bottom: 14px;
}

.event-detail-segments {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .event-detail-tabs {
    position: sticky;
    z-index: 93;
    top: calc(126px + var(--safe-top));
    isolation: isolate;
  }

  .event-detail-tabs::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -18px;
    right: -16px;
    bottom: -14px;
    left: -16px;
    border-radius: 30px 30px 0 0;
    background: var(--st-card);
    pointer-events: none;
  }
}

@media (max-width: 430px) {
  .event-detail-tabs::before {
    right: -14px;
    left: -14px;
  }
}

.athlete-result-segments {
  width: min(100%, 520px);
  margin: 0 auto 16px;
  padding: 6px 5px;
}

.athlete-result-segments > button {
  min-height: 38px;
}

.event-when-where .card-title,
.rsvp-summary-card .card-title {
  margin-bottom: 9px;
}

.event-map-preview {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 25%, var(--st-blue-soft), transparent 26%),
    linear-gradient(135deg, var(--st-bg), var(--st-card));
}

.event-map-preview > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--st-text);
}

.event-map-preview > span svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--st-blue-ink);
}

.event-map-preview strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsvp-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.event-count-section-title {
  margin-bottom: 10px;
  color: var(--st-text-3);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.event-count-tile {
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 10px 7px;
  border-radius: 14px;
  font-variant-numeric: tabular-nums;
}

.event-count-tile strong {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1;
}

.event-count-tile span {
  overflow: hidden;
  max-width: 100%;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .045em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-count-tile.going {
  background: var(--st-success-tint);
  color: var(--st-success);
}

.event-count-tile.maybe {
  background: var(--st-warning-tint);
  color: var(--st-warning);
}

.event-count-tile.out {
  background: var(--st-danger-tint);
  color: var(--st-danger);
}

.event-count-tile.neutral {
  background: var(--st-slate-tint);
  color: var(--st-text-2);
}

.attendance-summary-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--st-line);
}

.take-attendance-card {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1.5px dashed color-mix(in srgb, var(--st-success) 32%, var(--st-line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--st-success-tint) 76%, transparent);
  color: var(--st-success);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms ease;
}

.take-attendance-card:hover {
  border-color: color-mix(in srgb, var(--st-success) 60%, var(--st-line));
  background: color-mix(in srgb, var(--st-success-tint) 90%, var(--st-card));
}

.take-attendance-card:active {
  transform: scale(.99);
}

.take-attendance-card:focus-visible,
.attendance-all-here:focus-visible,
.attendance-filter-row button:focus-visible,
.attendance-quick-status:focus-visible,
.attendance-status-menu:focus-within {
  outline: 3px solid color-mix(in srgb, var(--st-blue) 30%, transparent);
  outline-offset: 2px;
}

.take-attendance-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.take-attendance-icon svg {
  width: 27px;
  height: 27px;
  padding: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.take-attendance-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.take-attendance-copy strong {
  color: var(--st-success);
  font-size: 15px;
  font-weight: 820;
}

.take-attendance-copy span {
  overflow: hidden;
  color: color-mix(in srgb, var(--st-success) 72%, var(--st-text-2));
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.take-attendance-chevron {
  width: 22px;
  height: 22px;
}

.event-coach-notes {
  margin: 6px 0 0;
}

.attendance-modal {
  display: flex;
  height: min(760px, calc(100dvh - 48px));
  flex-direction: column;
}

.attendance-modal .modal-header {
  flex: 0 0 auto;
}

.attendance-modal .modal-body {
  min-height: 0;
  flex: 1;
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.attendance-sheet {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.attendance-sheet-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px 10px;
  color: var(--st-text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.attendance-sheet-summary > strong {
  font-weight: 780;
}

.attendance-all-here {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--st-blue-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 820;
}

.attendance-all-here:disabled {
  cursor: default;
  opacity: .5;
}

.attendance-filter-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 0 22px 12px;
  overflow-x: auto;
  scrollbar-color: color-mix(in srgb, var(--st-text-3) 24%, transparent) transparent;
  scrollbar-width: thin;
}

.attendance-filter-row button {
  display: flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 780;
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
}

.attendance-filter-row button:hover {
  color: var(--st-text);
}

.attendance-filter-row button:active {
  transform: scale(.97);
}

.attendance-filter-row button.active {
  background: var(--st-gradient);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--st-blue) 22%, transparent);
  color: #fff;
}

.attendance-filter-row button strong {
  color: inherit;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.attendance-roster {
  min-height: 0;
  margin: 0 22px 14px;
  overflow-y: auto;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-card);
  scrollbar-color: color-mix(in srgb, var(--st-text-3) 28%, transparent) transparent;
  scrollbar-width: thin;
}

.attendance-roster .attendance-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 40px 40px minmax(36px, auto);
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 9px 13px;
  border: 0;
  border-bottom: 1px solid var(--st-line);
  border-radius: 0;
  background: transparent;
}

.attendance-roster .attendance-row:last-child {
  border-bottom: 0;
}

.attendance-athlete-name {
  overflow: hidden;
  color: var(--st-text);
  font-size: 14px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-quick-status {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: .45;
  transition: background 140ms ease, color 140ms ease, opacity 140ms ease, transform 120ms ease;
}

.attendance-quick-status:hover,
.attendance-quick-status.active {
  opacity: 1;
}

.attendance-quick-status:active {
  transform: scale(.93);
}

.attendance-quick-status:disabled {
  cursor: default;
  opacity: .35;
  transform: none;
}

.attendance-quick-status svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.attendance-quick-status.here {
  color: var(--st-success);
}

.attendance-quick-status.here.active {
  background: var(--st-success-tint);
}

.attendance-quick-status.out {
  color: var(--st-danger);
}

.attendance-quick-status.out.active {
  background: var(--st-danger-tint);
}

.attendance-status-menu {
  position: relative;
  display: flex;
  min-width: 36px;
  min-height: 38px;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  border-radius: 10px;
  color: var(--st-text-3);
  cursor: pointer;
}

.attendance-status-menu.has-label {
  padding-left: 7px;
  background: var(--st-slate-tint);
  color: var(--st-text-2);
}

.attendance-status-menu svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  transform: rotate(90deg);
}

.attendance-status-note {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}

.attendance-status-menu select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.attendance-status-menu select:disabled {
  cursor: default;
}

.attendance-empty-filter {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 24px;
  color: var(--st-text-3);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.attendance-sheet-footer {
  padding: 13px 22px calc(17px + var(--safe-bottom));
  border-top: 1px solid var(--st-line);
  background: var(--st-card);
}

.attendance-save-button {
  width: 100%;
  min-height: 48px;
}

.meet-panel {
  overflow: hidden;
}

.meet-panel[data-view="entries"] :is(.meet-panel__capture-owner, .meet-panel__assignee, .meet-panel__controls, .meet-panel__start, .meet-panel__field-finish, .meet-panel__readonly, .meet-panel__finalize, .meet-panel__mark-control),
.meet-panel[data-view="capture"] :is(.meet-panel__lineup-control, .meet-panel__lineup, .meet-panel__confirmation),
.meet-panel[data-view="results"] :is(.meet-panel__confirmation, .meet-panel__capture-owner, .meet-panel__assignee, .meet-panel__controls, .meet-panel__start, .meet-panel__field-finish, .meet-panel__readonly, .meet-panel__lineup-control, .meet-panel__lineup, .meet-panel__finalize, .meet-panel__mark-control),
.meet-panel[data-view="schedule"] :is(.meet-panel__capture-owner, .meet-panel__assignee, .meet-panel__controls, .meet-panel__start, .meet-panel__field-finish, .meet-panel__readonly, .meet-panel__lineup-control, .meet-panel__lineup, .meet-panel__finalize, .meet-panel__mark-control) {
  display: none;
}

.meet-panel[data-view="entries"] .meet-panel__entry > .button,
.meet-panel[data-view="results"] .meet-panel__entry > .button,
.meet-panel[data-view="schedule"] .meet-panel__entry > .button {
  display: none;
}

.meet-panel--empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meet-panel--empty p {
  margin: 5px 0 0;
}

.meet-panel__header,
.meet-panel__event-header,
.meet-panel__confirmation,
.meet-panel__finalize,
.meet-panel__field-finish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.meet-panel__header {
  margin-bottom: 14px;
}

.meet-panel__header p,
.meet-panel__event-header p {
  margin: 4px 0 0;
  color: var(--st-text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.meet-panel__summary-pills,
.meet-panel__competition-flags {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.meet-panel__header-tools,
.meet-panel__event-actions,
.meet-panel__program-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meet-panel__header-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meet-panel__event-actions {
  flex: 0 0 auto;
}

.meet-panel__assignee,
.meet-panel__lineup-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-bg);
}

.meet-panel__assignee > span,
.meet-panel__lineup-control > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.meet-panel__assignee strong,
.meet-panel__lineup-control strong {
  color: var(--st-text);
  font-size: 13.5px;
}

.meet-panel__assignee small,
.meet-panel__lineup-control small {
  color: var(--st-text-2);
  font-size: 11px;
  font-weight: 600;
}

.meet-panel__assignee .form-select {
  width: min(220px, 48%);
}

.meet-panel__lineup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 280px;
  margin: 0 0 14px;
  overflow-y: auto;
}

.meet-panel__lineup label {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
  cursor: pointer;
}

.meet-panel__lineup label.active {
  border-color: rgba(49, 109, 244, 0.35);
  background: var(--st-blue-tint);
}

.meet-panel__lineup label:focus-within {
  outline: 3px solid rgba(58, 109, 240, 0.2);
  outline-offset: 2px;
}

.meet-panel__lineup label > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.meet-panel__lineup label strong,
.meet-panel__lineup label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meet-panel__lineup label strong {
  color: var(--st-text);
  font-size: 12.5px;
}

.meet-panel__lineup label small {
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 650;
}

.meet-panel__live-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 14px;
  color: var(--st-blue-ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.meet-panel__live-link:hover {
  text-decoration: underline;
}

.meet-panel__layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: var(--st-card);
}

.meet-panel__competition-list {
  display: grid;
  align-content: start;
  min-width: 0;
  max-height: 660px;
  overflow-y: auto;
  border-right: 1px solid var(--st-line);
  background: var(--st-bg);
}

.meet-panel__competition {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid var(--st-line);
  background: transparent;
  color: var(--st-text);
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.meet-panel__competition:hover {
  background: color-mix(in srgb, var(--st-card) 72%, transparent);
}

.meet-panel__competition.active {
  position: relative;
  background: var(--st-card);
  box-shadow: inset 3px 0 0 var(--st-blue);
}

.meet-panel__competition:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(58, 109, 240, 0.2);
  outline-offset: -3px;
}

.meet-panel__competition-time,
.meet-panel__competition-meta {
  overflow: hidden;
  color: var(--st-text-3);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meet-panel__competition-time {
  color: var(--st-blue-ink);
  font-weight: 800;
}

.meet-panel__competition > strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meet-panel__competition-flags {
  margin-top: 6px;
  justify-content: flex-start;
}

.meet-panel__personal {
  color: var(--st-blue-ink);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meet-panel__detail {
  min-width: 0;
  padding: 18px;
}

.meet-panel__event-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.meet-panel__event-header h3 {
  margin: 0;
  color: var(--st-text);
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.meet-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.meet-panel__stats .stat-card {
  padding: 11px 12px;
  background: var(--st-bg);
}

.meet-panel__stats .stat-value {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.meet-panel__confirmation,
.meet-panel__finalize,
.meet-panel__field-finish {
  margin: 12px 0;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--st-blue-tint);
}

.meet-panel__confirmation > div,
.meet-panel__finalize > span,
.meet-panel__field-finish > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.meet-panel__confirmation strong,
.meet-panel__finalize strong,
.meet-panel__field-finish strong {
  color: var(--st-text);
  font-size: 14px;
}

.meet-panel__confirmation span,
.meet-panel__finalize small,
.meet-panel__field-finish small,
.meet-panel__capture-owner,
.meet-panel__readonly {
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.meet-panel__capture-owner,
.meet-panel__readonly {
  margin: 10px 0;
}

.meet-panel__readonly {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--st-bg);
}

.meet-panel__controls {
  margin: 12px 0 8px;
}

.meet-panel__stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-bg);
}

.meet-panel__stepper > span:first-child {
  display: grid;
  gap: 2px;
}

.meet-panel__stepper > span:first-child strong {
  font-size: 13.5px;
}

.meet-panel__stepper small {
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 650;
}

.meet-panel__stepper-buttons {
  display: grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  background: var(--st-card);
  text-align: center;
}

.meet-panel__stepper-buttons button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 19px;
  font-weight: 800;
}

.meet-panel__stepper-buttons button:disabled {
  color: var(--st-text-3);
  cursor: default;
  opacity: 0.45;
}

.meet-panel__start {
  width: 100%;
  margin: 5px 0 14px;
}

.meet-panel__entries {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 14px;
}

.meet-panel__entries > .empty-inline {
  padding: 4px 14px 15px;
}

.meet-panel__entry {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(82px, auto) minmax(80px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 13px;
  border-bottom: 1px solid var(--st-line);
}

.meet-panel__entry:last-child {
  border-bottom: 0;
}

.meet-panel__athlete {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.meet-panel__athlete > span,
.meet-panel__result {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.meet-panel__athlete strong {
  overflow: hidden;
  color: var(--st-text);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meet-panel__athlete small,
.meet-panel__result small {
  color: var(--st-text-3);
  font-size: 10.5px;
  font-weight: 650;
}

.meet-panel__result {
  justify-items: end;
  color: var(--st-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.meet-panel__mark-control {
  display: grid;
  grid-template-columns: minmax(72px, 100px) auto;
  align-items: center;
  gap: 7px;
}

.meet-panel__mark-control .form-input {
  height: 38px;
  min-width: 0;
  padding: 0 10px;
}

.meet-panel__splits {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 2px 0 0 39px;
}

.meet-panel__splits summary {
  width: max-content;
  color: var(--st-blue-ink);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 750;
}

.meet-panel__split-table {
  display: grid;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 11px;
}

.meet-panel__split-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(65px, auto) minmax(65px, auto);
  gap: 10px;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid var(--st-line);
  color: var(--st-text-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.meet-panel__split-row:last-child {
  border-bottom: 0;
}

.meet-panel__split-row span:not(:first-child),
.meet-panel__split-row strong {
  text-align: right;
}

.meet-panel__split-row--header {
  background: var(--st-bg);
  color: var(--st-text-3);
  font-size: 9.5px;
  font-weight: 820;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.meet-panel__finalize {
  margin-bottom: 0;
  background: rgba(240, 158, 24, 0.11);
}

.meet-panel__field-finish {
  margin: 5px 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(240, 158, 24, 0.22);
  border-radius: 13px;
  background: rgba(240, 158, 24, 0.08);
}

@media (max-width: 980px) {
  .meet-panel__layout {
    display: block;
  }

  .meet-panel__competition-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--st-line);
    scroll-snap-type: x proximity;
  }

  .meet-panel__competition {
    width: 205px;
    flex: 0 0 205px;
    border-right: 1px solid var(--st-line);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .meet-panel__competition.active {
    box-shadow: inset 0 -3px 0 var(--st-blue);
  }
}

@media (max-width: 600px) {
  .rsvp-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .event-count-tile {
    min-height: 68px;
    padding-inline: 3px;
    border-radius: 13px;
  }

  .event-count-tile strong {
    font-size: 23px;
  }

  .event-count-tile span {
    font-size: 9px;
    letter-spacing: .025em;
  }

  .attendance-modal {
    height: calc(92dvh - var(--safe-top));
  }

  .attendance-modal .modal-body {
    max-height: none;
    padding: 0;
  }

  .attendance-sheet-summary {
    padding: 14px 16px 9px;
  }

  .attendance-filter-row {
    padding: 0 16px 11px;
  }

  .attendance-roster {
    margin: 0 12px 10px;
  }

  .attendance-roster .attendance-row {
    grid-template-columns: 38px minmax(0, 1fr) 36px 36px minmax(32px, auto);
    gap: 7px;
    min-height: 64px;
    padding: 8px 10px;
  }

  .attendance-roster .avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 12px;
  }

  .attendance-athlete-name {
    font-size: 13px;
  }

  .attendance-quick-status {
    width: 34px;
    height: 34px;
  }

  .attendance-quick-status svg {
    width: 20px;
    height: 20px;
  }

  .attendance-status-menu {
    min-width: 32px;
    min-height: 34px;
  }

  .attendance-status-menu.has-label {
    padding-left: 5px;
  }

  .attendance-sheet-footer {
    padding: 11px 16px calc(11px + var(--safe-bottom));
  }

  .event-map-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .event-map-preview .button {
    width: 100%;
  }

  .meet-panel {
    padding: 14px;
  }

  .meet-panel__header,
  .meet-panel__event-header {
    align-items: flex-start;
  }

  .meet-panel__header {
    display: grid;
  }

  .meet-panel__header-tools,
  .meet-panel__program-actions {
    justify-content: flex-start;
  }

  .meet-panel__event-header {
    display: grid;
  }

  .meet-panel__event-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .meet-panel__summary-pills {
    justify-content: flex-start;
  }

  .meet-panel__detail {
    padding: 14px 12px;
  }

  .meet-panel__stats {
    gap: 6px;
  }

  .meet-panel__stats .stat-card {
    padding: 9px;
  }

  .meet-panel__stats .stat-label {
    font-size: 9px;
  }

  .meet-panel__stats .stat-value {
    font-size: 17px;
  }

  .meet-panel__confirmation,
  .meet-panel__finalize,
  .meet-panel__field-finish,
  .meet-panel__assignee,
  .meet-panel__lineup-control {
    align-items: flex-start;
  }

  .meet-panel__assignee,
  .meet-panel__lineup-control {
    flex-direction: column;
  }

  .meet-panel__assignee .form-select,
  .meet-panel__lineup-control .button {
    width: 100%;
  }

  .meet-panel__lineup {
    grid-template-columns: minmax(0, 1fr);
  }

  .meet-panel__entry {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }

  .meet-panel__result {
    grid-column: 2;
    grid-row: 1;
  }

  .meet-panel__entry > .button,
  .meet-panel__entry > .chip,
  .meet-panel__mark-control {
    grid-column: 1 / -1;
    width: 100%;
  }

  .meet-panel__mark-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .meet-panel__splits {
    padding-left: 0;
  }

  .meet-panel__competition {
    width: 180px;
    flex-basis: 180px;
  }
}

@media (max-width: 767px) {
  .app-shell > .fab {
    display: grid;
  }

  .master-heading.mobile-hidden-title .master-count {
    display: none;
  }

  .app-shell.detail-active .app-body {
    z-index: 100;
  }

  .app-shell.detail-active .mobile-tabbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
  }

  .startup-page {
    padding: max(20px, var(--safe-top)) 14px max(20px, var(--safe-bottom));
  }

  .startup-card {
    padding: 27px 20px;
    border-radius: 23px;
  }

  .startup-card h1 {
    font-size: 28px;
  }

  .startup-actions {
    display: grid;
  }

  .mobile-header .mobile-title {
    margin-top: 18px;
  }

  .mobile-header .mobile-title-row {
    margin-top: 18px;
  }

  .mobile-header .mobile-title-row .mobile-title {
    width: auto;
    margin-top: 0;
  }

  .mobile-header .assistant-help-button {
    height: 32px;
    padding: 0 11px;
  }

  .assistant-layout {
    min-height: 0;
  }

  .modal.assistant-modal {
    height: calc(92dvh - var(--safe-top));
  }

  .assistant-modal .modal-body {
    padding-bottom: calc(17px + var(--safe-bottom));
  }

  .assistant-suggestions {
    grid-template-columns: 1fr;
  }

  .mobile-header .coach-profile {
    border: 0;
    background: transparent;
  }

  .mobile-tabbar .tab-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-layout {
    display: block;
    min-height: 0;
    margin: -17px -18px;
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--st-line);
  }

  .settings-nav button {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .settings-content {
    padding: 18px;
  }

  .appearance-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .compact-role-picker,
  .checkbox-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .invite-settings {
    align-items: flex-start;
    flex-direction: column;
  }

  .invite-result {
    align-items: stretch;
    flex-direction: column;
  }

  .rsvp-buttons {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-detail {
    min-height: 280px;
  }

  .media-gallery {
    padding-bottom: 0;
  }

  .runner-topbar {
    min-height: calc(68px + var(--safe-top));
    padding: calc(11px + var(--safe-top)) 14px 11px;
  }

  .runner-topbar h2 {
    max-width: 75vw;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .runner-setup,
  .runner-review,
  .live-runner {
    padding: 20px 14px calc(22px + var(--safe-bottom));
  }

  .runner-picker,
  .live-runner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-runner-card {
    min-height: 122px;
    padding: 11px;
  }

  .live-runner-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .live-runner-card strong {
    font-size: 22px;
  }

  .runner-footer {
    position: sticky;
    bottom: 0;
    padding: 12px 0 0;
    background: linear-gradient(transparent, var(--st-bg) 30%);
  }
}

/* Athlete and guardian workout delivery. Kept fully scoped so the same panel
   can sit inside an event detail without changing the coach workspace. */
.athlete-workout {
  display: grid;
  gap: 14px;
  min-width: 0;
  color: var(--st-text);
}

.athlete-workout__assignment {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.athlete-workout__summary,
.athlete-workout__block,
.athlete-workout__feedback,
.athlete-workout__finish {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--st-line);
  border-radius: 20px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.athlete-workout__summary {
  display: grid;
  gap: 13px;
}

.athlete-workout__summary-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.athlete-workout__summary-header h3,
.athlete-workout__block h4,
.athlete-workout__feedback h4,
.athlete-workout__finish h4,
.athlete-workout__prescription h5 {
  margin: 0;
  color: var(--st-text);
  letter-spacing: -0.015em;
}

.athlete-workout__summary-header h3 {
  font-size: 17px;
  font-weight: 850;
}

.athlete-workout__summary-header p,
.athlete-workout__block > header p,
.athlete-workout__prescription > header p,
.athlete-workout__finish > p,
.athlete-workout__feedback--private p {
  margin: 3px 0 0;
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 630;
  line-height: 1.45;
}

.athlete-workout__workout-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--st-blue-ink);
  background: var(--st-blue-tint);
}

.athlete-workout__workout-icon svg {
  width: 21px;
  height: 21px;
}

.athlete-workout__progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 720;
}

.athlete-workout__progress-copy strong {
  color: var(--st-text);
  font-variant-numeric: tabular-nums;
}

.athlete-workout__caption,
.athlete-workout__readonly,
.athlete-workout__warning,
.athlete-workout__waiting,
.athlete-workout__complete,
.athlete-workout__locked {
  margin: 0;
  font-size: 12px;
  font-weight: 660;
  line-height: 1.45;
}

.athlete-workout__caption { color: var(--st-text-2); }
.athlete-workout__readonly,
.athlete-workout__locked { color: var(--st-text-3); }
.athlete-workout__warning,
.athlete-workout__waiting { color: var(--st-warning); }
.athlete-workout__complete { display: flex; align-items: center; gap: 6px; color: var(--st-success); font-weight: 800; }
.athlete-workout__complete svg { width: 17px; height: 17px; }

.athlete-workout__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--st-text-3);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.athlete-workout__block > header,
.athlete-workout__feedback > header,
.athlete-workout__finish > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.athlete-workout__block > header {
  display: block;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--st-line);
}

.athlete-workout__block h4,
.athlete-workout__feedback h4,
.athlete-workout__finish h4 {
  font-size: 15px;
  font-weight: 830;
}

.athlete-workout__prescriptions {
  display: grid;
}

.athlete-workout__prescription {
  min-width: 0;
  padding: 15px 0;
}

.athlete-workout__prescription:last-child { padding-bottom: 0; }
.athlete-workout__prescription + .athlete-workout__prescription { border-top: 1px solid var(--st-line); }

.athlete-workout__prescription > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.athlete-workout__prescription > header > div { min-width: 0; }

.athlete-workout__prescription h5 {
  font-size: 14px;
  font-weight: 820;
}

.athlete-workout__prescription > header p {
  color: var(--st-text-3);
  font-size: 11.5px;
}

.athlete-workout__prescription > header small {
  display: block;
  margin-top: 5px;
  color: var(--st-text-2);
  font-size: 11px;
  line-height: 1.4;
}

.athlete-workout__prescription > header > span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--st-text-3);
  font-size: 9.5px;
  font-weight: 830;
  white-space: nowrap;
  background: var(--st-bg);
}

.athlete-workout__prescription > header > span.is-recorded {
  color: var(--st-success);
  background: var(--st-success-tint);
}

.athlete-workout__occurrences {
  display: grid;
  gap: 8px;
}

.athlete-workout__result-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--st-bg);
}

.athlete-workout__result-row > span:nth-child(2),
.athlete-workout__result-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.athlete-workout__result-row strong {
  color: var(--st-text-2);
  font-size: 11.5px;
  font-weight: 780;
}

.athlete-workout__result-row small {
  color: var(--st-text);
  font-size: 12.5px;
  font-weight: 720;
  line-height: 1.4;
}

.athlete-workout__result-row.is-pending small { color: var(--st-text-3); font-weight: 620; }
.athlete-workout__result-row.is-complete { border-color: rgba(24, 165, 90, 0.15); background: var(--st-success-tint); }
.athlete-workout__result-row.is-modified { border-color: rgba(201, 130, 30, 0.2); background: var(--st-warning-tint); }

.athlete-workout__result-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--st-text-3);
  font-size: 15px;
  font-weight: 900;
}

.athlete-workout__result-row.is-complete .athlete-workout__result-icon { color: var(--st-success); }
.athlete-workout__result-row.is-modified .athlete-workout__result-icon { color: var(--st-warning); }

.athlete-workout__source {
  color: var(--st-text-3);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.045em;
}

.athlete-workout__split-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 5px;
}

.athlete-workout__split-list em {
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--st-text-2);
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
  background: rgba(255, 255, 255, 0.72);
}

.athlete-workout__entry {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-bg);
}

.athlete-workout__entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.athlete-workout__entry-head strong { font-size: 12px; }
.athlete-workout__entry-head span { color: var(--st-text-3); font-size: 9.5px; font-weight: 820; text-transform: uppercase; }

.athlete-workout fieldset {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.athlete-workout fieldset:disabled { opacity: 0.64; }

.athlete-workout__field,
.athlete-workout__unit,
.athlete-workout__reason,
.athlete-workout__metrics label,
.athlete-workout__range {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--st-text-2);
  font-size: 9.5px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.athlete-workout__field .form-input,
.athlete-workout__field .form-textarea,
.athlete-workout__unit .form-select,
.athlete-workout__reason .form-select,
.athlete-workout__metrics .form-input {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 690;
  letter-spacing: 0;
  text-transform: none;
}

.athlete-workout__field .form-textarea {
  height: auto;
  min-height: 72px;
  padding-block: 9px;
}

.athlete-workout__metrics {
  display: grid;
  gap: 8px;
}

.athlete-workout__metrics.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.athlete-workout__unit { width: min(150px, 100%); }

.athlete-workout__check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--st-text-2);
  font-size: 12px;
  font-weight: 690;
}

.athlete-workout__check input,
.athlete-workout__injury input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--st-blue);
}

.athlete-workout__range span,
.athlete-workout__feedback-ranges label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.athlete-workout__range output,
.athlete-workout__feedback-ranges output {
  color: var(--st-text);
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.athlete-workout__range input,
.athlete-workout__feedback-ranges input[type="range"] {
  width: 100%;
  margin: 5px 0;
  accent-color: var(--st-blue);
}

.athlete-workout__entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.athlete-workout__entry-actions .button { min-height: 34px; }

.athlete-workout__validation,
.athlete-workout__finish-error {
  margin: 0;
  color: var(--st-danger);
  font-size: 11px;
  font-weight: 700;
}

.athlete-workout__feedback {
  display: grid;
  gap: 13px;
}

.athlete-workout__feedback-ranges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.athlete-workout__feedback-ranges label {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  color: var(--st-text-2);
  font-size: 10px;
  font-weight: 780;
  background: var(--st-bg);
}

.athlete-workout__injury {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 9px 11px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: var(--st-card);
}

.athlete-workout__injury.active { border-color: rgba(216, 58, 79, 0.3); background: var(--st-danger-tint); }
.athlete-workout__injury span { display: grid; gap: 2px; }
.athlete-workout__injury strong { color: var(--st-text); font-size: 12px; }
.athlete-workout__injury small { color: var(--st-text-3); font-size: 10px; }

.athlete-workout__feedback--private { display: grid; gap: 2px; }
.athlete-workout__finish { display: grid; gap: 12px; }
.athlete-workout__finish > header > strong { color: var(--st-text-2); font-size: 16px; font-variant-numeric: tabular-nums; }
.athlete-workout__finish > .button { width: 100%; }

.athlete-workout__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.athlete-workout__banner button {
  min-height: 30px;
  padding: 3px 8px;
  border: 0;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.athlete-workout__announcer {
  min-height: 0;
  color: var(--st-text-3);
  font-size: 11px;
  font-weight: 650;
}

.athlete-workout__announcer:empty { display: none; }

.athlete-workout--loading,
.athlete-workout--empty {
  justify-items: center;
  padding: 28px 20px;
  border: 1px dashed var(--st-line-strong);
  border-radius: 18px;
  color: var(--st-text-3);
  text-align: center;
  background: var(--st-card);
}

.athlete-workout--loading strong,
.athlete-workout--empty h3 { margin: 4px 0 0; color: var(--st-text); font-size: 15px; }
.athlete-workout--loading small,
.athlete-workout--empty p { margin: 0; color: var(--st-text-3); font-size: 12px; line-height: 1.45; }
.athlete-workout--empty > svg { width: 28px; height: 28px; }

.athlete-workout__spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--st-blue-tint);
  border-top-color: var(--st-blue);
  border-radius: 50%;
  animation: athlete-workout-spin 700ms linear infinite;
}

@keyframes athlete-workout-spin { to { transform: rotate(360deg); } }

.athlete-workout__coach-assignment {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.athlete-workout__coach-summary,
.athlete-workout__coach-plan,
.athlete-workout__coach-roster,
.athlete-workout__coach-finalize {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--st-line);
  border-radius: 20px;
  background: var(--st-card);
  box-shadow: var(--st-shadow-xs);
}

.athlete-workout__coach-summary {
  display: grid;
  gap: 14px;
}

.athlete-workout__coach-summary > header,
.athlete-workout__coach-plan > header,
.athlete-workout__coach-roster > header {
  display: flex;
  align-items: center;
  gap: 11px;
}

.athlete-workout__coach-summary > header > div,
.athlete-workout__coach-plan > header > div,
.athlete-workout__coach-roster > header > div {
  min-width: 0;
  flex: 1;
}

.athlete-workout__coach-summary h3,
.athlete-workout__coach-plan h4,
.athlete-workout__coach-roster h4,
.athlete-workout__coach-finalize h4 {
  margin: 0;
  color: var(--st-text);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.athlete-workout__coach-summary header p,
.athlete-workout__coach-finalize p {
  margin: 3px 0 0;
  color: var(--st-text-2);
  font-size: 11.5px;
  font-weight: 630;
  line-height: 1.45;
}

.athlete-workout__coach-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.athlete-workout__coach-stats > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  text-align: center;
  background: var(--st-bg);
}

.athlete-workout__coach-stats strong {
  color: var(--st-text);
  font-size: 18px;
  font-weight: 870;
  font-variant-numeric: tabular-nums;
}

.athlete-workout__coach-stats small {
  overflow: hidden;
  color: var(--st-text-3);
  font-size: 8.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.athlete-workout__coach-stats .has-flag {
  border-color: rgba(216, 58, 79, 0.24);
  background: var(--st-danger-tint);
}

.athlete-workout__coach-stats .has-flag strong,
.athlete-workout__coach-stats .has-flag small { color: var(--st-danger); }

.athlete-workout__coach-plan,
.athlete-workout__coach-roster {
  display: grid;
  gap: 13px;
}

.athlete-workout__coach-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.athlete-workout__coach-blocks > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-bg);
}

.athlete-workout__coach-blocks h5 {
  margin: 0;
  color: var(--st-text);
  font-size: 13px;
  font-weight: 830;
}

.athlete-workout__coach-blocks > section > p {
  margin: 3px 0 8px;
  color: var(--st-text-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.athlete-workout__coach-blocks > section > div {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.athlete-workout__coach-blocks article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid var(--st-line);
}

.athlete-workout__coach-blocks article > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.athlete-workout__coach-blocks article strong { color: var(--st-text); font-size: 11.5px; }
.athlete-workout__coach-blocks article small { color: var(--st-text-3); font-size: 9.5px; line-height: 1.35; }

.athlete-workout__coach-tags {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.athlete-workout__coach-tags em {
  padding: 3px 5px;
  border-radius: 999px;
  color: var(--st-text-3);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 830;
  text-transform: uppercase;
  background: var(--st-card);
}

.athlete-workout__coach-athletes {
  display: grid;
  gap: 8px;
}

.athlete-workout__coach-athlete {
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-bg);
}

.athlete-workout__coach-athlete.has-injury { border-color: rgba(216, 58, 79, 0.28); }

.athlete-workout__coach-athlete > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
}

.athlete-workout__coach-athlete > summary::-webkit-details-marker { display: none; }

.athlete-workout__coach-athlete > summary > span:nth-of-type(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.athlete-workout__coach-athlete > summary strong { color: var(--st-text); font-size: 12.5px; }
.athlete-workout__coach-athlete > summary small { color: var(--st-text-3); font-size: 10px; }

.athlete-workout__coach-athlete-progress {
  color: var(--st-text-2);
  font-size: 11px;
  font-weight: 830;
  font-variant-numeric: tabular-nums;
}

.athlete-workout__injury-flag {
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--st-danger);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  background: var(--st-danger-tint);
}

.athlete-workout__coach-athlete-detail {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--st-line);
  background: var(--st-card);
}

.athlete-workout__coach-activate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(58, 109, 240, 0.18);
  border-radius: 12px;
  background: var(--st-blue-tint);
}

.athlete-workout__coach-activate > span {
  display: grid;
  gap: 2px;
}

.athlete-workout__coach-activate strong { color: var(--st-text); font-size: 11.5px; }
.athlete-workout__coach-activate small { color: var(--st-text-2); font-size: 10px; line-height: 1.35; }

.athlete-workout__coach-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.athlete-workout__coach-results > section {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.athlete-workout__coach-results > section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.athlete-workout__coach-results > section > header strong { color: var(--st-text); font-size: 11px; }
.athlete-workout__coach-results > section > header span { color: var(--st-text-3); font-size: 8px; font-weight: 820; text-transform: uppercase; }

.athlete-workout__coach-feedback {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--st-line);
  border-radius: 13px;
  background: var(--st-bg);
}

.athlete-workout__coach-feedback.has-injury { border-color: rgba(216, 58, 79, 0.26); background: var(--st-danger-tint); }
.athlete-workout__coach-feedback > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.athlete-workout__coach-feedback > header strong { font-size: 12px; }
.athlete-workout__coach-feedback-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.athlete-workout__coach-feedback-metrics span { padding: 5px 7px; border-radius: 8px; color: var(--st-text-2); font-size: 10px; font-weight: 700; background: var(--st-card); }
.athlete-workout__coach-feedback p,
.athlete-workout__coach-no-feedback { margin: 0; color: var(--st-text-2); font-size: 10.5px; line-height: 1.45; }
.athlete-workout__coach-note { white-space: pre-wrap; }

.athlete-workout__coach-finalize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.athlete-workout__coach-finalize > div { min-width: 0; }
.athlete-workout__coach-finalize > .button { flex: 0 0 auto; }
.athlete-workout__coach-finalize.is-finalized { border-color: rgba(24, 165, 90, 0.2); background: var(--st-success-tint); }

@media (max-width: 767px) {
  .athlete-workout { gap: 12px; }

  .athlete-workout__assignment { gap: 12px; }

  .athlete-workout__summary,
  .athlete-workout__block,
  .athlete-workout__feedback,
  .athlete-workout__finish {
    padding: 14px;
    border-radius: 17px;
  }

  .athlete-workout__summary-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .athlete-workout__summary-header > .chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .athlete-workout__prescription > header {
    display: grid;
    gap: 7px;
  }

  .athlete-workout__prescription > header > span { justify-self: start; }

  .athlete-workout__feedback-ranges {
    grid-template-columns: minmax(0, 1fr);
  }

  .athlete-workout__feedback-ranges label {
    grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto;
    align-items: center;
  }

  .athlete-workout__feedback-ranges input[type="range"] {
    grid-column: 2;
    grid-row: 1;
  }

  .athlete-workout__feedback-ranges output {
    grid-column: 3;
    grid-row: 1;
  }

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

  .athlete-workout__entry-actions .button { width: 100%; }

  .athlete-workout__banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .athlete-workout__coach-assignment { gap: 12px; }

  .athlete-workout__coach-summary,
  .athlete-workout__coach-plan,
  .athlete-workout__coach-roster,
  .athlete-workout__coach-finalize {
    padding: 14px;
    border-radius: 17px;
  }

  .athlete-workout__coach-summary > header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .athlete-workout__coach-summary > header > .chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .athlete-workout__coach-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .athlete-workout__coach-blocks,
  .athlete-workout__coach-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .athlete-workout__coach-athlete > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .athlete-workout__coach-athlete-progress { display: none; }

  .athlete-workout__injury-flag {
    grid-column: 2;
    justify-self: start;
  }

  .athlete-workout__coach-athlete > summary > .chip {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .athlete-workout__coach-activate,
  .athlete-workout__coach-finalize {
    align-items: stretch;
    flex-direction: column;
  }

  .athlete-workout__coach-activate .button,
  .athlete-workout__coach-finalize .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .athlete-workout__spinner { animation-duration: 1.6s; }
}

@media (max-width: 767px) {
  .event-tile {
    min-height: 100px;
    gap: 14px;
    padding: 15px;
    border-radius: 20px;
  }
}

@media (max-width: 430px) {
  .event-time-block {
    width: 56px;
    flex-basis: 56px;
  }

  .event-time {
    font-size: 25px;
  }

  .event-tile {
    gap: 12px;
  }
}

@media (max-width: 767px) {
  .group-workouts {
    gap: 10px;
  }

  .group-workout-list {
    gap: 12px;
  }

  .group-workout-card {
    gap: 12px;
    padding: 15px;
    border-radius: 18px;
  }

  .group-workout-badge {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
  }

  .group-workout-choose,
  .group-workout-assignment-main {
    min-height: 70px;
    padding: 10px;
  }

  .group-workout-assignment-footer {
    padding-left: 0;
  }

  .workout-picker-modal .modal-body {
    padding-top: 14px;
  }

  .workout-picker {
    gap: 14px;
  }

  .workout-picker-list {
    max-height: min(330px, 37dvh);
  }

  .workout-picker-feedback {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .workout-picker .form-actions {
    align-items: stretch;
  }

  .workout-picker .form-actions .form-action-spacer {
    display: none;
  }
}

@media (max-width: 430px) {
  .group-workout-assignment-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .group-workout-assignment-footer .button {
    width: 100%;
  }

  .group-workout-assignment-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workout-picker-row {
    grid-template-columns: 40px minmax(0, 1fr) 26px;
    gap: 9px;
    padding-inline: 9px;
  }

  .workout-picker-row-icon {
    width: 40px;
    height: 40px;
  }
}
