/* ============================================================
   featherScroll 2026 — Global Stylesheet
   Mobile-first · Glassmorphism · Cream + Forest Green · Pi-native
   ============================================================ */

/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;700&display=swap");
/* ===== CSS VARIABLES ===== */
:root {
  /* Core Palette */
  --cream: #f5f0e8;
  --cream-light: #faf7f2;
  --cream-dark: #ede5d8;
  --green-deep: #1a3a2a;
  --green-forest: #2d5a3d;
  --green-mid: #3d7a52;
  --green-soft: #5a9e6f;
  --green-mist: #a8c5b0;
  --green-pale: #d4e8da;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-pale: #f5e6b8;

  /* Text */
  --text-primary: #1a3a2a;
  --text-secondary: #4a6b58;
  --text-muted: #7a9b87;
  --text-on-dark: #f5f0e8;
  --text-on-dark-2: #c8d8c2;

  /* Glass */
  --glass-bg: rgba(245, 240, 232, 0.15);
  --glass-bg-strong: rgba(245, 240, 232, 0.25);
  --glass-border: rgba(245, 240, 232, 0.3);
  --glass-border-gold: rgba(201, 168, 76, 0.4);
  --glass-shadow: rgba(26, 58, 42, 0.25);

  /* Gradients */
  --grad-page: linear-gradient(
    160deg,
    #0f2318 0%,
    #1a3a2a 35%,
    #2d5a3d 70%,
    #1a3a2a 100%
  );
  --grad-card: linear-gradient(
    135deg,
    rgba(245, 240, 232, 0.18) 0%,
    rgba(245, 240, 232, 0.08) 100%
  );
  --grad-gold: linear-gradient(135deg, #c9a84c 0%, #e8c97a 50%, #c9a84c 100%);
  --grad-green: linear-gradient(135deg, #2d5a3d 0%, #3d7a52 100%);
  --grad-quote-overlay: linear-gradient(
    180deg,
    rgba(15, 35, 24, 0.3) 0%,
    rgba(15, 35, 24, 0.75) 100%
  );

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", sans-serif;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-mid: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Bottom nav height */
  --nav-height: 68px;

  /* Z-index layers */
  --z-bg: 0;
  --z-content: 10;
  --z-card: 20;
  --z-nav: 100;
  --z-modal: 200;
  --z-popup: 300;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--grad-page);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text-on-dark);
  overflow-x: hidden;
  position: relative;
}

img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
ul,
ol {
  list-style: none;
}

/* ===== FEATHER CANVAS (background animation) ===== */
#feather-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-bg);
  overflow: hidden;
}

.feather {
  position: absolute;
  top: -60px;
  font-size: 18px;
  opacity: 0;
  animation: featherFall linear infinite;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(201, 168, 76, 0.3));
}

@keyframes featherFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(40px);
    opacity: 0;
  }
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.loading-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

.loading-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(201, 168, 76, 0.3);
  border-top-color: var(--gold);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* ===== APP CONTAINER ===== */
.app-container {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + var(--space-md));
  position: relative;
  z-index: var(--z-content);
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  background: rgba(15, 35, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.header-content {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-container {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  object-fit: cover;
}

/* Logo ripple rings */
.logo-ripple {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 168, 76, 0.4);
  animation: rippleOut 2.5s ease-out infinite;
}
.ripple-1 {
  animation-delay: 0s;
}
.ripple-2 {
  animation-delay: 0.8s;
}
.ripple-3 {
  animation-delay: 1.6s;
}

@keyframes rippleOut {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.logo-section h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.header-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-on-dark-2);
  letter-spacing: 0.02em;
  text-align: right;
  line-height: 1.4;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 10px;
}

/* ===== PAGE WRAPPER ===== */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: none;
  animation: pageFadeIn 0.4s ease forwards;
}

.page.active {
  display: block;
}

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

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-on-dark-2);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-xl);
  margin-top: 0.5rem;
}

/* Gold underline accent */
.section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--grad-gold);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
}

/* ===== GLASS CARD BASE ===== */
.glass-card {
  background: var(--grad-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    inset 0 1px 0 rgba(245, 240, 232, 0.15);
  transition:
    transform var(--transition-mid),
    box-shadow var(--transition-mid);
  overflow: hidden;
}

.glass-card:active {
  transform: scale(0.98);
}

/* Gold border variant */
.glass-card-gold {
  border-color: var(--glass-border-gold);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    0 0 0 1px rgba(201, 168, 76, 0.1),
    inset 0 1px 0 rgba(201, 168, 76, 0.2);
}

/* ===== HOME PAGE ===== */
.home-hero {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.home-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.home-logo {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(201, 168, 76, 0.6);
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.2);
}

.home-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.home-title span {
  color: var(--gold-light);
}

.home-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-on-dark-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

/* Today's date pill */
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2xl);
}

.date-pill-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: var(--radius-full);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Home feature grid — 2x2 */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.home-feature-card {
  background: var(--grad-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    inset 0 1px 0 rgba(245, 240, 232, 0.15);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  transition:
    transform var(--transition-mid),
    box-shadow var(--transition-mid),
    border-color var(--transition-mid);
  text-align: left;
  overflow: hidden;
  position: relative;
}

.home-feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-gold);
  opacity: 0;
  transition: opacity var(--transition-mid);
}

.home-feature-card:active {
  transform: scale(0.97);
  border-color: var(--glass-border-gold);
}

.home-feature-card:active::before {
  opacity: 1;
}

.feature-emoji {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.feature-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}

.feature-desc {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-on-dark-2);
  line-height: 1.4;
  font-weight: 300;
}

/* Home welcome user strip */
.welcome-strip {
  background: rgba(45, 90, 61, 0.3);
  border: 1px solid rgba(90, 158, 111, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  animation: welcomeSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes welcomeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-strip .leaf {
  font-size: 1.1rem;
}

.welcome-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--green-mist);
  font-weight: 300;
}

.welcome-text strong {
  color: var(--gold-light);
  font-weight: 700;
}

/* ===== QUOTE PAGE ===== */
.quote-card-full {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
  box-shadow: 0 16px 48px rgba(15, 35, 24, 0.6);
}

.quote-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease;
}

/* Background theme fallbacks */
.quote-background.theme-cosmic {
  background: linear-gradient(135deg, #0f1b2d 0%, #1a3a4a 50%, #0d2b1e 100%);
}
.quote-background.theme-sunset {
  background: linear-gradient(135deg, #3d2b1f 0%, #6b4226 50%, #2d3a1a 100%);
}
.quote-background.theme-meditation {
  background: linear-gradient(135deg, #1a2a3a 0%, #2d4a3d 50%, #1a3a2a 100%);
}
.quote-background.theme-divine {
  background: linear-gradient(135deg, #2a1a0f 0%, #4a3020 50%, #1a2a1a 100%);
}
.quote-background.theme-action {
  background: linear-gradient(135deg, #1a0f2a 0%, #3a1a2a 50%, #1a2a1a 100%);
}

.quote-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-quote-overlay);
}

.quote-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  width: 100%;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.25;
  quotes: "\201C" "\201D";
  text-align: center;
  margin-bottom: 46px;
}

.quote-text::before {
  content: open-quote;
  font-size: 3.2rem;
  color: var(--gold);
  line-height: 1;
  vertical-align: 0.3em;
  margin-right: 2px;
  font-style: normal;
}

.quote-author {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-style: normal;
}

.quote-meta {
  margin-top: var(--space-xs);
}

.quote-source {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-on-dark-2);
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* Reveal button */
.reveal-btn {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #766b4d 0%, #ffe49f 50%, #635222 100%);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-deep);
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.reveal-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.25);
}

/* Countdown timer */
.timer-card {
  background: var(--grad-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px var(--glass-shadow);
}

.timer-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-on-dark-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 300;
}

.timer-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.time-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}

.time-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.time-separator {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 10px;
  animation: blink 1s step-start infinite;
}

/* ===== CONTENT PAGES (What If / Wild History / Knowledge) ===== */
.content-hero-card {
  background: var(--grad-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-gold);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow:
    0 12px 40px var(--glass-shadow),
    inset 0 1px 0 rgba(201, 168, 76, 0.15);
  position: relative;
  overflow: hidden;
}

.content-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-gold);
}

.content-emoji {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: var(--space-md);
  display: block;
}

.content-scenario {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.content-preview-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-on-dark-2);
  line-height: 1.5;
  font-weight: 300;
}

/* Unlock / Read button */
.unlock-btn {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  margin-top: var(--space-lg);
}

.unlock-btn:active {
  transform: scale(0.97);
}

.unlock-btn-gold {
  background: var(--grad-gold);
  color: var(--green-deep);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
}

.unlock-btn-green {
  background: var(--grad-green);
  color: var(--cream);
  border: 1px solid rgba(90, 158, 111, 0.4);
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.4);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.status-badge-free {
  background: rgba(90, 158, 111, 0.2);
  border: 1px solid rgba(90, 158, 111, 0.4);
  color: var(--green-soft);
}

.status-badge-ad {
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold-light);
}

.status-badge-unlocked {
  background: rgba(90, 158, 111, 0.25);
  border: 1px solid rgba(90, 158, 111, 0.5);
  color: #7dcea0;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: calc(var(--nav-height) + var(--space-md));
  animation: modalFadeIn 0.25s ease forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: linear-gradient(160deg, #162b1e 0%, #1e3d2a 100%);
  border: 1px solid var(--glass-border-gold);
  border-radius: var(--radius-xl);
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(201, 168, 76, 0.2);
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-header {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-lg);
  width: 36px;
  height: 2px;
  background: var(--grad-gold);
  border-radius: var(--radius-full);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
  padding-right: var(--space-lg);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark-2);
  font-size: 1rem;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.modal-close:active {
  background: rgba(245, 240, 232, 0.15);
}

.modal-body {
  padding: var(--space-lg);
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling */
.modal-body::-webkit-scrollbar {
  width: 3px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
  border-radius: 2px;
}

/* Quote modal specifics */
.modal-quote-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  border-left: 3px solid var(--gold);
  padding-left: var(--space-md);
}

.modal-author {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  font-style: normal;
}

.modal-hook {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-on-dark-2);
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: rgba(90, 158, 111, 0.08);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--green-soft);
}

.why-matters {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: rgba(201, 168, 76, 0.06);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--gold);
}

.why-matters h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: var(--space-sm);
}

.why-matters p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-on-dark-2);
  line-height: 1.6;
  font-weight: 300;
}

.modal-description p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-on-dark-2);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--space-md);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(245, 240, 232, 0.08);
}

.tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-soft);
  background: rgba(90, 158, 111, 0.12);
  border: 1px solid rgba(90, 158, 111, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  letter-spacing: 0.04em;
}

/* Content HTML inside modals (from JSON) */
.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.modal-body p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-on-dark-2);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--space-md);
}

.modal-body strong {
  color: var(--cream);
  font-weight: 700;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(12, 28, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-nav);
  padding: 0 var(--space-sm);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  padding: var(--space-sm) 0;
  cursor: pointer;
  transition: transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius-md);
}

.nav-item:active {
  transform: scale(0.9);
}

.nav-icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: transform var(--transition-mid);
}

.nav-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition-mid);
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.5));
}

.nav-item.active .nav-label {
  color: var(--gold-light);
}

/* Active indicator dot */
.nav-item.active::before {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-full);
}

/* ===== POPUP TOAST ===== */
#popup {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--space-lg));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 58, 42, 0.95);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--cream);
  z-index: var(--z-popup);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}

#popup.hidden {
  display: none;
}

#popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== KNOWLEDGE UNLOCK STATE ===== */
.knowledge-unlocked-note {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(90, 158, 111, 0.12);
  border: 1px solid rgba(90, 158, 111, 0.25);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.knowledge-unlocked-note span {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--green-soft);
  font-weight: 400;
}

/* ===== FADE IN ANIMATION (for cards on page load) ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-up:nth-child(1) {
  animation-delay: 0.05s;
}
.fade-in-up:nth-child(2) {
  animation-delay: 0.12s;
}
.fade-in-up:nth-child(3) {
  animation-delay: 0.2s;
}
.fade-in-up:nth-child(4) {
  animation-delay: 0.28s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  margin-top: var(--space-xl);
}

.footer p {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer-link {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--transition-fast);
}

.footer-link:active {
  color: var(--gold-light);
}

.footer-separator {
  color: rgba(245, 240, 232, 0.2);
  font-size: 0.6rem;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}
.text-gold {
  color: var(--gold-light);
}
.text-cream {
  color: var(--cream);
}
.text-muted {
  color: var(--text-on-dark-2);
}
.mt-sm {
  margin-top: var(--space-sm);
}
.mt-md {
  margin-top: var(--space-md);
}
.mt-lg {
  margin-top: var(--space-lg);
}

/* ===== RESPONSIVE — TABLET / DESKTOP ===== */
@media (min-width: 480px) {
  .page {
    padding: var(--space-xl) var(--space-lg);
  }
  .home-title {
    font-size: 2.8rem;
  }
  .quote-text {
    font-size: 1.25rem;
  }
  .modal-body {
    max-height: 75vh;
  }
  .modal-content {
    margin-top: var(--space-2xl);
  }
}

@media (min-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .quote-card-full {
    min-height: 420px;
  }

  .page {
    padding: var(--space-2xl) var(--space-xl);
    max-width: 560px;
  }

  /* On desktop, bottom nav stays — app is mobile-first */
  .bottom-nav {
    max-width: 560px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (min-width: 1024px) {
  /* Side-centered layout for desktop visitors */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
  }
}

/* ===== SAFE AREA (iPhone notch / home bar) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(env(safe-area-inset-bottom) + 4px);
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }

  .app-container {
    padding-bottom: calc(
      var(--nav-height) + env(safe-area-inset-bottom) + var(--space-md)
    );
  }
}

/* ===== HIGH CONTRAST / REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
   WHAT IF PAGE — Parchment Scroll Theme
   ===================================================== */

#page-whatif {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  max-width: 100%;
}

#page-whatif.active {
  padding: 0;
  max-width: 100%;
}

.whatif-header {
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  background: linear-gradient(160deg, #1a0e00 0%, #2e1a00 50%, #1a1200 100%);
  position: relative;
  overflow: hidden;
}

.whatif-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.whatif-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #c9a84c,
    #e8c97a,
    #c9a84c,
    transparent
  );
}

.whatif-header-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  position: relative;
}

.whatif-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
  position: relative;
  text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
}

.whatif-subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(232, 201, 122, 0.6);
  font-weight: 300;
  letter-spacing: 0.04em;
  position: relative;
}

.whatif-scenario-banner {
  background: linear-gradient(135deg, #2e1a00 0%, #3d2500 100%);
  border-left: 4px solid var(--gold);
  padding: var(--space-lg);
  margin: 0;
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  position: relative;
}

.whatif-scenario-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(201, 168, 76, 0.05) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.whatif-scenario-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(201, 168, 76, 0.4));
}

.whatif-scenario-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.25;
}

.whatif-content-body {
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(180deg, #1a1000 0%, #0f0a00 100%);
  min-height: 200px;
}

.whatif-content-inner h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: var(--space-md);
  margin-top: var(--space-xl);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.whatif-content-inner h3:first-child {
  margin-top: 0;
}

.whatif-content-inner p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(245, 240, 232, 0.82);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: var(--space-lg);
  animation: contentReveal 0.5s ease forwards;
  opacity: 0;
}

.whatif-content-inner p:nth-child(1) {
  animation-delay: 0.1s;
}
.whatif-content-inner p:nth-child(2) {
  animation-delay: 0.2s;
}
.whatif-content-inner p:nth-child(3) {
  animation-delay: 0.3s;
}
.whatif-content-inner p:nth-child(4) {
  animation-delay: 0.4s;
}
.whatif-content-inner p:nth-child(5) {
  animation-delay: 0.5s;
}

.whatif-content-inner strong {
  color: var(--gold-light);
  font-weight: 600;
}

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

/* Loading dots */
.whatif-loading {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-2xl) 0;
}

.whatif-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
  animation: dotPulse 1.2s ease-in-out infinite;
}

/* ===== WHAT IF LIST CARDS ===== */
.whatif-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md);
}

.whatif-entry-card {
  background: rgba(46, 26, 0, 0.45);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition:
    border-color var(--transition-mid),
    background var(--transition-mid);
  position: relative;
}

.whatif-entry-card:active {
  background: rgba(46, 26, 0, 0.65);
  border-color: rgba(201, 168, 76, 0.7);
}

.whatif-entry-today {
  border-color: rgba(201, 168, 76, 0.55);
  background: rgba(46, 26, 0, 0.55);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.12);
  animation: whatifTodayPulse 2.5s ease-in-out infinite;
}

@keyframes whatifTodayPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.55);
  }
  50% {
    box-shadow: 0 0 32px rgba(201, 168, 76, 0.3);
    border-color: rgba(201, 168, 76, 0.85);
  }
}

.whatif-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.whatif-entry-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.whatif-new-badge {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--grad-gold);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  animation: newBadgeShake 3s ease-in-out infinite;
}

.whatif-entry-scenario {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gold-pale);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.whatif-entry-chevron {
  color: var(--gold);
  text-align: right;
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.whatif-entry-chevron::before {
  content: "Explore";
  color: var(--gold);
}
.whatif-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.whatif-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* ===== QUOTE PAGE SPACING FIX ===== */
#page-quote {
  padding-top: var(--space-md);
}

#page-quote .section-title {
  margin-bottom: 2px;
}

#page-quote .section-subtitle {
  margin-bottom: var(--space-md);
}

/* =====================================================
   KNOWLEDGE — premium midnight theme
   ===================================================== */

.knowledge-section-title {
  color: var(--gold-light);
}

.knowledge-loading {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-2xl) 0;
}

.knowledge-all-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.knowledge-entry-card {
  background: rgba(10, 20, 50, 0.4);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition:
    border-color var(--transition-mid),
    background var(--transition-mid);
  position: relative;
}

.knowledge-entry-card:active {
  background: rgba(10, 20, 50, 0.6);
  border-color: rgba(201, 168, 76, 0.7);
}

.knowledge-entry-today {
  border-color: rgba(201, 168, 76, 0.5);
  background: rgba(10, 20, 50, 0.5);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.1);
  animation: knowledgeTodayPulse 2.5s ease-in-out infinite;
}

@keyframes knowledgeTodayPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.5);
  }
  50% {
    box-shadow: 0 0 32px rgba(201, 168, 76, 0.3);
    border-color: rgba(201, 168, 76, 0.8);
  }
}

.knowledge-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.knowledge-entry-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.knowledge-new-badge {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--grad-gold);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  animation: newBadgeShake 3s ease-in-out infinite;
}

@keyframes newBadgeShake {
  0%,
  85%,
  100% {
    transform: translateX(0);
  }
  88% {
    transform: translateX(-3px);
  }
  91% {
    transform: translateX(3px);
  }
  94% {
    transform: translateX(-2px);
  }
  97% {
    transform: translateX(2px);
  }
}

.knowledge-entry-hook {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: #e8d5a3;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.knowledge-entry-chevron {
  font-size: 1.1rem;
  color: var(--gold);
  text-align: right;
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.knowledge-entry-chevron::before {
  content: "Read more";
  color: var(--gold);
}

/* Knowledge Modal — midnight premium theme */
#knowledgeModal .modal-content {
  background: linear-gradient(160deg, #080f2a 0%, #0f1b4a 50%, #0a1432 100%);
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(201, 168, 76, 0.1),
    inset 0 1px 0 rgba(201, 168, 76, 0.2);
}

#knowledgeModal .modal-header {
  border-bottom-color: rgba(201, 168, 76, 0.15);
}

#knowledgeModal .modal-title {
  color: var(--gold-light);
}

#knowledgeModal .modal-body h3 {
  color: #e8d5a3;
}

#knowledgeModal .modal-body p {
  color: #a8b8d8;
  line-height: 1.8;
}

#knowledgeModal .modal-body strong {
  color: var(--gold-light);
}

#knowledgeModal .knowledge-date {
  color: rgba(201, 168, 76, 0.5);
  font-size: 0.72rem;
  text-align: right;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(201, 168, 76, 0.1);
  margin-top: var(--space-md);
}

#knowledgeModal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.4);
}

/* =====================================================
   WILD HISTORY — Simplified structure, blue/purple theme
   (mirrors Knowledge structure)
   ===================================================== */

.wild-section-title {
  color: #a78bfa;
}

.wild-section-title::after {
  background: linear-gradient(135deg, #6b8cff 0%, #a78bfa 50%, #6b8cff 100%);
}

.wild-loading-simple {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-2xl) 0;
}

.wild-loading-simple .whatif-loading-dot {
  background: #a78bfa;
}

.wild-all-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.wild-entry-card {
  background: rgba(10, 15, 40, 0.45);
  border: 1px solid rgba(107, 140, 255, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition:
    border-color var(--transition-mid),
    background var(--transition-mid);
  position: relative;
}

.wild-entry-card:active {
  background: rgba(107, 140, 255, 0.1);
  border-color: rgba(167, 139, 250, 0.7);
}
.wild-entry-today {
  border-color: rgba(167, 139, 250, 0.5);
  /* background: rgba(107, 140, 255, 0.1); */
  box-shadow: 0 0 20px rgba(107, 140, 255, 0.15);
  animation: wildTodayPulse 2.5s ease-in-out infinite;
}

@keyframes wildTodayPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(107, 140, 255, 0.15);
    border-color: rgba(167, 139, 250, 0.5);
  }
  50% {
    box-shadow: 0 0 32px rgba(107, 140, 255, 0.35);
    border-color: rgba(167, 139, 250, 0.8);
  }
}

.wild-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.wild-entry-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b8cff;
}

.wild-new-badge {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a0f2a;
  background: linear-gradient(135deg, #a78bfa, #6b8cff);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  animation: newBadgeShake 3s ease-in-out infinite;
}

.wild-entry-teaser {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.wild-entry-chevron {
  font-size: 1.1rem;
  color: #a78bfa;
  text-align: right;
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wild-entry-chevron::before {
  content: "Read more";
  color: #a78bfa;
}

/* Wild modal — midnight blue/purple theme (mirrors #knowledgeModal) */
#wildModal .modal-content {
  background: linear-gradient(160deg, #080a2a 0%, #0f0f4a 50%, #0a0a32 100%);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(107, 140, 255, 0.1),
    inset 0 1px 0 rgba(167, 139, 250, 0.2);
}

#wildModal .modal-header {
  border-bottom-color: rgba(107, 140, 255, 0.15);
}

#wildModal .modal-header::after {
  background: linear-gradient(90deg, #6b8cff 0%, #a78bfa 50%, #6b8cff 100%);
}

#wildModal .modal-title {
  color: #a78bfa;
}

#wildModal .modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-bottom: var(--space-md);
  margin-top: var(--space-xl);
  line-height: 1.3;
}

#wildModal .modal-body h3:first-child {
  margin-top: 0;
}

#wildModal .modal-body p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #b8c4e8;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: var(--space-md);
}

#wildModal .modal-body strong {
  color: #c4b5fd;
}

#wildModal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(107, 140, 255, 0.4);
}

/* =====================================================
   PAGINATION CONTROLS
   ===================================================== */

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  color: var(--cream);
  font-size: 1rem;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.pagination-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-on-dark-2);
  letter-spacing: 0.04em;
  min-width: 70px;
  text-align: center;
}

.home-welcome-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-welcome-card.show {
  opacity: 1;
  transform: translateY(0);
}

.home-welcome-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  animation: featherWiggle 3s ease-in-out infinite;
}

.home-welcome-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-on-dark-2);
  font-weight: 300;
  line-height: 1.5;
  text-align: left;
}

.home-welcome-text span {
  color: var(--gold-light);
  font-weight: 700;
}

@keyframes featherWiggle {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}
