:root {
  --bg-1: #0f1328;
  --bg-2: #241245;
  --text-main: #fbf8ff;
  --text-soft: #d7cfe6;
  --card: rgba(255, 255, 255, 0.11);
  --card-border: rgba(255, 255, 255, 0.25);
  --accent-1: #ff9f1c;
  --accent-2: #ff5f95;
  --accent-3: #72e8ff;
  --good: #9cffc8;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Manrope", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: radial-gradient(circle at 10% 20%, rgba(114, 232, 255, 0.15), transparent 35%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

body.auth-page {
  background: #000;
  overflow: hidden;
}

body.home-page {
  color: #2a1240;
  background: linear-gradient(135deg, #ffedf5 0%, #fff9ed 38%, #ffd8b0 100%);
  overflow-x: hidden;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 120, 190, 0.22), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(255, 193, 112, 0.24), transparent 40%);
  z-index: -1;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 159, 28, 0.18), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(255, 95, 149, 0.2), transparent 45%);
  filter: blur(0.5vmax);
  z-index: -1;
  animation: ambient 18s ease-in-out infinite alternate;
}

body.auth-page::before {
  display: none;
}

#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.welcome-corner {
  position: fixed;
  top: 1rem;
  right: 3.2rem;
  z-index: 3;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.95rem;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 255, 102, 0.75);
  border-radius: 0.72rem;
  background: rgba(0, 10, 0, 0.82);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(0, 255, 102, 0.18), inset 0 0 0 1px rgba(0, 255, 102, 0.18);
  text-shadow: 0 0 12px rgba(0, 255, 102, 0.5);
  max-width: min(58vw, 300px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr minmax(320px, 1fr) 1fr;
  align-items: center;
  justify-items: stretch;
  padding: 1.4rem;
  position: relative;
  z-index: 2;
}

.weather-card {
  grid-column: 1 / 3;
  align-self: start;
  justify-self: start;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--card-border);
  border-radius: 1.1rem;
  backdrop-filter: blur(8px);
  padding: 0.9rem 1rem;
  max-width: 680px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
}

.auth-card,
.section,
.hero,
.story-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--card-border);
  border-radius: 1.4rem;
  backdrop-filter: blur(8px);
}

.auth-card {
  grid-column: 2;
  width: 100%;
  max-width: 440px;
  padding: 1.7rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: reveal 0.6s ease-out both;
}

.auth-title-wrap {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.blink-dot-wrap {
  min-width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blink-dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #ff3f4e;
  animation: blinkDot 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 63, 78, 0.55);
}

@keyframes blinkDot {
  0%, 45%, 100% {
    background: #ff3f4e;
    box-shadow: 0 0 12px rgba(255, 63, 78, 0.55);
  }

  50%, 95% {
    background: #4dff9f;
    box-shadow: 0 0 12px rgba(77, 255, 159, 0.55);
  }
}

#startPageButton {
  margin-top: 1rem;
}

.blink-word {
  text-align: center;
}

.blink-word {
  position: absolute;
  right: 0;
  top: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700;
  animation-duration: 1.4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.blink-word.danger {
  color: #ff3f4e;
  font-size: 1.1rem;
  animation-name: blinkDanger;
}

.blink-word.success {
  color: #4dff9f;
  font-size: 1.2rem;
  animation-name: blinkSuccess;
}

.label {
  margin: 0 0 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-3);
}

h1,
h2,
h3 {
  margin: 0 0 0.65rem;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

h3 {
  font-size: 1.08rem;
}

.subtitle {
  margin: 0 0 1rem;
  color: var(--text-soft);
  max-width: 64ch;
  line-height: 1.6;
}

.auth-form label,
label {
  display: block;
  font-size: 0.9rem;
  margin: 0.9rem 0 0.35rem;
  color: var(--text-soft);
}

.auth-form input,
.auth-form textarea,
select,
#songSelect,
#lyricVariantSelect {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.8rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
}

.auth-form input:focus,
.auth-form textarea:focus,
select:focus,
input:focus,
textarea:focus,
button.pill:focus,
.version-btn:focus {
  outline: none;
  border-color: var(--accent-3);
}

.auth-form textarea {
  resize: vertical;
}

.pill {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  cursor: pointer;
  background: linear-gradient(110deg, var(--accent-1), var(--accent-2));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 95, 149, 0.38);
}

.auth-page .pill {
  background: linear-gradient(110deg, #0f3 45%, #003300 100%);
  color: #ecffec;
  border: 1px solid rgba(0, 255, 102, 0.55);
  box-shadow: 0 0 14px rgba(0, 255, 102, 0.25);
}

.auth-page .pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 255, 102, 0.32);
}

.matrix-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #001100 0%, #004400 35%, #008000 70%, #00b300 100%);
  color: #eaffea;
  border: 1px solid rgba(0, 255, 102, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.matrix-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 120%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 0, 0, 0.22), transparent);
  animation: matrixStripe 2.8s linear infinite;
}

.matrix-start-btn {
  width: 100%;
  color: #f4ffed;
  border: 1px solid rgba(77, 255, 159, 0.9);
}

@keyframes matrixStripe {
  0% { transform: translateX(0); }
  100% { transform: translateX(220%); }
}

.home-page .pill {
  box-shadow: 0 10px 22px rgba(244, 143, 191, 0.18);
}

.pill.secondary {
  background: rgba(255, 255, 255, 0.16);
}

.forgot-link {
  display: inline-block;
  color: var(--accent-3);
  text-decoration: none;
  margin-top: 0.9rem;
}

.forgot-link:hover {
  text-decoration: underline;
}

.music-status {
  font-size: 0.9rem;
  color: var(--good);
  margin: 0.4rem 0 0;
}

#forgotSubmitBtn {
  margin-top: 1.35rem;
}

#startPageButton {
  margin-top: 1rem;
}

#loginError {
  color: #ff7b7b;
}

.forgot-page .subtitle.muted {
  margin-top: 0.7rem;
}

.page-shell {
  width: min(1080px, calc(100vw - 2rem));
  margin: 1.2rem auto;
  display: grid;
  gap: 1.5rem;
}

.hero {
  padding: 1.6rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 0.9rem;
}

.hero-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.visitor-counter {
  margin: 0.2rem 0 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(58, 31, 87, 0.25);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.75);
  color: #2b1149;
  font-weight: 700;
  width: fit-content;
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transform: rotate(-1deg);
}

.age-box {
  display: block;
  margin: 0.6rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.07);
}

.section {
  padding: 1.4rem;
  animation: reveal 0.8s ease-out both;
  animation-delay: 120ms;
}

.section-lead {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.music-control-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.music-sidebar {
  display: grid;
  gap: 0.75rem;
}

.song-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.lyrics-wrap {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.07);
  max-height: 340px;
  overflow: auto;
}

.lyrics-download-row {
  margin-top: 0.65rem;
  margin-bottom: 0.15rem;
}

.lyrics-download-link {
  color: #ffe17a;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  font-weight: 700;
  transition: opacity 0.25s ease;
}

.lyrics-download-link.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.lyrics-download-link.is-ready:hover {
  text-decoration: underline;
}

.lyrics-download-link:not(.is-ready):hover {
  text-decoration: underline;
}

.song-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.lyrics-lines {
  margin: 0;
  max-height: 220px;
  display: grid;
  gap: 0.45rem;
  overflow: auto;
}

.song-cards {
  margin: 0.8rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.song-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  cursor: pointer;
}

.song-card.active {
  background: linear-gradient(120deg, var(--accent-2), var(--accent-1));
  border-color: transparent;
}

.lyric-line {
  padding: 0.42rem 0.6rem;
  border-radius: 0.55rem;
  color: var(--text-soft);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lyric-line.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(255, 159, 28, 0.35), rgba(114, 232, 255, 0.25));
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
  transform: translateX(4px) scale(1.01);
}

.lyrics-box {
  margin-top: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
}

.lyrics-box h3 {
  margin-top: 0;
}

.lyrics-box pre {
  white-space: pre-wrap;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  max-height: 240px;
  overflow: auto;
}

.song-buttons .pill:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.relationship-text {
  margin: 0;
  color: #4b2c74;
  line-height: 1.55;
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.version-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.9rem;
  padding: 0.85rem 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.version-btn.is-active {
  background: linear-gradient(120deg, var(--accent-2), var(--accent-1));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(255, 159, 28, 0.3);
}

.version-panel {
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  min-height: 6rem;
  background: rgba(255, 255, 255, 0.07);
}

.version-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.story-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 132px;
  overflow: hidden;
  animation: reveal 0.7s ease-out both;
}

.story-card:nth-child(1) { animation-delay: 180ms; }
.story-card:nth-child(2) { animation-delay: 260ms; }
.story-card:nth-child(3) { animation-delay: 340ms; }
.story-card:nth-child(4) { animation-delay: 420ms; }

.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-body {
  padding: 0.8rem;
}

.story-body p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.flower-bouquet {
  display: grid;
}

.candle-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.76);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.candle-modal.open {
  display: flex;
}

.candle-modal-content {
  position: relative;
  max-width: min(92vw, 980px);
  width: 100%;
}

.candle-modal img {
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.candle-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.celebration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.candles-wrap {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0.4rem;
}

.candle {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(244, 236, 255, 0.85));
  border-radius: 0.5rem;
  aspect-ratio: 1 / 1;
  padding: 0.2rem;
  color: #2f2247;
  display: grid;
  align-content: start;
  justify-items: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(44, 16, 56, 0.2);
}

.candle-photo {
  width: 100%;
  height: 55%;
  object-fit: cover;
  border-radius: 0.35rem;
}

.candle.has-photo .flame {
  top: 0.5rem;
}

.candle.has-photo .candle-body {
  margin-top: 0.3rem;
}

.candle .candle-body {
  margin-top: 0.65rem;
  width: 18px;
  height: 44px;
  background: linear-gradient(180deg, #fff 0%, #d9ccff 100%);
  border-radius: 0 0 5px 5px;
}

.candle .flame {
  position: absolute;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffea70 30%, #ff8a00);
  box-shadow: 0 0 10px #ff8a00;
  transition: opacity 0.3s ease;
}

.candle .flame.off {
  opacity: 0;
}

.candle.off {
  opacity: 0.5;
}

.candle.off .candle-body {
  background: linear-gradient(180deg, #b3b3b3 0%, #7e7e7e 100%);
}

.candle-id {
  margin-top: 0.15rem;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
}

.candle-controls {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

body.home-page .birthday-title {
  color: #3a1f57;
}

body.home-page .label,
body.home-page .section-lead,
body.home-page .story-card h3,
body.home-page .story-body p {
  color: #3a1f57;
}

body.home-page .lyrics-wrap,
body.home-page .lyrics-box,
body.home-page .version-panel,
body.home-page .section,
body.home-page .story-card,
body.home-page .song-card,
body.home-page .candles-wrap,
body.home-page .music-sidebar,
body.home-page .hero,
body.home-page .auth-card {
  background: rgba(255, 255, 255, 0.68);
  color: #2c1452;
  border-color: rgba(58, 31, 87, 0.22);
}

body.home-page .subtitle,
body.home-page .lyrics-wrap,
body.home-page #lyricsStatus,
body.home-page .music-status,
body.home-page .story-body p,
body.home-page .story-card {
  color: #4b2c74;
}

.fireworks-canvas {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
}

.memory-gallery {
  margin-top: 0.75rem;
  position: relative;
}

.memory-slideshow {
  position: relative;
  min-height: clamp(380px, 60vw, 720px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 30px rgba(255, 105, 180, 0.2);
}

.memory-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.memory-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.memory-slide img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  display: block;
  background: linear-gradient(145deg, #3c1648, #170d2e);
}

.memory-dots {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.memory-dot {
  border: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(58, 31, 87, 0.24);
}

.memory-dot.is-active {
  width: 14px;
  height: 10px;
  border-radius: 999px;
  background: #7b2dd4;
}

.memory-card {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(255, 105, 180, 0.2);
}

.memory-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.memory-copy {
  padding: 0.55rem 0.6rem 0.65rem;
}

.memory-copy p {
  margin: 0.18rem 0;
  color: #3b1849;
}

.memory-date {
  font-weight: 700;
}

.feature-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.feature-card {
  border: 1px dashed rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.75rem;
  border-radius: 0.8rem;
}

.feature-card h3 {
  margin-bottom: 0.4rem;
}

.feature-card p {
  margin: 0;
  color: #4a276f;
  line-height: 1.45;
}

.home-page .fireworks-canvas {
  z-index: 8;
}

#bgMusic {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
}

.footer {
  text-align: center;
  color: var(--text-soft);
  padding: 0.7rem 0.8rem 1.2rem;
}

.birthday-title {
  position: relative;
  color: #fff8c5;
}

.birthday-title.birthday-in {
  animation: happyBounce 1.2s ease;
}

.forgot-page .auth-card {
  max-width: 640px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@keyframes ambient {
  from {
    transform: scale(1) rotate(2deg);
    opacity: 0.4;
  }

  to {
    transform: scale(1.08) rotate(-3deg);
    opacity: 1;
  }
}

@keyframes blinkDanger {
  0%, 45%, 100% { opacity: 1; transform: scale(1); }
  50%, 95% { opacity: 0; transform: scale(0.9); }
}

@keyframes blinkSuccess {
  0%, 45%, 100% { opacity: 0; transform: scale(0.8); }
  50%, 95% { opacity: 1; transform: scale(1.1); }
}

@keyframes happyBounce {
  0% { transform: scale(0.93) translateY(18px); opacity: 0; }
  40% { transform: scale(1.08) translateY(-6px); opacity: 1; }
  70% { transform: scale(1.01) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .weather-card {
    grid-column: 1;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .music-control-grid,
  .timeline,
  .version-grid,
  .celebration-grid,
  .song-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .hero {
    padding: 1.2rem;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .candle {
    width: 100%;
  }

  .version-btn {
    font-size: 0.95rem;
    padding-block: 0.7rem;
  }

  .candles-wrap {
    grid-template-columns: repeat(9, 1fr);
  }

  .memory-gallery,
  .feature-grid,
  .song-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .memory-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
