/* ==========================================================================
   SCORP — Digital Active Life Platform
   Editorial Minimalist Design System (Lululemon / Nike Training Club / Apple Fitness)
   Monochrome & Neutral Stone Palette · Zero External Dependencies
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Light Theme (Default) */
  --bg: #F7F7F5;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #EFEFED;
  --bg-inverse: #0A0A0A;
  --text: #0A0A0A;
  --text-secondary: #525252;
  --text-muted: #7A7A78;
  --text-inverse: #FAFAFA;
  --border: #E5E5E2;
  --border-strong: #1A1A1A;
  --accent: #0A0A0A;
  --accent-hover: #262626;
  --success: #166534;
  --success-bg: #ECFDF3;
  --warning: #854D0E;
  --warning-bg: #FEF9C3;
  --danger: #991B1B;
  --danger-bg: #FEF2F2;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);

  --header-h: 52px;
  --bnav-h: 68px;
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0A0A0A;
  --bg-elevated: #141414;
  --bg-subtle: #1D1D1D;
  --bg-inverse: #FAFAFA;
  --text: #F5F5F3;
  --text-secondary: #A3A3A0;
  --text-muted: #737370;
  --text-inverse: #0A0A0A;
  --border: #262624;
  --border-strong: #F5F5F3;
  --accent: #FAFAFA;
  --accent-hover: #E2E2DE;
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --warning: #FACC15;
  --warning-bg: rgba(250, 204, 21, 0.12);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

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

/* Shell & Header */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  :root { --header-h: 64px; }
}

.header-inner {
  max-width: 1180px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-wordmark {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.brand-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 900px) {
  .brand-logo { height: 26px; }
}

.logo-for-dark { display: none; }
[data-theme="dark"] .logo-for-light { display: none; }
[data-theme="dark"] .logo-for-dark { display: block; }

.hero-brand-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  opacity: 0.94;
  margin-bottom: 4px;
}

.brand-tag {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  display: inline;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.dnav-btn {
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.dnav-btn:hover { color: var(--text); background: var(--bg-subtle); }
.dnav-btn.active {
  color: var(--text-inverse);
  background: var(--bg-inverse);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn, .icon-pill {
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}

.icon-btn { width: 34px; }
.icon-pill { padding: 0 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }
.icon-btn:hover, .icon-pill:hover { border-color: var(--border-strong); }

/* Main Container */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px calc(var(--bnav-h) + 32px);
  animation: fadeSlide 240ms ease-out;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Bottom Nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
}
.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bnav-btn {
  flex: 1 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.bnav-btn svg { transition: transform var(--transition); }
.bnav-btn.active { color: var(--text); font-weight: 700; }
.bnav-btn.active svg { transform: translateY(-1px); stroke-width: 2.2; }

/* Editorial Hero Banner */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  background: #0E0E0E;
  color: #FAFAFA;
  display: flex;
  align-items: flex-end;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.hero-banner img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: grayscale(18%) contrast(1.06);
  transition: transform 600ms ease;
}

.hero-banner:hover img.hero-bg { transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.18) 0%, rgba(10,10,10,0.52) 55%, rgba(10,10,10,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.82;
}

.hero-title {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 660px;
}

.hero-subtitle {
  font-size: 0.94rem;
  color: rgba(250, 250, 250, 0.82);
  max-width: 580px;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

/* Module Header Banner (Compact Editorial) */
.module-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 190px;
  background: #0F0F0F;
  color: #FAFAFA;
  display: flex;
  align-items: flex-end;
  margin-bottom: 22px;
}

.module-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: grayscale(15%);
}

.module-hero .hero-overlay {
  background: linear-gradient(180deg, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.85) 100%);
}

.module-hero-body {
  position: relative;
  z-index: 2;
  padding: 24px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.module-hero h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.module-hero p {
  font-size: 0.9rem;
  color: rgba(250,250,250,0.8);
  margin-top: 4px;
  max-width: 560px;
}

/* Typography & Section Headers */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}

.section-title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Cards & Grids */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card-subtle {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* Stats Strip */
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-hint {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Module Editorial Cards (Dashboard) */
.module-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 210px;
  background: #121212;
  color: #FAFAFA;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.module-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 450ms ease, opacity 300ms ease;
}

.module-card:hover img { transform: scale(1.05); opacity: 0.68; }

.module-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.82) 100%);
}

.module-card-body {
  position: relative;
  z-index: 2;
  padding: 18px;
}

.module-card-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.module-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin-top: 2px;
}

.module-card-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.78);
  margin-top: 4px;
}

/* Segmented Tabs */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); }

.btn-ghost {
  background: rgba(255,255,255,0.14);
  color: #FAFAFA;
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.24); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.btn-sm { padding: 7px 13px; font-size: 0.78rem; }
.btn-block { width: 100%; }

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

.chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-color: var(--bg-inverse);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-dark {
  background: rgba(255,255,255,0.14);
  color: #FAFAFA;
  border-color: rgba(255,255,255,0.22);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: transparent;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.input, .select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus, .select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent);
}

/* Progress Bars & Rings */
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: var(--radius-pill);
  transition: width 350ms ease;
}

/* Exercise / Routine List Items */
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color var(--transition);
}

.item-row:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--border)); }

.item-title { font-size: 0.95rem; font-weight: 600; }
.item-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Weekly Calendar Strip */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-cell {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.day-cell.today { border-color: var(--border-strong); }
.day-cell.done { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.day-name { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.72; }
.day-label { font-size: 0.72rem; font-weight: 600; line-height: 1.2; }

/* Timer Ring (Pilates) */
.timer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  gap: 18px;
}

.timer-ring-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
}

.timer-ring-wrap svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-readout {
  position: absolute;
  text-align: center;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.timer-phase {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

/* Water Tracker Visual */
.water-cups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.water-cup {
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.water-cup.filled {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-color: var(--bg-inverse);
}

/* Color Swatches (Style Module) */
.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(128,128,128,0.35);
}

/* Challenge Day Dots */
.day-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 14px 0;
}

.day-dot {
  height: 36px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.day-dot.completed {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-color: var(--bg-inverse);
}

/* Achievement Badges */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.achievement-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-elevated);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.achievement-card.locked { opacity: 0.45; filter: grayscale(1); }

.achievement-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Disclaimer Box */
.disclaimer {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-strong);
  padding: 12px 14px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  line-height: 1.5;
}

/* Toast & Modal */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px);
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: fadeSlide 200ms ease-out;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-panel {
  width: 100%;
  max-width: 540px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Helpers */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flex-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.mono { font-family: var(--font-mono); }

/* Responsive Breakpoints */
@media (min-width: 640px) {
  .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .brand-tag { font-size: 0.65rem; letter-spacing: 0.16em; padding-left: 10px; }
}

@media (min-width: 900px) {
  .desktop-nav { display: flex; }
  .bottom-nav { display: none; }
  .app-main { padding: 28px 24px 56px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-banner { min-height: 330px; }
  .hero-content { padding: 36px 34px; }
}

/* ==========================================================================
   Auth Gate, Live WooCommerce Shop & Cart Drawer
   ========================================================================== */
body.auth-locked .desktop-nav,
body.auth-locked .bottom-nav,
body.auth-locked #header-cart-btn,
body.auth-locked [data-nav="settings"] {
  display: none !important;
}

.auth-gate {
  min-height: calc(100vh - var(--header-h) - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: var(--shadow-md);
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.auth-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 6px;
}

.auth-error {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-footnote {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Header Cart Trigger */
.cart-trigger { position: relative; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Shop Product Cards */
.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.product-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-subtle);
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
  cursor: pointer;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 400ms ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.04); }

.sale-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: #0A0A0A;
  color: #FAFAFA;
  font-size: 0.7rem;
  font-weight: 700;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.price-old {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-modal-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 400px;
  margin: 0 auto;
  background: var(--bg-subtle);
}
.product-modal-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Legal Checkbox & Modal Copy */
.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}
.legal-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--text);
  flex-shrink: 0;
}
.link-inline {
  text-decoration: underline;
  font-weight: 600;
  color: var(--text);
  padding: 0;
}
.legal-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.legal-text strong { color: var(--text); }

/* Featured Shop Spotlight Banner on Dashboard */
.shop-spotlight {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 210px;
  background: #0D0D0D;
  color: #FAFAFA;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.shop-spotlight .spotlight-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.62;
  transition: transform 550ms ease;
}

.shop-spotlight:hover .spotlight-bg { transform: scale(1.03); }

.shop-spotlight .spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.52) 55%, rgba(10,10,10,0.22) 100%);
}

.shop-spotlight .spotlight-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 28px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.spotlight-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.spotlight-sub {
  font-size: 0.88rem;
  color: rgba(250, 250, 250, 0.82);
  max-width: 480px;
  margin-top: 4px;
}

.btn-spotlight {
  background: #FAFAFA;
  color: #0A0A0A;
  padding: 12px 24px;
  font-weight: 700;
}
.btn-spotlight:hover { background: #E5E5E2; transform: translateY(-1px); }

/* Expandable Subcategory Bar & 3-Photo Product Gallery */
.subcat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.chip-sub {
  font-size: 0.76rem;
  padding: 5px 12px;
  background: var(--bg-subtle);
}

.card-img-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 10, 0.52);
  backdrop-filter: blur(6px);
}
.img-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 160ms ease, background 160ms ease;
}
.img-dot.active {
  background: #FFFFFF;
  transform: scale(1.25);
}

.modal-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.modal-thumb {
  width: 58px;
  height: 76px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: var(--transition);
}
.modal-thumb.active {
  border-color: var(--border-strong);
  opacity: 1;
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Touch Swipe Carousel (All Product Photos — Strict Horizontal Axis) */
.swipe-track {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.swipe-track::-webkit-scrollbar { display: none; }
.swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.swipe-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  user-select: none;
  -webkit-user-drag: none;
}
.swipe-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.52);
  color: #FFFFFF;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.swipe-arrow.prev { left: 8px; }
.swipe-arrow.next { right: 8px; }
.product-modal-img { position: relative; }
.modal-thumbs { flex-wrap: wrap; }

/* Multi-level Expandable Category Dropdown Tree */
.cat-dropdown-wrap {
  position: relative;
  margin-top: 10px;
}
.cat-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.cat-dropdown-panel {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: 8px;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.cat-tree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  transition: background 140ms ease;
}
.cat-tree-row:hover { background: var(--bg-subtle); }
.cat-tree-row.active { background: var(--bg-inverse); color: var(--text-inverse); }
.cat-tree-label {
  flex: 1;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 500;
}
.cat-tree-row.active .cat-tree-label { font-weight: 700; }
.cat-tree-toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.cat-tree-children {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

/* Editorial Toned Grey Campaign Strip (Under Shop Hero) */
.campaign-strip {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--text) 12%, var(--border));
  background: linear-gradient(135deg, #ECECE8 0%, #DFDFD9 52%, #EAEAE5 100%);
  padding: 20px 18px;
  margin-bottom: 18px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--shadow-sm);
}

[data-theme="dark"] .campaign-strip {
  background: linear-gradient(135deg, #161615 0%, #222220 52%, #171716 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}

.campaign-strip-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  background: color-mix(in srgb, var(--bg-elevated) 60%, transparent);
  margin-bottom: 10px;
}

.campaign-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.campaign-line {
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.campaign-line-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Clean Full-Width Shop Search & Dual Filter Row */
.shop-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-search-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.shop-search-row .input {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.shop-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .shop-filter-row {
    grid-template-columns: 1fr;
  }
}

/* Premium Borderless Tab-Indented Category Picker */
.prem-cat-wrap {
  position: relative;
  width: 100%;
}
.prem-cat-trigger {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color var(--transition);
}
.prem-cat-trigger:hover { border-color: var(--border-strong); }
.prem-cat-panel {
  margin-top: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prem-cat-opt {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  transition: background 140ms ease;
}
.prem-cat-opt:hover { background: var(--bg-subtle); }
.prem-cat-opt.depth-0 { font-weight: 600; }
.prem-cat-opt.depth-1 { font-weight: 400; color: var(--text-secondary); }
.prem-cat-opt.depth-2,
.prem-cat-opt.depth-3 { font-weight: 400; font-size: 0.83rem; color: var(--text-muted); }
.prem-cat-opt.active {
  background: var(--bg-inverse);
  color: var(--text-inverse) !important;
  font-weight: 600;
}
.prem-cat-count {
  font-size: 0.74rem;
  opacity: 0.55;
  font-family: var(--font-mono);
}

/* Dynamic Shop Grid (Admin Configurable: Mobile 1-2, Desktop 3-4-5) */
.shop-grid-dynamic {
  display: grid;
  grid-template-columns: repeat(var(--cols-m, 2), minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .shop-grid-dynamic {
    grid-template-columns: repeat(var(--cols-d, 3), minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 639px) {
  .shop-grid-dynamic.cols-m-2 .product-body {
    padding: 11px;
    gap: 4px;
  }
  .shop-grid-dynamic.cols-m-2 .product-name {
    font-size: 0.82rem;
  }
  .shop-grid-dynamic.cols-m-2 .btn-sm {
    padding: 7px 8px;
    font-size: 0.72rem;
  }
  .shop-grid-dynamic.cols-m-2 .swipe-arrow {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}

.prem-cat-section {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 10px 12px 4px;
}

/* Clean Accordion Category Rows (No counts, no borders, tidy expansion) */
.prem-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: var(--radius-xs);
  padding-right: 6px;
  transition: background 140ms ease;
}
.prem-cat-row:hover { background: var(--bg-subtle); }
.prem-cat-row.active {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.prem-cat-name {
  flex: 1;
  text-align: left;
  padding: 9px 4px;
  font-size: 0.88rem;
  color: inherit;
}
.prem-cat-row.depth-0 .prem-cat-name { font-weight: 600; }
.prem-cat-row.depth-1 .prem-cat-name { font-weight: 400; color: var(--text-secondary); }
.prem-cat-row.depth-2 .prem-cat-name,
.prem-cat-row.depth-3 .prem-cat-name { font-weight: 400; font-size: 0.83rem; color: var(--text-muted); }
.prem-cat-row.active .prem-cat-name { color: var(--text-inverse) !important; font-weight: 600; }

.prem-cat-exp {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  color: var(--text-muted);
  transition: transform 160ms ease;
}
.prem-cat-row.active .prem-cat-exp { color: var(--text-inverse); }
.prem-cat-exp.open { transform: rotate(90deg); }

/* SCORP Run Pro — Live GPS Panel */
.run-live-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}
.run-live-hero {
  text-align: center;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--border);
}
.run-big-km {
  font-size: clamp(3.2rem, 11vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.run-big-unit {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 6px;
}
.run-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.run-metric strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 4px;
}

/* SCORP Training Pro — Dashed Motion Diagrams & Live Set Runner */
.ex-diagram-box {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ex-diagram-svg {
  width: 100%;
  max-width: 280px;
  height: 148px;
  color: var(--text);
}
.ex-mini-diagram {
  width: 132px;
  height: 78px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px;
  overflow: hidden;
}
.ex-mini-diagram .ex-diagram-svg {
  width: 100%;
  height: 100%;
  max-width: none;
}
.set-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.set-row {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg);
  border: 1px solid var(--border);
}
.set-row.done {
  background: var(--success-bg);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}
.rest-banner {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px);
  z-index: 40;
  background: #0A0A0A;
  color: #FAFAFA;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

/* Pilates Breathwork Orb & Nutrition Macro Bar */
.breath-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.breath-orb {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
.breath-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.breath-sec {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 2px;
}
.breath-pat-btn.active-pat {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.macro-bar {
  display: flex;
  height: 10px;
  width: 100%;
  border-radius: var(--radius-pill);
  overflow: hidden;
  gap: 2px;
}

/* Evenly Distributed Quick Tools Grid on Dashboard */
.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.quick-tool-btn {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}
.quick-tool-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

/* Integrated Search + Favorites Location Dropdown (Sailing, Ski, Cycling) */
.loc-picker-wrap {
  position: relative;
  width: 100%;
}
.loc-trigger-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.loc-trigger-row .prem-cat-trigger {
  flex: 1;
  min-width: 0;
}
.loc-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loc-dropdown-panel {
  margin-top: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}
.loc-list-scroll {
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.loc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-radius: var(--radius-xs);
  padding: 2px 4px 2px 10px;
  transition: background 140ms ease;
}
.loc-row:hover { background: var(--bg-subtle); }
.loc-row.active {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.loc-row-name {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 8px 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loc-star-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 140ms ease, color 140ms ease;
}
.loc-star-btn:hover { transform: scale(1.12); color: var(--text); }
.loc-star-btn.is-fav { color: var(--text); }
.loc-row.active .loc-star-btn { color: var(--text-inverse); }

/* SCORP Community Instagram Editorial Banner (Matched to .module-card) */
.ig-community-card {
  width: 100%;
  cursor: default;
}
.ig-community-card img {
  object-position: center 30%;
}
.ig-community-body {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.ig-community-info {
  min-width: 0;
}
.ig-handle-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.ig-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #FAFAFA;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}
.ig-handle-text {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(250, 250, 250, 0.92);
}
.ig-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .ig-community-body {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ig-cta-wrap {
    width: 100%;
    justify-content: center;
  }
}

/* Larger, Crisp Realistic Line-Art Illustrations for Training & Pilates */
.ex-diagram-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 220px;
  object-fit: contain;
  background: #FFFFFF;
  border-radius: var(--radius-xs);
}
.ex-mini-diagram .ex-diagram-img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  border-radius: 0;
}
.modal-panel .ex-diagram-box .ex-diagram-img {
  max-height: 260px;
}
[data-theme="dark"] .ex-diagram-box,
[data-theme="dark"] .ex-mini-diagram {
  background: #000000;
}
[data-theme="dark"] .ex-diagram-img {
  filter: invert(1) contrast(1.06);
}
@media (max-width: 480px) {
  .ex-mini-diagram {
    width: 112px;
    height: 66px;
  }
}
