/* ===========================================================================
   SOEM — design system
   Dark, romantic, playful, glassmorphism. Mobile-first, then desktop.
=========================================================================== */

:root {
  --bg-0: #060714;
  --bg-1: #0b0d20;
  --bg-2: #11142b;
  --ink-0: #f5f3ff;
  --ink-1: #c9c8e0;
  --ink-2: #8886ad;

  --pink: #ff5fa2;
  --red: #ff5470;
  --blue: #5fb4ff;
  --yellow: #ffd166;
  --purple: #a06bff;
  --green: #5ef2a6;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --font-display: "Georgia", "Iowan Old Style", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gap: clamp(1rem, 2vw, 2rem);
  --section-pad: clamp(3rem, 8vw, 7rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-0: #060714;
    --bg-1: #0b0d20;
    --bg-2: #11142b;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* "proximity" (not "mandatory") on purpose: several sections carry more
     content than one screen (charts, stat grids), and mandatory snapping
     would fight the user when a section overflows the viewport. Proximity
     still gives every full-screen section a natural resting point. */
  scroll-snap-type: y proximity;
}

/* Mobile/touch: drop scroll-snap entirely. Combining position:sticky (the
   hero pin) with an ancestor scroll-snap-type is a known Safari/Chrome
   mobile bug — the sticky element unpins early or the snap fights momentum
   scrolling, which is what made the SOEM reveal feel broken on phones. */
@media (max-width: 768px), (pointer: coarse) {
  html { scroll-snap-type: none; }
  .section { scroll-snap-align: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 20% -10%, #1a1240 0%, var(--bg-0) 55%), var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--pink); }

button, input, select {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------- */
/* Loader */
/* ---------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-heart {
  font-size: 3rem;
  animation: heartbeat 1.1s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* ---------------------------------------------------------------------- */
/* Sticky nav dots */
/* ---------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  right: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
}

.nav-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-dot:hover,
.nav-dot.active {
  background: var(--pink);
  transform: scale(1.4);
}

.nav-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 140%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  white-space: nowrap;
  color: var(--ink-1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-dot:hover::after { opacity: 1; }

/* ---------------------------------------------------------------------- */
/* Sections & layout */
/* ---------------------------------------------------------------------- */

.section {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--section-pad) 1.25rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--ink-1);
  margin-top: 0;
  margin-bottom: 2.5rem;
}

.disclaimer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-2);
  font-style: italic;
  max-width: 640px;
  margin: 1rem auto 2rem;
}

/* ---------------------------------------------------------------------- */
/* Glassmorphism */
/* ---------------------------------------------------------------------- */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--glass-shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}

/* ---------------------------------------------------------------------- */
/* Hero */
/* ---------------------------------------------------------------------- */

/* The hero "pins" full-screen while the user scrolls through the extra
   height of .hero-wrapper below — pure CSS position:sticky, no JS scroll-
   jacking library required, so it can't fail if a CDN is unreachable. */
.hero-wrapper {
  position: relative;
  /* dvh (not vh/svh) on purpose: it tracks the *actual current* viewport as
     the mobile browser's address bar shows/hides mid-scroll. The JS in
     animations.js measures progress against window.innerHeight, which also
     tracks the real-time viewport — using vh/svh here made the two drift
     out of sync on phones and the reveal would jump or stall. */
  height: 220dvh;
  scroll-snap-align: none; /* this element is taller than one screen; see .section for the snap points that follow it */
}

.hero-section {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  padding-top: 4rem;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrapper { height: 100dvh; }
}

.bg-glow {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 70%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 95, 162, 0.25), transparent 60%),
              radial-gradient(circle at 70% 10%, rgba(95, 180, 255, 0.2), transparent 55%),
              radial-gradient(circle at 50% 50%, rgba(160, 107, 255, 0.2), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.soem-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
  width: 100%;
}

.soem-word {
  display: flex;
  gap: clamp(0.1rem, 1vw, 0.4rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 9rem);
  letter-spacing: 0.02em;
  z-index: 2;
  white-space: nowrap;
  transform-origin: center center;
}

.letter {
  display: inline-block;
  background: linear-gradient(180deg, #fff, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  white-space: pre;
  vertical-align: bottom;
}

.reveal-letter {
  overflow: hidden;
}

.letter.heart-sep {
  color: var(--red);
  -webkit-text-fill-color: var(--red);
  font-size: 0.5em;
  align-self: center;
  opacity: 0;
}

.mascot {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

.mascot-soufiane,
.mascot-maryem {
  position: absolute;
  /* Smaller floor than before (was 70px): on narrow phones "SOUFIANE ♥
     MARYEM" already needs most of the width, and a mascot that can't
     shrink below 70px has nowhere to sit without covering the outer
     letters (see positionMascots()/fitSoemWord() in animations.js, which
     reserve room based on this actual rendered width). */
  width: clamp(46px, 12vw, 140px);
  top: 50%;
  opacity: 0;
  z-index: 3;
}

.mascot-soufiane { left: 4%; transform: translateY(-50%) translateX(-20px); }
.mascot-maryem { right: 4%; transform: translateY(-50%) translateX(20px); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--ink-1);
  max-width: 34ch;
  margin: 0;
}

.hero-tagline {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 42ch;
  margin: 0;
}

.countdown-wrap {
  margin-top: 1rem;
}

.countdown-label {
  color: var(--ink-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.countdown {
  display: flex;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.countdown .unit {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  min-width: 4.2rem;
  text-align: center;
}

.countdown .unit strong {
  display: block;
  font-size: 1.4rem;
  color: var(--yellow);
}

.countdown .unit span {
  font-size: 0.65rem;
  color: var(--ink-2);
  text-transform: uppercase;
}

.birthday-celebration {
  font-size: 1.5rem;
  color: var(--yellow);
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.6);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--ink-1);
  border-radius: 20px;
}

.scroll-indicator span {
  display: block;
  width: 5px;
  height: 8px;
  background: var(--pink);
  border-radius: 3px;
  margin: 6px auto;
  animation: scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------------------------------------------------------------------- */
/* Empty state */
/* ---------------------------------------------------------------------- */

.empty-state-section { display: flex; justify-content: center; }
.empty-state {
  text-align: center;
  max-width: 480px;
}
.empty-state .mascot-small { width: 90px; margin-bottom: 1rem; }

/* ---------------------------------------------------------------------- */
/* Stat grid / numbers */
/* ---------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--gap);
}

.stat-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--green);
  text-shadow: 0 0 18px rgba(94, 242, 166, 0.35);
}

.stat-label {
  color: var(--ink-1);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Comparison */
/* ---------------------------------------------------------------------- */

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: center;
}

@media (min-width: 800px) {
  .comparison-grid { grid-template-columns: 1fr auto 1fr; }
}

.participant-card {
  text-align: center;
}

.participant-card .mascot { width: 100px; margin-bottom: 0.75rem; }
.participant-desc { color: var(--ink-1); font-size: 0.9rem; }

.participant-stats {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.4rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-1);
}

.participant-stats li strong { color: var(--ink-0); }

.balance-scale { display: flex; justify-content: center; }
.balance-bar {
  width: 100%;
  max-width: 220px;
  height: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--green), var(--pink));
  position: relative;
  overflow: hidden;
}
.balance-fill {
  position: absolute;
  inset: 0;
  width: 50%;
  background: rgba(6, 7, 20, 0.55);
  right: 0;
  left: auto;
  transition: width 1s ease;
}

/* ---------------------------------------------------------------------- */
/* Charts */
/* ---------------------------------------------------------------------- */

.chart-card { margin-bottom: var(--gap); }
.chart-card canvas { max-width: 100%; }
.chart-canvas-wrap { position: relative; width: 100%; height: clamp(220px, 40vw, 340px); }
.chart-summary { color: var(--ink-2); font-size: 0.8rem; margin-top: 0.75rem; }
.chart-empty { color: var(--ink-2); text-align: center; padding: 2rem 0; font-size: 0.9rem; }
.chart-text-fallback { display: grid; gap: 0.4rem; }
.fallback-row { display: flex; justify-content: space-between; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.fallback-row strong { color: var(--green); }

#heatmap {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  overflow-x: auto;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--purple);
}

/* ---------------------------------------------------------------------- */
/* Language / words */
/* ---------------------------------------------------------------------- */

.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: baseline;
}

.word-cloud span {
  color: var(--blue);
}

.mini-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-1);
}

.mini-stats strong { color: var(--yellow); }

.term-card {
  border-bottom: 1px solid var(--glass-border);
  padding: 0.6rem 0;
}
.term-card:last-child { border-bottom: none; }

/* ---------------------------------------------------------------------- */
/* Emoji universe */
/* ---------------------------------------------------------------------- */

.floating-emojis {
  position: relative;
  height: 120px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.floating-emoji {
  position: absolute;
  font-size: 1.8rem;
  bottom: -40px;
  animation: float-up 6s linear infinite;
  opacity: 0.85;
}

@keyframes float-up {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(-160px) rotate(15deg); opacity: 0; }
}

/* ---------------------------------------------------------------------- */
/* Milestones */
/* ---------------------------------------------------------------------- */

.milestone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  border-left: 2px solid var(--glass-border);
  padding-left: 1.5rem;
}

.milestone-list li {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
}

.milestone-list li::before {
  content: "✦";
  position: absolute;
  left: -1.85rem;
  color: var(--yellow);
}

.milestone-date { color: var(--ink-2); font-size: 0.75rem; display: block; }

/* ---------------------------------------------------------------------- */
/* Birthday ending */
/* ---------------------------------------------------------------------- */

.birthday-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  top: -20px;
  opacity: 0.9;
  animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

.birthday-mascots {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.birthday-mascots .mascot { width: 110px; }

.birthday-letter {
  max-width: 620px;
  margin: 0 auto 2rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.8;
}

.final-message {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------------- */
/* Buttons */
/* ---------------------------------------------------------------------- */

.btn-primary, .btn-secondary, .btn-chip {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 95, 162, 0.35);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ink-0);
  margin: 0.3rem;
  text-decoration: none;
}

.btn-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ink-0);
  margin: 0.25rem;
  font-size: 0.85rem;
}

.btn-primary:hover, .btn-secondary:hover, .btn-chip:hover { transform: translateY(-2px); }

/* ---------------------------------------------------------------------- */
/* Footer */
/* ---------------------------------------------------------------------- */

.site-footer {
  text-align: center;
  padding: 3rem 1.25rem 5rem;
  color: var(--ink-2);
  font-size: 0.85rem;
  position: relative;
}

.gear-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ink-1);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  margin: 1rem 0;
  font-size: 1.1rem;
}

.footer-credit { color: var(--ink-1); }

/* ---------------------------------------------------------------------- */
/* Admin modal */
/* ---------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 12, 0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--ink-1);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-hint { color: var(--ink-2); font-size: 0.85rem; }

#admin-login-form, #custom-term-form, #import-classifications-form {
  display: grid;
  gap: 0.6rem;
}

#admin-login-form label, #custom-term-form label, #import-classifications-form label {
  font-size: 0.8rem;
  color: var(--ink-1);
}

#admin-login-form input, #custom-term-form input, #custom-term-form select, #import-classifications-form input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: var(--ink-0);
}

.form-error {
  color: var(--red);
  font-size: 0.8rem;
  min-height: 1em;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-tab {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  color: var(--ink-1);
  cursor: pointer;
  font-size: 0.8rem;
}

.admin-tab.active {
  background: var(--glass-bg);
  color: var(--ink-0);
  border-color: var(--pink);
}

.dropzone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-1);
  cursor: pointer;
  font-size: 0.9rem;
}

.dropzone.dragover { border-color: var(--pink); background: rgba(255, 95, 162, 0.08); }

.progress-bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width 0.3s ease;
}

.import-summary {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-1);
  display: grid;
  gap: 0.3rem;
}

.terms-list { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.term-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

.checkbox-row { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; }
.checkbox-row label { display: flex; align-items: center; gap: 0.3rem; color: var(--ink-1); }

.review-card {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  color: var(--ink-1);
  font-size: 0.85rem;
}

.review-card img { max-width: 100%; max-height: 240px; border-radius: var(--radius-sm); }

.review-actions { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.review-nav { display: flex; justify-content: space-between; margin-top: 0.8rem; }
.review-nav button {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--ink-1);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

/* ---------------------------------------------------------------------- */
/* RTL-safe excerpts (Arabic text inside dynamic content) */
/* ---------------------------------------------------------------------- */

[dir="auto"] { unicode-bidi: plaintext; }

/* ---------------------------------------------------------------------- */
/* Skeleton loading state for stat values while fetch is in flight */
/* ---------------------------------------------------------------------- */

.stat-value.skeleton {
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
  min-width: 3ch;
}

@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------------------------------------------------------------------- */
/* Content lock: everything past the hero stays hidden until the
   birthday countdown reaches zero (see setupCountdown in main.js). */
/* ---------------------------------------------------------------------- */

main.content-locked .section,
main.content-locked .site-footer,
main.content-locked ~ .site-nav .nav-dot:not([href="#hero"]) {
  display: none;
}

.lock-hint {
  /* max-width narrows this <p> below its parent's width, so without
     auto side-margins the block itself sits at the left edge of
     #countdown-wrap — the text inside was centered, but relative to that
     off-center box, which is what skewed the two wrapped lines. */
  margin: 1rem auto 0;
  color: var(--ink-1);
  font-size: 0.85rem;
  max-width: 32ch;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Love letter popup (Girlfriend's Day / 2-month anniversary) */
/* ---------------------------------------------------------------------- */

.love-modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 95, 162, 0.18), rgba(4, 4, 12, 0.88) 65%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.love-modal-overlay.love-modal-visible { opacity: 1; }

.love-modal-overlay[hidden] { display: none; }

.love-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.love-hearts span {
  position: absolute;
  bottom: -10%;
  font-size: 1.6rem;
  opacity: 0.55;
  animation: love-float 9s linear infinite;
}

.love-hearts span:nth-child(1) { left: 6%; animation-delay: 0s; font-size: 1.2rem; }
.love-hearts span:nth-child(2) { left: 18%; animation-delay: 1.4s; font-size: 2rem; }
.love-hearts span:nth-child(3) { left: 32%; animation-delay: 2.8s; font-size: 1.4rem; }
.love-hearts span:nth-child(4) { left: 50%; animation-delay: 0.6s; font-size: 1.8rem; }
.love-hearts span:nth-child(5) { left: 66%; animation-delay: 3.6s; font-size: 1.3rem; }
.love-hearts span:nth-child(6) { left: 80%; animation-delay: 2s; font-size: 2.2rem; }
.love-hearts span:nth-child(7) { left: 92%; animation-delay: 4.4s; font-size: 1.5rem; }

@keyframes love-float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.55; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-115vh) rotate(25deg); opacity: 0; }
}

.love-modal {
  position: relative;
  background: linear-gradient(160deg, rgba(28, 14, 36, 0.92), var(--bg-2));
  border: 1px solid rgba(255, 95, 162, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(255, 95, 162, 0.18), var(--glass-shadow);
  max-width: 540px;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.5s ease;
}

.love-modal-overlay.love-modal-visible .love-modal {
  transform: scale(1) translateY(0);
}

.love-modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--ink-1);
  background: rgba(255, 95, 162, 0.12);
  border: 1px solid rgba(255, 95, 162, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}

.love-modal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0 0 1.25rem;
  background: linear-gradient(90deg, var(--pink), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.love-letter-body {
  text-align: left;
  color: var(--ink-1);
  font-size: 1rem;
  line-height: 1.7;
}

.love-letter-body p { margin: 0 0 1rem; }
.love-letter-body p:last-child {
  color: var(--ink-0);
  font-family: var(--font-display);
  font-style: italic;
  margin-top: 1.5rem;
}

.love-modal-continue {
  margin-top: 1.5rem;
}

/* No horizontal overflow anywhere */
html, body { max-width: 100%; }
