/* MotivationWell v4.0 — Complete Redesign
   Immersive, minimal, card-forward layout with fluid motion
   ════════════════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Color palette */
  --bg-deep: #08090c;
  --bg-surface: #0f1117;
  --bg-elevated: #161822;
  --bg-card: rgba(22, 24, 34, 0.7);

  --accent: #c9a84c;
  --accent-light: #f0d080;
  --accent-glow: rgba(201, 168, 76, 0.25);
  --accent-subtle: rgba(201, 168, 76, 0.08);

  --text-1: rgba(255, 255, 255, 0.92);
  --text-2: rgba(255, 255, 255, 0.55);
  --text-3: rgba(255, 255, 255, 0.45);

  --border: rgba(255, 255, 255, 0.09);
  --border-accent: rgba(201, 168, 76, 0.15);

  /* Orb colors (background ambient) */
  --orb-1: rgba(201, 168, 76, 0.08);
  --orb-2: rgba(76, 130, 201, 0.06);
  --orb-3: rgba(160, 100, 200, 0.05);

  /* Spacing */
  --nav-h: 60px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: 'Cinzel Decorative', serif;
}

/* ── THEME VARIANTS ─────────────────────────────────────────── */
[data-theme="dawn"] {
  --bg-deep: #12080e;
  --bg-surface: #1a0e15;
  --bg-elevated: #24141d;
  --bg-card: rgba(36, 20, 29, 0.7);
  --accent: #e8a0b0;
  --accent-light: #f0c0d0;
  --accent-glow: rgba(232, 160, 176, 0.25);
  --accent-subtle: rgba(232, 160, 176, 0.08);
  --border-accent: rgba(232, 160, 176, 0.15);
  --orb-1: rgba(232, 160, 176, 0.1);
  --orb-2: rgba(200, 120, 180, 0.07);
  --orb-3: rgba(160, 80, 140, 0.05);
}

[data-theme="forest"] {
  --bg-deep: #060d08;
  --bg-surface: #0a150d;
  --bg-elevated: #121f16;
  --bg-card: rgba(18, 31, 22, 0.7);
  --accent: #8ac94c;
  --accent-light: #b0f080;
  --accent-glow: rgba(138, 201, 76, 0.25);
  --accent-subtle: rgba(138, 201, 76, 0.08);
  --border-accent: rgba(138, 201, 76, 0.15);
  --orb-1: rgba(138, 201, 76, 0.1);
  --orb-2: rgba(76, 180, 120, 0.07);
  --orb-3: rgba(60, 140, 90, 0.05);
}

[data-theme="cosmic"] {
  --bg-deep: #06060f;
  --bg-surface: #0a0a1a;
  --bg-elevated: #141428;
  --bg-card: rgba(20, 20, 40, 0.7);
  --accent: #a0a0e8;
  --accent-light: #c0c0f0;
  --accent-glow: rgba(160, 160, 232, 0.25);
  --accent-subtle: rgba(160, 160, 232, 0.08);
  --border-accent: rgba(160, 160, 232, 0.15);
  --orb-1: rgba(160, 160, 232, 0.1);
  --orb-2: rgba(120, 100, 220, 0.07);
  --orb-3: rgba(100, 80, 200, 0.05);
}

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-1);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.6s var(--ease);
}

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ══════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND
   ══════════════════════════════════════════════════════════════ */
.ambient-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}

.orb-1 {
  width: 600px; height: 600px;
  background: var(--orb-1);
  top: -15%; left: -10%;
  animation: orbFloat1 25s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: var(--orb-2);
  bottom: -10%; right: -10%;
  animation: orbFloat2 30s ease-in-out infinite;
}
.orb-3 {
  width: 400px; height: 400px;
  background: var(--orb-3);
  top: 40%; left: 50%;
  animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 60px) scale(1.1); }
  66% { transform: translate(-40px, 100px) scale(0.95); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -40px) scale(1.05); }
  66% { transform: translate(50px, -80px) scale(0.9); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -60px) scale(1.15); }
}

.grain-overlay {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════════
   TOP NAV
   ══════════════════════════════════════════════════════════════ */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 20px;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg-deep) 0%, transparent 100%);
  pointer-events: none;
}
.top-nav > * { pointer-events: auto; }

.nav-left, .nav-right {
  display: flex; gap: 6px; align-items: center;
  min-width: 80px;
}
.nav-right { justify-content: flex-end; }

.nav-brand {
  flex: 1; text-align: center;
}
.brand-mark {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  opacity: 0.7;
}

.nav-icon {
  background: none; border: none;
  color: var(--text-2);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
}
.nav-icon:hover {
  color: var(--text-1);
  background: var(--accent-subtle);
}
.nav-icon:active {
  transform: scale(0.92);
}
.nav-icon svg { flex-shrink: 0; }

.nav-badge {
  position: absolute; top: 4px; right: 2px;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 0.55rem; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
}

/* Streak pill */
.streak-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 500;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
}

/* ═══ INSTALL BANNER ═══ */
#installBanner {
  display: none;
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200;
  align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.3s var(--ease);
}
#installBanner:hover { transform: translateX(-50%) translateY(-2px); }

/* ══════════════════════════════════════════════════════════════
   HERO / MAIN
   ══════════════════════════════════════════════════════════════ */
.hero-header {
  text-align: center;
  margin-bottom: 16px;
  animation: fadeInDown 0.8s var(--ease-out) both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.title-accent {
  color: var(--accent);
  font-style: italic;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--text-3);
  margin-top: 6px;
  letter-spacing: 0.08em;
}

/* Context row (daily + seasonal) */
.context-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  animation: fadeIn 1s 0.2s var(--ease-out) both;
}

.daily-badge, .seasonal-banner {
  display: none;
  align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 500;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: var(--font-body);
}
.daily-badge:hover, .seasonal-banner:hover {
  background: rgba(201, 168, 76, 0.12);
  transform: translateY(-1px);
}
.seasonal-icon { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════
   QUOTE STAGE
   ══════════════════════════════════════════════════════════════ */
.quote-stage {
  width: 100%;
  max-width: 560px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  position: relative;
  animation: fadeIn 1s 0.4s var(--ease-out) both;
}

/* Water loader */
.water-loader {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
}
.water-ring {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: waterRipple 2s ease-out infinite;
}
.water-ring:nth-child(2) { animation-delay: 0.4s; }
.water-ring:nth-child(3) { animation-delay: 0.8s; }

@keyframes waterRipple {
  0% { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Hint text */
.hint-text {
  text-align: center;
  color: var(--text-3);
  animation: gentlePulse 4s ease-in-out infinite;
}
.hint-icon {
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 12px;
}
.hint-icon.galaxy-icon {
  position: relative;
  opacity: 1;
}
.hint-icon.galaxy-icon svg {
  animation: galaxySpin 20s linear infinite;
}
.hint-icon.galaxy-icon::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  animation: gentlePulse 4s ease-in-out infinite;
}
.hint-text p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
}

@keyframes gentlePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes galaxySpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════
   QUOTE CARD
   ══════════════════════════════════════════════════════════════ */
.quote-card-main {
  width: 100%;
  position: relative;
  padding: 40px 32px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  overflow: hidden;
  animation: cardEnter 0.7s var(--ease-spring) both;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.quote-glow {
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
  animation: glowExpand 0.8s 0.3s var(--ease-out) forwards;
}
@keyframes glowExpand {
  to { width: 60%; }
}

.quote-mark {
  font-family: var(--font-brand);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 12px; left: 20px;
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-1);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 24px;
}
.quote-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.quote-text .word.visible {
  opacity: 1;
  transform: translateY(0);
}

.quote-divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.3;
  margin: 0 auto 16px;
}

.quote-author {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-category {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-3);
  text-align: center;
  margin-top: 6px;
  text-transform: capitalize;
  letter-spacing: 0.1em;
}

/* Quote action chips */
.quote-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.action-chip {
  display: flex; align-items: center; gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.02em;
}
.action-chip:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-subtle);
}
.action-chip:active {
  transform: scale(0.95);
}
.action-chip svg { flex-shrink: 0; }

.action-chip.favorited {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.action-chip.favorited svg {
  fill: var(--accent);
}

#favBtn.favorited {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════
   DRAW BUTTON
   ══════════════════════════════════════════════════════════════ */
.draw-area {
  margin-top: 32px;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
  animation: fadeIn 1s 0.6s var(--ease-out) both;
}

.draw-btn {
  position: relative;
  border: none;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 48px;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  box-shadow: 0 4px 24px var(--accent-glow), 0 0 0 0 var(--accent-glow);
  animation: drawBtnPulse 3s ease-in-out 2;
}

.draw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 0 4px var(--accent-subtle);
}
.draw-btn:active {
  transform: translateY(0) scale(0.97);
  animation: none;
}
.draw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

.draw-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.2) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out 1;
}

.draw-btn-text { position: relative; z-index: 1; }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

@keyframes drawBtnPulse {
  0%, 100% { box-shadow: 0 4px 24px var(--accent-glow), 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 4px 24px var(--accent-glow), 0 0 0 8px transparent; }
}

/* Draw meta row */
.draw-meta {
  display: flex; align-items: center; gap: 12px;
}

.meta-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-3);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.meta-btn:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-subtle);
}
.meta-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.counter-badge {
  display: none;
  font-size: 0.68rem;
  color: var(--text-3);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════
   FILTER STRIP
   ══════════════════════════════════════════════════════════════ */
.filter-strip {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 20px;
  max-width: 600px;
  animation: fadeIn 1s 0.8s var(--ease-out) both;
}

.filter-pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.filter-pill:hover {
  color: var(--text-2);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.filter-pill.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: bottom 0.4s var(--ease-spring);
  white-space: nowrap;
}
.toast.show {
  bottom: 32px;
}

/* ══════════════════════════════════════════════════════════════
   PANELS (slide-over sheets)
   ══════════════════════════════════════════════════════════════ */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 310;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
}

.panel-close {
  background: none; border: none;
  color: var(--text-3);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.panel-close:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.06);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

.panel-intro {
  font-size: 0.78rem;
  color: var(--text-3);
  font-style: italic;
  margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════════
   MENU ITEMS
   ══════════════════════════════════════════════════════════════ */
.menu-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
  color: var(--text-1);
  margin-bottom: 4px;
}
.menu-row:hover {
  background: rgba(255,255,255,0.04);
}
.menu-row:active {
  background: rgba(255,255,255,0.06);
  transform: scale(0.99);
}

.menu-row-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-1);
}

.sunrise-icon { background: linear-gradient(135deg, rgba(255,180,80,0.12), rgba(255,120,50,0.08)); color: #ffb050; }
.history-icon { background: linear-gradient(135deg, rgba(120,160,255,0.12), rgba(80,120,230,0.08)); color: #8aadff; }
.paths-icon { background: linear-gradient(135deg, rgba(255,200,80,0.12), rgba(230,170,50,0.08)); color: #ffd060; }
.submit-icon { background: linear-gradient(135deg, rgba(140,230,140,0.12), rgba(100,200,100,0.08)); color: #90e890; }
.settings-icon { background: linear-gradient(135deg, rgba(180,180,200,0.12), rgba(150,150,180,0.08)); color: #b0b0cc; }

.menu-row-text {
  flex: 1;
  display: flex; flex-direction: column;
}
.menu-row-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
}
.menu-row-desc {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 1px;
}

.menu-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.menu-row:hover .menu-arrow {
  transform: translateX(3px);
  color: var(--text-2);
}

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.25s var(--ease);
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: rgba(255,255,255,0.06);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-3);
}
.form-textarea {
  resize: vertical; min-height: 100px;
}
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select option {
  background: var(--bg-surface);
  color: var(--text-1);
}

.form-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  width: 100%;
}
.form-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.form-btn:active {
  transform: translateY(0) scale(0.98);
}
.form-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.form-btn-ghost {
  background: none;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.form-btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-1);
  opacity: 1;
}

.submit-form {
  display: flex; flex-direction: column; gap: 12px;
}

/* ══════════════════════════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════════════════════════ */
.search-container { margin-bottom: 16px; }
.search-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s var(--ease);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.search-input::placeholder { color: var(--text-3); }
.search-results-count {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 8px;
  padding-left: 4px;
}

/* ══════════════════════════════════════════════════════════════
   CARDS (quotes in panels)
   ══════════════════════════════════════════════════════════════ */
.quote-card {
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all 0.2s var(--ease);
}
.quote-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.card-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 8px;
}
.card-author {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.card-meta {
  display: flex; justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-3);
  margin-top: 6px;
  text-transform: capitalize;
}
.card-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.card-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 5px 12px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.card-action-btn:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-subtle);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
  font-size: 0.85rem;
  line-height: 1.6;
}
.empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════════
   PATHS
   ══════════════════════════════════════════════════════════════ */
.path-card {
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.path-card:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

.path-icon { font-size: 1.5rem; margin-bottom: 8px; }
.path-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.path-desc {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 12px;
}
.path-progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.path-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}

.path-day {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.path-day.completed {
  opacity: 0.6;
  border-color: var(--accent-subtle);
}
.path-day.current {
  border-color: var(--border-accent);
  background: var(--accent-subtle);
}
.day-label {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.day-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-1);
  margin-bottom: 4px;
}
.day-author {
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 8px;
}
.day-reflection {
  font-size: 0.72rem;
  color: var(--text-3);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   SETTINGS
   ══════════════════════════════════════════════════════════════ */
.settings-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.settings-section:last-child { border-bottom: none; }

.settings-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.settings-value {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}
.settings-desc {
  font-size: 0.75rem;
  color: var(--text-3);
}

.theme-options {
  display: flex; gap: 14px;
}
.theme-option { text-align: center; }
.theme-btn {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s var(--ease);
  padding: 0;
  background: none;
}
.theme-btn:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.theme-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}
.theme-swatch {
  display: block; width: 100%; height: 100%;
  border-radius: calc(var(--radius-sm) - 2px);
}
.theme-label {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-top: 6px;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   WALLPAPER
   ══════════════════════════════════════════════════════════════ */
.wallpaper-options {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.wallpaper-bg-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.wallpaper-bg-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}
.wallpaper-preview {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.wallpaper-preview canvas {
  width: 100%;
  display: block;
}

.friend-link-box {
  font-size: 0.72rem;
  color: var(--text-2);
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  word-break: break-all;
  font-family: monospace;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN
   ══════════════════════════════════════════════════════════════ */
.admin-stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 18px;
  margin: 0 8px 10px 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 90px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.admin-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 20px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-quote-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.aq-text {
  flex: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-2);
}

.admin-delete-btn {
  background: none; border: 1px solid rgba(255,80,80,0.2);
  color: rgba(255,80,80,0.6);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.admin-delete-btn:hover {
  background: rgba(255,80,80,0.1);
  border-color: rgba(255,80,80,0.4);
  color: rgba(255,80,80,0.9);
}

.admin-user-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.admin-user-info { flex: 1; }
.admin-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-1);
}
.admin-user-detail {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 2px;
}
.admin-user-actions {
  display: flex; gap: 6px;
  align-items: center;
}

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s var(--ease-spring);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.04em;
}
.modal-header p {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 4px;
}

.auth-form {
  display: flex; flex-direction: column;
  gap: 12px;
}
.auth-name-row {
  display: flex; gap: 10px;
}
.auth-signup-fields {
  display: flex; flex-direction: column; gap: 12px;
}

.auth-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.75rem;
  text-align: center;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.08);
  border-radius: var(--radius-sm);
}

.auth-toggle, .auth-forgot {
  text-align: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-3);
}
.auth-toggle a, .auth-forgot a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.auth-toggle a:hover, .auth-forgot a:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-actions {
  display: flex; gap: 10px;
  margin-top: 8px;
}
.modal-actions .form-btn { flex: 1; }

.edit-meta {
  font-size: 0.68rem;
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════
   MORNING ROUTINE
   ══════════════════════════════════════════════════════════════ */
.morning-overlay {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.morning-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.morning-step {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 360px;
  animation: fadeInUp 0.5s var(--ease-out);
}
.morning-step.active { display: flex; }

.breathe-circle {
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  animation: breathe 8s ease-in-out infinite;
  margin-bottom: 32px;
}
.breathe-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.7;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.6); opacity: 0.4; border-color: var(--accent-subtle); }
  50% { transform: scale(1.2); opacity: 1; border-color: var(--accent); box-shadow: 0 0 40px var(--accent-glow); }
}

.morning-desc {
  color: var(--text-2);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 8px;
}
.morning-sub {
  color: var(--text-3);
  font-size: 0.72rem;
  margin-bottom: 24px;
}
.morning-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.morning-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 12px;
}
.morning-author {
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 32px;
}

.morning-btn {
  padding: 14px 36px;
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.25s var(--ease);
}
.morning-btn:hover { opacity: 0.9; }

.morning-skip {
  background: none; border: none;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.2s;
}
.morning-skip:hover { color: var(--text-2); }

.intention-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-1);
  margin-bottom: 20px;
}
.intention-input {
  width: 100%;
  max-width: 300px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: center;
  outline: none;
  margin-bottom: 24px;
  transition: border-color 0.25s;
}
.intention-input:focus { border-color: var(--accent); }
.intention-input::placeholder { color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════
   ONBOARDING
   ══════════════════════════════════════════════════════════════ */
.onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.onboarding-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.onboarding-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px 36px;
  max-width: 400px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.onboarding-step {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.4s var(--ease-out);
}
.onboarding-step.active { display: flex; }

.onboarding-icon {
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0.7;
}

.onboarding-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
}
.onboarding-text {
  font-size: 0.85rem;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 24px;
}

.onboarding-dots {
  display: flex; gap: 8px;
  margin-bottom: 24px;
}
.onboarding-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s var(--ease);
}
.onboarding-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.1s !important;
  }
  .orb { display: none; }
  .draw-btn { animation: none; }
  .draw-btn-glow { animation: none; display: none; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero { padding: calc(var(--nav-h) + 12px) 18px 32px; }
  .hero-title { font-size: clamp(1.7rem, 8vw, 2.4rem); }

  .quote-card-main { padding: 32px 22px 22px; }
  .quote-text { font-size: 1rem; }
  .quote-actions { flex-wrap: wrap; }

  .draw-btn { padding: 14px 36px; font-size: 0.8rem; }

  .panel {
    width: 100%;
    border-left: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    top: 6vh;
    transform: translateY(100%);
  }
  .panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 10px auto 0;
  }
  .panel.open {
    transform: translateY(0);
  }
  .panel-header {
    padding-top: 8px;
  }

  .modal { padding: 28px 22px; }
  .onboarding-card { padding: 36px 24px 28px; }

  .action-chip { padding: 6px 10px; font-size: 0.62rem; }
  .action-chip svg { width: 14px; height: 14px; }
}

@media (max-width: 360px) {
  .nav-left, .nav-right { min-width: 60px; gap: 4px; }
  .nav-icon { width: 36px; height: 36px; }
  .hero-title { font-size: 1.5rem; }
  .quote-card-main { padding: 26px 16px 18px; }
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Panel open body lock */
body.panel-open {
  overflow: hidden;
}

/* Scrollbar styling */
.panel-body::-webkit-scrollbar {
  width: 4px;
}
.panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.panel-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.12);
}

/* ══════════════════════════════════════════════════════════════
   PARTICLE CANVAS
   ══════════════════════════════════════════════════════════════ */
.particle-canvas {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%; height: 100%;
}

/* ══════════════════════════════════════════════════════════════
   STREAK RING (animated SVG)
   ══════════════════════════════════════════════════════════════ */
.streak-ring-container {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.streak-ring { position: absolute; inset: 0; }
.streak-ring-bg {
  stroke: var(--border);
}
.streak-ring-fill {
  stroke: var(--accent);
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.streak-ring-num {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   QUOTE OF THE DAY HERO
   ══════════════════════════════════════════════════════════════ */
.qotd-hero {
  width: 100%;
  max-width: 560px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--accent-subtle), rgba(201, 168, 76, 0.03));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: qotdEnter 0.8s var(--ease-spring) both;
  cursor: pointer;
}
.qotd-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 60%);
  opacity: 0.3;
  animation: qotdShimmer 8s ease-in-out infinite;
}
@keyframes qotdShimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}
@keyframes qotdEnter {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.qotd-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
  position: relative;
}
.qotd-label svg {
  animation: qotdPulse 2s ease-in-out infinite;
}
@keyframes qotdPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.qotd-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 10px;
  position: relative;
}
.qotd-author {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════
   SWIPE HINT
   ══════════════════════════════════════════════════════════════ */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-3);
  animation: swipeHintFade 3s ease-in-out forwards;
}
.swipe-hint svg {
  animation: swipeArrow 1.5s ease-in-out infinite;
}
@keyframes swipeArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}
@keyframes swipeHintFade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; display: none; }
}

/* ══════════════════════════════════════════════════════════════
   QUOTE CARD SWIPE STATES
   ══════════════════════════════════════════════════════════════ */
.quote-card-main.swiping {
  transition: none !important;
}
.quote-card-main.swipe-exit-left {
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease) !important;
  transform: translateX(-120%) rotate(-5deg) !important;
  opacity: 0 !important;
}
.quote-card-main.swipe-exit-right {
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease) !important;
  transform: translateX(120%) rotate(5deg) !important;
  opacity: 0 !important;
}
.quote-card-main.swipe-fav {
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease) !important;
  transform: translateY(-100%) scale(0.8) !important;
  opacity: 0 !important;
}

/* Swipe feedback overlays */
.swipe-feedback {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 10;
  background: var(--bg-card);
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(20px);
}
.swipe-feedback.show { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   PAGE TRANSITION SYSTEM
   ══════════════════════════════════════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
  padding: calc(var(--nav-h) + 20px) 24px 40px;
  max-width: 720px;
  margin: 0 auto;
}

/* State transitions */
.hero.state-loading .hero-header,
.hero.state-loading .context-row,
.hero.state-loading .draw-area,
.hero.state-loading .filter-strip {
  opacity: 0.3;
  filter: blur(2px);
  transition: all 0.4s var(--ease);
}

.hero.state-revealed .quote-stage {
  animation: stageReveal 0.6s var(--ease-out) both;
}
@keyframes stageReveal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Nav hide on scroll */
.top-nav {
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.top-nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* ═══ CARD BRAND WATERMARK ═══ */
.card-watermark {
  position: absolute;
  bottom: 10px; right: 16px;
  font-family: var(--font-brand);
  font-size: 0.55rem;
  color: var(--accent);
  opacity: 0.15;
  letter-spacing: 0.2em;
  pointer-events: none;
}

/* ═══ REFLECTION MODAL ═══ */
.reflection-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.reflection-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.reflection-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s var(--ease-spring);
}
.reflection-modal-overlay.open .reflection-modal {
  transform: translateY(0) scale(1);
}
.reflection-modal h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}
.reflection-modal p {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: 16px;
  font-style: italic;
}
.reflection-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s var(--ease);
  margin-bottom: 12px;
}
.reflection-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.reflection-textarea::placeholder {
  color: var(--text-3);
}
.reflection-actions {
  display: flex; gap: 10px;
}
.reflection-actions .form-btn { flex: 1; }

/* ═══ DRAW SEQUENCE FOCUS ═══ */
.hero.draw-focus .ambient-bg {
  filter: blur(8px);
  transition: filter 0.4s var(--ease);
}
.hero.draw-focus .hero-header,
.hero.draw-focus .context-row,
.hero.draw-focus .filter-strip {
  opacity: 0.15;
  filter: blur(3px);
  transition: all 0.4s var(--ease);
}

/* ═══ NAV ICON TOUCH TARGETS ═══ */
.nav-icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
}

/* ═══ STARS (kept for compat but hidden - replaced by particles) ═══ */
.stars { display: none; }
.vignette { display: none; }
.star { display: none; }
