:root {
  --bg-top: #fce1ea;
  --bg-middle: #fff8f3;
  --bg-bottom: #ffe0c7;
  --text-main: #704b61;
  --text-soft: rgba(112, 75, 97, 0.72);
  --white-soft: rgba(255, 255, 255, 0.72);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 18px 60px rgba(176, 118, 143, 0.18);
  --shadow-strong: 0 26px 90px rgba(173, 112, 142, 0.24);
  --accent-pink: #f7a9c2;
  --accent-rose: #f989ad;
  --accent-lavender: #c9b2ee;
  --accent-sky: #a9d4f8;
  --accent-gold: #ffd4a6;
  --accent-night: #5a4d7a;
  --page-padding: clamp(18px, 4vw, 40px);
  --section-gap: clamp(28px, 5vw, 56px);
  --hero-min-height: min(100svh, 1000px);
  --heart-size: min(34vw, 320px);
  --grain-opacity: 0.09;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Zen Maru Gothic", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.88), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(255, 219, 201, 0.5), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-middle) 48%, var(--bg-bottom) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 212, 227, 0.45), transparent 24%),
    radial-gradient(circle at 80% 16%, rgba(255, 228, 180, 0.4), transparent 18%),
    radial-gradient(circle at 70% 72%, rgba(179, 208, 255, 0.22), transparent 28%);
  filter: blur(10px);
}

body::after {
  opacity: var(--grain-opacity);
  background-image:
    linear-gradient(transparent 50%, rgba(255, 255, 255, 0.35) 51%),
    radial-gradient(circle, rgba(114, 91, 113, 0.24) 0.7px, transparent 0.75px);
  background-size: 100% 3px, 18px 18px;
  mix-blend-mode: soft-light;
  z-index: 5;
}

body[data-weather="rain"] {
  --bg-top: #d9d8ec;
  --bg-middle: #eef2fb;
  --bg-bottom: #f5d8d8;
  --accent-sky: #8fbde8;
  --accent-gold: #e7c6c4;
}

body[data-weather="snow"] {
  --bg-top: #f8efff;
  --bg-middle: #fbfdff;
  --bg-bottom: #ddebf8;
  --accent-sky: #b4daf9;
  --accent-gold: #f8e7e7;
}

body[data-weather="dusk"] {
  --bg-top: #ffd3d7;
  --bg-middle: #ffe5d0;
  --bg-bottom: #ffd5a8;
  --accent-gold: #ffb67f;
}

body[data-weather="starry"],
body.confession-mode {
  --bg-top: #28305c;
  --bg-middle: #423565;
  --bg-bottom: #6f4167;
  --text-main: #fff5fa;
  --text-soft: rgba(255, 244, 250, 0.78);
  --glass-bg: rgba(21, 17, 42, 0.28);
  --glass-border: rgba(255, 255, 255, 0.22);
  --shadow-soft: 0 18px 60px rgba(17, 13, 43, 0.28);
  --shadow-strong: 0 30px 100px rgba(10, 7, 31, 0.44);
}

body.confession-mode::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 171, 210, 0.18), transparent 14%),
    radial-gradient(circle at 80% 28%, rgba(255, 188, 139, 0.18), transparent 16%),
    radial-gradient(circle at 20% 22%, rgba(172, 203, 255, 0.16), transparent 14%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

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

.cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 8;
}

.page-shell {
  position: relative;
  z-index: 1;
  padding: var(--page-padding);
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.18));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.top-bar {
  position: sticky;
  top: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 999px;
  margin: 0 auto 20px;
  max-width: 1360px;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.brand-kana,
.brand-subtitle,
.section-kicker,
.eyebrow,
.panel-label,
.quote-label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--text-soft);
}

.brand-title {
  font-family: "Yomogi", cursive;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.weather-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.weather-chip,
.soft-button,
.modal-close {
  position: relative;
  isolation: isolate;
  padding: 10px 16px;
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 8px 25px rgba(224, 160, 184, 0.18);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.weather-chip::before,
.soft-button::before,
.modal-close::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 75%);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: -1;
}

.weather-chip:hover,
.soft-button:hover,
.modal-close:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 35px rgba(230, 154, 185, 0.26);
}

.weather-chip:hover::before,
.soft-button:hover::before,
.modal-close:hover::before {
  opacity: 1;
}

.weather-chip:active,
.soft-button:active,
.modal-close:active {
  transform: scale(0.96);
}

.weather-chip.is-active {
  background: linear-gradient(120deg, rgba(251, 201, 221, 0.82), rgba(255, 242, 233, 0.52));
  box-shadow: 0 14px 35px rgba(247, 152, 186, 0.32);
}

.hero {
  position: relative;
  min-height: var(--hero-min-height);
  display: flex;
  align-items: stretch;
  max-width: 1360px;
  margin: 0 auto;
}

.scene-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 38px;
  z-index: 0;
  box-shadow: var(--shadow-strong);
}

.scene-gradient,
.scene-glow,
.scene-illustration,
.scene-film,
.cloud {
  position: absolute;
}

.scene-gradient {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 225, 236, 0.2), rgba(255, 240, 232, 0.06) 35%, rgba(236, 204, 255, 0.12) 70%, rgba(255, 189, 126, 0.24)),
    linear-gradient(180deg, rgba(178, 221, 255, 0.34) 0%, rgba(255, 222, 228, 0.3) 38%, rgba(255, 218, 170, 0.4) 100%);
}

.scene-glow {
  width: 44vw;
  height: 44vw;
  max-width: 540px;
  max-height: 540px;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.58;
}

.scene-glow-a {
  top: -4%;
  right: -4%;
  background: radial-gradient(circle, rgba(255, 211, 221, 0.86), rgba(255, 210, 153, 0.16) 66%, transparent 75%);
  animation: floatGlow 18s ease-in-out infinite alternate;
}

.scene-glow-b {
  left: -10%;
  bottom: -10%;
  background: radial-gradient(circle, rgba(174, 214, 255, 0.44), rgba(255, 223, 237, 0.16) 60%, transparent 72%);
  animation: floatGlow 24s ease-in-out infinite alternate-reverse;
}

.cloud {
  width: 28vw;
  height: 9vw;
  min-width: 220px;
  min-height: 68px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 48%, rgba(255, 255, 255, 0.86) 0 28%, transparent 29%),
    radial-gradient(circle at 49% 38%, rgba(255, 255, 255, 0.9) 0 24%, transparent 25%),
    radial-gradient(circle at 68% 54%, rgba(255, 255, 255, 0.76) 0 27%, transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18));
  filter: blur(4px);
  opacity: 0.45;
}

.cloud-a {
  top: 10%;
  left: -10%;
  animation: driftCloud 38s linear infinite;
}

.cloud-b {
  top: 24%;
  right: -14%;
  animation: driftCloud 48s linear infinite reverse;
}

.cloud-c {
  top: 34%;
  left: 12%;
  animation: driftCloud 54s linear infinite;
  opacity: 0.3;
}

.scene-illustration {
  inset: auto 0 0 0;
  height: 44%;
}

.scene-illustration::before,
.scene-illustration::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
}

.scene-illustration::before {
  height: 100%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(136, 117, 150, 0.08) 20%, rgba(116, 88, 113, 0.2) 100%),
    radial-gradient(circle at 50% 120%, rgba(255, 236, 223, 0.8) 0 30%, transparent 31%);
}

.scene-illustration::after {
  height: 84%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 250, 249, 0.08) 8.4%, transparent 9%, transparent 88%, rgba(255, 249, 247, 0.08) 88.4%, transparent 89%),
    linear-gradient(180deg, rgba(188, 142, 156, 0.12), rgba(89, 63, 80, 0.34)),
    radial-gradient(circle at 50% -24%, rgba(255, 241, 227, 0.48), transparent 52%);
  clip-path: polygon(8% 100%, 22% 32%, 38% 32%, 46% 100%, 54% 100%, 62% 32%, 78% 32%, 92% 100%);
  opacity: 0.6;
}

.confession-scene {
  inset: auto 0 0 0;
  height: 62%;
}

.confession-scene::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 13%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.52;
}

.confession-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: 210px;
  height: 150px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 232, 227, 0.76) 0 10px, transparent 10.5px),
    radial-gradient(circle at 62% 26%, rgba(255, 232, 227, 0.76) 0 10px, transparent 10.5px),
    linear-gradient(180deg, rgba(255, 243, 240, 0.18) 0 40%, rgba(64, 44, 56, 0.6) 41% 100%);
  clip-path: polygon(40% 0, 60% 0, 68% 18%, 68% 44%, 62% 65%, 58% 100%, 42% 100%, 38% 65%, 32% 44%, 32% 18%);
  opacity: 0.2;
}

.scene-film {
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 28%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 46%, rgba(255, 244, 204, 0.4) 0 2px, transparent 2.6px);
  background-size: 180px 180px, 220px 220px, 260px 260px;
  opacity: 0.4;
  mix-blend-mode: screen;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: var(--hero-min-height);
  padding: clamp(28px, 7vw, 72px);
  display: grid;
  align-content: center;
  gap: 26px;
}

.hero-copy {
  max-width: min(720px, 90%);
}

.hero-title {
  margin: 12px 0 16px;
  line-height: 1.08;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-family: "Yomogi", cursive;
  font-weight: 400;
  text-shadow: 0 10px 36px rgba(255, 251, 255, 0.2);
}

.hero-title-line,
.typewriter {
  display: block;
}

.typewriter {
  min-height: 1.4em;
  position: relative;
}

.typewriter::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  margin-left: 0.15em;
  background: currentColor;
  vertical-align: -0.06em;
  animation: blinkCaret 1.1s step-end infinite;
}

.hero-description {
  max-width: 560px;
  margin: 0;
  line-height: 1.9;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-soft);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(240px, 380px);
  gap: 26px;
  align-items: center;
  justify-content: start;
}

.heart-stage {
  position: relative;
  width: min(84vw, 380px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-left: -18px;
  filter: drop-shadow(0 20px 60px rgba(248, 141, 180, 0.35));
}

.heart-stage:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 6px;
}

.heart-halo,
.mini-heart {
  position: absolute;
}

.heart-halo {
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.55;
}

.heart-halo-a {
  inset: 15%;
  background: radial-gradient(circle, rgba(255, 207, 228, 0.9), rgba(255, 175, 196, 0.16) 70%, transparent 72%);
  animation: pulseHalo 4.2s ease-in-out infinite;
}

.heart-halo-b {
  inset: 4%;
  background: radial-gradient(circle, rgba(255, 240, 222, 0.88), rgba(255, 205, 221, 0.12) 68%, transparent 76%);
  animation: pulseHalo 5.4s ease-in-out infinite reverse;
}

.heart-core {
  width: var(--heart-size);
  max-width: 100%;
  transform-origin: center;
  animation: heartBeat 3.8s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

.mini-heart {
  width: 26px;
  height: 26px;
  opacity: 0.8;
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.6) 0 16%, transparent 16.2%),
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.6) 0 16%, transparent 16.2%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 171, 198, 0.88));
  clip-path: path("M13 23 C5 18 0 12 0 6 C0 2 3 0 6 0 C9 0 11 2 13 5 C15 2 17 0 20 0 C23 0 26 2 26 6 C26 12 21 18 13 23 Z");
  filter: blur(0.1px);
}

.mini-heart-a {
  top: 18%;
  left: 12%;
  animation: floatMiniHeart 5.2s ease-in-out infinite;
}

.mini-heart-b {
  top: 12%;
  right: 16%;
  animation: floatMiniHeart 6.6s ease-in-out infinite 0.8s;
}

.mini-heart-c {
  bottom: 18%;
  right: 12%;
  animation: floatMiniHeart 4.8s ease-in-out infinite 1.4s;
}

.quote-card {
  align-self: center;
  padding: 20px 22px;
  border-radius: 28px;
}

.quote-text {
  margin: 8px 0 10px;
  font-size: 1.05rem;
  line-height: 1.85;
}

.quote-meta,
.panel-subtext {
  color: var(--text-soft);
}

.hero-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.status-card,
.music-player,
.promise-card,
.secret-entry {
  border-radius: 28px;
}

.status-card {
  padding: 22px;
  display: grid;
  gap: 8px;
}

.panel-value {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-family: "Yomogi", cursive;
  font-weight: 400;
}

.music-player {
  padding: 18px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  align-items: center;
}

.vinyl-wrap {
  display: grid;
  place-items: center;
}

.vinyl-record {
  position: relative;
  width: 108px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(42, 32, 47, 0.96) 0 22%, rgba(18, 13, 24, 0.98) 23% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06), 0 10px 25px rgba(84, 47, 71, 0.26);
  animation: spinVinyl 8s linear infinite;
  animation-play-state: running;
}

.music-player.is-paused .vinyl-record {
  animation-play-state: paused;
}

.vinyl-record::before,
.vinyl-record::after,
.vinyl-groove {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vinyl-record::after {
  inset: 24%;
}

.vinyl-groove {
  inset: 36%;
}

.vinyl-label {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd1dc, #fff5e8 65%, #ccb5f8);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.12);
}

.music-body {
  display: grid;
  gap: 8px;
}

.music-name {
  font-size: 1.12rem;
}

.music-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.volume-wrap {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
}

input[type="range"] {
  width: 140px;
  accent-color: var(--accent-rose);
}

.hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  margin-top: 8px;
  color: var(--text-soft);
}

.hero-hint::before {
  content: "";
  width: 42px;
  height: 1px;
  background: currentColor;
}

.memory-section,
.promise-section,
.site-footer {
  max-width: 1360px;
  margin: var(--section-gap) auto 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 10px 0 14px;
  font-family: "Yomogi", cursive;
  font-weight: 400;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  line-height: 1.9;
  color: var(--text-soft);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px;
}

.polaroid-card {
  position: relative;
  padding: 14px 14px 18px;
  background: rgba(255, 251, 252, 0.82);
  border-radius: 20px;
  box-shadow: 0 22px 40px rgba(167, 113, 135, 0.18);
  transform: rotate(-1.6deg);
  transition:
    transform 260ms ease,
    box-shadow 260ms ease;
  overflow: hidden;
}

.polaroid-card::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 78px;
  height: 24px;
  background: rgba(255, 221, 229, 0.5);
  border-radius: 8px;
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 3px 10px rgba(235, 184, 200, 0.24);
}

.polaroid-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 12px;
}

.polaroid-note {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.polaroid-note span {
  color: rgba(112, 75, 97, 0.72);
  font-size: 0.92rem;
}

.polaroid-card.tilt-left {
  transform: rotate(-3.2deg);
}

.polaroid-card.tilt-right {
  transform: rotate(2.7deg);
}

.polaroid-card:hover {
  transform: translateY(-8px) rotate(0.4deg) scale(1.02);
  box-shadow: 0 28px 50px rgba(167, 113, 135, 0.24);
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.promise-card {
  padding: 24px;
}

.promise-card h3 {
  margin: 12px 0 12px;
  line-height: 1.5;
  font-size: 1.12rem;
}

.promise-card p,
.secret-entry p,
.site-footer p {
  margin: 0;
  line-height: 1.85;
  color: var(--text-soft);
}

.secret-entry {
  margin-top: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer {
  padding: 16px 10px 24px;
  text-align: center;
}

.memory-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(46, 28, 48, 0.24);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
  z-index: 16;
}

.memory-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.memory-dialog {
  width: min(940px, 100%);
  padding: 24px;
  border-radius: 34px;
  position: relative;
  overflow: visible;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  z-index: 6;
}

.memory-book {
  perspective: 1800px;
  margin-top: 12px;
}

.memory-sheet {
  position: relative;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 880ms cubic-bezier(0.2, 0.85, 0.25, 1);
  z-index: 1;
}

.memory-sheet.is-flipped {
  transform: rotateY(-180deg);
}

.memory-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 24px;
  backface-visibility: hidden;
  border-radius: 28px;
  overflow: hidden;
}

.memory-front {
  background: rgba(255, 249, 250, 0.74);
  padding: 18px;
}

.memory-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.memory-copy,
.memory-letter {
  display: grid;
  align-content: center;
  gap: 14px;
}

.memory-copy h3 {
  margin: 0;
  font-family: "Yomogi", cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
}

.memory-copy p,
.memory-letter p {
  margin: 0;
  line-height: 1.9;
  color: rgba(88, 57, 77, 0.82);
}

.memory-back {
  padding: 32px;
  background:
    linear-gradient(160deg, rgba(255, 247, 246, 0.8), rgba(244, 231, 255, 0.8)),
    repeating-linear-gradient(180deg, rgba(211, 172, 190, 0.1) 0 1px, transparent 1px 40px);
  transform: rotateY(180deg);
}

.memory-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.message-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(90vw, 420px);
  padding: 16px 18px;
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  z-index: 18;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.message-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.floating-heart,
.cursor-star,
.cursor-trail-heart,
.ripple,
.heart-burst,
.firework {
  position: absolute;
  pointer-events: none;
}

.cursor-star,
.cursor-trail-heart {
  will-change: transform, opacity;
}

.cursor-star {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, rgba(255, 251, 198, 1) 0 45%, rgba(255, 206, 134, 0.74) 46% 100%);
  clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%);
  filter: blur(0.15px);
}

.cursor-trail-heart {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 171, 198, 0.92));
  clip-path: path("M8 14 C3 11 0 8 0 4 C0 1.5 1.8 0 4 0 C5.8 0 7 1.2 8 2.8 C9 1.2 10.2 0 12 0 C14.2 0 16 1.5 16 4 C16 8 13 11 8 14 Z");
  filter: drop-shadow(0 3px 8px rgba(255, 173, 204, 0.42));
}

.ripple {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%) scale(0.2);
}

.heart-burst {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(252, 177, 205, 0.92));
  clip-path: ellipse(30% 48% at 50% 50%);
  border-radius: 30% 70% 65% 35% / 38% 45% 55% 62%;
}

.firework {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 196, 1), rgba(255, 169, 181, 0.6));
  box-shadow: 0 0 12px rgba(255, 222, 178, 0.6);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 820ms ease, transform 820ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, 26px, 0) scale(1.05);
  }
}

@keyframes driftCloud {
  from {
    transform: translateX(-10vw);
  }
  to {
    transform: translateX(115vw);
  }
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  18% {
    transform: scale(1.06);
  }
  36% {
    transform: scale(0.98);
  }
  52% {
    transform: scale(1.08);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes pulseHalo {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.65;
  }
}

@keyframes floatMiniHeart {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0) rotate(8deg);
  }
}

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

@keyframes blinkCaret {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .top-bar {
    border-radius: 28px;
  }

  .hero-stage,
  .hero-panels,
  .album-grid,
  .promise-grid,
  .memory-face {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    justify-items: center;
  }

  .quote-card,
  .hero-copy {
    max-width: 100%;
  }

  .music-player {
    grid-template-columns: 100px 1fr;
  }

  .memory-front img {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-padding: 14px;
    --hero-min-height: auto;
    --heart-size: min(52vw, 260px);
    --grain-opacity: 0.05;
  }

  .top-bar {
    position: relative;
    top: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .weather-switcher {
    justify-content: flex-start;
  }

  .hero-inner {
    padding: 22px;
    min-height: auto;
  }

  .scene-backdrop {
    border-radius: 28px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }

  .heart-stage {
    width: 100%;
    margin-left: 0;
  }

  .hero-stage {
    gap: 18px;
  }

  .quote-card,
  .status-card,
  .music-player,
  .promise-card,
  .secret-entry,
  .memory-dialog {
    border-radius: 24px;
  }

  .music-player {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .polaroid-card,
  .polaroid-card.tilt-left,
  .polaroid-card.tilt-right {
    transform: rotate(0);
  }

  .secret-entry {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-sheet {
    min-height: 560px;
  }

  .memory-front,
  .memory-back {
    padding: 16px;
  }

  .memory-copy h3 {
    font-size: 2rem;
  }

  .message-toast {
    bottom: 18px;
    width: calc(100vw - 28px);
  }
}

@media (max-width: 520px) {
  .album-grid {
    grid-template-columns: 1fr;
  }

  .weather-chip,
  .soft-button {
    padding: 9px 14px;
  }

  .memory-sheet {
    min-height: 620px;
  }

  .memory-front img {
    max-height: 280px;
  }
}

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