@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --wine-950: #260d20;
  --wine-900: #35122b;
  --wine-800: #501938;
  --wine-700: #70254b;
  --pink: #f5a7c5;
  --pink-light: #ffcfdf;
  --gold: #f3d395;
  --cream: #fff7ee;
  --muted: #d9bdcc;
  --panel: rgba(65, 22, 52, 0.78);
  --panel-border: rgba(255, 223, 191, 0.19);
  --shadow: 0 24px 72px rgba(19, 5, 16, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 48% 14%, rgba(255, 220, 226, 0.3), transparent 43%),
    radial-gradient(ellipse at 91% 82%, rgba(235, 164, 190, 0.23), transparent 39%),
    linear-gradient(140deg, #684257 0%, #8a4e6c 52%, #633c56 100%);
  font-family: "Be Vietnam Pro", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.32;
  background-image:
    radial-gradient(circle, rgba(255, 246, 218, 0.8) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 207, 223, 0.74) 0 1.4px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.8px);
  background-position: 0 0, 42px 67px, 103px 21px;
  background-size: 154px 172px, 218px 196px, 287px 241px;
  animation: starfield-drift 32s linear infinite;
}

body::after {
  opacity: 0.56;
  background:
    radial-gradient(ellipse at 12% 38%, rgba(255, 194, 220, 0.15), transparent 28%),
    radial-gradient(ellipse at 84% 27%, rgba(255, 224, 163, 0.13), transparent 25%),
    radial-gradient(ellipse at 65% 89%, rgba(209, 188, 255, 0.12), transparent 30%);
  animation: aurora-breathe 14s ease-in-out infinite alternate;
}

@keyframes starfield-drift {
  from { background-position: 0 0, 42px 67px, 103px 21px; }
  to { background-position: 154px 172px, -176px 263px, 390px -220px; }
}

@keyframes aurora-breathe {
  from { opacity: 0.34; transform: scale(1); }
  to { opacity: 0.7; transform: scale(1.04); }
}

.class-photo-bg {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.class-photo-bg::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 38, 68, 0.46), rgba(113, 51, 82, 0.3));
  content: "";
}

.class-photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(0.86) brightness(1.12);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.music-prompt {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  place-items: center;
  padding: 24px;
  border: 0;
  background: transparent;
  color: var(--cream);
}

.music-prompt[open] {
  display: grid;
  animation: memory-backdrop-in 180ms ease both;
}

.music-prompt::backdrop {
  background: rgba(28, 8, 23, 0.78);
  backdrop-filter: blur(9px);
}

.music-prompt-card {
  width: min(470px, 100%);
  padding: clamp(28px, 6vw, 46px);
  border: 1px solid rgba(255, 226, 183, 0.5);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(245, 167, 197, 0.24), transparent 55%),
    linear-gradient(145deg, rgba(92, 34, 68, 0.98), rgba(43, 16, 39, 0.98));
  box-shadow: 0 28px 100px rgba(14, 3, 12, 0.55);
  text-align: center;
  animation: reward-pop 420ms cubic-bezier(0.18, 0.85, 0.25, 1.15) both;
}

.music-prompt-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 226, 183, 0.55);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 32px rgba(255, 207, 223, 0.18);
  font-size: 1.8rem;
}

.music-prompt-card .eyebrow {
  color: var(--gold);
}

.music-prompt-card h2 {
  margin: 0;
  color: #fff5e7;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.music-prompt-card > p:not(.eyebrow) {
  margin: 14px 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.music-prompt-button {
  min-height: 48px;
}

::selection {
  color: var(--wine-950);
  background: var(--pink-light);
}

.site-glow {
  position: fixed;
  z-index: -1;
  width: 29rem;
  aspect-ratio: 1;
  border: 1px solid rgba(247, 201, 215, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.site-glow::before,
.site-glow::after {
  position: absolute;
  inset: 2rem;
  border: inherit;
  border-radius: inherit;
  content: "";
}

.site-glow::after {
  inset: 4rem;
}

.site-glow--one {
  top: -20rem;
  left: -12rem;
  animation: ambient-orbit 22s ease-in-out infinite alternate;
}

.site-glow--two {
  right: -19rem;
  bottom: -20rem;
  width: 42rem;
  animation: ambient-orbit 28s ease-in-out -9s infinite alternate-reverse;
}

@keyframes ambient-orbit {
  from { opacity: 0.56; transform: translate3d(-1.5rem, 0, 0) rotate(-7deg) scale(0.96); }
  to { opacity: 1; transform: translate3d(1.5rem, 1.2rem, 0) rotate(7deg) scale(1.04); }
}

.petal-layer {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-petal {
  position: absolute;
  top: -2rem;
  color: rgba(255, 199, 215, 0.45);
  animation: petal-fall var(--fall-duration) linear var(--fall-delay) infinite;
  font-size: var(--petal-size);
  left: var(--petal-left);
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -4vh, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.7; }
  84% { opacity: 0.56; }
  100% { transform: translate3d(var(--petal-drift), 108vh, 0) rotate(480deg); opacity: 0; }
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(1240px, calc(100% - 48px));
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255, 236, 224, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 211, 149, 0.6);
  border-radius: 50%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--cream);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.13rem;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-button,
.soft-button,
.primary-button,
.outline-button,
.small-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.header-button {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(255, 236, 224, 0.2);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
}

.header-button:hover,
.soft-button:hover,
.outline-button:hover,
.small-button:hover {
  border-color: rgba(243, 211, 149, 0.72);
  background: rgba(255, 255, 255, 0.09);
}

.header-button[aria-pressed="true"] {
  border-color: rgba(243, 211, 149, 0.65);
  color: var(--gold);
}

.primary-button {
  min-height: 49px;
  padding: 0 23px;
  color: #41192f;
  background: linear-gradient(135deg, #ffe4b7, #efc57f);
  box-shadow: 0 10px 30px rgba(11, 3, 9, 0.24);
}

.primary-button:hover {
  box-shadow: 0 13px 36px rgba(11, 3, 9, 0.35);
  transform: translateY(-2px);
}

.easter-sticker-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.easter-sticker {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 251, 242, 0.88), rgba(255, 227, 238, 0.68));
  box-shadow: 0 5px 14px rgba(38, 13, 32, 0.16);
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.78;
  pointer-events: auto;
  cursor: default;
  transform: rotate(var(--sticker-rotation, -8deg));
  user-select: none;
  animation: sticker-drift 5.6s ease-in-out var(--sticker-delay, 0ms) infinite;
  transition: opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.easter-sticker:hover {
  z-index: 2;
  opacity: 1;
  filter: brightness(1.1) saturate(1.12) drop-shadow(0 0 9px rgba(255, 231, 178, 0.8));
  box-shadow: 0 0 0 3px rgba(255, 235, 191, 0.3), 0 8px 22px rgba(38, 13, 32, 0.26);
  transform: rotate(0) scale(1.08);
}

@keyframes sticker-drift {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

.easter-sticker--secret {
  z-index: 1;
  cursor: pointer;
}

.easter-sticker--secret .easter-sticker-icon {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: inherit;
  border-radius: inherit;
  background: inherit;
  box-shadow: inherit;
  font-size: inherit;
  line-height: inherit;
}

@media (min-width: 1001px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body::before {
    opacity: 0.48;
    animation-duration: 22s;
  }

  body::after {
    opacity: 0.72;
    background:
      radial-gradient(ellipse at 12% 38%, rgba(255, 194, 220, 0.22), transparent 28%),
      radial-gradient(ellipse at 84% 27%, rgba(255, 224, 163, 0.2), transparent 25%),
      radial-gradient(ellipse at 65% 89%, rgba(209, 188, 255, 0.18), transparent 30%),
      radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.055), transparent 55%);
    animation-duration: 9s;
  }

  .easter-sticker::after {
    position: absolute;
    top: -8px;
    right: -7px;
    color: #ffe7ad;
    content: "\2726";
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 9px rgba(255, 231, 173, 0.95);
    animation: desktop-sticker-twinkle 5.2s ease-in-out var(--sticker-delay) infinite;
  }

  .easter-sticker:hover::after,
  .easter-sticker:focus-visible::after {
    animation: desktop-sticker-hover-twinkle 850ms ease-in-out infinite;
  }

  @keyframes desktop-sticker-twinkle {
    0%, 12%, 100% { opacity: 0; transform: scale(0.35) rotate(-25deg); }
    18% { opacity: 1; transform: scale(1) rotate(15deg); }
    25% { opacity: 0; transform: scale(0.45) rotate(35deg); }
  }

  @keyframes desktop-sticker-hover-twinkle {
    0%, 100% { opacity: 0.45; transform: scale(0.7) rotate(-20deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-glow--one,
  .site-glow--two,
  .easter-sticker,
  .easter-sticker--secret,
  .section-heading h1::after {
    animation: none;
  }
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.soft-button,
.outline-button {
  min-height: 46px;
  padding: 0 19px;
  border-color: rgba(255, 236, 224, 0.22);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.055);
}

.small-button {
  min-height: 34px;
  padding: 0 13px;
  border-color: rgba(255, 236, 224, 0.22);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.77rem;
}

.page {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 140px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 66px) 0 70px;
  background:
    radial-gradient(ellipse at 4% 13%, rgba(255, 218, 231, 0.075), transparent 24%),
    radial-gradient(ellipse at 96% 72%, rgba(255, 222, 169, 0.065), transparent 25%);
  background-size: 180% 180%;
  animation: page-enter 420ms ease both, page-atmosphere 18s ease-in-out 420ms infinite alternate;
}

@keyframes page-atmosphere {
  from { background-position: 0 0; }
  to { background-position: 100% 100%; }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(11px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.75;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

.hero {
  display: grid;
  min-height: min(680px, calc(100vh - 160px));
  align-items: center;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(24px, 5vw, 72px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 580px;
  margin: 20px 0 17px;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 span,
.accent-text {
  color: var(--pink);
}

.hero-lede {
  max-width: 470px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.9;
}

.hero-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 28px;
  color: var(--gold);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
}

.hero-date::before {
  width: 38px;
  height: 1px;
  background: currentColor;
  content: "";
}

.intro-wish-card {
  display: flex;
  max-width: 450px;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 226, 203, 0.24);
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(255, 237, 232, 0.13), rgba(255, 222, 224, 0.055));
  box-shadow: 0 8px 24px rgba(31, 10, 24, 0.12);
  backdrop-filter: blur(9px);
}

.intro-wish-icon {
  display: grid;
  width: 38px;
  min-width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(243, 211, 149, 0.46);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.15rem;
  animation: wish-heartbeat 2s ease-in-out infinite;
}

.intro-wish-label {
  color: var(--gold);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro-wish-message {
  min-height: 1.5em;
  margin: 3px 0 0;
  color: var(--cream);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 1;
  transition: opacity 240ms ease, transform 240ms ease;
}

.intro-wish-message.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

@keyframes wish-heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hero-art {
  position: relative;
  min-height: 480px;
}

.hero-photo {
  position: absolute;
  inset: 14px 25px 28px 55px;
  overflow: hidden;
  border: 1px solid rgba(255, 223, 191, 0.45);
  border-radius: 45% 45% 18px 18px;
  background: linear-gradient(160deg, #9a4e68, #481939);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo--small {
  z-index: 2;
  inset: auto;
  width: 34%;
  height: 31%;
  border-radius: 13px;
  transform: rotate(-7deg);
}

.hero-photo--small-1 {
  bottom: 2px;
  left: 12px;
}

.hero-photo--small-2 {
  right: -3px;
  bottom: 46px;
  width: 29%;
  height: 27%;
  transform: rotate(7deg);
}

.hero-photo--small-1 img {
  filter: hue-rotate(-18deg) saturate(0.88);
}

.hero-photo--small-2 img {
  filter: hue-rotate(20deg) saturate(0.92);
}

.hero-photo::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(33, 8, 25, 0.58));
  content: "";
}

.photo-caption {
  position: absolute;
  z-index: 1;
  right: 25px;
  bottom: 25px;
  left: 25px;
  color: white;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.2rem, 2.3vw, 1.9rem);
}

.hero-stamp {
  position: absolute;
  z-index: 2;
  top: 34px;
  left: 0;
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(243, 211, 149, 0.74);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(50, 17, 41, 0.88);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem;
  transform: rotate(-12deg);
  animation: stamp-wiggle 6s ease-in-out infinite;
}

@keyframes stamp-wiggle {
  0%, 84%, 100% { transform: rotate(-12deg) scale(1); }
  89% { transform: rotate(-7deg) scale(1.06); }
  94% { transform: rotate(-15deg) scale(1.03); }
}

.hero-side-note {
  position: absolute;
  right: -9px;
  bottom: 72px;
  color: var(--pink-light);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  writing-mode: vertical-rl;
}

.secret-page {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.secret-card {
  width: min(620px, 100%);
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(255, 225, 184, 0.42);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(245, 167, 197, 0.2), transparent 55%),
    linear-gradient(145deg, rgba(77, 29, 61, 0.96), rgba(39, 16, 36, 0.96));
  box-shadow: 0 28px 92px rgba(23, 5, 19, 0.42);
  text-align: center;
}

.secret-exit {
  display: block;
  width: fit-content;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.secret-exit:hover {
  color: var(--gold);
}

.secret-lock-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 226, 183, 0.48);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 34px rgba(255, 207, 223, 0.14);
  font-size: 2rem;
}

.secret-card .eyebrow {
  color: var(--gold);
}

.secret-card h1 {
  margin: 10px 0 14px;
  color: #fff3e1;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
}

.secret-lede,
.secret-hint {
  color: var(--muted);
  line-height: 1.75;
}

.secret-form {
  display: grid;
  gap: 12px;
  margin: 24px auto 0;
  text-align: left;
}

.secret-form label {
  color: #ffe7c2;
  font-size: 0.86rem;
  font-weight: 600;
}

.secret-form input,
.secret-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 226, 200, 0.32);
  border-radius: 13px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.075);
}

.secret-form input::placeholder,
.secret-form textarea::placeholder {
  color: rgba(255, 235, 225, 0.52);
}

.secret-form input[name="password"] {
  max-width: 220px;
  justify-self: center;
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
}

.secret-form > button {
  justify-self: center;
  margin-top: 6px;
}

.secret-feedback {
  min-height: 1.45em;
  margin: 0;
  color: #ffd2c7;
  font-size: 0.86rem;
  text-align: center;
}

.secret-question {
  margin: 8px 0;
  color: #fff3e1 !important;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem !important;
  line-height: 1.5;
  text-align: center;
}

.secret-progress {
  height: 8px;
  overflow: hidden;
  margin: 22px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.secret-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5a7c5, #f3d395);
  transition: width 300ms ease;
}

.secret-hint {
  margin: 18px 0 0;
  font-size: 0.77rem;
}

.secret-photo-frame {
  width: min(390px, 100%);
  margin: 24px auto;
  padding: 9px;
  border: 1px solid rgba(255, 226, 183, 0.65);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 236, 208, 0.18), rgba(255, 255, 255, 0.05));
  box-shadow: 0 14px 38px rgba(15, 4, 13, 0.3);
}

.secret-photo-frame img {
  display: block;
  width: 100%;
  max-height: 320px;
  aspect-ratio: 1.4;
  border-radius: 13px;
  object-fit: cover;
}

.secret-photo-frame figcaption {
  padding: 10px 4px 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.secret-winner-form {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 226, 200, 0.18);
}

.secret-winner-banner {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(243, 211, 149, 0.42);
  border-radius: 18px;
  color: #fff0c9;
  background: rgba(243, 211, 149, 0.09);
}

.secret-winner-banner span {
  font-size: 2rem;
}

.secret-winner-banner p {
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 1000px) {
  .easter-sticker {
    width: 18px;
    height: 18px;
    border-radius: 7px;
    font-size: 0.86rem;
    opacity: 0.68;
  }
}

@media (max-width: 700px) {
  .easter-sticker {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 1.05rem;
    opacity: 0.68;
  }

  .easter-sticker--secret {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    font-size: 1.05rem;
  }

  .easter-sticker--secret .easter-sticker-icon {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(255, 251, 242, 0.88), rgba(255, 227, 238, 0.68));
    box-shadow: 0 5px 14px rgba(38, 13, 32, 0.16);
  }
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  animation: page-enter 470ms ease both;
}

.section-heading h1,
.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(2.2rem, 4.8vw, 3.9rem);
  line-height: 1.08;
}

.section-heading h1 {
  text-shadow: 0 0 32px rgba(255, 207, 223, 0.15);
}

.section-heading h1::after {
  display: block;
  width: clamp(54px, 9vw, 90px);
  height: 2px;
  margin-top: 13px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--pink), transparent);
  box-shadow: 0 0 16px rgba(255, 207, 223, 0.35);
  content: "";
  animation: heading-glimmer 3.4s ease-in-out infinite alternate;
}

@keyframes heading-glimmer {
  from { opacity: 0.58; transform: scaleX(0.82); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.section-heading p {
  max-width: 460px;
  margin-bottom: 3px;
  color: var(--muted);
  line-height: 1.75;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.profile-card,
.memory-card,
.panel-card,
.feature-card,
.wish-card {
  border: 1px solid var(--panel-border);
  background: linear-gradient(145deg, rgba(105, 42, 77, 0.64), rgba(47, 17, 40, 0.76));
  box-shadow: 0 14px 45px rgba(19, 5, 16, 0.14);
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-radius: 18px;
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
  animation: card-enter 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--profile-delay, 0ms);
}

.profile-card::before {
  position: absolute;
  z-index: 2;
  top: -60%;
  left: -85%;
  width: 44%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 238, 214, 0.22), transparent);
  content: "";
  pointer-events: none;
  transform: rotate(22deg);
  transition: left 650ms ease;
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-card:hover,
.profile-card:focus-within,
.memory-card:hover {
  border-color: rgba(243, 211, 149, 0.58);
  box-shadow: 0 18px 42px rgba(19, 5, 16, 0.28), 0 0 20px rgba(245, 167, 197, 0.14);
  transform: translateY(-5px) scale(1.015);
}

.profile-card:hover::before,
.profile-card:focus-within::before {
  left: 140%;
}

.profile-photo {
  position: relative;
  display: block;
  aspect-ratio: 0.91;
  overflow: hidden;
  border-radius: 12px;
  background: #602b4b;
}

.profile-photo img,
.memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.memory-card img[data-memory-open] {
  cursor: zoom-in;
}

.memory-card img[data-memory-open]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -5px;
}

.profile-card:hover .profile-photo img,
.memory-card:hover img {
  transform: scale(1.04);
}

.profile-caption {
  padding: 12px 4px 2px;
}

.profile-caption strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
}

.profile-caption span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.profile-compliment {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 8px 9px;
  border: 1px solid rgba(245, 167, 197, 0.2);
  border-radius: 11px;
  color: #ffe0eb;
  background: linear-gradient(105deg, rgba(244, 157, 190, 0.13), rgba(255, 231, 200, 0.055));
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.72rem;
  line-height: 1.5;
  transition: border-color 240ms ease, background 240ms ease, box-shadow 240ms ease, color 240ms ease;
}

.profile-compliment > span {
  flex: 0 0 auto;
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  animation: profile-star-twinkle 2.4s ease-in-out infinite;
}

.profile-card:hover .profile-compliment,
.profile-card:focus-within .profile-compliment {
  border-color: rgba(243, 211, 149, 0.46);
  color: #fff1d9;
  background: linear-gradient(105deg, rgba(244, 157, 190, 0.2), rgba(255, 231, 200, 0.11));
  box-shadow: 0 0 18px rgba(245, 167, 197, 0.12);
}

@keyframes profile-star-twinkle {
  0%, 100% { opacity: 0.72; transform: scale(0.92) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.13) rotate(8deg); }
}

.video-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.video-upload:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hint {
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.hall-intro {
  position: relative;
  max-width: 710px;
  margin-bottom: 32px;
}

.hall-intro::after {
  position: absolute;
  top: 6px;
  right: 8%;
  color: rgba(255, 223, 159, 0.82);
  content: "✦";
  font-size: clamp(1.2rem, 3vw, 2rem);
  animation: sparkle-drift 3.6s ease-in-out infinite;
}

.hall-intro h1 {
  margin: 12px 0 10px;
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
}

.hall-intro p {
  color: var(--muted);
  line-height: 1.75;
}

.feature-grid {
  position: relative;
  display: grid;
  grid-template-areas:
    "cloud star flower"
    "cap letter rainbow";
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.feature-grid::before,
.feature-grid::after {
  position: absolute;
  z-index: 0;
  color: rgba(255, 229, 177, 0.48);
  content: "✧";
  font-size: 1.5rem;
  pointer-events: none;
  animation: sparkle-drift 4.2s ease-in-out infinite;
}

.feature-grid::before {
  top: 40%;
  left: -28px;
}

.feature-grid::after {
  right: -19px;
  bottom: 7%;
  color: rgba(255, 191, 216, 0.62);
  animation-delay: -1.8s;
}

.feature-card {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(255, 232, 218, 0.42);
  border-radius: 28px 20px 28px 20px;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(31, 8, 27, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
  animation: card-float 5s ease-in-out infinite;
}

.feature-card:nth-child(2n) {
  animation-delay: -1.6s;
}

.feature-card:nth-child(3n) {
  animation-delay: -3s;
}

.feature-card--cloud { grid-area: cloud; }
.feature-card--star { grid-area: star; }
.feature-card--flower { grid-area: flower; }
.feature-card--cap { grid-area: cap; }
.feature-card--letter { grid-area: letter; }
.feature-card--rainbow { grid-area: rainbow; }

.feature-card::after {
  position: absolute;
  z-index: -1;
  top: 43%;
  right: -37px;
  width: 142px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 225, 208, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 13px rgba(255, 225, 208, 0.025), 0 0 0 27px rgba(255, 225, 208, 0.025);
  content: "";
}

.feature-card::before {
  position: absolute;
  bottom: 17px;
  right: 18px;
  color: rgba(255, 242, 222, 0.72);
  content: "✦";
  font-size: 0.9rem;
  pointer-events: none;
  animation: sparkle-drift 3.2s ease-in-out infinite;
}

.feature-card:hover {
  border-color: rgba(255, 235, 181, 0.94);
  background: linear-gradient(145deg, rgba(151, 63, 111, 0.88), rgba(80, 28, 70, 0.94));
  box-shadow: 0 22px 48px rgba(31, 8, 27, 0.3), 0 0 25px rgba(245, 167, 197, 0.2);
  transform: translateY(-7px) scale(1.025);
  animation-play-state: paused;
}

.feature-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.feature-card--cloud {
  border-radius: 36px 36px 24px 24px;
  background:
    radial-gradient(ellipse at 92% 100%, rgba(193, 224, 237, 0.19), transparent 46%),
    linear-gradient(145deg, rgba(129, 99, 148, 0.88), rgba(72, 54, 106, 0.91));
}

.feature-card--star {
  border-radius: 22px 36px 22px 36px;
  background:
    radial-gradient(circle at 94% 95%, rgba(250, 220, 148, 0.22), transparent 42%),
    linear-gradient(145deg, rgba(151, 93, 133, 0.88), rgba(82, 43, 91, 0.92));
}

.feature-card--flower {
  border-radius: 34px 22px 34px 22px;
  background:
    radial-gradient(ellipse at 95% 95%, rgba(255, 194, 202, 0.2), transparent 45%),
    linear-gradient(145deg, rgba(170, 85, 122, 0.86), rgba(91, 39, 83, 0.92));
}

.feature-card--cap {
  border-radius: 24px 34px 24px 34px;
  background:
    radial-gradient(ellipse at 96% 100%, rgba(193, 196, 250, 0.2), transparent 45%),
    linear-gradient(145deg, rgba(103, 97, 148, 0.89), rgba(57, 49, 103, 0.93));
}

.feature-card--letter {
  min-height: 250px;
  align-items: center;
  border-color: rgba(255, 224, 168, 0.55);
  border-radius: 27px 27px 27px 10px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 218, 184, 0.24), transparent 62%),
    linear-gradient(145deg, rgba(178, 91, 122, 0.86), rgba(108, 49, 92, 0.91));
  text-align: center;
  box-shadow: 0 18px 42px rgba(41, 10, 32, 0.28), inset 0 0 22px rgba(255, 222, 177, 0.08);
  animation-name: letter-float;
}

.feature-card--letter::before {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255, 232, 191, 0.35);
  border-radius: 19px 19px 19px 7px;
  background: linear-gradient(145deg, transparent 48.5%, rgba(255, 230, 194, 0.17) 49%, transparent 50.5%);
  content: "";
  pointer-events: none;
}

.feature-card--letter::after {
  top: 17px;
  right: auto;
  left: 22px;
  width: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: rgba(255, 232, 193, 0.9);
  content: "♡";
  font-size: 1.15rem;
  transform: rotate(12deg);
}

.feature-card--rainbow {
  border-radius: 34px 34px 22px 22px;
  background:
    radial-gradient(ellipse at 100% 120%, rgba(243, 211, 149, 0.21), transparent 44%),
    linear-gradient(145deg, rgba(105, 107, 151, 0.89), rgba(64, 47, 103, 0.92));
}

.feature-card--letter .feature-icon {
  width: 60px;
  border-radius: 18px;
}

.feature-card--letter strong,
.feature-card--letter > span:last-child {
  max-width: 300px;
}

.feature-card--letter strong {
  font-size: 1.5rem;
}

.feature-icon {
  position: relative;
  z-index: 1;
}

.feature-icon svg {
  display: block;
  width: 34px;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.feature-icon--star svg,
.feature-icon--flower svg {
  fill: currentColor;
  stroke-width: 1.5;
}

.feature-icon--flower svg circle:last-child {
  fill: var(--gold);
  stroke: rgba(121, 53, 77, 0.65);
}

.feature-icon--rainbow svg {
  stroke-width: 4;
}

.feature-icon--rainbow svg path:nth-child(1) { stroke: #ffcf89; }
.feature-icon--rainbow svg path:nth-child(2) { stroke: #f7a4c5; }
.feature-icon--rainbow svg path:nth-child(3) { stroke: #aee0c0; }

.feature-icon--rainbow .rainbow-cloud {
  stroke: var(--gold);
  stroke-width: 5;
}

.feature-icon--cap svg {
  fill: rgba(243, 211, 149, 0.22);
}

.feature-icon--letter svg {
  fill: rgba(243, 211, 149, 0.15);
  stroke-width: 2.5;
}

.feature-icon {
  display: grid;
  width: 56px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(243, 211, 149, 0.4);
  border-radius: 19px 14px 19px 14px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.055);
  font-size: 1.35rem;
  box-shadow: 0 5px 16px rgba(30, 8, 26, 0.16);
  animation: icon-bob 3.3s ease-in-out infinite;
}

.feature-card--star .feature-icon svg {
  animation: icon-twinkle 2.8s ease-in-out infinite;
}

.feature-card--flower .feature-icon svg {
  animation: flower-sway 5s ease-in-out infinite;
}

.feature-card--cap .feature-icon svg {
  animation: cap-bob 3.8s ease-in-out infinite;
}

.feature-card--letter .feature-icon {
  animation: letter-stamp 4.8s ease-in-out infinite;
}

.feature-card--rainbow .feature-icon svg {
  animation: rainbow-glow 3s ease-in-out infinite;
}

.feature-card--cloud .feature-icon {
  color: #d9eff9;
  background: rgba(219, 239, 249, 0.13);
}

.feature-card--star .feature-icon {
  color: #ffe5a8;
  background: rgba(255, 229, 168, 0.13);
}

.feature-card--flower .feature-icon {
  color: #ffd2e0;
  background: rgba(255, 210, 224, 0.13);
}

.feature-card--cap .feature-icon {
  color: #e1d9ff;
  background: rgba(225, 217, 255, 0.13);
}

.feature-card--rainbow .feature-icon {
  color: #ffe5b3;
  background: rgba(255, 229, 179, 0.13);
}

@keyframes sparkle-drift {
  0%, 100% { opacity: 0.48; transform: translateY(2px) rotate(-7deg) scale(0.92); }
  50% { opacity: 1; transform: translateY(-5px) rotate(10deg) scale(1.12); }
}

@keyframes card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@keyframes letter-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@keyframes icon-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes icon-twinkle {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 225, 150, 0)); transform: rotate(-5deg) scale(0.96); }
  50% { filter: drop-shadow(0 0 9px rgba(255, 225, 150, 0.74)); transform: rotate(5deg) scale(1.08); }
}

@keyframes flower-sway {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

@keyframes cap-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(-4deg); }
}

@keyframes letter-stamp {
  0%, 78%, 100% { transform: rotate(-4deg) scale(1); }
  84% { transform: rotate(3deg) scale(1.07); }
  90% { transform: rotate(-2deg) scale(1.03); }
}

@keyframes rainbow-glow {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(255, 217, 165, 0.1)); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 217, 165, 0.68)); }
}

.feature-number {
  position: absolute;
  top: 26px;
  right: 25px;
  color: rgba(255, 239, 226, 0.34);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
}

.feature-card--star .feature-number,
.feature-card--flower .feature-number,
.feature-card--cap .feature-number,
.feature-card--rainbow .feature-number {
  top: 26px;
  right: 25px;
}

.feature-card strong {
  position: relative;
  z-index: 1;
  margin-top: 19px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
}

.feature-card > span:last-child {
  position: relative;
  z-index: 1;
  max-width: 260px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.photo-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 210px;
  gap: 16px;
}

.memory-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 226, 207, 0.34);
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(31, 8, 27, 0.18);
  transition: transform 350ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 350ms ease, border-color 350ms ease;
  animation: memory-arrive 680ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.memory-card:nth-child(1) { animation-delay: 0ms; }
.memory-card:nth-child(2) { animation-delay: 70ms; }
.memory-card:nth-child(3) { animation-delay: 140ms; }
.memory-card:nth-child(4) { animation-delay: 210ms; }
.memory-card:nth-child(5) { animation-delay: 280ms; }
.memory-card:nth-child(6) { animation-delay: 350ms; }
.memory-card:nth-child(7) { animation-delay: 420ms; }
.memory-card:nth-child(8) { animation-delay: 490ms; }

@keyframes memory-arrive {
  from { opacity: 0; transform: translateY(24px) scale(0.96) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.memory-card:hover {
  z-index: 2;
  border-color: rgba(255, 224, 172, 0.82);
  box-shadow: 0 22px 48px rgba(31, 8, 27, 0.3), 0 0 25px rgba(245, 167, 197, 0.2);
  transform: translateY(-7px) rotate(-0.6deg);
}

.memory-card:nth-child(3n + 1) {
  grid-row: span 2;
}

.memory-card::after {
  position: absolute;
  z-index: 0;
  inset: 35% 0 0;
  background: linear-gradient(transparent 0%, rgba(28, 7, 23, 0.22) 35%, rgba(28, 7, 23, 0.88) 100%);
  content: "";
  pointer-events: none;
  transition: inset 350ms ease, opacity 350ms ease;
}

.memory-card::before {
  position: absolute;
  z-index: 1;
  top: -60%;
  left: -70%;
  width: 52%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 226, 0.24), transparent);
  content: "";
  pointer-events: none;
  transform: rotate(23deg);
}

.memory-card:hover::before {
  animation: memory-shine 900ms ease both;
}

@keyframes memory-shine {
  to { left: 130%; }
}

.memory-card:hover::after {
  inset: 18% 0 0;
}

.memory-label {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  left: 16px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  text-shadow: 0 2px 12px rgba(28, 7, 23, 0.55);
  transition: transform 300ms ease, color 300ms ease, text-shadow 300ms ease;
}

.memory-card:hover .memory-label {
  color: #fff1ce;
  text-shadow: 0 0 16px rgba(255, 212, 150, 0.58);
  transform: translateY(-5px);
}

.memory-lightbox {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
  place-items: center;
  padding: 24px;
  background: rgba(32, 9, 26, 0.82);
  backdrop-filter: blur(12px);
  animation: memory-backdrop-in 180ms ease both;
}

.memory-lightbox-card {
  position: relative;
  width: min(920px, 100%);
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 230, 200, 0.46);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 10% 0, rgba(245, 167, 197, 0.2), transparent 48%),
    linear-gradient(145deg, #6f3658, #35162f);
  box-shadow: 0 30px 100px rgba(13, 3, 10, 0.58);
  animation: memory-card-in 320ms cubic-bezier(0.18, 0.85, 0.25, 1.15) both;
}

.memory-lightbox-card::before,
.memory-lightbox-card::after {
  position: absolute;
  z-index: 1;
  color: rgba(255, 225, 165, 0.9);
  content: "✦";
  pointer-events: none;
  animation: memory-modal-sparkle 2.8s ease-in-out infinite;
}

.memory-lightbox-card::before {
  top: 18px;
  left: 22px;
  font-size: 1.25rem;
}

.memory-lightbox-card::after {
  top: 34px;
  left: 54px;
  color: rgba(255, 207, 223, 0.9);
  content: "♡";
  font-size: 0.9rem;
  animation-delay: -1.1s;
}

@keyframes memory-modal-sparkle {
  0%, 100% { opacity: 0.45; transform: translateY(2px) scale(0.86) rotate(-8deg); }
  50% { opacity: 1; transform: translateY(-4px) scale(1.12) rotate(8deg); }
}

.memory-lightbox-image {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: rgba(20, 7, 17, 0.45);
  animation: memory-image-reveal 600ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes memory-image-reveal {
  from { opacity: 0.55; transform: scale(0.975); filter: blur(5px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.memory-lightbox-copy {
  padding: clamp(20px, 4vw, 34px);
  text-align: center;
}

.memory-lightbox-copy h2 {
  margin: 11px 0 9px;
  color: var(--pink-light);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  animation: memory-caption-rise 600ms 120ms both;
}

.memory-lightbox-copy p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--cream);
  font-size: clamp(0.92rem, 2vw, 1.08rem);
  line-height: 1.85;
  animation: memory-caption-rise 650ms 220ms both;
}

@keyframes memory-caption-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.memory-lightbox-close {
  top: 12px;
  right: 12px;
  width: 42px;
  background: rgba(36, 13, 30, 0.74);
}

@keyframes memory-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes memory-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-card {
  padding: clamp(20px, 4vw, 38px);
  border-radius: 22px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 26px;
}

.game-info h2,
.content-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.game-info p,
.content-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.game-stat {
  display: flex;
  gap: 22px;
  margin: 18px 0;
}

.game-stat span {
  color: var(--muted);
  font-size: 0.78rem;
}

.game-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 1.1rem;
}

.puzzle-board {
  display: grid;
  width: min(100%, 570px);
  margin-inline: auto;
  aspect-ratio: 1;
  overflow: hidden;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 16px 44px rgba(39, 12, 29, 0.24);
}

.puzzle-piece {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border: 1px solid rgba(255, 244, 234, 0.73);
  border-radius: 0;
  background-color: #b75c7c;
  background-repeat: no-repeat;
  background-size: 400% 400%;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  transition: transform 170ms ease, filter 170ms ease;
}

.puzzle-piece.is-correct {
  border-color: rgba(255, 226, 158, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 158, 0.22);
}

.puzzle-piece:not(.is-correct):hover {
  z-index: 1;
  filter: brightness(1.13);
  transform: scale(1.035);
}

.puzzle-piece.is-selected {
  z-index: 2;
  outline: 4px solid #ffe29e;
  outline-offset: -4px;
  filter: brightness(1.19);
  transform: scale(0.94);
}

.puzzle-progress {
  height: 8px;
  overflow: hidden;
  margin-top: 13px;
  border-radius: 999px;
  background: rgba(255, 239, 228, 0.16);
}

.puzzle-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5a7c5, #f3d395);
  box-shadow: 0 0 12px rgba(243, 211, 149, 0.42);
  transition: width 280ms ease;
}

.puzzle-place-button {
  margin: 0 7px 12px 0;
}

.puzzle-place-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.puzzle-reference {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px 0;
  padding: 10px;
  border: 1px solid rgba(255, 230, 210, 0.19);
  border-radius: 14px;
  background: rgba(255, 247, 240, 0.055);
}

.puzzle-reference img {
  width: 90px;
  min-width: 90px;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 211, 149, 0.55);
  border-radius: 9px;
  cursor: zoom-in;
  object-fit: cover;
  box-shadow: 0 5px 16px rgba(25, 8, 21, 0.24);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.puzzle-reference img:hover,
.puzzle-reference img:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(25, 8, 21, 0.34), 0 0 15px rgba(243, 211, 149, 0.28);
  transform: scale(1.05);
}

.puzzle-reference strong,
.puzzle-reference span {
  display: block;
}

.puzzle-reference strong {
  margin-bottom: 5px;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.92rem;
}

.puzzle-reference span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.puzzle-preview-overlay {
  position: fixed;
  z-index: 25;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
  place-items: center end;
  padding: 24px;
  background: rgba(28, 8, 23, 0.84);
  backdrop-filter: blur(11px);
  animation: memory-backdrop-in 180ms ease both;
}

.puzzle-preview-card {
  position: relative;
  display: grid;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 230, 200, 0.48);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 12% 0, rgba(245, 167, 197, 0.19), transparent 48%),
    linear-gradient(145deg, #60304f, #32152d);
  box-shadow: 0 30px 100px rgba(13, 3, 10, 0.58);
  animation: memory-card-in 320ms cubic-bezier(0.18, 0.85, 0.25, 1.15) both;
}

.puzzle-preview-image {
  display: block;
  width: 100%;
  min-height: 0;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: rgba(20, 7, 17, 0.56);
  animation: memory-image-reveal 520ms ease both;
}

.puzzle-preview-caption {
  padding: 19px 24px 22px;
  text-align: center;
}

.puzzle-preview-caption h2 {
  margin: 7px 0 5px;
  color: var(--pink-light);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.puzzle-preview-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.puzzle-preview-close {
  top: 12px;
  right: 12px;
  width: 42px;
  background: rgba(36, 13, 30, 0.78);
}

.reward-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 22px;
  background: rgba(39, 14, 31, 0.76);
  backdrop-filter: blur(12px);
}

.puzzle-achievement-overlay {
  align-items: start;
}

.puzzle-reward-card {
  position: relative;
  width: min(740px, 100%);
  overflow: hidden;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(255, 229, 193, 0.55);
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(221, 123, 158, 0.34), transparent 49%),
    linear-gradient(145deg, #713351, #40182f);
  box-shadow: 0 30px 100px rgba(13, 3, 10, 0.48);
  text-align: center;
  animation: reward-pop 480ms cubic-bezier(0.18, 0.85, 0.25, 1.2) both;
}

.puzzle-achievement-card {
  width: min(680px, 100%);
  border: 1px solid rgba(255, 228, 169, 0.8);
  background:
    radial-gradient(ellipse at 50% 14%, rgba(255, 221, 151, 0.27), transparent 32%),
    radial-gradient(ellipse at 50% 100%, rgba(225, 109, 157, 0.25), transparent 47%),
    linear-gradient(145deg, #55203f, #291329 72%);
  box-shadow: 0 0 0 7px rgba(255, 219, 154, 0.08), 0 30px 110px rgba(13, 3, 10, 0.68);
}

.achievement-crown {
  display: flex;
  width: min(210px, 65%);
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin: 0 auto 16px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 226, 165, 0.58);
  border-radius: 999px;
  color: #fff0bd;
  background: linear-gradient(100deg, rgba(255, 225, 166, 0.17), rgba(255, 255, 255, 0.04), rgba(255, 225, 166, 0.17));
  box-shadow: 0 0 28px rgba(255, 211, 134, 0.16), inset 0 0 16px rgba(255, 224, 171, 0.08);
}

.achievement-crown span {
  color: #ffe2a1;
  font-size: 1.2rem;
  animation: achievement-sparkle 1.8s ease-in-out infinite alternate;
}

.achievement-crown strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
}

.puzzle-achievement-card > .eyebrow {
  color: #ffe6a9;
  letter-spacing: 0.2em;
}

.puzzle-achievement-card h2 {
  color: #fff4dd;
  text-shadow: 0 3px 24px rgba(255, 202, 129, 0.28);
}

.puzzle-achievement-card .reward-lede {
  color: rgba(255, 245, 231, 0.8);
}

.achievement-photo-frame {
  position: relative;
  width: min(330px, 84%);
  margin: 22px auto 20px;
  padding: 9px;
  border: 1px solid rgba(255, 232, 182, 0.8);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff0c5, #d99a62 46%, #fff2cc);
  box-shadow: 0 0 0 5px rgba(255, 226, 169, 0.1), 0 16px 44px rgba(8, 2, 8, 0.5);
  transform: rotate(-1deg);
}

.achievement-photo-glow {
  position: absolute;
  z-index: -1;
  inset: -20px;
  border-radius: 50%;
  background: rgba(255, 209, 133, 0.24);
  filter: blur(30px);
  animation: achievement-glow 2.8s ease-in-out infinite alternate;
}

.achievement-photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1.32;
  border: 3px solid rgba(255, 249, 229, 0.9);
  border-radius: 15px;
  object-fit: cover;
}

.memory-video-slot {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.memory-video-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  background: rgba(20, 7, 17, 0.72);
  border: 1px solid rgba(243, 211, 149, 0.37);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}

.memory-video-frame video,
.memory-video-empty {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(20, 7, 17, 0.72);
}

.memory-video-frame video {
  min-height: 0;
  object-fit: contain;
}

.memory-video-toolbar {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  left: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  pointer-events: none;
}

.memory-video-toolbar button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 235, 221, 0.42);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(40, 13, 33, 0.9);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  pointer-events: auto;
}

.memory-video-toolbar button:hover,
.memory-video-toolbar button:focus-visible {
  border-color: var(--gold);
  background: rgba(145, 42, 91, 0.96);
}

.memory-video-frame.is-expanded {
  position: relative;
  display: grid;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
  border-color: rgba(255, 224, 190, 0.78);
  box-shadow: 0 24px 100px rgba(5, 1, 5, 0.72), 0 0 35px rgba(239, 143, 188, 0.15);
}

.memory-video-frame.is-expanded video {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: min(78vh, 900px);
  aspect-ratio: 16 / 9;
}

.memory-video-empty {
  position: absolute;
  inset: 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px;
  color: var(--cream);
  background: linear-gradient(rgba(38, 15, 34, 0.58), rgba(38, 15, 34, 0.9));
  text-align: center;
  pointer-events: none;
}

.memory-video-empty > span {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  padding-left: 3px;
  border: 1px solid rgba(243, 211, 149, 0.65);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 248, 239, 0.08);
}

.memory-video-empty small {
  max-width: 250px;
  color: var(--muted);
  line-height: 1.5;
}

.memory-video-empty code {
  color: var(--gold);
}

.achievement-photo-caption {
  display: block;
  padding: 10px 5px 2px;
  color: #512742;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.achievement-stats {
  display: flex;
  width: min(470px, 100%);
  justify-content: center;
  gap: clamp(12px, 5vw, 34px);
  margin: 0 auto 18px;
  padding: 13px 8px;
  border-block: 1px solid rgba(255, 227, 174, 0.22);
}

.achievement-stats span {
  display: grid;
  gap: 5px;
}

.achievement-stats strong {
  color: #ffe2a1;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1rem, 4vw, 1.35rem);
}

.achievement-stats small {
  color: rgba(255, 242, 223, 0.67);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.achievement-message {
  max-width: 490px;
  margin: 0 auto 16px;
  color: #fff1db;
  font-size: 0.92rem;
  line-height: 1.75;
}

.puzzle-achievement-card .reward-signature {
  color: #ffe2a1;
}

.achievement-claim-button {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 242, 202, 0.8);
  color: #54223e;
  background: linear-gradient(110deg, #ffe7ad, #ffd1a0 52%, #fff0cb);
  box-shadow: 0 7px 26px rgba(255, 200, 135, 0.26);
}

.achievement-claim-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

@keyframes achievement-sparkle {
  to { opacity: 0.55; transform: scale(0.8) rotate(16deg); }
}

@keyframes achievement-glow {
  to { opacity: 0.55; transform: scale(0.92); }
}

@keyframes reward-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reward-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 15px;
  width: 36px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.4rem;
}

.reward-ornament {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 1.25rem;
  letter-spacing: 0.3em;
}

.puzzle-reward-card h2 {
  margin: 13px 0 9px;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1.16;
}

.reward-lede {
  max-width: 560px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.reward-signature {
  margin: 0 0 17px;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.94rem;
}

.reward-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.reward-confetti span {
  position: absolute;
  top: -18px;
  left: var(--confetti-left);
  color: var(--confetti-color);
  animation: confetti-fall 2.7s ease-in var(--confetti-delay) both;
  font-size: 17px;
}

@keyframes confetti-fall {
  to { transform: translate3d(24px, 110vh, 0) rotate(540deg); opacity: 0; }
}

.notice {
  min-height: 1.5em;
  margin: 11px 0 0;
  color: var(--gold) !important;
  font-size: 0.84rem;
}

.quiz-panel {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 48px);
  background:
    radial-gradient(ellipse at 8% 4%, rgba(245, 198, 216, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(111, 56, 94, 0.89), rgba(70, 35, 77, 0.94));
  animation: page-enter 350ms ease both;
}

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-score {
  color: var(--muted);
  font-size: 0.8rem;
}

.quiz-score strong {
  color: var(--gold);
  font-size: 1rem;
}

.quiz-progress {
  height: 8px;
  overflow: hidden;
  margin: 17px 0 27px;
  border-radius: 999px;
  background: rgba(255, 245, 234, 0.15);
}

.quiz-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5a7c5, #f3d395);
  transition: width 300ms ease;
}

.quiz-question {
  margin: 0 0 22px;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  line-height: 1.3;
}

.quiz-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.quiz-answer {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 235, 220, 0.2);
  border-radius: 14px;
  color: var(--cream);
  background: rgba(255, 248, 239, 0.055);
  cursor: pointer;
  line-height: 1.5;
  text-align: left;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.quiz-answer:hover:not(:disabled) {
  border-color: rgba(243, 211, 149, 0.64);
  background: rgba(255, 248, 239, 0.1);
  transform: translateY(-2px);
}

.quiz-answer:disabled {
  cursor: default;
}

.quiz-answer-letter {
  display: grid;
  width: 31px;
  min-width: 31px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(243, 211, 149, 0.4);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 700;
}

.quiz-answer.is-correct {
  border-color: #9ad6a5;
  background: rgba(99, 174, 120, 0.23);
}

.quiz-answer.is-wrong {
  border-color: #f39bae;
  background: rgba(193, 66, 99, 0.28);
}

.quiz-answer-mark {
  margin-left: auto;
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 700;
}

.quiz-feedback {
  min-height: 1.6em;
  margin: 17px 0 0;
  color: #c3ebc8;
  font-size: 0.86rem;
}

.quiz-feedback.is-error {
  color: #ffc1d0;
}

.quiz-feedback-media {
  display: grid;
  min-height: 150px;
  place-items: center;
  margin: 12px auto 16px;
}

.quiz-feedback-media img {
  display: block;
  width: min(300px, 100%);
  max-height: 190px;
  border: 1px solid rgba(255, 235, 220, 0.2);
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 12px 30px rgba(22, 6, 20, 0.22);
  animation: quiz-gif-pop 380ms cubic-bezier(0.18, 0.85, 0.25, 1.2) both;
}

.quiz-feedback-media.is-correct img {
  border-color: rgba(154, 214, 165, 0.62);
}

.quiz-feedback-media.is-wrong img {
  border-color: rgba(243, 155, 174, 0.58);
}

@keyframes quiz-gif-pop {
  from { opacity: 0; transform: scale(0.86) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.quiz-next-button {
  margin-top: 6px;
}

.quiz-final-gift {
  display: flex;
  max-width: 490px;
  align-items: center;
  gap: 18px;
  margin: 21px auto;
  padding: 13px;
  border: 1px solid rgba(243, 211, 149, 0.37);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.quiz-final-gift img {
  width: 92px;
  min-width: 92px;
  aspect-ratio: 1;
  border: 2px solid rgba(243, 211, 149, 0.7);
  border-radius: 50%;
  object-fit: cover;
}

.quiz-final-gift p {
  margin: 0;
  color: var(--pink-light);
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.65;
}

.wish-layout,
.teacher-layout,
.video-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 24px;
}

.wish-form {
  display: grid;
  gap: 12px;
}

.field-label {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
}

.text-field,
.text-area {
  width: 100%;
  border: 1px solid rgba(255, 236, 224, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--cream);
  background: rgba(31, 9, 25, 0.52);
}

.text-field::placeholder,
.text-area::placeholder {
  color: rgba(232, 207, 220, 0.55);
}

.text-area {
  min-height: 112px;
  resize: vertical;
}

.wish-list {
  display: grid;
  max-height: 460px;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.wish-sync-status {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  margin: -8px 0 21px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 236, 224, 0.19);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.76rem;
  line-height: 1.5;
}

.wish-sync-status::before {
  width: 8px;
  min-width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e8c98c;
  box-shadow: 0 0 10px currentColor;
  content: "";
}

.wish-sync-status[data-state="success"] {
  border-color: rgba(163, 223, 174, 0.36);
  color: #c6efcc;
}

.wish-sync-status[data-state="success"]::before {
  background: #a6e4ae;
}

.wish-sync-status[data-state="warning"],
.wish-sync-status[data-state="error"] {
  border-color: rgba(255, 190, 204, 0.35);
  color: #ffd0dc;
}

.wish-sync-status[data-state="warning"]::before,
.wish-sync-status[data-state="error"]::before {
  background: #ff9db8;
}

.wish-card {
  padding: 16px 18px;
  border-radius: 14px;
  animation: wish-card-enter 420ms ease both;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.wish-card:hover {
  border-color: rgba(243, 211, 149, 0.55);
  box-shadow: 0 10px 25px rgba(25, 6, 22, 0.18);
  transform: translateX(4px);
}

.wish-card:nth-child(2n) {
  animation-delay: 70ms;
}

.wish-card:nth-child(3n) {
  animation-delay: 130ms;
}

.wish-empty {
  padding: 22px;
  border: 1px dashed rgba(255, 223, 191, 0.28);
  border-radius: 16px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

@keyframes wish-card-enter {
  from { opacity: 0; transform: translateY(9px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wish-card p {
  margin: 0;
  color: var(--cream);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.wish-card span {
  display: block;
  margin-top: 9px;
  color: var(--gold);
  font-size: 0.75rem;
}

.teacher-photo {
  width: 100%;
  max-height: 440px;
  aspect-ratio: 0.9;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.teacher-photo-column {
  min-width: 0;
}

.teacher-photo-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.teacher-photo-trigger {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 201, 0.48);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(237, 136, 178, 0.25), rgba(71, 24, 56, 0.8));
  box-shadow: 0 16px 42px rgba(21, 5, 17, 0.32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.teacher-photo-trigger::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 231, 209, 0.16);
  border-radius: inherit;
  content: "";
  pointer-events: none;
  transition: box-shadow 300ms ease, border-color 300ms ease;
}

.teacher-photo-trigger:hover::after,
.teacher-photo-trigger:focus-visible::after {
  border-color: rgba(255, 226, 169, 0.85);
  box-shadow: inset 0 0 38px rgba(255, 200, 223, 0.2), 0 0 28px rgba(247, 162, 198, 0.22);
}

.teacher-photo-trigger:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.teacher-photo-trigger .teacher-photo {
  display: block;
  max-height: 470px;
  border: 0;
  border-radius: inherit;
  cursor: pointer;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 500ms ease;
}

.teacher-photo-trigger:hover .teacher-photo,
.teacher-photo-trigger:focus-visible .teacher-photo {
  filter: saturate(1.1) brightness(1.05);
  transform: scale(1.035);
}

.teacher-photo-hint {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 231, 215, 0.35);
  border-radius: 999px;
  color: #fff8f2;
  background: rgba(49, 16, 40, 0.76);
  backdrop-filter: blur(8px);
  font-size: 0.77rem;
  letter-spacing: 0.025em;
  opacity: 0.9;
  transition: opacity 220ms ease, transform 220ms ease;
}

.teacher-photo-trigger:hover .teacher-photo-hint,
.teacher-photo-trigger:focus-visible .teacher-photo-hint {
  opacity: 1;
  transform: translateY(-2px);
}

.teacher-photo-blooms,
.teacher-effect-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.teacher-photo-blooms span {
  position: absolute;
  z-index: 0;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 241, 221, 0.6);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 243, 223, 0.92), rgba(248, 164, 202, 0.88));
  box-shadow: 0 7px 20px rgba(31, 8, 25, 0.28), 0 0 19px rgba(255, 201, 225, 0.22);
  font-size: 1.5rem;
  opacity: 0;
  transform: scale(0.25) rotate(-35deg);
  transition: opacity 320ms ease, transform 520ms cubic-bezier(0.18, 0.85, 0.25, 1.2);
}

.teacher-photo-blooms span:nth-child(1) { top: 5%; left: -20px; transition-delay: 0ms; }
.teacher-photo-blooms span:nth-child(2) { top: 23%; right: -18px; transition-delay: 45ms; }
.teacher-photo-blooms span:nth-child(3) { top: 46%; left: -26px; transition-delay: 90ms; }
.teacher-photo-blooms span:nth-child(4) { top: 65%; right: -22px; transition-delay: 135ms; }
.teacher-photo-blooms span:nth-child(5) { top: 80%; left: -14px; transition-delay: 180ms; }
.teacher-photo-blooms span:nth-child(6) { top: 2%; right: 12%; transition-delay: 225ms; }

.teacher-photo-stage:has(.teacher-photo-trigger:active) .teacher-photo-blooms span,
.teacher-photo-stage.is-celebrating .teacher-photo-blooms span {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.teacher-effect-layer {
  z-index: 5;
  overflow: hidden;
}

.teacher-effect-particle {
  position: absolute;
  top: var(--particle-y);
  left: var(--particle-x);
  display: block;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.teacher-photo-flower {
  z-index: 1;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  filter: drop-shadow(0 3px 9px rgba(55, 12, 39, 0.4));
  animation: teacher-flower-bloom 1250ms cubic-bezier(0.16, 0.8, 0.25, 1) var(--particle-delay) both;
}

.teacher-icon-rain {
  z-index: 2;
  font-size: clamp(0.95rem, 2.2vw, 1.45rem);
  filter: drop-shadow(0 2px 6px rgba(68, 14, 47, 0.44));
  animation: teacher-icon-rain var(--fall-duration, 1800ms) linear var(--particle-delay) both;
}

.teacher-love-float,
.teacher-flower-float {
  z-index: 4;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 700;
  filter: drop-shadow(0 3px 8px rgba(53, 8, 37, 0.4));
  animation: teacher-love-rise var(--float-duration, 1500ms) cubic-bezier(0.18, 0.65, 0.3, 1) var(--particle-delay) both;
}

.teacher-love-float {
  color: #ffdbec;
  text-shadow: 0 0 12px rgba(255, 164, 203, 0.72);
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
}

.teacher-flower-float {
  font-size: clamp(1.4rem, 3.8vw, 2.4rem);
}

.teacher-firework-spark {
  z-index: 3;
  color: hsl(var(--spark-hue, 340deg) 100% 82%);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  text-shadow: 0 0 14px currentColor, 0 0 26px rgba(255, 201, 95, 0.7);
  animation: teacher-firework-burst 850ms cubic-bezier(0.12, 0.75, 0.2, 1) var(--particle-delay) both;
}

@keyframes teacher-flower-bloom {
  0% { opacity: 0; transform: translate(-50%, 16px) scale(0.25) rotate(-35deg); }
  38% { opacity: 1; transform: translate(-50%, -8px) scale(1.18) rotate(10deg); }
  68% { opacity: 1; transform: translate(-50%, -4px) scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -38px) scale(0.86) rotate(16deg); }
}

@keyframes teacher-icon-rain {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-24deg) scale(0.65); }
  12% { opacity: 0.95; }
  83% { opacity: 0.82; }
  100% { opacity: 0; transform: translate3d(var(--fall-sway, 0px), var(--fall-distance, 420px), 0) rotate(300deg) scale(1.1); }
}

@keyframes teacher-love-rise {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.45) rotate(-12deg); }
  16% { opacity: 1; transform: translate(-50%, -14px) scale(1.16) rotate(6deg); }
  76% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--float-drift, 0px)), calc(-1 * var(--float-rise, 220px))) scale(0.82) rotate(18deg); }
}

@keyframes teacher-firework-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15) rotate(0); }
  24% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(35deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(0.3) rotate(130deg); }
}

.teacher-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.teacher-action-item {
  display: grid;
  justify-items: stretch;
  gap: 7px;
}

.teacher-action-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 226, 203, 0.31);
  border-radius: 14px;
  color: var(--cream);
  background: linear-gradient(145deg, rgba(134, 55, 98, 0.82), rgba(76, 26, 59, 0.9));
  box-shadow: 0 7px 20px rgba(28, 5, 22, 0.2);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.teacher-action-button:hover,
.teacher-action-button:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(28, 5, 22, 0.3), 0 0 18px rgba(246, 172, 205, 0.2);
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.teacher-action-button:active {
  transform: translateY(1px) scale(0.97);
}

.teacher-action-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.teacher-action-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.teacher-like-button .teacher-action-icon {
  color: #ffb5d1;
  animation: wish-heartbeat 1.8s ease-in-out infinite;
}

.teacher-flower-button .teacher-action-icon {
  animation: flower-sway 2.5s ease-in-out infinite;
}

.teacher-infinity-count {
  display: flex;
  min-height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 224, 174, 0.55);
  border-radius: 11px;
  background: linear-gradient(100deg, rgba(255, 210, 230, 0.16), rgba(255, 227, 174, 0.12));
  box-shadow: inset 0 0 16px rgba(255, 216, 183, 0.06), 0 0 16px rgba(244, 162, 199, 0.12);
  animation: teacher-infinity-glow 2.4s ease-in-out infinite;
}

.teacher-count-label {
  color: rgba(255, 241, 225, 0.78);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.teacher-count-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff0c8;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-shadow: 0 0 13px rgba(255, 225, 169, 0.43);
}

.teacher-count-value > span {
  color: #ffc0d8;
  font-size: 0.94rem;
  filter: drop-shadow(0 0 5px rgba(255, 148, 191, 0.6));
}

.teacher-action-item:nth-child(2) .teacher-infinity-count {
  animation-delay: 150ms;
}

@keyframes teacher-infinity-glow {
  0%, 100% { box-shadow: inset 0 0 16px rgba(255, 216, 183, 0.06), 0 0 12px rgba(244, 162, 199, 0.1); }
  50% { box-shadow: inset 0 0 20px rgba(255, 216, 183, 0.11), 0 0 22px rgba(244, 162, 199, 0.24); }
}

.teacher-infinity-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  color: #ffe4c3;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.teacher-infinity-note span {
  color: #ffb7d3;
  filter: drop-shadow(0 0 7px rgba(255, 170, 204, 0.55));
}

.teacher-blessings {
  display: grid;
  gap: 10px;
  margin: 23px 0 20px;
}

.teacher-blessings-title {
  margin-bottom: 1px;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.035em;
}

.content-panel .teacher-blessings p {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 225, 205, 0.17);
  border-radius: 13px;
  color: rgba(255, 243, 237, 0.88);
  background: linear-gradient(110deg, rgba(247, 174, 204, 0.1), rgba(255, 231, 200, 0.045));
  font-size: 0.88rem;
  line-height: 1.7;
  animation: teacher-blessing-enter 500ms ease both;
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.content-panel .teacher-blessings p:nth-of-type(2) {
  animation-delay: 90ms;
}

.content-panel .teacher-blessings p:nth-of-type(3) {
  animation-delay: 180ms;
}

.content-panel .teacher-blessings p:hover {
  border-color: rgba(243, 211, 149, 0.42);
  background: linear-gradient(110deg, rgba(247, 174, 204, 0.16), rgba(255, 231, 200, 0.08));
  transform: translateX(4px);
}

.teacher-blessings p > span {
  color: #ffd4e4;
  font-size: 1.08rem;
  filter: drop-shadow(0 0 7px rgba(255, 187, 216, 0.32));
}

@keyframes teacher-blessing-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.teacher-signoff {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 21px 0 0 !important;
  color: #ffd4e4 !important;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
}

.teacher-signoff span {
  color: #ff9dc4;
  font-size: 1.35rem;
  animation: wish-heartbeat 1.8s ease-in-out infinite;
}

.teacher-quote {
  position: relative;
  margin: 21px 0 24px;
  padding: 18px 19px 18px 24px;
  border: 1px solid rgba(243, 211, 149, 0.26);
  border-left: 3px solid var(--gold);
  border-radius: 0 16px 16px 0;
  color: #ffe4ef !important;
  background: linear-gradient(110deg, rgba(244, 157, 190, 0.13), rgba(255, 229, 206, 0.045));
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.08rem, 2.1vw, 1.42rem);
  font-style: italic;
  line-height: 1.72;
  box-shadow: 0 10px 24px rgba(21, 5, 17, 0.12);
}

.teacher-quote::before {
  position: absolute;
  top: -13px;
  left: 12px;
  color: var(--gold);
  content: "❝";
  font-size: 2rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .content-panel .teacher-blessings p {
    padding: 10px 11px;
    font-size: 0.82rem;
  }

  .teacher-blessings-title {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .teacher-signoff {
    font-size: 1.1rem;
  }

  .teacher-quote {
    padding: 16px 14px 15px 19px;
    font-size: 1.08rem;
  }
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(243, 211, 149, 0.37);
  border-radius: 18px;
  background: #190b17;
  box-shadow: var(--shadow);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}

.video-frame video {
  display: block;
  width: 100%;
  min-height: 210px;
  max-height: 420px;
  aspect-ratio: 16 / 9;
  background: #251120;
  object-fit: contain;
}

.video-zoom-toggle {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 11px;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 235, 221, 0.4);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(40, 13, 33, 0.82);
  box-shadow: 0 4px 15px rgba(17, 5, 14, 0.24);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  transition: background 180ms ease, transform 180ms ease;
}

.video-zoom-toggle:hover,
.video-zoom-toggle:focus-visible {
  background: rgba(145, 42, 91, 0.96);
  transform: translateY(-1px);
}

.video-zoom-toggle span:first-child {
  color: var(--gold);
  font-size: 1.05rem;
}

.video-theater-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  animation: memory-backdrop-in 180ms ease both;
}

.video-theater-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(20, 5, 18, 0.88);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.video-theater-content {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  animation: memory-card-in 280ms cubic-bezier(0.18, 0.85, 0.25, 1.15) both;
}

.video-frame.is-expanded {
  border-color: rgba(255, 224, 190, 0.78);
  box-shadow: 0 24px 100px rgba(5, 1, 5, 0.72), 0 0 35px rgba(239, 143, 188, 0.15);
}

.video-frame.is-expanded video {
  min-height: 0;
  max-height: min(78vh, 900px);
}

.video-caption {
  padding: 13px 16px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.65;
}

.video-upload {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(243, 211, 149, 0.5);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.gift-stage {
  position: relative;
  display: grid;
  min-height: 300px;
  align-content: center;
  justify-items: center;
  margin-top: 18px;
  perspective: 700px;
  isolation: isolate;
}

.gift-stage::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(320px, 94%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 126, 174, 0.2), rgba(244, 126, 174, 0.055) 48%, transparent 72%);
  content: "";
  opacity: 0.72;
  transform: translate(-50%, -53%) scale(0.86);
  transition: opacity 500ms ease, transform 700ms ease;
}

.gift-stage.is-open::before {
  opacity: 1;
  transform: translate(-50%, -53%) scale(1.12);
}

.gift-sticker {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255, 237, 217, 0.68);
  border-radius: 50%;
  color: #8e315e;
  background: linear-gradient(145deg, #fff4e5, #ffc4d8);
  box-shadow: 0 7px 19px rgba(34, 7, 25, 0.25), 0 0 15px rgba(255, 205, 226, 0.18);
  font-size: 1.35rem;
  opacity: 0.92;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 500ms ease;
  animation: gift-sticker-drift 3.2s ease-in-out infinite;
}

.gift-sticker-flower {
  top: 9%;
  left: 10%;
  transform: rotate(-13deg);
}

.gift-sticker-heart {
  top: 2%;
  right: 15%;
  color: #cf4d82;
  font-size: 2rem;
  animation-delay: -0.8s;
}

.gift-sticker-class {
  top: 42%;
  left: 1%;
  width: 55px;
  height: 55px;
  border-radius: 18px 50% 50%;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  transform: rotate(-9deg);
  animation-delay: -1.7s;
}

.gift-sticker-star {
  top: 30%;
  right: 4%;
  color: #d9a744;
  font-size: 2.1rem;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  animation-delay: -1.2s;
}

.gift-sticker-bloom {
  top: 71%;
  left: 12%;
  animation-delay: -2.1s;
}

.gift-sticker-date {
  top: 72%;
  right: 12%;
  width: 54px;
  height: 54px;
  border-radius: 17px 50% 50%;
  color: #a53a6d;
  font-size: 0.72rem;
  font-weight: 700;
  transform: rotate(9deg);
  animation-delay: -0.5s;
}

.gift-sticker-sparkle {
  top: 14%;
  right: 31%;
  width: 28px;
  height: 28px;
  border: 0;
  color: #ffe7a9;
  background: transparent;
  box-shadow: none;
  animation-delay: -2.6s;
}

.gift-stage.is-open .gift-sticker {
  box-shadow: 0 9px 25px rgba(34, 7, 25, 0.24), 0 0 25px rgba(255, 205, 226, 0.48);
}

.gift-stage.is-open .gift-sticker-flower {
  transform: translate(-6px, -9px) rotate(-23deg) scale(1.16);
}

.gift-stage.is-open .gift-sticker-heart {
  transform: translate(5px, -11px) rotate(12deg) scale(1.28);
}

.gift-stage.is-open .gift-sticker-class {
  transform: translate(-6px, -4px) rotate(-15deg) scale(1.08);
}

.gift-stage.is-open .gift-sticker-star {
  transform: translate(8px, -8px) rotate(16deg) scale(1.25);
}

.gift-stage.is-open .gift-sticker-bloom {
  transform: translate(-5px, 4px) rotate(-12deg) scale(1.15);
}

.gift-stage.is-open .gift-sticker-date {
  transform: translate(6px, 4px) rotate(14deg) scale(1.1);
}

.gift-stage.is-open .gift-sticker-sparkle {
  transform: translate(4px, -7px) rotate(24deg) scale(1.4);
}

@keyframes gift-sticker-drift {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -7px; }
}

.gift-box {
  position: relative;
  width: 150px;
  height: 108px;
  margin-top: 44px;
  border: 3px solid #f6c47a;
  border-radius: 5px 5px 13px 13px;
  background: linear-gradient(110deg, #bd3d70, #902b5a 60%, #7b204f);
  box-shadow: 0 24px 45px rgba(15, 4, 13, 0.38);
  transition: box-shadow 500ms ease, transform 500ms ease;
}

.gift-box.is-open {
  box-shadow: 0 24px 55px rgba(15, 4, 13, 0.32), 0 0 35px rgba(252, 151, 196, 0.42);
  transform: translateY(-5px);
}

.gift-box::before,
.gift-box::after {
  position: absolute;
  content: "";
}

.gift-box::before {
  top: 0;
  bottom: 0;
  left: 43%;
  width: 18px;
  background: linear-gradient(90deg, #f2ca88, #ffe8b8, #d4a75f);
}

.gift-box::after {
  z-index: 1;
  top: 41%;
  right: 0;
  left: 0;
  height: 18px;
  background: linear-gradient(90deg, #f2ca88, #ffe8b8, #d4a75f);
}

.gift-lid {
  position: absolute;
  z-index: 2;
  top: -25px;
  left: -11px;
  width: 166px;
  height: 35px;
  border: 3px solid #f6c47a;
  border-radius: 7px;
  background: linear-gradient(110deg, #e15f8f, #bd3d70 55%, #a32f65);
  transform-origin: 8% 80%;
  transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gift-bow {
  position: absolute;
  z-index: 3;
  top: -58px;
  left: 52px;
  color: #ffe3a8;
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(54, 15, 37, 0.48);
}

.gift-box.is-open .gift-lid {
  transform: rotate(-35deg) translate(-29px, -38px);
}

.gift-box.is-open .gift-bow {
  animation: gift-bow-sparkle 900ms ease-in-out infinite alternate;
}

@keyframes gift-bow-sparkle {
  from { filter: drop-shadow(0 0 3px rgba(255, 227, 168, 0.25)); transform: rotate(-8deg) scale(0.95); }
  to { filter: drop-shadow(0 0 13px rgba(255, 227, 168, 0.9)); transform: rotate(8deg) scale(1.12); }
}

.gift-dedication {
  margin: 12px 0 -13px;
  color: #f4cbdc;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-align: center;
  transition: color 300ms ease, text-shadow 300ms ease;
}

.gift-stage.is-open .gift-dedication {
  color: #ffe6b7;
  text-shadow: 0 0 15px rgba(255, 216, 162, 0.5);
}

.gift-message {
  max-width: 380px;
  min-height: 3em;
  margin: 25px 0 15px;
  color: var(--pink-light) !important;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.5;
  text-align: center;
}

.timeline-page {
  max-width: 1040px;
}

.timeline-heading {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
  animation: page-enter 470ms ease both;
}

.timeline-heading h1 {
  margin: 12px 0;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1.1;
}

.timeline-heading > p {
  max-width: 630px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.school-timeline {
  position: relative;
  display: grid;
  gap: 23px;
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 0 12px;
}

.school-timeline::before {
  position: absolute;
  top: 28px;
  bottom: 60px;
  left: 35px;
  width: 2px;
  background: linear-gradient(180deg, rgba(243, 211, 149, 0.25), rgba(243, 211, 149, 0.72) 65%, rgba(239, 143, 188, 0.82));
  content: "";
}

.timeline-card {
  position: relative;
  margin-left: 94px;
  border: 1px solid rgba(255, 230, 210, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 241, 234, 0.09), rgba(255, 222, 232, 0.035));
  box-shadow: 0 15px 44px rgba(28, 7, 23, 0.19);
  animation: memory-arrive 540ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.timeline-card--early {
  display: grid;
  min-height: 178px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 155px;
  gap: 20px;
  padding: 20px 22px;
}

.timeline-card--early:nth-child(2) {
  animation-delay: 100ms;
}

.timeline-year-marker {
  position: absolute;
  z-index: 1;
  top: 28px;
  left: -94px;
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(243, 211, 149, 0.68);
  border-radius: 50%;
  color: var(--gold);
  background: linear-gradient(145deg, rgba(112, 41, 79, 0.98), rgba(57, 20, 47, 0.98));
  box-shadow: 0 0 0 7px rgba(76, 24, 56, 0.45), 0 8px 24px rgba(20, 4, 16, 0.26);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
}

.timeline-card-copy .eyebrow,
.timeline-final-heading .eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.timeline-card-copy h2 {
  margin: 8px 0 7px;
  color: var(--cream);
  font-size: clamp(1.1rem, 2.2vw, 1.48rem);
}

.timeline-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.timeline-photo {
  display: block;
  width: 100%;
  object-fit: cover;
  border: 1px solid rgba(243, 211, 149, 0.35);
  background: linear-gradient(145deg, rgba(225, 116, 163, 0.24), rgba(76, 25, 56, 0.42));
}

.timeline-photo--small {
  height: 130px;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(26, 6, 20, 0.22);
}

.timeline-photo[role="button"],
.timeline-final-photo img[role="button"] {
  cursor: zoom-in;
}

.timeline-photo[role="button"]:focus-visible,
.timeline-final-photo img[role="button"]:focus-visible {
  outline: 3px solid #ffe3a8;
  outline-offset: 4px;
}

.timeline-card--final {
  margin-top: 4px;
  padding: clamp(24px, 4vw, 42px);
  border-color: rgba(243, 211, 149, 0.46);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 90% 0, rgba(239, 143, 188, 0.2), transparent 46%),
    linear-gradient(145deg, rgba(129, 48, 88, 0.53), rgba(55, 20, 45, 0.86));
  box-shadow: 0 24px 70px rgba(23, 5, 18, 0.32), 0 0 32px rgba(239, 143, 188, 0.08);
  animation-delay: 190ms;
}

.timeline-year-marker--final {
  top: 39px;
  left: -94px;
  width: 78px;
  border-color: #ffe3a8;
  color: #fff0c9;
  background: linear-gradient(145deg, #d45d91, #873463);
  box-shadow: 0 0 0 8px rgba(76, 24, 56, 0.5), 0 0 31px rgba(255, 179, 211, 0.36);
  font-size: 1.65rem;
}

.timeline-final-heading {
  max-width: 700px;
  margin: 0 auto 24px;
  text-align: center;
}

.timeline-final-heading h2 {
  margin: 8px 0 0;
  color: #ffe1ed;
  font-size: clamp(4.2rem, 11vw, 7.8rem);
  line-height: 0.96;
  text-shadow: 0 8px 32px rgba(255, 167, 202, 0.2);
}

.timeline-final-heading h3 {
  margin: 9px 0 12px;
  color: var(--gold);
  font-size: clamp(1.25rem, 3vw, 1.9rem);
}

.timeline-final-heading p {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 241, 236, 0.83);
  font-size: 0.95rem;
  line-height: 1.8;
}

.timeline-final-media {
  position: relative;
  display: grid;
  min-height: 260px;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 15px;
  align-items: center;
}

.timeline-final-media-item {
  position: relative;
  height: 220px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 230, 210, 0.48);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(225, 116, 163, 0.22), rgba(76, 25, 56, 0.5));
  box-shadow: 0 15px 30px rgba(24, 5, 19, 0.3);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.timeline-final-video {
  transform: rotate(-3deg) translateY(8px);
}

.timeline-final-photo {
  z-index: 1;
  height: 255px;
  transform: translateY(-4px);
}

.timeline-final-video:last-of-type {
  transform: rotate(3deg) translateY(8px);
}

.timeline-final-media-item:hover {
  z-index: 2;
  box-shadow: 0 20px 38px rgba(24, 5, 19, 0.4), 0 0 22px rgba(255, 206, 226, 0.18);
  transform: translateY(-7px) rotate(0) scale(1.03);
}

.timeline-final-media-item img,
.timeline-final-media-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-final-media-item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 22px 12px 12px;
  color: #fff8f3;
  background: linear-gradient(transparent, rgba(31, 8, 24, 0.82));
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.88rem;
}

.timeline-final-video figcaption {
  bottom: 38px;
}

.timeline-final-media-item img[role="button"] {
  cursor: zoom-in;
}

.timeline-final-sticker {
  position: absolute;
  z-index: 3;
  top: -11px;
  right: -14px;
  display: grid;
  width: 66px;
  aspect-ratio: 1;
  align-content: center;
  border: 1px solid rgba(255, 235, 198, 0.8);
  border-radius: 50%;
  color: #84345e;
  background: linear-gradient(145deg, #fff0d2, #f5a8c9);
  box-shadow: 0 7px 22px rgba(27, 5, 19, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transform: rotate(11deg);
}

.timeline-final-note {
  margin-top: 20px;
  color: #ffe6b8;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  text-align: center;
}

.timeline-final-note span {
  margin-right: 5px;
  color: #ffc3db;
}

.timeline-actions {
  max-width: 900px;
  margin: 20px auto 0;
}

.site-footer {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 17px 0 24px;
  border-top: 1px solid rgba(255, 236, 224, 0.1);
  color: rgba(232, 207, 220, 0.65);
  font-size: 0.65rem;
  letter-spacing: 0.025em;
}

[hidden] {
  display: none !important;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
    gap: 20px;
  }

  .hero-art {
    min-height: 410px;
  }

  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-areas:
      "cloud star"
      "flower cap"
      "letter letter"
      "rainbow rainbow";
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card--letter {
    min-height: 190px;
    width: min(100%, 460px);
    justify-self: center;
    grid-column: span 2;
  }

  .feature-card--rainbow {
    grid-column: span 2;
  }

  .timeline-card--early {
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 15px;
  }

  .timeline-photo--small {
    height: 116px;
  }

  .timeline-final-media {
    gap: 10px;
  }

  .timeline-final-media-item {
    height: 190px;
  }

  .timeline-final-photo {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 30px);
    min-height: 70px;
  }

  .brand-mark {
    width: 36px;
    font-size: 21px;
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small {
    font-size: 0.56rem;
  }

  .header-actions {
    gap: 6px;
  }

  .header-button {
    min-height: 35px;
    padding: 0 10px;
    font-size: 0.69rem;
  }

  #app {
    position: relative;
    z-index: 1;
  }

  .page {
    width: calc(100% - 30px);
    min-height: calc(100vh - 122px);
    padding: 35px 0 48px;
  }

  .hero {
    min-height: initial;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .hero h1 {
    max-width: 500px;
    margin: 15px 0 12px;
    font-size: clamp(3.25rem, 14vw, 5rem);
  }

  .hero-lede {
    max-width: 500px;
    font-size: 0.9rem;
    line-height: 1.75;
  }

  .hero-date {
    margin: 17px 0 19px;
    font-size: 0.74rem;
  }

  .hero-art {
    min-height: 305px;
    margin: 0 2px;
  }

  .hero-photo {
    inset: 5px 26px 20px 35px;
  }

  .hero-photo--small {
    inset: auto;
    width: 34%;
    height: 30%;
  }

  .hero-photo--small-1 {
    bottom: 2px;
    left: 7px;
  }

  .hero-photo--small-2 {
    right: -3px;
    bottom: 34px;
    width: 29%;
    height: 26%;
  }

  .hero-stamp {
    top: 14px;
    width: 79px;
    font-size: 1.35rem;
  }

  .hero-side-note {
    right: 2px;
    bottom: 44px;
    font-size: 0.8rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 22px;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: clamp(2.1rem, 10vw, 3.4rem);
  }

  .timeline-heading {
    margin-bottom: 29px;
  }

  .timeline-heading h1 {
    font-size: clamp(2.35rem, 10vw, 3.3rem);
  }

  .timeline-heading > p {
    font-size: 0.86rem;
    line-height: 1.7;
  }

  .school-timeline {
    gap: 16px;
    padding-top: 4px;
  }

  .school-timeline::before {
    top: 21px;
    bottom: 45px;
    left: 22px;
  }

  .timeline-card {
    margin-left: 57px;
    border-radius: 19px;
  }

  .timeline-card--early {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 18px 15px;
  }

  .timeline-year-marker {
    top: 18px;
    left: -57px;
    width: 45px;
    border-width: 1px;
    box-shadow: 0 0 0 5px rgba(76, 24, 56, 0.45), 0 8px 24px rgba(20, 4, 16, 0.26);
    font-size: 1.05rem;
  }

  .timeline-card-copy h2 {
    font-size: 1.15rem;
  }

  .timeline-card-copy p {
    font-size: 0.77rem;
  }

  .timeline-photo--small {
    height: 128px;
  }

  .timeline-card--final {
    margin-top: 2px;
    padding: 23px 15px 20px;
    border-radius: 23px;
  }

  .timeline-year-marker--final {
    top: 21px;
    left: -57px;
    width: 48px;
    font-size: 1.15rem;
  }

  .timeline-final-heading {
    margin-bottom: 18px;
  }

  .timeline-final-heading h2 {
    font-size: clamp(4rem, 20vw, 6.3rem);
  }

  .timeline-final-heading h3 {
    font-size: 1.28rem;
  }

  .timeline-final-heading p {
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .timeline-final-media {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 2px 5px 0;
  }

  .timeline-final-media-item,
  .timeline-final-photo {
    height: 185px;
    border-radius: 15px;
  }

  .timeline-final-video,
  .timeline-final-photo,
  .timeline-final-video:last-of-type {
    transform: none;
  }

  .timeline-final-media-item figcaption {
    font-size: 0.8rem;
  }

  .timeline-final-video figcaption {
    bottom: 38px;
  }

  .timeline-final-sticker {
    top: -8px;
    right: -1px;
    width: 55px;
  }

  .timeline-final-note {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .timeline-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .section-heading p {
    font-size: 0.85rem;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .profile-card {
    padding: 7px;
    border-radius: 14px;
  }

  .profile-caption {
    padding: 9px 3px 2px;
  }

  .profile-caption strong {
    font-size: 0.98rem;
  }

  .profile-caption span {
    font-size: 0.63rem;
  }

  .profile-compliment {
    min-height: 48px;
    gap: 4px;
    margin-top: 8px;
    padding: 7px 6px;
    font-size: 0.66rem;
    line-height: 1.45;
  }

  .profile-compliment > span {
    font-size: 0.7rem;
  }

  .feature-grid {
    gap: 10px;
    grid-template-areas:
      "cloud star"
      "flower cap"
      "letter letter"
      "rainbow rainbow";
  }

  .feature-card {
    min-height: 188px;
    padding: 16px;
    border-radius: 16px;
  }

  .feature-card--cloud {
    border-radius: 35px 35px 15px 15px;
  }

  .feature-card--flower {
    border-radius: 34px 20px 34px 20px;
  }

  .feature-card--letter {
    width: min(100%, 320px);
    min-height: 170px;
    border-radius: 16px 16px 26px 16px;
    grid-column: span 2;
  }

  .feature-card--rainbow {
    min-height: 155px;
    grid-column: span 2;
  }

  .feature-icon {
    width: 40px;
    border-radius: 13px;
  }

  .feature-number {
    top: 19px;
    right: 16px;
    font-size: 0.8rem;
  }

  .feature-card strong {
    margin-top: 15px;
    font-size: 1.05rem;
  }

  .feature-card > span:last-child {
    font-size: 0.71rem;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 155px;
    gap: 10px;
  }

  .memory-card:nth-child(3n + 1) {
    grid-row: span 1;
  }

  .memory-card:first-child {
    grid-column: span 2;
  }

  .memory-label {
    right: 10px;
    bottom: 11px;
    left: 10px;
    font-size: 0.98rem;
  }

  .memory-lightbox {
    padding: 12px;
  }

  .memory-lightbox-card {
    border-radius: 18px;
  }

  .memory-lightbox-image {
    max-height: 60vh;
  }

  .memory-lightbox-copy {
    padding: 22px 17px;
  }

  .memory-lightbox-copy .eyebrow {
    font-size: 0.58rem;
  }

  .memory-lightbox-copy .eyebrow::before,
  .memory-lightbox-copy .eyebrow::after {
    width: 12px;
  }

  .game-layout,
  .wish-layout,
  .teacher-layout,
  .video-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-layout {
    display: flex;
    flex-direction: column;
  }

  .page--game {
    width: calc(100% - 30px);
  }

  .page--game .section-heading {
    margin-bottom: 18px;
  }

  .page--game .game-layout {
    gap: 15px;
    padding: 16px 12px 20px;
  }

  .page--game .puzzle-stage {
    order: -1;
    width: 100%;
  }

  .puzzle-board {
    width: 100%;
  }

  .page--game .puzzle-board {
    width: min(570px, calc(100% + 16px));
    max-width: calc(100vw - 24px);
    margin: 0 -8px;
    gap: 3px;
    padding: 5px;
    border: 1px solid rgba(255, 226, 183, 0.52);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255, 239, 220, 0.16), rgba(92, 34, 68, 0.34));
    box-shadow: 0 18px 42px rgba(24, 5, 19, 0.34), 0 0 24px rgba(255, 206, 226, 0.1);
  }

  .page--game .puzzle-piece {
    border-radius: 4px;
  }

  .puzzle-reference img {
    width: 75px;
    min-width: 75px;
  }

  .puzzle-place-button {
    margin-right: 0;
    margin-bottom: 9px;
  }

  .puzzle-reward-card {
    padding: 28px 16px 20px;
  }

  .achievement-photo-frame {
    width: min(300px, 88%);
    margin-block: 18px;
  }

  .achievement-stats {
    gap: 10px;
  }

  .quiz-panel {
    padding: 20px 15px;
  }

  .quiz-answers {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quiz-answer {
    min-height: 56px;
    padding: 9px 11px;
    font-size: 0.86rem;
  }

  .quiz-final-gift {
    gap: 12px;
  }

  .quiz-final-gift img {
    width: 70px;
    min-width: 70px;
  }

  .quiz-final-gift p {
    font-size: 0.9rem;
  }

  .teacher-photo {
    max-height: 340px;
    aspect-ratio: 1.15;
  }

  .video-frame video {
    min-height: 175px;
  }

  .gift-stage {
    min-height: 240px;
  }

  .site-footer {
    width: calc(100% - 30px);
    flex-direction: column;
    gap: 5px;
    font-size: 0.61rem;
  }
}

@media (max-width: 700px) and (hover: none) {
  body::before,
  body::after,
  .site-glow--one,
  .site-glow--two,
  .easter-sticker,
  .easter-sticker--secret,
  .intro-wish-icon,
  .hero-stamp,
  .section-heading h1::after,
  .profile-compliment > span,
  .hall-intro::after,
  .feature-grid::before,
  .feature-grid::after,
  .feature-card,
  .feature-card::before,
  .feature-card .feature-icon,
  .feature-card .feature-icon svg,
  .teacher-like-button .teacher-action-icon,
  .teacher-flower-button .teacher-action-icon,
  .teacher-infinity-count,
  .gift-sticker,
  .gift-box.is-open .gift-bow {
    animation-play-state: paused;
  }

  .page {
    animation-play-state: running, paused;
  }

  .profile-card,
  .memory-card,
  .wish-card {
    animation: none;
  }

  .class-photo-bg img {
    filter: none;
  }
}

@media (min-width: 1001px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .feature-card:active {
    transform: translateY(-2px) scale(0.985);
    transition-duration: 100ms;
  }

  .memory-card img[data-memory-open] {
    transition: transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1), filter 500ms ease;
  }

  .memory-card:hover img[data-memory-open] {
    filter: brightness(1.08) saturate(1.16) contrast(1.025);
    transform: scale(1.075);
  }

  .memory-card:active {
    transform: translateY(-2px) scale(0.985);
    transition-duration: 100ms;
  }

  .memory-lightbox {
    background:
      radial-gradient(ellipse at 50% 42%, rgba(255, 207, 223, 0.22), transparent 34%),
      radial-gradient(ellipse at 18% 82%, rgba(195, 166, 255, 0.14), transparent 36%),
      radial-gradient(ellipse at 85% 18%, rgba(255, 220, 159, 0.14), transparent 33%),
      rgba(32, 9, 26, 0.84);
    background-size: 150% 150%;
    animation: memory-backdrop-in 180ms ease both, desktop-lightbox-aurora 8s ease-in-out infinite alternate;
  }

  .memory-lightbox-card {
    animation:
      memory-card-in 320ms cubic-bezier(0.18, 0.85, 0.25, 1.15) both,
      desktop-memory-frame-glow 3.8s ease-in-out 320ms infinite alternate;
  }

  @keyframes desktop-lightbox-aurora {
    from { background-position: 0% 20%; }
    to { background-position: 100% 80%; }
  }

  @keyframes desktop-memory-frame-glow {
    from { border-color: rgba(255, 230, 200, 0.42); box-shadow: 0 30px 100px rgba(13, 3, 10, 0.58), 0 0 22px rgba(245, 167, 197, 0.12); }
    to { border-color: rgba(255, 224, 172, 0.78); box-shadow: 0 30px 100px rgba(13, 3, 10, 0.58), 0 0 42px rgba(245, 167, 197, 0.28); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
