/* FitForge v1.0 — Dark Glass Morphism Fitness PWA */

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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111113;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-input: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --accent: #3b82f6;
  --accent-dim: rgba(59,130,246,0.15);
  --accent-glow: rgba(59,130,246,0.3);
  --pr: #10b981;
  --pr-dim: rgba(16,185,129,0.15);
  --pr-glow: rgba(16,185,129,0.3);
  --danger: #ef4444;
  --danger-dim: rgba(239,68,68,0.15);
  --warn: #f59e0b;
  --text: #f0f2f5;
  --text-secondary: #9ca3af;
  --muted: #6b7280;
  --dimmer: #374151;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* ─── Layout ─── */
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  padding-bottom: calc(72px + var(--safe-bottom));
  min-height: 100dvh;
}

.view { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Typography ─── */
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
h3 { font-size: 16px; font-weight: 600; }
.label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.mono { font-family: var(--mono); }

.stat-value {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -1px;
}
.stat-value.medium { font-size: 32px; }
.stat-value.small { font-size: 24px; }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.15s, background 0.15s;
}
.card:active { background: var(--bg-card-hover); }
.card-glow {
  box-shadow: 0 0 20px var(--accent-dim), inset 0 1px 0 rgba(255,255,255,0.04);
}
.card-pr { border-color: rgba(16,185,129,0.2); box-shadow: 0 0 20px var(--pr-dim); }
.card + .card { margin-top: 12px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: #2563eb; transform: scale(0.97); }
.btn-success { background: var(--pr); color: #fff; }
.btn-success:active { background: #059669; transform: scale(0.97); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:active { background: var(--bg-card); border-color: var(--border-hover); }
.btn-ghost { background: transparent; color: var(--accent); padding: 8px 12px; }
.btn-ghost:active { background: var(--accent-dim); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 24px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: var(--radius-xs); }

/* ─── Inputs ─── */
input, select, textarea {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="number"] { font-family: var(--mono); font-size: 20px; font-weight: 700; text-align: center; padding: 10px 8px; }
input::placeholder { color: var(--dimmer); }

/* ─── Bottom Tab Navigation ─── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.tab-bar-inner {
  display: flex;
  max-width: 480px;
  width: 100%;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
}
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tab.active { color: var(--accent); }
.tab.active svg { stroke-width: 2.2; }
.tab:active { color: var(--text); }

/* ─── FAB ─── */
.fab {
  position: fixed;
  bottom: calc(72px + var(--safe-bottom));
  right: max(16px, calc((100vw - 480px) / 2 + 16px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 28px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 90;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:active { transform: scale(0.92); }
.fab-pulse { animation: fabPulse 2s ease infinite; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 30px rgba(59,130,246,0.5); }
}

/* ─── Chips / Badges ─── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.chip-accent { background: var(--accent-dim); color: var(--accent); }
.chip-pr { background: var(--pr-dim); color: var(--pr); }
.chip-danger { background: var(--danger-dim); color: var(--danger); }
.chip-muted { background: rgba(255,255,255,0.04); color: var(--muted); }
.chip-warn { background: rgba(245,158,11,0.15); color: var(--warn); }

.badge-muscle {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.muscle-chest { background: rgba(239,68,68,0.15); color: #f87171; }
.muscle-back { background: rgba(59,130,246,0.15); color: #60a5fa; }
.muscle-shoulders { background: rgba(245,158,11,0.15); color: #fbbf24; }
.muscle-biceps, .muscle-triceps { background: rgba(168,85,247,0.15); color: #c084fc; }
.muscle-quadriceps, .muscle-hamstrings, .muscle-glutes, .muscle-calves { background: rgba(16,185,129,0.15); color: #34d399; }
.muscle-core { background: rgba(251,191,36,0.15); color: #fbbf24; }
.muscle-forearms { background: rgba(156,163,175,0.15); color: #9ca3af; }
.muscle-cardio { background: rgba(236,72,153,0.15); color: #f472b6; }

/* ─── Workout Set Row ─── */
.set-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.2s, opacity 0.2s;
}
.set-row.warmup { opacity: 0.6; }
.set-row .set-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.set-row .set-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 16px;
}
.set-row.done .set-check { background: var(--pr); border-color: var(--pr); color: #fff; }
.set-row.done { opacity: 0.7; }

.set-header {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 44px;
  gap: 8px;
  padding: 6px 0;
}
.set-header span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--dimmer); text-align: center; }

/* Swipe to delete */
.swipe-container { position: relative; overflow: hidden; }
.swipe-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ─── Exercise Picker ─── */
.exercise-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.exercise-item:active { background: var(--bg-card-hover); }
.exercise-item .ex-name { font-size: 15px; font-weight: 600; }
.exercise-item .ex-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Filter chips row */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-chip:active { background: var(--bg-card-hover); }

/* ─── Search ─── */
.search-box {
  position: relative;
  margin-bottom: 4px;
}
.search-box input {
  padding-left: 40px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
}

/* ─── Rest Timer ─── */
.timer-ring {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .track { stroke: var(--border); fill: none; stroke-width: 6; }
.timer-ring .progress { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-ring .progress.blue { stroke: var(--accent); }
.timer-ring .progress.warn { stroke: var(--warn); }
.timer-ring .progress.danger { stroke: var(--danger); }
.timer-time {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer-time .seconds {
  font-size: 72px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -2px;
}
.timer-time .timer-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.timer-presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Mini rest timer bar (in active workout) */
.rest-bar {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--accent-dim);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 95;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.rest-bar .rest-time {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.rest-bar .rest-progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.rest-bar .rest-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s linear;
}

/* ─── Charts ─── */
.chart-container {
  width: 100%;
  padding: 8px 0;
}
.chart-container canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Modal / Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal-sheet {
  background: var(--bg-elevated);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: sheetUp 0.25s ease;
}
@keyframes sheetUp { from { transform: translateY(30%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  color: var(--muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.modal-body { padding: 16px 20px; }

/* ─── Onboarding ─── */
.onboarding {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.onboarding-logo {
  font-size: 48px;
  margin-bottom: 8px;
}
.onboarding h1 { margin-bottom: 8px; }
.onboarding .subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 40px; }
.onboarding-step { width: 100%; max-width: 320px; animation: fadeIn 0.3s ease; }
.onboarding-step .field { margin-bottom: 20px; text-align: left; }
.onboarding-step .field label { display: block; margin-bottom: 6px; }

.goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.goal-option {
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.goal-option:active { transform: scale(0.97); }
.goal-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.goal-option .goal-icon { font-size: 28px; margin-bottom: 8px; }
.goal-option .goal-name { font-size: 13px; font-weight: 600; }

.progress-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.progress-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dimmer);
  transition: all 0.2s;
}
.progress-dots .dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* ─── Workout Card (history) ─── */
.workout-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
}
.workout-card .wc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.workout-card .wc-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; }
.workout-card .wc-info { flex: 1; min-width: 0; }
.workout-card .wc-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workout-card .wc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.workout-card .wc-duration { font-size: 13px; font-weight: 600; color: var(--text-secondary); font-family: var(--mono); }

/* ─── Program Card ─── */
.program-card { padding: 20px; cursor: pointer; }
.program-card .pc-freq { margin-top: 4px; }
.program-card .pc-desc { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

/* ─── Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.06) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-xs);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; width: 60%; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 40%; margin-bottom: 12px; }
.skeleton-card { height: 80px; width: 100%; margin-bottom: 12px; border-radius: var(--radius); }
.skeleton-chart { height: 200px; width: 100%; border-radius: var(--radius); }

/* ─── PR Celebration ─── */
.pr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,185,129,0.15);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: prFlash 2s ease forwards;
  pointer-events: none;
}
@keyframes prFlash {
  0% { opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
.pr-overlay .pr-text {
  font-size: 42px;
  font-weight: 900;
  color: var(--pr);
  text-shadow: 0 0 40px var(--pr-glow);
  animation: prBounce 0.5s ease;
}
@keyframes prBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.pr-overlay .pr-detail {
  font-size: 16px;
  color: var(--pr);
  margin-top: 8px;
  font-weight: 600;
  opacity: 0;
  animation: prDetail 0.5s ease 0.3s forwards;
}
@keyframes prDetail { to { opacity: 1; } }
.confetti-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  z-index: 501;
  pointer-events: none;
  animation: confettiFall 2s ease forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state svg { width: 48px; height: 48px; stroke: var(--dimmer); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; line-height: 1.5; }

/* ─── Flex / Grid Utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stats-grid .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}

/* ─── Active Workout Header ─── */
.workout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.workout-timer {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ─── Exercise Block in Active Workout ─── */
.exercise-block {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.exercise-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.exercise-block-header .eb-name { font-size: 15px; font-weight: 700; }
.exercise-block-body { padding: 8px 16px; }
.add-set-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xs);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 8px 0;
  font-family: var(--font);
}
.add-set-btn:active { background: var(--accent-dim); }

/* ─── Continue Workout Banner ─── */
.continue-banner {
  background: var(--pr-dim);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 16px;
  animation: pulseBorder 2s ease infinite;
}
@keyframes pulseBorder {
  0%, 100% { border-color: rgba(16,185,129,0.2); }
  50% { border-color: rgba(16,185,129,0.4); }
}
.continue-banner .cb-text { font-weight: 600; color: var(--pr); }
.continue-banner .cb-time { font-family: var(--mono); font-size: 13px; color: var(--pr); opacity: 0.7; }

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-top: 28px;
}
.section-header:first-child { margin-top: 16px; }

/* ─── CTA Badge ─── */
#cta-badge {
  position: fixed;
  bottom: calc(68px + var(--safe-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 20px;
  color: rgba(59,130,246,0.7);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.3px;
  text-decoration: none;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  pointer-events: auto;
}
#cta-badge:active {
  background: rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.4);
  color: var(--accent);
}
#cta-badge svg { flex-shrink: 0; opacity: 0.8; }

/* ─── Version Stamp ─── */
#version-stamp {
  position: fixed;
  bottom: 4px;
  right: 8px;
  font-size: 8px;
  color: #444;
  letter-spacing: 0.5px;
  pointer-events: none;
  font-family: var(--mono);
  z-index: 1;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 0; height: 0; }

/* ─── Desktop ─── */
@media (min-width: 520px) {
  body { background: #050505; }
  #app {
    background: var(--bg);
    box-shadow: -1px 0 0 var(--border), 1px 0 0 var(--border);
    min-height: 100dvh;
  }
}
