:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2563eb;
  --accent: var(--primary);
  --primary-soft: #dbeafe;
  --primary-text: #1d4ed8;
  --accent-hover: #eef2ff;
  --focus-ring: rgba(37, 99, 235, 0.2);
  --selected-ring: rgba(37, 99, 235, 0.15);
  --done-bg: #ecfdf5;
  --done-border: #a7f3d0;
  --done-pill-bg: #d1fae5;
  --done-pill-text: #047857;
  --done-stamp: #059669;
  --done-stamp-bg: #ecfdf5;
  --done-stamp-text: #047857;
  --done-stamp-ring: rgba(5, 150, 105, 0.34);
  --active-bg: #eff6ff;
  --active-pill-bg: #dbeafe;
  --active-pill-text: #1d4ed8;
  --interval-bg: #fff7ed;
  --interval-border: #f97316;
  --note-bg: #f0fdf4;
  --note-text: #166534;
  --banner-bg: #eff6ff;
  --banner-border: #bfdbfe;
  --banner-text: #1e3a8a;
  --banner-error-bg: #fef2f2;
  --banner-error-border: #fecaca;
  --banner-error-text: #991b1b;
  --cat-strength: #b45309;
  --cat-strength-bg: #fdf6ee;
  --cat-conditioning: #0f766e;
  --cat-conditioning-bg: #eef8f6;
  --cat-mixed: #5b21b6;
  --cat-mixed-bg: #f5f0ff;
  --cat-skill: #166534;
  --cat-skill-bg: #f0f7f2;
  --cat-general: #64748b;
  --cat-general-bg: #f8fafc;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --font: "Roboto", system-ui, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1117;
  --surface: #151b24;
  --surface-2: #1a2230;
  --surface-hover: #243044;
  --border: #2d3a4d;
  --text: #e8edf4;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --accent: var(--primary);
  --primary-soft: #1e3a5f;
  --primary-text: #93c5fd;
  --accent-hover: #243044;
  --focus-ring: rgba(59, 130, 246, 0.35);
  --selected-ring: rgba(59, 130, 246, 0.25);
  --done-bg: #0f2a22;
  --done-border: #065f46;
  --done-pill-bg: #064e3b;
  --done-pill-text: #6ee7b7;
  --done-stamp: #34d399;
  --done-stamp-bg: #064e3b;
  --done-stamp-text: #6ee7b7;
  --done-stamp-ring: rgba(52, 211, 153, 0.42);
  --active-bg: #172554;
  --active-pill-bg: #1e3a5f;
  --active-pill-text: #93c5fd;
  --interval-bg: #2a1f14;
  --interval-border: #ea580c;
  --note-bg: #14261a;
  --note-text: #86efac;
  --banner-bg: #172554;
  --banner-border: #1e40af;
  --banner-text: #bfdbfe;
  --banner-error-bg: #3f1515;
  --banner-error-border: #991b1b;
  --banner-error-text: #fecaca;
  --cat-strength: #f59e0b;
  --cat-strength-bg: #2a2014;
  --cat-conditioning: #2dd4bf;
  --cat-conditioning-bg: #122824;
  --cat-mixed: #a78bfa;
  --cat-mixed-bg: #221a33;
  --cat-skill: #4ade80;
  --cat-skill-bg: #14261a;
  --cat-general: #94a3b8;
  --cat-general-bg: #1a2230;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html {
  height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  max-width: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 40;
  overflow: visible;
}

.brand { display: flex; align-items: flex-start; gap: 12px; overflow: visible; }
.brand-body { flex: 1; min-width: 0; overflow: visible; }
.brand-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.brand-title-row .brand-heading {
  flex: 1;
  min-width: 0;
}
.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: transparent;
}
.brand-logo-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: transparent;
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-heading {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}
.brand-title { font-size: 18px; font-weight: 700; }
.brand-location {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.brand-subtitle-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.brand-subtitle { color: var(--muted); font-size: 14px; }
.prefs-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.75;
}
.prefs-link:hover { opacity: 1; color: var(--text); }

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

.topbar-header-utils {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Dropdown system (NotebookLM-inspired floating menus) */
.dropdown-wrap {
  position: relative;
  display: inline-flex;
}
.generate-dropdown-wrap {
  display: flex;
  width: 100%;
}
.generate-dropdown-wrap .dropdown-trigger {
  width: 100%;
}
.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--text) 6%, transparent),
    0 8px 28px color-mix(in srgb, var(--text) 12%, transparent);
  z-index: 60;
  overflow: hidden;
  animation: dropdown-in 0.14s ease-out;
}
.dropdown-panel--align-end { right: 0; left: auto; }
.dropdown-panel--align-start { left: 0; right: auto; }
.dropdown-panel--menu { padding: 6px 0; }
.dropdown-panel-header {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.dropdown-panel-body {
  padding: 12px 14px 14px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dropdown-panel--settings {
  min-width: min(320px, calc(100vw - 24px));
  max-width: min(360px, calc(100vw - 24px));
}
.settings-dropdown-wrap .dropdown-panel {
  right: 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.dropdown-item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus-ring);
}
.dropdown-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
}
.dropdown-item-label { flex: 1; min-width: 0; }
.dropdown-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--border);
}
.dropdown-hint,
.share-menu-hint {
  margin: 0;
  padding: 4px 16px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.dropdown-group-label {
  margin: 0;
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dropdown-custom-row,
.generate-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 10px;
}
.dropdown-custom-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}
.dropdown-custom-row input,
.generate-custom-row input {
  flex: 1;
  min-width: 0;
  max-width: 72px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  background: var(--surface-2);
  color: var(--text);
}
@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prefs-panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prefs-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.prefs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.prefs-field select,
.prefs-field input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
}
.prefs-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prefs-section + .prefs-section {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.prefs-section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.prefs-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}
.prefs-contact-hint {
  margin: -4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }

.search-shell {
  flex: 1;
  max-width: 320px;
  min-width: 0;
}
.topbar-chrome-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}
.topbar-primary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}
.search-box input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--primary);
}
.search-toggle-btn,
.search-close-btn {
  flex-shrink: 0;
}

.btn {
  border: none; border-radius: 8px; padding: 10px 14px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-today {
  background: #ea580c;
  color: #fff;
  border: 1px solid #c2410c;
}
.btn-today:hover {
  background: #c2410c;
  opacity: 1;
}
[data-theme="dark"] .btn-today {
  background: #f97316;
  border-color: #ea580c;
  color: #fff;
}
[data-theme="dark"] .btn-today:hover {
  background: #ea580c;
}
.btn-done { background: #059669; color: white; }
.btn-done.is-done {
  background: var(--done-stamp);
  color: #fff;
}
.btn-done.is-done:hover {
  background: color-mix(in srgb, var(--done-stamp) 88%, #000);
}
.btn:hover { opacity: 0.92; }

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.icon-btn--ghost {
  border: none;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}
.icon-btn--ghost:hover {
  background: var(--surface-2);
}
.dropdown-trigger[aria-expanded="true"].btn-secondary,
.dropdown-trigger[aria-expanded="true"].btn-primary {
  background: var(--surface-2);
}
.icon-btn--ghost.dropdown-trigger[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text);
}

/* Legacy aliases — menus now use .dropdown-panel */
.generate-wrap { position: relative; }

.layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px 24px;
  min-width: 0;
  max-width: 100%;
}

.layout-below {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.calendar-pane, .detail-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  max-width: 100%;
}

.calendar-grid {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.calendar-pane { padding: 16px; }
.detail-pane-slot {
  grid-area: detail;
  width: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}
.detail-pane {
  padding: 20px;
  min-height: 0;
  scroll-padding-bottom: 20px;
}

@media (min-width: 961px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    grid-template-areas:
      "calendar detail"
      "below detail";
    align-items: start;
    gap: 16px;
  }
  .calendar-pane { grid-area: calendar; }
  .detail-pane-slot {
    align-self: start;
  }
  .detail-pane {
    position: fixed;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
  }
  .layout-below { grid-area: below; }
  .layout-below .gym-nudge,
  .layout-below .partners-discovery {
    margin-left: 0;
    margin-right: 0;
  }
  .layout-below .partners-discovery {
    margin-bottom: 0;
  }
}

.calendar-toolbar { margin-bottom: 12px; }
.month-nav { display: flex; align-items: center; gap: 8px; justify-content: center; }
.month-label-wrap { position: relative; }

.month-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-width: 200px;
  justify-content: center;
}
.month-label-btn:hover,
.month-label-btn[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border);
}
.month-label-chevron {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
  transition: transform 0.15s ease;
}
.month-label-btn[aria-expanded="true"] .month-label-chevron {
  transform: rotate(180deg);
}

.month-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(320px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.month-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.month-picker-year {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}
.month-picker-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.month-picker-cell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.month-picker-cell:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--accent-hover);
}
.month-picker-cell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.month-picker-cell.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-text);
}
.month-picker-cell.is-today {
  box-shadow: inset 0 0 0 2px var(--primary);
}
.month-picker-cell.is-today.is-selected {
  box-shadow: inset 0 0 0 2px var(--primary-text);
}
.month-picker-cell.has-workouts::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
}
.month-picker-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.month-picker-today {
  font-size: 13px;
  padding: 8px 14px;
}

.icon-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); font-size: 22px; cursor: pointer; line-height: 1;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.theme-toggle { color: var(--muted); }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-icon { display: block; }
.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }

.weekday-row, .week-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.weekday-row {
  color: var(--muted); font-size: 12px; font-weight: 600;
  margin-bottom: 6px;
}
.weeks { display: flex; flex-direction: column; gap: 6px; }

.day-cell {
  position: relative;
  min-width: 0;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.day-cell:hover { border-color: var(--border); background: var(--surface-hover); }
.day-cell.outside {
  opacity: 0.62;
  cursor: pointer;
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-hover) 70%, transparent);
}
.day-cell.outside:hover {
  opacity: 0.92;
  border-color: var(--primary);
  background: var(--surface-hover);
}
.day-cell.outside-empty {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}
.day-adjacent-hint {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.day-preview-adjacent {
  opacity: 0.75;
  font-size: 0.82em;
  line-height: 1.25;
}
.day-cell.selected {
  border-color: var(--primary);
  background: var(--surface-hover);
  box-shadow: 0 0 0 2px var(--selected-ring);
}
.day-cell.today .day-number { background: var(--primary); color: white; }
.day-cell-done {
  box-shadow: inset 0 0 0 1px var(--done-stamp-ring);
}
.day-cell-done.selected {
  box-shadow: 0 0 0 2px var(--selected-ring), inset 0 0 0 1px var(--done-stamp-ring);
}
.day-cell-active { background: var(--active-bg); }
.day-cell-locked {
  opacity: 0.72;
  border-style: dashed;
}
.day-cell-locked .day-preview {
  opacity: 0.85;
}
.day-cell-viewed {
  box-shadow: inset 0 0 0 1px var(--border);
}
.day-lock-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* Workout-type color coding (toggle via Preferences) */
.cat-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  vertical-align: -1px;
}
.cat-swatch.cat-strength { background: var(--cat-strength-bg); box-shadow: inset 3px 0 0 var(--cat-strength); }
.cat-swatch.cat-conditioning { background: var(--cat-conditioning-bg); box-shadow: inset 3px 0 0 var(--cat-conditioning); }
.cat-swatch.cat-mixed { background: var(--cat-mixed-bg); box-shadow: inset 3px 0 0 var(--cat-mixed); }
.cat-swatch.cat-skill { background: var(--cat-skill-bg); box-shadow: inset 3px 0 0 var(--cat-skill); }
.legend-done-swatch {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--done-stamp);
  color: #fff;
  border: 2px solid var(--surface-2);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  vertical-align: -3px;
}
.done-check-icon {
  width: 11px;
  height: 11px;
  display: block;
}

.prefs-toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prefs-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.prefs-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.prefs-color-legend.hidden { display: none; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

html:not(.calendar-colors-off) .day-cell[data-category="strength"]:not(.day-cell-active):not(.selected) {
  background: var(--cat-strength-bg);
  border-left: 3px solid var(--cat-strength);
}
html:not(.calendar-colors-off) .day-cell[data-category="conditioning"]:not(.day-cell-active):not(.selected) {
  background: var(--cat-conditioning-bg);
  border-left: 3px solid var(--cat-conditioning);
}
html:not(.calendar-colors-off) .day-cell[data-category="mixed"]:not(.day-cell-active):not(.selected) {
  background: var(--cat-mixed-bg);
  border-left: 3px solid var(--cat-mixed);
}
html:not(.calendar-colors-off) .day-cell[data-category="skill"]:not(.day-cell-active):not(.selected) {
  background: var(--cat-skill-bg);
  border-left: 3px solid var(--cat-skill);
}
html:not(.calendar-colors-off) .day-cell[data-category="general"]:not(.day-cell-active):not(.selected) {
  background: var(--cat-general-bg);
  border-left: 3px solid var(--cat-general);
}
html:not(.calendar-colors-off) .day-cell-done[data-category="strength"]:not(.selected) {
  background: color-mix(in srgb, var(--done-stamp-bg) 18%, var(--cat-strength-bg));
}
html:not(.calendar-colors-off) .day-cell-done[data-category="conditioning"]:not(.selected) {
  background: color-mix(in srgb, var(--done-stamp-bg) 18%, var(--cat-conditioning-bg));
}
html:not(.calendar-colors-off) .day-cell-done[data-category="mixed"]:not(.selected) {
  background: color-mix(in srgb, var(--done-stamp-bg) 18%, var(--cat-mixed-bg));
}
html:not(.calendar-colors-off) .day-cell-done[data-category="skill"]:not(.selected) {
  background: color-mix(in srgb, var(--done-stamp-bg) 18%, var(--cat-skill-bg));
}
html:not(.calendar-colors-off) .day-cell-done[data-category="general"]:not(.selected) {
  background: color-mix(in srgb, var(--done-stamp-bg) 18%, var(--cat-general-bg));
}
html:not(.calendar-colors-off) .day-cell[data-category]:not([data-category="none"]).day-cell-locked {
  border-left-width: 3px;
}
html.calendar-colors-off .prefs-color-legend {
  opacity: 0.55;
}

.prefs-danger-btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #dc2626 35%, var(--border));
  background: color-mix(in srgb, #dc2626 8%, var(--surface));
  color: #dc2626;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.prefs-danger-btn:hover:not(:disabled) {
  background: color-mix(in srgb, #dc2626 14%, var(--surface));
}
.prefs-danger-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.prefs-history-section {
  margin-top: 2px;
}
.prefs-history-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.detail-locked {
  padding: 28px 20px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.detail-locked-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.detail-locked-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.detail-locked-message {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}
.detail-locked-preview {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-hover);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.45;
}
.detail-locked-preview-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.detail-locked-preview p:last-child {
  margin: 0;
}

.detail-locked-form {
  text-align: left;
  margin-top: 4px;
}
.detail-locked-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}
.detail-locked-field input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  background: var(--surface-2);
  color: var(--text);
}
body.quota-exhausted .detail-locked-field input {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.detail-locked-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.detail-locked-actions .btn-primary {
  width: 100%;
}

.quota-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 24px 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow);
  animation: quota-banner-in 0.35s ease-out;
}
.quota-banner-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
.quota-banner-text strong {
  display: block;
  margin-bottom: 2px;
}
@keyframes quota-banner-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.contact-card.quota-prominent {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow);
  animation: quota-card-pulse 2.4s ease-in-out infinite;
}
@keyframes quota-card-pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow); }
}
.contact-card.quota-prominent .contact-field:first-child input {
  border-color: var(--primary);
}

.prefs-link.quota-cta {
  color: var(--primary);
  font-weight: 700;
  animation: quota-cta-pulse 2s ease-in-out infinite;
}
@keyframes quota-cta-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

body.quota-exhausted .day-lock-pill {
  background: color-mix(in srgb, var(--primary) 18%, var(--active-pill-bg));
  color: var(--primary);
  font-weight: 700;
}

.day-number {
  width: 26px; height: 26px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-weight: 600; font-size: 14px; margin-bottom: 4px;
}
.day-done-mark {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--done-stamp);
  color: #fff;
  border: 2px solid var(--surface-2);
  display: grid;
  place-items: center;
  box-shadow:
    0 1px 4px rgba(15, 23, 42, 0.22),
    0 0 0 1px var(--done-stamp-ring);
  pointer-events: none;
  z-index: 2;
}
.day-done-mark .done-check-icon {
  width: 14px;
  height: 14px;
}
.day-preview {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  max-height: calc(1.4em * 2);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.day-status-pill {
  margin-top: 6px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--active-pill-bg);
  color: var(--active-pill-text);
}
.day-status-pill-done {
  background: var(--done-stamp-bg);
  color: var(--done-stamp-text);
  border: 1px solid color-mix(in srgb, var(--done-stamp) 28%, transparent);
}
.day-status-pill-done::before {
  content: "✅ ";
}

.detail-empty {
  min-height: 300px;
  display: grid; place-content: center; text-align: center; color: var(--muted);
}
.detail-empty h2 { color: var(--text); margin: 0 0 8px; font-size: 20px; }

.detail-header {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: flex-start; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.detail-date { font-size: 22px; font-weight: 700; line-height: 1.25; }
.detail-subdate { color: var(--muted); font-size: 15px; margin-top: 4px; }
.detail-actions { display: flex; gap: 8px; flex-shrink: 0; }

.section-card {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-card:last-child { border-bottom: none; }
.section-card-reference { border-bottom: none; margin-bottom: 8px; }

.section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
}
.section-summary::-webkit-details-marker { display: none; }
.section-body { padding-top: 4px; }

.reference-wrap {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.reference-wrap-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.workout-group {
  margin-bottom: 4px;
}
.workout-group:last-child {
  margin-bottom: 0;
}
.workout-structure,
.workout-block-header {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  margin: 14px 0 8px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.workout-group:first-child .workout-block-header:first-child,
.workout-group:first-child .workout-structure:first-child {
  margin-top: 0;
}
.workout-movement {
  margin: 0 0 14px;
}
.workout-movement:last-child {
  margin-bottom: 0;
}
.workout-movement-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 4px;
}
.workout-prescription {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  padding-left: 10px;
  margin: 0 0 2px;
}
.workout-prescription-intensity {
  color: color-mix(in srgb, var(--muted) 85%, var(--primary-text));
  font-style: italic;
}
.workout-group .workout-movement {
  margin-left: 2px;
}
.workout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.workout-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  min-width: 0;
}
.workout-line > span:last-child {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.workout-bullet {
  color: var(--muted);
  flex-shrink: 0;
  width: 0.75em;
  text-align: center;
}
.workout-group .workout-list {
  margin: 0 0 4px 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.workout-line-interval {
  background: var(--interval-bg);
  border-radius: 6px;
  padding: 6px 8px;
  border-left: 3px solid var(--interval-border);
}
.workout-line-note,
.workout-note {
  background: var(--note-bg);
  font-size: 14px;
  color: var(--note-text);
  font-style: italic;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0 0;
}
.workout-plain {
  margin: 0;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sections,
.section-body,
.detail-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.workout-movement-title,
.workout-prescription {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.reference-group {
  margin-top: 10px;
}
.reference-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.workout-line-sub {
  font-size: 14px;
  color: var(--muted);
}

.search-results {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.search-results h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.search-result {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--surface);
  cursor: pointer;
  font: inherit;
}
.search-result strong { display: block; font-size: 14px; }
.search-result span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.search-result:hover { border-color: var(--primary); }

.contact-card {
  margin: 0 24px 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.contact-card-header {
  margin-bottom: 12px;
}
.contact-card-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.contact-card-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.contact-card-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.contact-field input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  background: var(--surface-2);
  color: var(--text);
}
.contact-optional {
  font-weight: 400;
  opacity: 0.85;
}
.contact-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-save-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--done-pill-text);
}
.contact-status {
  font-size: 12px;
  color: var(--muted);
}
.contact-status.is-saved {
  color: var(--done-pill-text);
}
.prefs-link.is-saved::after {
  content: " ✓";
}
.contact-dismiss {
  border: none;
  background: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-dismiss:hover {
  color: var(--text);
}

.scrape-banner {
  margin: 0 24px 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  color: var(--banner-text);
}
.scrape-banner--error {
  background: var(--banner-error-bg);
  border-color: var(--banner-error-border);
  color: var(--banner-error-text);
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: white; padding: 12px 20px;
  border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); z-index: 100;
}
.hidden { display: none !important; }

.topbar-mobile-only { display: none; }
.topbar-desktop-only { display: block; }
.dropdown-wrap.topbar-desktop-only { display: inline-flex; }
.generate-dropdown-wrap { display: inline-flex; width: auto; }

@media (max-width: 960px) {
  .detail-pane {
    scroll-margin-top: 12px;
    width: 100%;
    max-width: none;
    position: static;
    left: auto;
    top: auto;
    max-height: none;
  }
  .detail-pane-slot {
    width: 100%;
    align-self: stretch;
  }
  .layout {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .topbar { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .contact-card-fields {
    grid-template-columns: 1fr;
  }
}

/* iPhone / narrow mobile */
@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 12px 10px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .brand {
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .brand-title {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .brand-location {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .brand-subtitle-row {
    gap: 6px 10px;
    align-items: center;
  }

  .brand-title-row {
    align-items: center;
  }

  .brand-subtitle {
    font-size: 13px;
    line-height: 1.35;
  }

  .contact-status {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prefs-panel-body {
    max-width: none;
  }

  .topbar-actions {
    width: 100%;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
  }

  .topbar-chrome-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
  }

  .topbar-chrome-row.search-active .topbar-primary-actions {
    width: 100%;
  }

  .search-shell {
    max-width: none;
    flex: 0 0 auto;
    width: auto;
  }

  .search-shell:not(.search-shell--open) .search-box {
    display: none;
  }

  .search-shell.search-shell--open {
    flex: 1 1 100%;
    width: 100%;
    order: -1;
  }

  .search-shell.search-shell--open .search-box {
    display: flex;
    width: 100%;
  }

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

  .search-box input {
    font-size: 16px;
    min-height: 44px;
    padding: 12px 14px;
  }

  .topbar-primary-actions {
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
  }

  .topbar-primary-actions .btn-today {
    flex: 1;
    min-width: 0;
  }

  .topbar-primary-actions .dropdown-wrap.topbar-mobile-only {
    flex-shrink: 0;
  }

  .topbar-primary-actions .btn,
  .topbar-primary-actions .dropdown-wrap {
    min-width: 0;
  }

  .topbar-primary-actions .btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .topbar-primary-actions .btn-today {
    width: auto;
  }

  .topbar-primary-actions .topbar-mobile-only .btn {
    width: auto;
    min-width: 88px;
  }

  .topbar-desktop-only,
  .dropdown-wrap.topbar-desktop-only,
  .theme-toggle.topbar-desktop-only {
    display: none !important;
  }

  .topbar-mobile-only {
    display: flex;
  }

  .generate-dropdown-wrap {
    width: auto;
  }

  .dropdown-panel {
    max-width: calc(100vw - 24px);
  }

  .dropdown-item {
    min-height: 48px;
    font-size: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #mobileMoreMenu {
    min-width: 240px;
  }

  .layout {
    padding: 10px 10px calc(16px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .calendar-pane,
  .detail-pane {
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .detail-pane-slot {
    width: 100%;
    align-self: stretch;
  }

  .detail-content {
    width: 100%;
  }

  .month-label-btn {
    min-width: 0;
    font-size: 18px;
    padding: 10px 8px;
    min-height: 44px;
  }

  .month-nav {
    gap: 4px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .weekday-row {
    gap: 3px;
    margin-bottom: 4px;
    font-size: 11px;
    text-align: center;
  }

  .week-row {
    gap: 3px;
  }

  .weeks {
    gap: 3px;
  }

  .day-cell {
    min-height: 52px;
    padding: 4px 2px 6px;
    border-radius: 6px;
  }

  .day-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin: 0 auto 2px;
    display: grid;
  }

  .day-preview {
    font-size: 9px;
    line-height: 1.25;
    max-height: 2.5em;
    text-align: center;
    padding: 0 1px;
  }

  .day-done-mark {
    width: 16px;
    height: 16px;
    top: 2px;
    right: 2px;
    border-width: 1px;
  }

  .day-done-mark .done-check-icon {
    width: 10px;
    height: 10px;
  }

  .day-status-pill,
  .day-lock-pill,
  .day-adjacent-hint {
    display: none;
  }

  .detail-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .detail-date {
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .detail-subdate {
    font-size: 14px;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .detail-actions .btn {
    min-height: 48px;
    width: 100%;
    font-size: 15px;
  }

  .detail-empty {
    min-height: 180px;
    padding: 24px 12px;
  }

  .detail-locked {
    padding: 20px 8px;
    max-width: none;
  }

  .section-card {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .workout-movement-title {
    font-size: 16px;
  }

  .workout-prescription,
  .workout-line {
    font-size: 15px;
  }

  .contact-card,
  .quota-banner,
  .scrape-banner {
    margin-left: 10px;
    margin-right: 10px;
  }

  .quota-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .quota-banner .btn {
    width: 100%;
    min-height: 44px;
  }

  .toast {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom));
    text-align: center;
    border-radius: 12px;
  }

  .search-results {
    margin-top: 12px;
    padding-top: 12px;
  }

  .search-result {
    min-height: 48px;
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .day-preview {
    display: none;
  }

  .day-cell {
    min-height: 44px;
    padding-bottom: 4px;
  }

  .brand-title {
    font-size: 15px;
  }
}

/* Workout type filter chips */
.workout-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.type-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  min-height: 32px;
}
.type-chip-on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.type-chip-on:hover {
  background: color-mix(in srgb, var(--primary) 88%, #000);
  border-color: color-mix(in srgb, var(--primary) 88%, #000);
}

/* Gym discovery — below workouts, always visible when enabled */
.partners-discovery {
  margin: 16px 16px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 12px 16px;
}
.partners-discovery-title {
  margin: 0 0 4px;
  padding: 0 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
.partners-discovery .partners-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.partners-card {
  margin: 12px 16px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.gym-nudge {
  margin: 0 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.gym-nudge-btn {
  background: none;
  border: none;
  color: var(--primary-text);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}
.partners-card-title {
  margin: 0 0 4px;
  font-size: 1rem;
}
.partners-card-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.partners-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.partner-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.partner-item--link {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.15s ease;
}
@media (hover: hover) {
  .partner-item--link:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    box-shadow: var(--shadow);
    background: color-mix(in srgb, var(--primary) 3%, var(--bg));
  }
  .partner-item-promoted.partner-item--link:hover {
    background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary) 14%, var(--surface)) 0%,
      color-mix(in srgb, var(--primary) 6%, var(--bg)) 100%
    );
  }
}
.partner-item--link:active {
  transform: scale(0.993);
}
.partner-item-promoted {
  position: relative;
  padding: 16px 16px 14px 18px;
  margin-bottom: 4px;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 10%, var(--surface)) 0%,
    color-mix(in srgb, var(--primary) 4%, var(--bg)) 100%
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent),
    0 8px 24px color-mix(in srgb, var(--primary) 12%, transparent);
}
.partner-item-promoted::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}
.partner-item-promoted .partner-item-name {
  font-size: 1.05rem;
  line-height: 1.35;
}
.partner-item-promoted .partner-item-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  margin-top: 8px;
}
.partner-tagline {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary-text);
}
.partner-highlights {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.partner-highlights li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}
.partner-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--primary);
}
.partner-item-cta {
  display: inline-flex;
  margin-top: 12px;
  text-decoration: none;
}
.partner-item-featured {
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}
.partner-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  background: var(--primary-soft);
  color: var(--primary-text);
}
.partner-badge-promoted {
  background: var(--primary);
  color: #fff;
}
.partner-item-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.partner-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.partner-item-desc {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--text);
}
.partner-rating {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
  margin-left: 6px;
}
.partner-item-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--primary-text);
  text-decoration: none;
}
.partner-item-link:hover {
  text-decoration: underline;
}
.partners-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.partners-inquiry-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.partners-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.inquiry-modal-open {
  overflow: hidden;
}

.inquiry-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.inquiry-modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #0f172a 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.inquiry-modal-panel {
  position: relative;
  width: min(100%, 480px);
  max-height: min(92dvh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  padding: 24px 22px 20px;
  animation: inquiry-modal-in 0.22s ease-out;
}
@keyframes inquiry-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.inquiry-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.inquiry-modal-close:hover {
  color: var(--text);
  background: var(--border);
}
.inquiry-modal-header {
  margin-bottom: 18px;
  padding-right: 28px;
}
.inquiry-modal-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.inquiry-modal-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--text);
}
.inquiry-modal-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}
.inquiry-modal-form {
  display: grid;
  gap: 12px;
}
.inquiry-modal-form .contact-field {
  font-size: 13px;
}
.inquiry-modal-form .contact-field input,
.inquiry-modal-form .contact-field textarea {
  font-size: 16px;
  min-height: 44px;
  padding: 10px 12px;
}
.inquiry-modal-form .contact-field textarea {
  min-height: 88px;
}
.inquiry-modal-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.inquiry-modal-submit {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
}
.inquiry-modal-cancel {
  width: 100%;
  min-height: 44px;
}
.inquiry-modal-footnote {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.85rem;
}
.prefs-field textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.partner-cta-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--primary-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.partner-cta-link:hover {
  color: var(--primary);
}

.detail-partner-links {
  margin: 0 0 12px;
  padding: 0 4px;
  text-align: center;
}

.prefs-partner-cta {
  margin: 10px 0 0;
  font-size: 0.85rem;
}

.contact-trainer-followup {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.quota-banner-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.filter-empty-state {
  margin-top: 16px;
  padding: 20px 16px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.filter-empty-state p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.calendar-filter-hidden {
  opacity: 0.35;
  pointer-events: none;
}

.partner-owner-upsell {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.workout-page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}
.workout-page-header {
  margin-bottom: 24px;
}
.workout-page-eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.workout-page-header h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.2;
}
.workout-page-date {
  margin: 0 0 16px;
  color: var(--muted);
}
.workout-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.workout-page-body {
  display: grid;
  gap: 20px;
}
.workout-section h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.workout-section-body {
  line-height: 1.55;
  color: var(--text);
}
.workout-page-empty {
  color: var(--muted);
}

.site-footer {
  margin-top: auto;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}
[data-theme="dark"] .site-footer {
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
}
.site-footer-grid {
  display: grid;
  gap: 28px 40px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}
@media (min-width: 640px) {
  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .site-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.site-footer-heading {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.72;
}
.site-footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.site-footer-copy,
.site-footer-address {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
.site-footer-copy strong {
  color: var(--text);
  font-weight: 600;
}
.site-footer-address {
  font-style: normal;
  margin-top: 8px;
}
.site-footer-meta {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--muted);
  opacity: 0.7;
}
.breadcrumbs a {
  color: var(--primary-text);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs [aria-current="page"] {
  color: var(--text);
}

.market-silo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: var(--radius-md, 10px);
  background: var(--surface-elevated, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}
.market-silo-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.market-silo-link:hover {
  color: var(--text);
  background: var(--surface, #fff);
  border-color: var(--border, rgba(0, 0, 0, 0.08));
}
.market-silo-link.is-active {
  color: var(--primary-text, var(--text));
  background: var(--surface, #fff);
  border-color: var(--primary, #2563eb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.market-related {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}
.market-related-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.market-related ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.market-hub-body p,
.market-section p {
  line-height: 1.6;
  color: var(--muted);
}
.market-landmarks,
.market-voice {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.market-culture {
  font-style: italic;
  color: var(--muted);
}
.market-section h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.article-wrap {
  max-width: 680px;
}
.article-body {
  line-height: 1.6;
  color: var(--text);
}
.article-body h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}
.article-body p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}
.article-body ul {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  color: var(--muted);
}
.article-body a {
  color: var(--primary-text);
}
.page-next-link {
  margin: 24px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.page-next-link a {
  color: var(--primary-text);
}
.blog-cta {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: relative;
  z-index: 30;
}
.site-chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-chrome-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.site-chrome-brand:hover,
.site-chrome-brand:focus-visible,
.site-chrome-brand:visited {
  color: var(--text);
  text-decoration: none;
}
.site-chrome-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.25;
}
.site-chrome-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.site-chrome-brand .brand-title,
.site-chrome-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.site-chrome-brand .brand-location,
.site-chrome-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-chrome-utils {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.site-chrome-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: transparent;
}
.site-chrome-icon-btn:hover {
  background: var(--surface-2);
}
.site-chrome-more-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
#mobileMoreMenu .share-menu-hint {
  border-top: none;
  padding-top: 0;
}
.site-nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav-list::-webkit-scrollbar {
  display: none;
}
.site-nav-theme-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.site-nav-theme-item .theme-toggle {
  width: 34px;
  height: 34px;
}
.admin-theme-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.site-nav-list li {
  border-bottom: none;
  flex-shrink: 0;
}
.site-nav-list li:last-child {
  border-bottom: none;
}
.site-nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}
.site-nav-link[aria-current="page"] {
  color: var(--primary-text);
  font-weight: 600;
  background: var(--primary-soft);
}
.site-nav-link-owner {
  color: var(--muted);
}
.site-nav-link-owner[aria-current="page"] {
  color: var(--primary-text);
  background: var(--primary-soft);
}

.app-shell-subpage {
  min-height: 100vh;
  min-height: 100dvh;
}

.blog-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.blog-header h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.2;
}
.blog-lead {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}
.blog-grid {
  display: grid;
  gap: 16px;
}
.blog-card {
  padding: 16px 44px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
a.blog-card--link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
a.blog-card--link::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-50%) rotate(-45deg);
  opacity: 0.55;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}
@media (hover: hover) {
  a.blog-card--link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: var(--shadow);
    background: color-mix(in srgb, var(--primary) 3%, var(--surface));
  }
  a.blog-card--link:hover::after {
    border-color: var(--primary-text);
    opacity: 1;
    transform: translateY(-50%) rotate(-45deg) translate(2px, 2px);
  }
  a.blog-card--link:hover h2 {
    color: var(--primary-text);
  }
}
a.blog-card--link:active {
  transform: translateY(0) scale(0.992);
  box-shadow: none;
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  transition-duration: 0.08s;
}
a.blog-card--link:active::after {
  opacity: 1;
  border-color: var(--primary-text);
}
a.blog-card--link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.blog-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
}
.blog-card h2 a {
  color: inherit;
  text-decoration: none;
}
.blog-card h2 a:hover {
  color: var(--primary-text);
  text-decoration: underline;
}
.blog-meta {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.blog-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.blog-card p + p {
  margin-top: 8px;
}

@media (min-width: 641px) {
  .search-shell {
    flex: 1;
    max-width: 320px;
  }
  .search-shell .search-box {
    display: flex;
  }
  .topbar-chrome-row {
    flex: 1;
    justify-content: flex-end;
  }
}

@media (min-width: 768px) {
  .site-nav {
    padding: 0 24px;
  }
  .site-nav-list {
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    padding: 6px 0;
  }
  .site-nav-theme-item {
    border-top: none;
    padding: 0 0 0 4px;
    flex-shrink: 0;
  }
  .site-nav-list li {
    border-bottom: none;
  }
  .site-nav-link {
    padding: 8px 14px;
    border-radius: 999px;
  }
  .site-nav-link-owner {
    margin-left: auto;
  }
}

@media (max-width: 767px) {
  .site-nav {
    padding: 0 12px;
  }
  .site-nav-list {
    width: 100%;
    padding: 8px 0;
    gap: 6px;
  }
  .site-nav-link {
    padding: 8px 14px;
    font-size: 13px;
  }
  .site-nav-link-owner {
    font-weight: 500;
  }
}

.site-footer-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  opacity: 0.88;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.site-footer-link:hover {
  color: var(--primary-text);
  opacity: 1;
  text-decoration: none;
}

.for-gyms-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.for-gyms-back {
  margin: 0 0 20px;
  font-size: 0.9rem;
}
.for-gyms-back a {
  color: var(--primary-text);
  text-decoration: none;
}
.for-gyms-back a:hover {
  text-decoration: underline;
}
.for-gyms-header {
  margin-bottom: 28px;
}
.for-gyms-logo {
  height: 56px;
  width: fit-content;
  max-width: min(260px, 88vw);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  background: transparent;
}
.for-gyms-logo .brand-logo-img {
  height: 56px;
  width: auto;
}
.for-gyms-header h1 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  line-height: 1.25;
}
.for-gyms-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.for-gyms-pain {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.for-gyms-pain h2,
.for-gyms-benefits h2,
.for-gyms-pricing h2,
.for-gyms-form-section h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.for-gyms-pain-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  font-size: 0.92rem;
}
.for-gyms-pain-list li + li {
  margin-top: 6px;
}
.for-gyms-benefits {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.for-gyms-benefit-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
  color: var(--text);
}
.for-gyms-benefit-list li + li {
  margin-top: 8px;
}
.for-gyms-benefit-list strong {
  color: var(--text);
}
.for-gyms-pricing {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.for-gyms-pricing-grid {
  display: grid;
  gap: 12px;
}
.for-gyms-pricing-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.for-gyms-pricing-card-featured {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 5%, var(--bg));
}
.for-gyms-pricing-badge {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.for-gyms-pricing-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.for-gyms-pricing-desc {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.for-gyms-pricing-note {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-text);
}
.for-gyms-pricing-footnote {
  margin: 12px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (min-width: 560px) {
  .for-gyms-pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.for-gyms-form-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}
.for-gyms-form {
  display: grid;
  gap: 12px;
}
.for-gyms-form-actions {
  margin-top: 4px;
}
.partner-item-listing {
  display: inline-block;
  margin: 8px 0 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}
.partner-item-listing:hover {
  text-decoration: underline;
}
.partner-item-actions {
  display: block;
  margin-top: 6px;
}

.gym-listing-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.gym-listing-header h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.25;
}
.gym-tagline {
  margin: 0 0 6px;
  font-weight: 500;
  color: var(--primary-text);
}
.gym-listing-lead {
  margin: 0 0 20px;
  color: var(--muted);
}
.gym-listing-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .gym-listing-grid {
    grid-template-columns: 1fr minmax(280px, 360px);
    align-items: start;
  }
}
.gym-section {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.gym-section h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.gym-nap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.gym-nap-table th {
  text-align: left;
  padding: 6px 12px 6px 0;
  color: var(--muted);
  font-weight: 500;
  vertical-align: top;
  width: 90px;
}
.gym-nap-table td {
  padding: 6px 0;
  color: var(--text);
}
.gym-outbound-link {
  margin: 12px 0 0;
  font-size: 0.9rem;
}
.gym-outbound-link a {
  color: var(--primary-text);
  font-weight: 500;
}
.gym-about p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: var(--muted);
}
.gym-amenities,
.gym-highlights {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}
.gym-map-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.gym-map-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.gym-map-address {
  margin: 0 0 12px;
  line-height: 1.5;
  color: var(--text);
}
.gym-map-directions {
  display: inline-flex;
  text-decoration: none;
}
.gym-map-frame-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.gym-map-embed {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
  background: var(--surface-2);
}
.gym-map-footer {
  margin: 10px 0 0;
  font-size: 0.92rem;
}
.gym-map-directions-link {
  color: var(--primary-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gym-map-directions-link:hover {
  opacity: 0.9;
}
.gym-map-preview {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.gym-map-preview:hover .gym-map-open-label {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.gym-map-static {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--surface-2);
}
.gym-map-open-label {
  display: block;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--primary-text);
}
.gym-review {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.gym-review-stars {
  margin: 0 0 4px;
  color: var(--primary-text);
  letter-spacing: 1px;
}
.gym-review-body {
  margin: 0 0 4px;
  line-height: 1.5;
}
.gym-review-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.gym-form-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}
.gym-review-form {
  display: grid;
  gap: 10px;
}
.gym-review-success {
  margin: 8px 0 0;
  color: var(--primary-text);
  font-size: 0.9rem;
}
.for-gyms-footer {
  margin-top: 32px;
}
