@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --accent: #4A6FA5;
  --accent-dim: rgba(74,111,165,0.12);
  --accent-hover: rgba(74,111,165,0.18);
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --elevated: #E1EAF5;
  --text: #0F172A;
  --text-secondary: #1E293B;
  --text-tertiary: #334155;
  --muted: #64748B;
  --dim: #94A3B8;
  --border: #C7D2E0;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.1);
  --danger: #DC2626;
  --danger-dim: rgba(220,38,38,0.1);
  --success: #16A34A;
  --success-dim: rgba(22,163,74,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Typography ─── */
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--text); }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--text); }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }

/* ─── Layout ─── */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  background: rgba(248,250,252,0.8);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-bottom: 1px solid rgba(199,210,224,0.6);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}
.page-header .logo { height: 24px; width: auto; }
.page-header .header-right { display: flex; align-items: center; gap: 16px; }
.page-header .header-label { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.page-header .avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.page-header .user-name { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.page-header .sign-out {
  font-size: 0.75rem; color: var(--muted); cursor: pointer;
  background: none; border: none; font-family: inherit;
}
.page-header .sign-out:hover { color: var(--text); }

.page-content { flex: 1; padding: 32px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.container { max-width: 1200px; margin: 0 auto; width: 100%; }
.container-sm { max-width: 640px; margin: 0 auto; width: 100%; }
.container-md { max-width: 800px; margin: 0 auto; width: 100%; }

/* ─── Card ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-sm { padding: 16px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  border: none; border-radius: var(--radius);
  cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 1px 2px rgba(74,111,165,0.2); }
.btn-primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 16px rgba(74,111,165,0.3), 0 1px 3px rgba(74,111,165,0.15); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 2px rgba(74,111,165,0.15); }
.btn-outline { background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); background: var(--bg); box-shadow: 0 2px 8px rgba(74,111,165,0.1); transform: translateY(-1px); }
.btn-outline:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: rgba(0,0,0,0.04); }
.btn-danger { background: var(--danger-dim); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(220,38,38,0.18); }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 980px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 0.8125rem; font-weight: 600;
  color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-hint { font-size: 0.75rem; color: var(--dim); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }

.input, .select, .textarea {
  width: 100%; padding: 10px 14px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 0.9375rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  box-shadow: var(--shadow);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,111,165,0.1), 0 1px 2px rgba(0,0,0,0.04); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input-sm { padding: 6px 10px; font-size: 0.8125rem; }
.textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.char-count { font-size: 0.75rem; color: var(--dim); text-align: right; margin-top: 2px; }

/* ─── Inline form row ─── */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }

/* ─── Badges & Tags ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-muted { background: var(--elevated); color: var(--muted); }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 0.8125rem; font-weight: 500;
  background: var(--elevated); color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s;
}
.tag:hover { border-color: var(--accent); }
.tag.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.tag .tag-remove {
  display: inline-flex; margin-left: 2px; cursor: pointer;
  font-size: 1rem; line-height: 1; color: var(--muted);
}
.tag .tag-remove:hover { color: var(--danger); }

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

/* ─── Steps Indicator ─── */
.steps {
  display: flex; gap: 4px; margin-bottom: 32px; padding: 0 4px;
}
.step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border); transition: background 0.3s;
}
.step.active { background: var(--accent); }
.step.done { background: rgba(74,111,165,0.4); }

.step-title {
  font-size: 0.8125rem; color: var(--muted); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}

/* ─── Upload Zone ─── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
  background: var(--card);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(74,111,165,0.03); }
.upload-zone .upload-icon { font-size: 2rem; margin-bottom: 8px; color: var(--muted); }
.upload-zone .upload-text { font-size: 0.875rem; color: var(--muted); }
.upload-zone .upload-text strong { color: var(--accent); }
.upload-zone input[type="file"] { display: none; }
.upload-zone .upload-preview {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
}
.upload-zone .upload-preview img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: var(--radius); }
.upload-zone .upload-preview .remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  border: none; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Cover Upload (4:3 ratio) ─── */
.upload-zone-cover {
  aspect-ratio: 4 / 3;
  max-height: 300px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.upload-zone-cover #cover-placeholder { padding: 40px 24px; }

/* ─── AI Import Card ─── */
.ai-import-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.ai-import-card .ai-import-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; cursor: pointer;
}
.ai-import-card .ai-import-header h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.ai-import-card .ai-import-header .ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 100px;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  background: linear-gradient(135deg, rgba(74,111,165,0.15), rgba(74,111,165,0.08));
  color: var(--accent); letter-spacing: 0.04em;
}
.ai-import-body { margin-top: 4px; }
.ai-import-body .ai-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.ai-import-body .ai-tab {
  padding: 6px 14px; border-radius: 100px; font-size: 0.8125rem; font-weight: 500;
  background: var(--elevated); border: 1px solid var(--border); cursor: pointer;
  transition: all 0.15s;
}
.ai-import-body .ai-tab.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.ai-import-body textarea {
  width: 100%; padding: 10px 14px; min-height: 80px; resize: vertical;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 0.875rem; color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.ai-import-body textarea:focus { border-color: var(--accent); }
.ai-import-body textarea::placeholder { color: var(--dim); }
.ai-import-image-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px;
  text-align: center; cursor: pointer; transition: all 0.2s; background: var(--bg);
  position: relative;
}
.ai-import-image-zone:hover { border-color: var(--accent); background: rgba(74,111,165,0.03); }
.ai-import-image-zone input[type="file"] { display: none; }
.ai-import-image-zone .ai-image-preview {
  max-height: 160px; max-width: 100%; object-fit: contain; border-radius: var(--radius-sm);
  margin: 0 auto;
}
.ai-import-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ai-import-actions .ai-parse-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius); border: none;
  background: var(--accent); color: #fff; font-family: inherit;
  font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.ai-import-actions .ai-parse-btn:hover:not(:disabled) { opacity: 0.9; }
.ai-import-actions .ai-parse-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-import-actions .ai-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
  display: none;
}
.ai-import-actions .ai-status { font-size: 0.8125rem; color: var(--muted); }

/* ─── Exercise Video Upload ─── */
.video-upload-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 10px; min-width: 36px; height: 30px; border-radius: var(--radius-sm);
  background: transparent; border: 1px dashed var(--border); cursor: pointer;
  color: var(--dim); font-size: 0.75rem; transition: all 0.15s;
  position: relative; flex-shrink: 0; white-space: nowrap;
}
.video-upload-btn::after { content: 'Video'; }
.video-upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); border-style: solid; }
.video-upload-btn.has-video { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); border-style: solid; }
.video-upload-btn.has-video::after { content: 'Video ✓'; }
.video-upload-btn input[type="file"] { display: none; }
.video-badge {
  position: absolute; top: -3px; right: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 1.5px solid var(--card);
}

/* ─── Video Preview Modal ─── */
.video-preview-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 24px;
}
.video-preview-modal {
  background: var(--card); border-radius: var(--radius-lg); padding: 16px;
  max-width: 480px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.video-preview-modal video { width: 100%; border-radius: var(--radius); max-height: 320px; }
.video-preview-modal .video-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

.preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
  margin-top: 12px;
}
.preview-thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); cursor: pointer;
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-thumb .remove-btn {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: white;
  border: none; cursor: pointer; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Exercise Row ─── */
.exercise-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow);
}
.exercise-row .drag-handle {
  cursor: grab; color: var(--dim); font-size: 1.25rem;
  display: flex; align-items: center; flex-shrink: 0;
  user-select: none;
}
.exercise-row .drag-handle:active { cursor: grabbing; }
.exercise-row .exercise-fields { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exercise-row .exercise-fields > .exercise-name { flex: 2; min-width: 150px; }

/* ─── Exercise Autocomplete ─── */
.exercise-name-wrap { position: relative; flex: 2; min-width: 150px; }
.exercise-name-wrap .exercise-name { width: 100%; }
.autocomplete-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 100;
  min-width: 320px; width: max-content; max-width: 420px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-top: 4px;
  max-height: 240px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: none;
}
.autocomplete-dropdown.visible { display: block; }
.autocomplete-item {
  padding: 8px 12px; cursor: pointer; display: flex;
  align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active {
  background: var(--accent-dim);
}
.autocomplete-item .ac-name {
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  flex: 1; min-width: 0;
}
.autocomplete-item .ac-name mark {
  background: rgba(74,111,165,0.2); color: var(--text);
  border-radius: 2px; padding: 0 1px;
}
.autocomplete-item .ac-muscle {
  font-size: 0.7rem; color: var(--dim); white-space: nowrap;
  flex-shrink: 0;
}
.exercise-row .exercise-field { flex: 0 0 72px; }
.exercise-row .exercise-field-sm { flex: 0 0 56px; }
.exercise-row .exercise-actions { display: flex; gap: 4px; flex-shrink: 0; }
.exercise-row.superset { border-left: 3px solid var(--accent); }
.exercise-row.warmup { opacity: 0.7; border-style: dashed; }

.exercise-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); cursor: pointer; font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s; background: var(--card);
}
.exercise-add:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Listing Card (Dashboard) ─── */
.listings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.listing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow);
}
.listing-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.listing-card .card-cover {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--elevated);
  transition: transform 0.6s ease;
}
.listing-card:hover .card-cover { transform: scale(1.03); }
.listing-card .card-cover-placeholder {
  width: 100%; aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--elevated) 0%, var(--border) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 2rem;
}
.listing-card .card-body { padding: 16px; }
.listing-card .card-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.listing-card .card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--muted); margin-bottom: 12px;
}
.listing-card .card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.listing-card .card-price { font-size: 0.9375rem; font-weight: 700; color: var(--accent); }
.listing-card .card-actions { display: flex; gap: 6px; }

/* ─── Stats Row ─── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; margin-bottom: 2px; color: var(--text); }
.stat-card .stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; font-size: 0.9375rem; }

/* ─── Card Selector (Type picker) ─── */
.card-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card-option {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; cursor: pointer;
  text-align: center; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow);
}
.card-option:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-option.selected { border-color: var(--accent); background: rgba(74,111,165,0.04); }
.card-option .option-icon { font-size: 2rem; margin-bottom: 8px; }
.card-option .option-title { font-weight: 600; margin-bottom: 4px; color: var(--text); }
.card-option .option-desc { font-size: 0.8125rem; color: var(--muted); }

/* ─── Price Tier Selector ─── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.tier-option {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 12px 8px; cursor: pointer;
  text-align: center; transition: all 0.2s; font-weight: 600; font-size: 0.9375rem;
  box-shadow: var(--shadow);
}
.tier-option:hover { border-color: var(--accent); }
.tier-option.selected { border-color: var(--accent); color: var(--accent); background: rgba(74,111,165,0.04); }
.tier-btn {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 12px 8px; cursor: pointer;
  text-align: center; font-weight: 600; font-size: 0.9375rem;
  color: var(--text); transition: all 0.2s;
}
.tier-btn:hover { border-color: var(--accent); }
.tier-btn.selected { border-color: var(--accent); color: var(--accent); background: rgba(74,111,165,0.04); }
.toggle-btn {
  padding: 6px 20px; border-radius: 100px; font-size: 0.8125rem; font-weight: 600;
  border: 2px solid var(--border); background: var(--card); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Week / Day (Programs) ─── */
.week-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.week-tab {
  padding: 6px 16px; border-radius: 100px; font-size: 0.8125rem; font-weight: 600;
  background: var(--card); border: 1px solid var(--border); cursor: pointer;
  white-space: nowrap; transition: all 0.15s;
}
.week-tab.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.week-tab-add { color: var(--muted); border-style: dashed; }
.week-tab-add:hover { color: var(--accent); border-color: var(--accent); }

.day-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.day-card .day-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.day-card .day-name { font-weight: 600; font-size: 0.9375rem; color: var(--text); }

/* ─── Review Section ─── */
.review-section { margin-bottom: 24px; }
.review-section .review-label {
  font-size: 0.75rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600; margin-bottom: 6px;
}
.review-section .review-value { font-size: 0.9375rem; color: var(--text); }

/* ─── Pricing Card Selector ─── */
.pricing-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.pricing-option {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; cursor: pointer;
  text-align: center; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow);
}
.pricing-option:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pricing-option.selected { border-color: var(--accent); background: rgba(74,111,165,0.04); }
.pricing-option .option-title { font-weight: 700; margin-bottom: 4px; color: var(--text); }
.pricing-option .option-desc { font-size: 0.8125rem; color: var(--muted); }

/* ─── Revenue Preview ─── */
.revenue-preview {
  background: rgba(74,111,165,0.06); border: 1px solid rgba(74,111,165,0.15);
  border-radius: var(--radius); padding: 16px; margin-top: 16px;
}
.revenue-preview .rev-label { font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }
.revenue-preview .rev-amount { font-size: 1.25rem; font-weight: 800; color: var(--accent); }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: var(--radius); z-index: 1000;
  font-size: 0.875rem; font-weight: 500;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.1);
}
.toast-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(22,163,74,0.2); }
.toast-error { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(220,38,38,0.2); }

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  max-width: 420px; width: 100%;
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06), 0 24px 64px rgba(0,0,0,0.12);
}
.modal h2 { margin-bottom: 8px; }
.modal .modal-desc { color: var(--muted); font-size: 0.9375rem; margin-bottom: 24px; }
.modal .modal-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ─── Loading / Spinner ─── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--muted);
}
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ─── Landing Page (Public Listing) ─── */
.hero {
  position: relative; overflow: hidden;
  padding: 0;
}
.hero-img {
  width: 100%; height: 360px; object-fit: cover;
}
.hero-img-placeholder {
  width: 100%; height: 360px;
  background: linear-gradient(135deg, var(--elevated) 0%, var(--border) 100%);
}
.hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero-content {
  position: absolute; bottom: 24px; left: 24px; right: 24px;
}
.hero-content h1 { font-size: 2.5rem; margin-bottom: 8px; }

.creator-inline {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
}
.creator-inline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.creator-inline .creator-name { font-weight: 600; font-size: 0.9375rem; color: var(--text); }
.creator-inline .verified { color: var(--accent); font-size: 0.875rem; }
.creator-inline .creator-followers { font-size: 0.8125rem; color: var(--muted); }

.info-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0;
}
.info-stat {
  padding: 6px 14px; border-radius: 100px;
  background: var(--elevated); font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary);
}

.section { padding: 24px; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }
.section-title { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--muted); margin-bottom: 12px; }

.exercise-preview-list { list-style: none; }
.exercise-preview-list li {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9375rem; display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.exercise-preview-list li:last-child { border-bottom: none; }
.exercise-preview-list .ex-num { color: var(--dim); font-size: 0.8125rem; width: 24px; text-align: right; }
.exercise-video-btn {
  margin-left: auto; background: rgba(var(--accent-rgb, 59,130,246), 0.1); border: none;
  color: var(--accent); font-size: 0.75rem; width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.15s;
}
.exercise-video-btn:hover { background: rgba(var(--accent-rgb, 59,130,246), 0.2); }

.sticky-buy {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(248,250,252,0.88);
  backdrop-filter: saturate(200%) blur(24px); -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-top: 1px solid rgba(199,210,224,0.6); z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04), 0 -8px 24px rgba(0,0,0,0.03);
}
.sticky-buy .price-display { font-size: 1.5rem; font-weight: 800; color: var(--text); }

.powered-by {
  text-align: center; padding: 32px 24px;
  font-size: 0.8125rem; color: var(--dim);
}
.powered-by a { color: var(--accent); font-weight: 600; }
.powered-by a:hover { text-decoration: underline; }

/* ─── Flex utilities ─── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ─── Animations ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.animate-fadeUp { animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .page-content { padding: 20px 16px; }
  .listings-grid { grid-template-columns: 1fr; }
  .card-selector { grid-template-columns: 1fr; }
  .pricing-options { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .exercise-row .exercise-fields { flex-direction: column; gap: 6px; }
  .exercise-row .exercise-field, .exercise-row .exercise-field-sm { flex: 1; min-width: 0; }
  .form-row { flex-direction: column; }
  .hero-content h1 { font-size: 1.75rem; }
  .hero-img, .hero-img-placeholder { height: 260px; }
  .tier-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Dashboard Nav Tabs ─── */
.dash-nav {
  display: flex; gap: 4px; margin-bottom: 32px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.dash-nav-tab {
  padding: 10px 20px; font-size: 0.875rem; font-weight: 600;
  color: var(--muted); background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  margin-bottom: -1px;
}
.dash-nav-tab:hover { color: var(--text); }
.dash-nav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Profile Panel ─── */
.profile-panel { max-width: 640px; }
.profile-panel .avatar-upload-zone {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  border: 2px dashed var(--border); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); transition: border-color 0.2s; position: relative;
}
.profile-panel .avatar-upload-zone:hover { border-color: var(--accent); }
.profile-panel .avatar-upload-zone img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.profile-panel .avatar-upload-zone .avatar-placeholder {
  font-size: 2rem; color: var(--dim);
}
.profile-panel .avatar-upload-zone input[type="file"] { display: none; }
.profile-link-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; margin-top: 12px;
}
.profile-link-box code {
  flex: 1; font-size: 0.8125rem; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-link-box .copy-btn {
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--accent);
  font-family: inherit; transition: all 0.15s;
}
.profile-link-box .copy-btn:hover { background: var(--accent-dim); }

/* ─── Subscribers Table ─── */
.sub-section-title {
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 700; color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sub-section-title .sub-count {
  background: var(--elevated); padding: 2px 8px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
}
.sub-table {
  width: 100%; border-collapse: collapse; margin-bottom: 32px;
}
.sub-table th {
  text-align: left; font-size: 0.75rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.sub-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text);
}
.sub-table tr:last-child td { border-bottom: none; }
.sub-table .sub-user {
  display: flex; align-items: center; gap: 10px;
}
.sub-table .sub-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: var(--elevated); border: 1px solid var(--border);
}
.sub-table .sub-name { font-weight: 500; }
.sub-table .sub-username { font-size: 0.8125rem; color: var(--muted); }

/* ─── Public Profile Page ─── */
.profile-hero {
  text-align: center; padding: 48px 24px 32px;
}
.profile-hero .profile-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 16px; border: 3px solid var(--border);
  background: var(--elevated);
}
.profile-hero .profile-avatar-placeholder {
  width: 120px; height: 120px; border-radius: 50%;
  margin: 0 auto 16px; border: 3px solid var(--border);
  background: var(--elevated); display: flex; align-items: center;
  justify-content: center; font-size: 3rem; color: var(--dim);
}
.profile-hero .profile-name {
  font-size: 1.75rem; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.profile-hero .verified-badge {
  color: var(--accent); font-size: 1.25rem;
}
.profile-hero .profile-bio {
  color: var(--muted); font-size: 0.9375rem; max-width: 480px;
  margin: 8px auto 0; line-height: 1.6;
}
.profile-stats-row {
  display: flex; justify-content: center; gap: 32px; margin-top: 16px;
}
.profile-stats-row .pstat-value { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.profile-stats-row .pstat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.cta-banner {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(135deg, rgba(74,111,165,0.06), rgba(74,111,165,0.02));
  border-top: 1px solid var(--border);
}
.cta-banner h2 { margin-bottom: 8px; }
.cta-banner p { color: var(--muted); margin-bottom: 20px; font-size: 0.9375rem; }
.cta-banner .btn { border-radius: 980px; }

/* ─── Reels Grid ─── */
.reels-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.reel-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow);
}
.reel-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.reel-thumb {
  width: 100%; height: 200px; background: var(--elevated);
  background-size: cover; background-position: center;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.reel-thumb-placeholder { font-size: 2.5rem; color: var(--dim); }
.reel-thumb-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2); opacity: 0; transition: opacity 0.2s;
  font-size: 2rem; color: #fff;
}
.reel-card:hover .reel-thumb-overlay { opacity: 1; }
.reel-card-body { padding: 12px; }
.reel-card-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.reel-card-meta { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.reel-card-actions { display: flex; gap: 6px; }

@media (max-width: 640px) {
  .reels-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .reel-thumb { height: 160px; }
}

/* ─── Listing Detail (web purchase page) ─── */
.page-content.has-buy-bar { padding-bottom: 100px; }

/* ─── Redesigned Listing Page ─── */

/* Hero */
.listing-hero {
  position: relative; overflow: hidden; height: 420px;
}
.listing-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
  transition: transform 10s cubic-bezier(0.16, 1, 0.3, 1);
}
.listing-hero:hover .listing-hero-bg { transform: scale(1.06); }
.listing-hero-bg-placeholder {
  background: linear-gradient(135deg, #1a2a4a 0%, #0f172a 40%, #1e293b 100%);
}
.listing-hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 70%;
  background: linear-gradient(to top, var(--bg) 0%, rgba(248,250,252,0.8) 40%, transparent 100%);
}
.listing-hero-content {
  position: absolute; bottom: 32px; left: 32px; right: 32px;
  z-index: 1;
}
.listing-type-badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 12px;
  background: rgba(74,111,165,0.15); color: var(--accent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.listing-hero-title {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15; color: var(--text); margin-bottom: 8px;
}
.listing-hero-subtitle {
  font-size: 1.0625rem; color: var(--muted); line-height: 1.5;
  max-width: 560px;
}

/* Listing Body */
.listing-body {
  max-width: 720px; margin: 0 auto; padding: 0 24px;
}

/* Creator Card */
.listing-creator-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  margin-top: -24px; position: relative; z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}
.listing-creator-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.listing-creator-avatar img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.listing-creator-avatar-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--elevated); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; color: var(--muted);
}
.listing-creator-info { flex: 1; min-width: 0; }
.listing-creator-name {
  font-size: 1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.listing-creator-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.625rem;
}
.listing-creator-bio {
  font-size: 0.8125rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 2px;
}
.listing-creator-stats {
  display: flex; gap: 20px; padding: 12px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.listing-creator-stats:empty { display: none; }
.listing-creator-stat { display: flex; flex-direction: column; align-items: center; }
.listing-creator-stat-value { font-size: 1rem; font-weight: 800; color: var(--text); }
.listing-creator-stat-label { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.listing-creator-actions { display: flex; gap: 8px; }
.listing-creator-actions .btn { flex: 1; }

/* Social Proof Bar */
.social-proof-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0;
}
.social-proof-bar:empty { display: none; }
.social-proof-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.8125rem; font-weight: 500;
  background: var(--elevated); color: var(--text-secondary);
}
.social-proof-rating { background: rgba(250,204,21,0.12); color: #92400e; }
.social-proof-stars { color: #f59e0b; letter-spacing: 1px; }
.social-proof-badge { font-weight: 600; text-transform: capitalize; }
.social-proof-badge-beginner { background: rgba(22,163,74,0.1); color: var(--success); }
.social-proof-badge-intermediate { background: rgba(234,179,8,0.1); color: #92400e; }
.social-proof-badge-advanced { background: rgba(220,38,38,0.1); color: var(--danger); }
.social-proof-badge-all { background: var(--accent-dim); color: var(--accent); }

/* Listing Sections */
.listing-section {
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.listing-section:last-of-type { border-bottom: none; }
.listing-section.hidden { display: none; }
.listing-section-title {
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.listing-description {
  white-space: pre-wrap; font-size: 0.9375rem; color: var(--text);
  line-height: 1.7; letter-spacing: 0.01em;
}

/* Equipment Tags */
.listing-equip-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-equip-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.8125rem; font-weight: 500;
  background: var(--card); color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Content Badges */
.listing-content-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 100px;
  font-size: 0.6875rem; font-weight: 600; text-transform: none; letter-spacing: 0;
  background: var(--elevated); color: var(--text-secondary);
  vertical-align: middle;
}
.listing-content-badge-video { background: rgba(74,111,165,0.1); color: var(--accent); }

/* Exercise List (template) */
.listing-exercise-list { display: flex; flex-direction: column; gap: 2px; }
.listing-exercise-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  transition: background 0.15s;
}
.listing-exercise-item:hover { background: var(--elevated); }
.listing-exercise-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--elevated); color: var(--muted);
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.listing-exercise-name { flex: 1; font-size: 0.9375rem; font-weight: 500; color: var(--text); }
.listing-exercise-sets {
  font-size: 0.75rem; color: var(--muted); font-weight: 600;
  padding: 2px 8px; border-radius: 100px; background: var(--elevated);
}
.listing-exercise-video-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--accent-dim); color: var(--accent);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.listing-exercise-video-btn:hover { background: var(--accent); color: #fff; }

/* Content Accordion (program) */
.content-accordion { display: flex; flex-direction: column; gap: 6px; }
.content-accordion-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.content-accordion-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 14px 16px; border: none; background: none;
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background 0.15s;
}
.content-accordion-header:hover { background: var(--elevated); }
.content-accordion-title {
  font-size: 0.9375rem; font-weight: 600; color: var(--text); flex: 1;
}
.content-accordion-meta {
  font-size: 0.75rem; color: var(--muted); flex-shrink: 0;
}
.content-accordion-chevron {
  flex-shrink: 0; transition: transform 0.25s ease; color: var(--muted);
}
.content-accordion-header.open .content-accordion-chevron { transform: rotate(180deg); }
.content-accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 16px;
}
.content-accordion-body.open { max-height: 600px; padding: 0 16px 12px; }
.content-accordion-workout {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.04);
  font-size: 0.8125rem;
}
.content-accordion-day {
  font-size: 0.6875rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.03em;
  min-width: 36px;
}
.content-accordion-workout-name { flex: 1; color: var(--text); font-weight: 500; }
.content-accordion-muscle {
  font-size: 0.6875rem; padding: 2px 8px; border-radius: 100px;
  background: var(--elevated); color: var(--muted); font-weight: 600;
}
.content-accordion-videos {
  font-size: 0.6875rem; color: var(--accent); font-weight: 600;
  display: flex; align-items: center; gap: 2px;
}

/* Locked Content Overlay */
.listing-locked-overlay {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px; margin-top: 8px;
  background: linear-gradient(to bottom, rgba(248,250,252,0.6), var(--bg));
  border: 1px dashed var(--border); border-radius: var(--radius);
  text-align: center;
}
.listing-locked-icon {
  color: var(--muted); margin-bottom: 8px;
  opacity: 0.6;
}
.listing-locked-text {
  font-size: 0.9375rem; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.listing-locked-hint {
  font-size: 0.8125rem; color: var(--muted);
}

/* App Download Banner */
.app-download-banner {
  text-align: center; padding: 48px 24px; margin-top: 32px;
  background: linear-gradient(135deg, rgba(74,111,165,0.06), rgba(74,111,165,0.02));
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.app-download-icon {
  color: var(--accent); margin-bottom: 16px;
  display: flex; justify-content: center;
}
.app-download-banner h3 {
  font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.app-download-features {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 0.875rem; margin-bottom: 20px;
}
.app-download-dot { color: var(--dim); }

/* How It Works Steps */
.how-it-works-steps {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 320px; margin: 16px auto 0; text-align: left;
}
.how-it-works-step {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9375rem; color: var(--text); font-weight: 500;
}
.how-it-works-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.app-download-btn {
  border-radius: 980px !important;
  padding: 14px 32px !important;
}

/* Listing Footer */
.listing-footer {
  text-align: center; padding: 32px 0 100px;
  font-size: 0.8125rem; color: var(--dim);
}
.listing-footer a { color: var(--accent); font-weight: 600; }
.listing-footer a:hover { text-decoration: underline; }

/* Sticky Buy Bar (enhanced) */
.listing-sticky-buy {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(248,250,252,0.88);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-top: 1px solid rgba(199,210,224,0.6);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04), 0 -8px 24px rgba(0,0,0,0.05);
}
.listing-sticky-price { display: flex; flex-direction: column; }
.listing-sticky-price-amount { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.listing-sticky-price-label { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.listing-sticky-actions { display: flex; align-items: center; gap: 8px; }
.listing-sticky-app-btn {
  display: inline-flex; align-items: center; gap: 6px;
}

/* Scroll Fade Animation */
.scroll-fade {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-fade-visible {
  opacity: 1; transform: translateY(0);
}

/* Subscriber Callout */
.listing-subscriber-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
}
.subscriber-callout-icon {
  font-size: 1.25rem;
  color: #a855f7;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.subscriber-callout-body {
  flex: 1;
  min-width: 0;
}
.subscriber-callout-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #a855f7;
  margin-bottom: 4px;
}
.subscriber-callout-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Responsive — Listing Page */
@media (max-width: 768px) {
  .listing-hero { height: 320px; }
  .listing-hero-content { bottom: 24px; left: 20px; right: 20px; }
  .listing-hero-title { font-size: 1.75rem; }
  .listing-body { padding: 0 16px; }
  .listing-creator-card { margin-top: -16px; padding: 16px; }
  .listing-creator-stats { gap: 16px; }
  .listing-sticky-buy { padding: 12px 16px; }
  .listing-sticky-price-amount { font-size: 1.25rem; }
  .listing-sticky-actions .listing-sticky-app-btn { display: none; }
  .app-download-banner { padding: 32px 16px; margin-top: 24px; }
}

@media (max-width: 480px) {
  .listing-hero { height: 260px; }
  .listing-hero-title { font-size: 1.5rem; }
  .listing-creator-top { gap: 10px; }
  .listing-creator-avatar img, .listing-creator-avatar-placeholder { width: 40px; height: 40px; }
  .listing-creator-actions { flex-direction: column; }
  .social-proof-bar { gap: 6px; }
  .social-proof-item { padding: 4px 10px; font-size: 0.75rem; }
  .app-download-features { flex-wrap: wrap; }
}
