/* ============================================
   Back Pain Community Club — Light Mint
   ============================================ */

@font-face {
  font-family: 'LLPixel';
  src: url('../publish/LLPIXEL3.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'OffBit';
  src: url('../publish/OffBit-Dot.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #EEF2E6;
  --text-1: #1A1C18;
  --text-2: rgba(0,0,0,0.50);
  --text-3: rgba(0,0,0,0.30);
  --accent: rgba(0,0,0,0.75);
  --accent-dim: rgba(0,0,0,0.40);

  --glass: rgba(255, 255, 255, 0.55);
  --glass-light: rgba(255,255,255,0.40);
  --glass-border: rgba(0,0,0,0.06);
  --glass-hover: rgba(255, 255, 255, 0.70);

  --radius: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 100px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.2s;

  --font: 'Shippori Antique', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: #E8ECDF;
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.47;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ── Soft Gradient BG (lightweight) ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(200,215,180,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 70%, rgba(210,220,175,0.4) 0%, transparent 70%),
    linear-gradient(160deg, #ECF0E4 0%, #EEF2E6 40%, #F0F4E8 70%, #EAEED8 100%);
}

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

/* ── Loading ── */
#loading-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #EEF2E6;
  z-index: 1000;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
#loading-screen.fade-out { opacity: 0; visibility: hidden; }

.loader { text-align: center; }
.loader-ring {
  width: 36px; height: 36px;
  border: 2.5px solid rgba(0,0,0,0.10);
  border-top-color: rgba(0,0,0,0.40);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader h2 {
  font-size: 20px; font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 4px;
}
.loader p { color: var(--text-3); font-size: 13px; margin-bottom: 20px; font-weight: 400; }

.progress-bar {
  width: 160px; height: 2px;
  background: rgba(0,0,0,0.08);
  border-radius: 1px; overflow: hidden;
  margin: 0 auto;
}
.progress-fill {
  height: 100%; width: 0%;
  background: rgba(0,0,0,0.25);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

/* ── Header ── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 14px 28px;
  position: sticky; top: 0; z-index: 100;
}

.header-left h1 {
  font-size: 15px; font-weight: 400;
  letter-spacing: -0.01em;
  color: #000000;
  margin-top: 3px;
}

.timer {
  font-size: 13px; font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.header-right { display: flex; align-items: center; gap: 6px; }

/* ── Header Dropdowns (unified) ── */
.hdr-dropdown {
  position: relative;
}
.hdr-dropdown-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.hdr-dropdown-btn:hover,
.hdr-dropdown.active .hdr-dropdown-btn {
  background: rgba(0,0,0,0.06);
  color: var(--text-1);
}
.hdr-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  z-index: 200;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  pointer-events: none;
}
.hdr-dropdown.active .hdr-dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.hdr-dropdown-menu--settings {
  width: 280px;
}
.hdr-dropdown-menu--info {
  width: 300px;
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-md);
}
.info-title {
  font-size: 15px; font-weight: 400; margin-bottom: 10px;
  color: var(--text-1);
}
.info-desc {
  font-size: 12px; color: var(--text-2); line-height: 1.6;
  margin-bottom: 10px;
}
.info-version { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.info-desc strong { color: var(--text-1); font-weight: 400; }
.chin-link { color: var(--text-1); font-weight: 500; text-decoration: none; }
.chin-link:hover { text-decoration: underline; }
.info-links {
  display: flex; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 20px;
}
.info-links a {
  font-size: 11px; color: var(--text-3);
  text-decoration: none; transition: color 0.2s;
}
.info-links a:hover { color: var(--text-1); }
.bmc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 12px 0;
  background: #ece0de;
  color: #000;
  font-size: 12px; font-weight: 500;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s var(--ease);
}
.bmc-btn svg { flex-shrink: 0; stroke: #000; }
.bmc-btn:hover { background: #e0d2cf; }

/* ── Layout ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.main-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 12px;
  padding: 0 28px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* ── Camera ── */
.camera-section {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0;
}

.camera-container {
  position: relative;
  width: 100%;
  height: 70svh;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);
}
/* Placeholder — shows text + button before camera starts */
#camera-placeholder {
  position: absolute; inset: 0;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s var(--ease);
}
.camera-container.posture-good {
  box-shadow: none;
}
.camera-container.posture-bad {
  box-shadow: none;
  animation: nudge 0.35s var(--ease);
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ── Camera small (PiP mode) ── */
.camera-section.camera-pip {
  align-self: start;
  max-width: 220px;
}
.camera-section.camera-pip .camera-container {
  aspect-ratio: 3/4;
  height: auto;
  border-radius: 16px;
}
.camera-section.camera-pip #active-controls {
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.camera-section.camera-pip #active-controls .btn {
  font-size: 11px;
  padding: 5px 10px;
  min-height: auto;
  width: 100%;
}
.camera-section.camera-pip #score-ring {
  width: 40px; height: 40px;
  bottom: 8px; right: 8px;
}
.camera-section.camera-pip #score-text {
  font-size: 11px;
}

#webcam, #pose-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Posture badge */
#posture-overlay { display: none !important; }
#posture-label {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 400;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: all var(--duration) var(--ease);
}
#posture-label.good {
  background: rgba(255,255,255,0.65);
  color: var(--text-1);
}
#posture-label.bad {
  background: rgba(255,255,255,0.70);
  color: var(--text-1);
}

/* Score ring */
#score-ring {
  position: absolute; bottom: 14px; right: 14px;
  width: 64px; height: 64px; z-index: 10;
}
#score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-bg { fill: none; stroke: rgba(255,255,255,0.25); stroke-width: 5; }
.score-fg {
  fill: none; stroke: rgba(255,255,255,0.85);
  stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.5s var(--ease), stroke 0.3s var(--ease);
}
#score-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 400;
  color: #FFFFFF;
}

/* Placeholder — start card (absolute inside camera-container) */
/* #camera-placeholder is defined above near .camera-container */

.start-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
}

.start-card-image {
  flex: 0 0 52%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.start-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.start-card-image .mouth-open {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.start-card-image.talking .mouth-closed {
  opacity: 0;
}
.start-card-image.talking .mouth-open {
  opacity: 1;
}

.start-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 48px;
  text-align: center;
  background: var(--glass);
}

.start-card-text {
  font-family: 'Shippori Antique', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #000;
  text-align: center;
  margin: 0;
  max-width: 260px;
}

.start-card-btn {
  font-family: 'Shippori Antique', sans-serif;
  font-size: 15px;
  color: #000;
  background: #ece0de;
  border: none;
  border-radius: 100px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.start-card-btn:hover {
  background: #e0d2cf;
}

/* Calibration Overlay */
#calibration-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 25;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
/* Guide phase: transparent overlay, text at bottom */
#calibration-overlay.guide-active {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  align-items: flex-end;
  padding-bottom: 12px;
}
#calibration-overlay.guide-active .calibration-content {
  background: transparent;
  border-radius: 12px;
  padding: 8px 20px;
}
#calibration-overlay.guide-active #calibration-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2.5px solid rgba(72, 199, 142, 0.8);
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  margin: 0 auto 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
#calibration-overlay.guide-active #calibration-countdown.countdown-hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
#calibration-overlay.guide-active #calibration-message {
  display: block;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 100px;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
}
.calibration-content {
  text-align: center;
}
#calibration-countdown {
  display: none;
}
#calibration-message {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

/* ── Pose Guide Overlay ── */
#guide-overlay {
  position: absolute; inset: 0;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}
.guide-instruction {
  pointer-events: auto;
  padding: 6px 16px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-1);
  transition: all 0.3s var(--ease);
}
.guide-instruction.aligned {
  background: rgba(80,200,140,0.25);
  color: rgba(30,120,70,1);
}
.guide-progress-ring {
  position: relative;
  width: 56px; height: 56px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.guide-progress-ring.active { opacity: 1; }
.guide-progress-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.guide-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.25);
  stroke-width: 3;
}
.guide-ring-fg {
  fill: none;
  stroke: rgba(80,200,140,0.85);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 0.3s var(--ease);
}
#guide-timer-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 400;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

/* Controls */
/* Blur button overlay on video */
.btn-video-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 30;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.btn-video-overlay:hover {
  background: rgba(0,0,0,0.65);
}
.btn-video-overlay.hidden { display: none; }

#active-controls { display: flex; gap: 8px; justify-content: center; }
#active-controls .btn {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex: 1;
}

/* ── Side Panel ── */
.side-panel {
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 12px;
}

/* ── Cards ── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  transition: background var(--duration) var(--ease);
}
.card:hover { background: var(--glass-hover); }

.card h3 {
  font-size: 11px; font-weight: 400;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* Score / Status */
.status-indicator {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--glass-light);
  border-radius: var(--radius-sm);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.status-dot.idle { background: rgba(0,0,0,0.18); }
.status-dot.calibrating { background: rgba(0,0,0,0.35); box-shadow: 0 0 6px rgba(0,0,0,0.12); }
.status-dot.good { background: rgba(0,0,0,0.55); box-shadow: 0 0 6px rgba(0,0,0,0.15); }
.status-dot.bad { background: rgba(0,0,0,0.55); box-shadow: 0 0 6px rgba(0,0,0,0.15); animation: pulse-dot 1.2s var(--ease) infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.4} }

#status-text { font-size: 13px; font-weight: 400; color: var(--text-2); }

/* LED Fan Sign */
.card-led-sign {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 0 14px;
  overflow: hidden;
  height: 44px;
  position: relative;
  box-sizing: border-box;
}
.led-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  white-space: nowrap;
  overflow: hidden;
  animation: led-fade 3s ease infinite;
}
.led-heart {
  color: var(--text-1);
  font-size: 22px;
  font-family: 'OffBit', monospace;
  opacity: 0.25;
  animation: led-pulse 1.2s ease infinite;
}
.led-name {
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-1);
  font-family: 'OffBit', monospace;
}
.led-message {
  font-size: 18px;
  color: var(--text-2);
  font-family: 'OffBit', monospace;
  letter-spacing: 0.04em;
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}
@keyframes led-fade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
.card-led-sign.hidden { display: none; }

/* Onboarding */
.onboarding-content {
  max-width: 360px; width: 90%;
  padding: 32px;
  text-align: center;
}
.onboarding-title {
  font-size: 22px; font-weight: 400;
  margin-bottom: 6px;
}
.onboarding-subtitle {
  font-size: 14px; color: var(--text-2);
  margin-bottom: 24px;
}
.onboarding-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 400;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background: rgba(0,0,0,0.03);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.onboarding-input:focus {
  border-color: rgba(0,0,0,0.3);
}
.onboarding-input::placeholder {
  color: var(--text-3);
}
.onboarding-next {
  margin-top: 20px;
  width: auto;
  padding: 12px 40px;
}
.onboarding-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Streak */
.card-streak {
  padding: 20px 22px 16px; text-align: left;
  position: relative; overflow: hidden;
  min-height: 110px;
}
.card-streak:hover { background: var(--glass); }

/* Orb (particle canvas) */
.streak-orb {
  position: absolute;
  width: 80px; height: 80px;
  right: 16px; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  pointer-events: none;
  overflow: hidden;
}

.streak-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  min-height: 100%;
}
.streak-count {
  font-size: 62px; font-weight: 600; letter-spacing: -0.04em;
  color: var(--text-1); line-height: 0.9; font-variant-numeric: tabular-nums;
}
.streak-label {
  font-size: 14px; color: var(--text-2); font-weight: 500;
  margin-top: 6px; display: block;
}

/* Chart Tabs */
.card-chart-tabs { padding: 18px 20px; }
.chart-tabs {
  display: flex; gap: 0; margin-bottom: 14px;
  background: rgba(0,0,0,0.04); border-radius: 8px; padding: 3px;
}
.chart-tab {
  flex: 1; border: none; background: none;
  font-size: 12px; font-weight: 400; color: var(--text-2);
  padding: 6px 0; border-radius: 6px; cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: var(--font);
}
.chart-tab:hover { color: var(--text-2); }
.chart-tab.active {
  background: rgba(255,255,255,0.8); color: var(--text-1);
  font-weight: 400; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chart-tab-content { display: none; height: 124px; overflow: hidden; }
.chart-tab-content.active { display: block; }

/* Session Timeline */
#tab-session {
  display: none; flex-direction: column; justify-content: flex-end;
}
#tab-session.active { display: flex; }
#tab-session canvas {
  width: 100%; height: 70px; display: block; border-radius: 8px;
}
.timeline-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-3); margin-top: 4px;
}

/* Weekly Chart */
.week-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.week-header h3 { margin: 0; flex: 1; text-align: center; font-size: 11px; font-weight: 400; color: var(--text-3); text-transform: capitalize; }
.week-nav-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.week-nav-btn:hover { background: rgba(0,0,0,0.06); color: var(--text-1); }
.week-nav-btn:disabled { opacity: 0.2; cursor: default; }
.week-nav-btn:disabled:hover { background: none; }
.week-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 4px; height: 64px; padding: 0 2px;
}
.week-bar {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.week-bar-fill {
  width: 100%; border-radius: 4px 4px 2px 2px;
  background: #6C5CE7; min-height: 3px;
  transition: height 0.4s var(--ease);
  max-height: 56px;
}
.week-bar-fill--today { background: #22c55e; }
.week-bar-fill--empty { background: rgba(0,0,0,0.06); }
.week-bar-label {
  font-size: 9px; color: var(--text-3); text-transform: uppercase;
  font-weight: 400; line-height: 1;
}
.week-bar-label--today { color: var(--text-1); font-weight: 600; }
.week-summary {
  font-size: 12px; color: var(--text-2); margin: 10px 0 0; text-align: center;
  line-height: 1.4;
}

/* Session Controls */
.session-controls {
  display: flex; gap: 10px; align-items: stretch;
  justify-self: center;
  padding: 10px;
  background: rgba(215, 220, 200, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 24px;
}
#pause-btn, #stop-btn {
  flex: 1;
  height: 80px;
  min-width: 120px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
#pause-btn { font-size: 26px; }
#stop-btn { font-size: 16px; }
#pause-btn:hover, #stop-btn:hover {
  background: rgba(255, 255, 255, 1);
}
#pause-btn .pause-label-text { display: none; }

/* Level */


/* Club */
.card-club { padding: 18px 20px; }
.club-desc { font-size: 13px; color: var(--text-2); margin: 0 0 14px; line-height: 1.45; }
.club-actions { display: flex; gap: 8px; }
.club-btn {
  padding: 8px 16px; border: none; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s;
}
.club-btn:hover { opacity: 0.85; }
.club-btn--create { background: #6C5CE7; color: #fff; flex: 1; }
.club-btn--join { background: rgba(108,92,231,0.12); color: #6C5CE7; flex: 1; }
.club-btn--leave { background: rgba(0,0,0,0.06); color: var(--text-2); width: 100%; margin-top: 10px; }
.club-btn--cancel { background: rgba(0,0,0,0.06); color: var(--text-2); flex: 1; }
.club-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.club-name {
  font-size: 15px; font-weight: 700; color: var(--text-1);
}
.club-code-btn {
  background: rgba(108,92,231,0.1); border: none; border-radius: var(--radius-pill);
  padding: 4px 10px; font-size: 12px; cursor: pointer; color: #6C5CE7; font-weight: 600;
}
.club-members {
  display: flex; flex-direction: column; gap: 6px;
}
.club-member {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.03); font-size: 13px;
}
.club-member-name { font-weight: 600; color: var(--text-1); }
.club-member-level { font-weight: 600; color: #6C5CE7; font-size: 12px; }

/* Club Modals */
.club-modal-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.club-modal-overlay.hidden { display: none; }
.club-modal {
  background: #fff; border-radius: var(--radius);
  padding: 28px 24px; width: 100%; max-width: 340px;
  display: flex; flex-direction: column; gap: 14px;
}
.club-modal h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-1); }
.club-input {
  padding: 10px 14px; border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.club-input:focus { border-color: #6C5CE7; }
.club-modal-actions { display: flex; gap: 8px; }

/* Race — Horizontal Track */
.card-race-active { padding: 16px 18px; }
.race-card { display: flex; flex-direction: column; gap: 14px; }
.race-header {
  display: flex; justify-content: space-between; align-items: center;
}
.race-timer {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.race-lanes { display: flex; flex-direction: column; gap: 12px; }
.race-lane {
  display: flex; align-items: center; gap: 8px;
}
.race-lane-name {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  width: 56px; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.race-lane--you .race-lane-name {
  color: #6C5CE7; font-weight: 700;
}
.race-track {
  flex: 1; position: relative; height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
}
.race-dot {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #e74c3c 0%, #e74c3c88 40%, transparent 70%);
  box-shadow: 0 0 12px 4px rgba(231,76,60,0.4);
  transition: left 1.2s var(--ease), background 0.8s ease, box-shadow 0.8s ease, width 0.8s ease, height 0.8s ease;
  z-index: 1;
}
.race-lane-pct {
  font-size: 11px; font-weight: 700; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  width: 32px; text-align: right; flex-shrink: 0;
}

/* Race Countdown */
.race-countdown-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}
.race-countdown-num {
  font-size: 80px; font-weight: 800; color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: none;
}
.race-countdown-pop {
  animation: countdownPop 0.6s var(--spring);
}
@keyframes countdownPop {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Race Results */
.race-results-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.race-results-card {
  background: #fff; border-radius: var(--radius);
  padding: 28px 24px; width: 100%; max-width: 340px;
  display: flex; flex-direction: column; gap: 10px;
}
.race-results-title {
  font-size: 18px; font-weight: 700; color: var(--text-1);
  text-align: center; margin: 0 0 6px;
}
.race-result-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.03);
}
.race-result-you {
  background: rgba(108, 92, 231, 0.1);
}
.race-result-rank { font-size: 18px; width: 28px; text-align: center; }
.race-result-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-1); }
.race-result-pct {
  font-size: 14px; font-weight: 700; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.race-result-you .race-result-name { color: #6C5CE7; }
.race-result-you .race-result-pct { color: #6C5CE7; }
.race-result-win {
  text-align: center; font-size: 16px; font-weight: 700;
  color: #6C5CE7; padding: 12px 0 4px;
}
.race-result-lose {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--text-2); padding: 12px 0 4px;
}
.race-results-btn {
  margin-top: 8px; padding: 12px;
  background: #6C5CE7; color: #fff;
  border: none; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
}
.race-results-btn:hover { opacity: 0.85; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat-item {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 14px 16px;
  background: var(--glass-light);
  border-radius: var(--radius-sm);
}
.stat-value {
  font-size: 32px; font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-label { font-size: 11px; color: var(--text-3); font-weight: 400; letter-spacing: 0; text-transform: capitalize; }

/* Settings */
.setting-item { margin-bottom: 14px; }
.setting-item label {
  display: block; font-size: 12px;
  color: var(--text-3); margin-bottom: 5px;
  font-weight: 400;
}
.setting-item--toggle {
  display: flex; align-items: center; justify-content: space-between;
}
.setting-item--toggle label { margin-bottom: 0; }

/* Toggle Switch */
.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: rgba(0,0,0,0.12); border-radius: 12px;
  cursor: pointer; transition: background 0.25s var(--ease);
  flex-shrink: 0; border: none; padding: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s var(--ease);
}
.toggle-switch[data-enabled="true"] {
  background: #6C5CE7;
}
.toggle-switch[data-enabled="true"]::after {
  transform: translateX(20px);
}

.setting-item select {
  width: 100%; padding: 8px 12px;
  background: var(--glass-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font); font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='rgba(0,0,0,0.3)' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--duration) var(--ease);
}
.setting-item select:focus { outline: none; border-color: rgba(0,0,0,0.15); }
.setting-item select option { background: #F4F7ED; color: var(--text-1); }

/* Range */
.setting-item input[type="range"] {
  width: 100%; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: rgba(0,0,0,0.10);
  border-radius: 2px; outline: none; cursor: pointer;
}
.setting-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-1);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.setting-item input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
.range-labels { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; color: var(--text-3); }

.setting-buttons { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }

/* Tips list (inside dropdown) */
.tips-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.tips-list li {
  position: relative; padding-left: 12px;
  font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.tips-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-3);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font); font-size: 13px; font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-primary {
  background: var(--text-1);
  color: #FFFFFF;
  border: 1px solid transparent;
}
.btn-primary:hover:not(:disabled) { background: #2A2C28; }

.btn-glass {
  background: rgba(255,255,255,0.55);
  color: var(--text-1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}
.btn-glass:hover:not(:disabled) { background: rgba(255,255,255,0.75); }

.btn-secondary {
  background: rgba(0,0,0,0.06);
  color: var(--text-2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-secondary:hover:not(:disabled) { background: rgba(0,0,0,0.10); color: var(--text-1); }

.btn-ghost {
  background: rgba(255,255,255,0.45);
  color: var(--text-2);
  padding: 8px 14px; font-size: 12px;
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover:not(:disabled) { color: var(--text-1); background: rgba(255,255,255,0.65); }

.btn-danger-text { color: var(--text-2); }
.btn-danger-text:hover:not(:disabled) { color: var(--text-1); background: rgba(0,0,0,0.05); }

.btn-lg { padding: 12px 28px; font-size: 14px; font-weight: 400; }
.btn-block { width: 100%; }

/* ── Alert Toast ── */
.alert-toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 500;
  transition: transform 0.4s var(--spring);
}
.alert-toast.show { transform: translateX(-50%) translateY(0); }

.alert-content {
  padding: 10px 20px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-1);
  font-weight: 400; font-size: 13px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* ── Modals ── */
.modal {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.modal.show { opacity: 1; visibility: visible; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 360px; width: 90%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
  transform: scale(0.95);
  transition: transform 0.3s var(--spring);
}
.modal.show .modal-content { transform: scale(1); }

.modal-content h2 {
  font-size: 18px; font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--text-1);
}
.modal-content p {
  color: var(--text-2); font-size: 13px;
  line-height: 1.5; margin-bottom: 22px;
}

/* Session Summary Modal */
/* Summary modal — same design system as data-content */
.summary-content {
  max-width: 92vw; width: 420px;
  padding: 24px 28px;
  text-align: left;
}
.summary-content .data-header { margin-bottom: 16px; }
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.summary-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
}
.summary-value {
  font-size: 28px; font-weight: 300; color: var(--text-1);
  letter-spacing: -0.03em;
}
.summary-score { color: #4CAF50; }
.summary-score.bad { color: #E53935; }
.summary-label {
  font-size: 10px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-tip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  text-align: left;
}
.summary-tip-text {
  font-size: 13px; line-height: 1.45; color: var(--text-2);
}
.summary-tip.excellent { background: rgba(76, 175, 80, 0.08); }
.summary-tip.good { background: rgba(139, 195, 74, 0.08); }
.summary-tip.okay { background: rgba(255, 183, 77, 0.08); }
.summary-tip.poor { background: rgba(229, 57, 53, 0.06); }
.summary-content .action-btn-row { margin-top: 14px; }

/* Action Buttons Row */
.action-btn-row {
  display: flex; gap: 8px;
}
.action-btn-row .btn {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}
.action-btn-row .btn:hover { background: rgba(255, 255, 255, 0.7); }

/* Data Report Modal */
.data-content {
  max-width: 92vw; width: 420px;
  max-height: 96vh; overflow-y: auto;
  padding: 24px 28px;
  text-align: left;
}
.data-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0;
}
.data-header h2 { font-size: 18px; font-weight: 400; letter-spacing: -0.03em; }
.data-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.05);
  color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.data-close-btn:hover { background: rgba(0,0,0,0.1); }

.data-section-title {
  font-size: 11px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-3);
  margin: 0 0 10px;
}

/* Habit Hero */
.habit-hero {
  text-align: center;
  padding: 12px 0 16px;
}
.habit-streak-num {
  font-size: 56px; font-weight: 600; color: var(--text-1);
  letter-spacing: -0.04em; line-height: 1;
}
.habit-streak-label {
  font-size: 13px; color: var(--text-2); margin-top: 4px;
  font-weight: 500; letter-spacing: 0.02em;
}

/* Progress bar */
.habit-progress-section { margin-bottom: 14px; }
.habit-progress-label {
  font-size: 12px; color: var(--text-2); margin-bottom: 6px;
}
.habit-track {
  position: relative; height: 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  margin: 0 0 28px;
}
.habit-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: #4CAF50;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.habit-marker {
  position: absolute; top: -2px;
  width: 2px; height: 12px;
  background: rgba(0,0,0,0.12);
  transform: translateX(-1px);
}
.habit-marker span {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px; color: var(--text-3); white-space: nowrap;
}

/* Milestones */
.habit-milestones {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.habit-ms {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  background: none;
  border-radius: 0;
  justify-content: flex-start;
}
.habit-ms.unlocked { background: none; }
.habit-ms-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
}
.habit-ms-icon.locked {
  background: rgba(0,0,0,0.05);
  color: var(--text-3);
}
.habit-ms-icon.unlocked {
  background: #4CAF50;
  color: #fff;
}
.habit-ms-info { text-align: left; }
.habit-ms-title {
  font-size: 13px; font-weight: 500; color: var(--text-1);
}
.habit-ms-desc {
  font-size: 11px; color: var(--text-3); margin-top: 1px;
}

/* Week grid */
.habit-week-section { margin-bottom: 4px; }
.habit-week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.habit-day {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.habit-day-badge {
  width: 42px; height: 42px;
  position: relative;
}
.badge-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
/* Not earned — grayscale */
.habit-day-badge.locked {
  filter: grayscale(1) opacity(0.25);
}
/* Today in progress — grayscale base + color overlay */
.habit-day-badge.in-progress {
  filter: grayscale(1) opacity(0.3);
}
.habit-day-badge.in-progress::after {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 50%; height: 100%;
  overflow: hidden;
}
.habit-day-badge.in-progress .badge-img {
  filter: grayscale(1) opacity(0.3);
}
/* Earned — full color */
.habit-day-badge.earned {
  filter: none;
}
.habit-day-badge.today-ring {
  outline: 2px solid var(--text-3);
  outline-offset: 3px;
  border-radius: 8px;
}
.habit-day-label {
  font-size: 9px; color: var(--text-3); text-transform: uppercase;
}

.data-tip-card {
  padding: 12px 14px;
  background: rgba(255,255,255,0.35);
  border-radius: 14px;
  font-size: 12px; color: var(--text-2); line-height: 1.4;
}


#calibration-actions { display: flex; flex-direction: column; gap: 6px; }

.countdown-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,0.04);
  border: 2px solid rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  margin: 14px auto;
  animation: scale-pulse 1s var(--ease) infinite;
}
@keyframes scale-pulse { 0%,100%{transform:scale(1)}50%{transform:scale(1.06)} }

#countdown-number { font-size: 24px; font-weight: 400; color: var(--text-1); }
.success-icon { color: var(--text-2); margin-bottom: 8px; }

/* Stretch */
.stretch-exercises { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; text-align: left; }
.exercise {
  padding: 10px 14px;
  background: var(--glass-light);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2);
  border-left: 2px solid rgba(0,0,0,0.10);
}

/* ── Footer ── */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 28px 12px;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}
.app-footer a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}
.app-footer a:hover { color: var(--text-2); }
.footer-dot { opacity: 0.5; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .main-content { grid-template-columns: 1fr; padding: 12px; }
  .camera-section { position: static; align-self: auto; }
  .side-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-settings { grid-column: span 2; }
}

@media (max-width: 640px) {
  .app-header { padding: 12px 16px; }
  .main-content { padding: 8px; gap: 8px; }
  .start-card { flex-direction: column; }
  .start-card-image { flex: none; height: auto; }
  .start-card-right { padding: 16px; align-items: center; }
  .start-card-text { font-size: 14px; text-align: center; }
  .side-panel { grid-template-columns: 1fr; }
  .card-settings { grid-column: span 1; }
  .card { padding: 14px; border-radius: 22px; }
  #active-controls { flex-direction: column; }
  #active-controls .btn { width: 100%; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* ── Card entrance ── */
.card { animation: rise 0.5s var(--ease) backwards; }
.side-panel .card:nth-child(1) { animation-delay: 0.03s; }
.side-panel .card:nth-child(2) { animation-delay: 0.06s; }
.side-panel .card:nth-child(3) { animation-delay: 0.09s; }
.side-panel .card:nth-child(4) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
