:root {
  --cream: #fffaf5;
  --paper: #fffdf9;
  --ink: #342736;
  --muted: #847680;
  --rose: #ec6f78;
  --rose-dark: #d95360;
  --plum: #6c426b;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0, rgba(236, 111, 120, .15), transparent 32rem),
    radial-gradient(circle at 100% 60%, rgba(108, 66, 107, .12), transparent 30rem),
    var(--cream);
  font-family: "Nunito", ui-rounded, system-ui, sans-serif;
}

.archive-link {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  z-index: 2;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--plum);
  background: rgba(255, 253, 249, .86);
  box-shadow: 0 5px 18px rgba(75, 48, 69, .08);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.archive-link:focus-visible,
button:focus-visible { outline: 3px solid rgba(108, 66, 107, .3); outline-offset: 3px; }

.birthday-shell {
  width: min(100% - 32px, 560px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: max(80px, env(safe-area-inset-top)) 0 max(42px, env(safe-area-inset-bottom));
  text-align: center;
}

header { margin-bottom: 28px; }

.eyebrow {
  margin: 0 0 9px;
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  max-width: 500px;
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(46px, 12vw, 72px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: .95;
}

.photo-card {
  width: min(100%, 430px);
  height: min(52dvh, 530px);
  min-height: 330px;
  margin: 0;
  padding: 9px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 22px 60px rgba(75, 48, 69, .16);
  transform: rotate(-.6deg);
}

.photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 19px;
  object-fit: contain;
  background: #eee7e6;
}

.phrase {
  min-height: 42px;
  margin: 26px 0 18px;
  color: var(--plum);
  font-size: clamp(22px, 6vw, 31px);
  font-weight: 900;
  line-height: 1.2;
}

.phrase--new { animation: phrase-pop .3s cubic-bezier(.34, 1.56, .64, 1); }

button {
  border: 0;
  border-radius: 999px;
  padding: 15px 25px;
  color: white;
  background: var(--rose);
  box-shadow: 0 10px 24px rgba(213, 83, 96, .25), inset 0 -3px 0 rgba(132, 45, 58, .14);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  transition: transform .1s ease, background .2s ease;
}

button:hover { background: var(--rose-dark); }
button:active { transform: translateY(2px) scale(.98); }

@keyframes phrase-pop {
  from { opacity: .2; transform: translateY(6px) scale(.96); }
}

@media (max-height: 720px) {
  .birthday-shell { justify-content: flex-start; }
  header { margin-bottom: 20px; }
  .photo-card { height: 390px; min-height: 280px; }
  .phrase { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
