:root {
  --paper: #fffdf8;
  --paper-deep: #fff8ef;
  --pink-50: #fff7f9;
  --pink-100: #ffe9ef;
  --pink-200: #ffd7e1;
  --pink-300: #f7b6c7;
  --pink-400: #e9829c;
  --pink-500: #d95679;
  --pink-600: #b83f62;
  --berry: #7f263f;
  --berry-dark: #4f1829;
  --ink: #5d3742;
  --muted: #79535e;
  --yellow: #f4cd63;
  --mint: #dff3e9;
  --lavender: #efe8f5;
  --line: rgb(184 63 98 / 15%);
  --border: rgb(127 38 63 / 22%);
  --shadow-lg: 0 24px 60px rgb(95 35 53 / 14%);
  --shadow-md: 0 14px 32px rgb(95 35 53 / 12%);
  --shadow-sm: 0 8px 18px rgb(95 35 53 / 9%);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 11% 7%, rgb(255 255 255 / 86%) 0 3px, transparent 4px),
    radial-gradient(circle at 89% 21%, rgb(255 255 255 / 76%) 0 2px, transparent 3px),
    linear-gradient(155deg, #fffafb 0%, #ffeaf0 52%, #ffdce6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(185 63 98 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(185 63 98 / 5%) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

a,
button,
[tabindex] {
  outline-offset: 4px;
}

:focus-visible {
  outline: 3px solid var(--berry-dark);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4000;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  color: #fff;
  background: var(--berry-dark);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

body.is-locked .skip-link {
  display: none;
}

/* OPENING EXPERIENCE */
.opening-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 17%, rgb(255 255 255 / 90%) 0 6%, transparent 22%),
    linear-gradient(155deg, #fff9fb 0%, #ffdce7 100%);
  transition: opacity .45s ease, visibility .45s ease;
}

.opening-screen[hidden] {
  display: none;
}

.opening-screen.is-opening .opening-card {
  transform: translateY(-2px) scale(1.01);
}

.opening-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-card {
  position: relative;
  width: min(430px, 100%);
  padding: 28px 24px 25px;
  overflow: hidden;
  text-align: center;
  border: 1.5px solid rgb(127 38 63 / 18%);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    rgb(255 253 248 / 97%);
  background-position: 0 11px;
  background-size: 100% 30px;
  box-shadow: var(--shadow-lg);
  transition: transform .55s var(--ease);
}

.opening-stitch {
  position: absolute;
  inset: 11px;
  border: 1.5px dashed rgb(184 63 98 / 27%);
  border-radius: 25px;
  pointer-events: none;
}

.opening-kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

.envelope-scene {
  position: relative;
  width: 220px;
  height: 182px;
  margin: 7px auto 0;
  perspective: 800px;
}

.envelope-letter {
  position: absolute;
  left: 50%;
  top: 59px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 158px;
  height: 105px;
  padding-top: 7px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
  border: 1.5px solid rgb(127 38 63 / 24%);
  border-radius: 12px 12px 5px 5px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 23px;
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, 15px) rotate(-1deg);
  transition: transform .7s var(--ease), opacity .4s ease;
}

.envelope-letter span,
.envelope-letter strong {
  position: relative;
  z-index: 1;
}

.envelope-letter strong {
  color: var(--pink-500);
  font-size: 26px;
  line-height: 1;
}

.envelope-shell {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 206px;
  height: 126px;
  transform: translateX(-50%) rotate(-2deg);
  transform-style: preserve-3d;
}

.envelope-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 2px solid var(--berry);
  border-radius: 12px;
  background: #fff9fa;
  box-shadow: var(--shadow-md);
}

.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  border: 2px solid var(--berry);
  border-radius: 12px;
  background:
    linear-gradient(31deg, transparent 49%, var(--berry) 49.5% 50.5%, transparent 51%) left bottom / 52% 100% no-repeat,
    linear-gradient(-31deg, transparent 49%, var(--berry) 49.5% 50.5%, transparent 51%) right bottom / 52% 100% no-repeat,
    linear-gradient(155deg, #fff5f7, #ffe1e9);
  clip-path: polygon(0 25%, 50% 69%, 100% 25%, 100% 100%, 0 100%);
}

.envelope-flap {
  position: absolute;
  left: 2px;
  top: 2px;
  z-index: 5;
  width: calc(100% - 4px);
  height: 78px;
  border-bottom: 2px solid var(--berry);
  background: linear-gradient(155deg, #fff9fa, #ffd8e2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  backface-visibility: hidden;
  transition: transform .55s var(--ease), z-index 0s linear .28s;
}

.envelope-seal {
  position: absolute;
  left: 50%;
  top: 52px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pink-400);
  box-shadow: 0 5px 12px rgb(127 38 63 / 18%);
  transform: translateX(-50%);
  transition: opacity .18s ease, transform .3s var(--ease);
}

.opening-screen.is-opening .envelope-flap {
  z-index: 0;
  transform: rotateX(180deg);
}

.opening-screen.is-opening .envelope-seal {
  opacity: 0;
  transform: translateX(-50%) scale(.7);
}

.opening-screen.is-opening .envelope-letter {
  z-index: 6;
  transform: translate(-50%, -58px) rotate(1deg);
}

.opening-card h2 {
  position: relative;
  z-index: 1;
  margin: -2px 0 5px;
  color: var(--berry-dark);
  font-size: clamp(30px, 9vw, 38px);
  line-height: 1.1;
}

.opening-card > p:not(.opening-kicker) {
  position: relative;
  z-index: 1;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.primary-btn,
.secondary-btn,
.mini-btn,
.dialog-btn {
  appearance: none;
  min-height: 44px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}

.primary-btn {
  position: relative;
  z-index: 2;
  padding: 12px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--berry);
  box-shadow: 0 11px 24px rgb(127 38 63 / 24%);
  transition: transform .2s var(--ease), background-color .2s ease, box-shadow .2s ease;
}

.primary-btn:hover {
  background: var(--berry-dark);
  box-shadow: 0 14px 26px rgb(79 24 41 / 25%);
  transform: translateY(-2px);
}

.primary-btn:active,
.secondary-btn:active,
.dialog-btn:active,
.mini-btn:active {
  transform: scale(.98);
}

.primary-btn:disabled {
  cursor: wait;
}

.tiny-note {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 13px;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 16px;
}

/* PAGE AND PAPER */
.page-shell {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  margin: 0 auto;
  padding:
    max(14px, env(safe-area-inset-top))
    12px
    max(82px, calc(env(safe-area-inset-bottom) + 62px));
}

.paper-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  background-color: rgb(255 253 248 / 97%);
  box-shadow: var(--shadow-lg);
}

.hero {
  position: relative;
  padding: 38px 18px 66px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 14%, rgb(244 205 99 / 30%) 0 3px, transparent 4px),
    linear-gradient(rgb(184 63 98 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(184 63 98 / 7%) 1px, transparent 1px),
    rgb(255 253 248 / 98%);
  background-size: auto, 27px 27px, 27px 27px, auto;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1.5px dashed rgb(184 63 98 / 23%);
  border-radius: 25px;
  pointer-events: none;
}

.binder-clip {
  position: absolute;
  top: -7px;
  left: 31px;
  z-index: 5;
  width: 39px;
  height: 31px;
  border: 3px solid var(--berry-dark);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--pink-400);
  box-shadow: 0 4px 0 rgb(79 24 41 / 12%);
}

.binder-clip::before,
.binder-clip::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 13px;
  height: 14px;
  border: 2px solid var(--berry-dark);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.binder-clip::before {
  left: 2px;
}

.binder-clip::after {
  right: 2px;
}

.washi {
  position: absolute;
  z-index: 4;
  width: 112px;
  height: 25px;
  opacity: .82;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 25%) 50%, transparent 50%),
    var(--pink-400);
  background-size: 14px 14px;
  clip-path: polygon(2% 10%, 97% 0, 100% 88%, 3% 100%, 0 54%);
}

.washi-top {
  top: 5px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(270px, 83vw);
  margin: 0 auto;
}

.hero-polaroid {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 10px 10px 31px;
  border: 1px solid rgb(127 38 63 / 15%);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: rotate(-1.7deg);
}

.hero-polaroid::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 86px;
  height: 26px;
  background: rgb(247 182 199 / 84%);
  clip-path: polygon(0 8%, 98% 0, 100% 92%, 4% 100%);
  transform: translateX(-50%) rotate(2deg);
}

.hero-polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}

.hero-polaroid figcaption {
  position: absolute;
  right: 17px;
  bottom: 5px;
  left: 17px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 19px;
  text-align: center;
}

.postage-stamp {
  position: absolute;
  right: -4px;
  bottom: 17px;
  display: grid;
  place-items: center;
  width: 57px;
  height: 48px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  border: 2px dashed var(--pink-500);
  background: var(--pink-100);
  box-shadow: 0 0 0 4px var(--paper);
  transform: rotate(7deg);
}

.hero-content {
  text-align: center;
}

.mini-stamp,
.tiny-label {
  margin: 0;
  color: var(--pink-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero h1 {
  margin: 6px 0 4px;
  color: var(--berry-dark);
  font-size: clamp(38px, 12vw, 58px);
  line-height: .98;
  letter-spacing: -.045em;
}

#heroTitle:focus-visible,
.anchor-section:focus-visible {
  outline: 2px dashed var(--berry);
  outline-offset: 6px;
  border-radius: 12px;
}

.hero h1 > span[aria-hidden="true"] {
  color: var(--pink-500);
  font-family: "Gaegu", cursive;
  font-weight: 700;
}

.hero-headline {
  margin: 10px auto 14px;
  color: var(--berry-dark);
  font-size: clamp(23px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.handwritten {
  display: block;
  padding-bottom: 2px;
  color: var(--pink-500);
  font-family: "Gaegu", cursive;
  font-size: 1.18em;
  line-height: 1.1;
  transform: rotate(-1deg);
}

.hero-copy {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.hero-stickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.paper-label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 16px;
  border: 1.5px dashed rgb(184 63 98 / 45%);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.easter-heart {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--pink-500);
  font-family: "Gaegu", cursive;
  font-size: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), color .18s ease;
}

.easter-heart:hover {
  color: var(--berry);
  transform: rotate(-8deg) scale(1.08);
}

.easter-heart:active {
  transform: rotate(5deg) scale(.93);
}

.doodle {
  position: absolute;
  user-select: none;
  pointer-events: none;
}

.doodle-star {
  top: 92px;
  right: 22px;
  color: var(--yellow);
  font-size: 24px;
  transform: rotate(8deg);
}

/* SECTION HEADINGS */
.section {
  margin-top: 32px;
}

.anchor-section {
  scroll-margin-top: 16px;
}

.section-heading {
  margin: 0 5px 15px;
}

.hand-note {
  margin: 0;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

.section-heading h2 {
  margin: 1px 0 5px;
  color: var(--berry-dark);
  font-size: clamp(24px, 7vw, 31px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.section-heading > p:last-child {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* PERSONAL MENU */
.personal-menu,
.menu-feature-grid,
.menu-note-grid,
.social-ribbon {
  display: grid;
  gap: 11px;
}

.link-card,
.note-link,
.social-link,
.need-me-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 17px 43px 17px 16px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
}

.link-card::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 48px;
  width: 68px;
  height: 20px;
  background: rgb(255 255 255 / 42%);
  border-right: 1px solid rgb(127 38 63 / 8%);
  border-left: 1px solid rgb(127 38 63 / 8%);
  transform: rotate(2deg);
}

.link-card:hover,
.note-link:hover,
.social-link:hover,
.need-me-card:hover {
  border-color: rgb(127 38 63 / 37%);
  box-shadow: 0 17px 36px rgb(95 35 53 / 15%);
  transform: translateY(-2px) rotate(-.2deg);
}

.link-card:active,
.note-link:active,
.social-link:active,
.need-me-card:active {
  transform: scale(.985);
}

.card-symbol {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: 33px;
  font-weight: 700;
  border: 1.5px solid rgb(127 38 63 / 18%);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.link-card h3 {
  margin: 0 0 4px;
  color: var(--berry-dark);
  font-size: 17px;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.arrow {
  position: absolute;
  top: 14px;
  right: 15px;
  color: var(--pink-600);
  font-size: 18px;
  font-weight: 800;
}

.spotify {
  background:
    radial-gradient(circle at 92% 85%, rgb(255 255 255 / 75%) 0 32px, transparent 33px),
    linear-gradient(145deg, var(--mint), var(--paper));
}

.song {
  background:
    radial-gradient(circle at 92% 85%, rgb(255 255 255 / 75%) 0 32px, transparent 33px),
    linear-gradient(145deg, var(--pink-100), var(--paper));
}

.menu-note-grid {
  margin-top: 2px;
}

.note-link {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  min-height: 116px;
  padding: 15px;
  border: 1.5px dashed rgb(184 63 98 / 38%);
  border-radius: 15px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 25px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
}

.note-link:nth-child(odd) {
  transform: rotate(-.45deg);
}

.note-link:nth-child(even) {
  transform: rotate(.45deg);
}

.note-link > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: 27px;
  font-weight: 700;
  text-align: center;
}

.note-link strong {
  align-self: end;
  color: var(--berry-dark);
  font-size: 15px;
}

.note-link small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.note-letter {
  background-color: #fffdf8;
}

.note-memory {
  background-color: #fff5f7;
}

.note-story {
  background-color: #fffaf0;
}

.note-secret {
  background-color: #f7eff7;
}

.social-ribbon {
  position: relative;
  margin-top: 3px;
  padding: 17px 12px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(255 253 248 / 88%);
  box-shadow: var(--shadow-sm);
}

.social-ribbon::before {
  content: "our tiny internet corner";
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 2px 9px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 14px;
  background: var(--pink-200);
  transform: rotate(-1deg);
}

.social-link {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgb(127 38 63 / 16%);
  border-radius: 13px;
  background: #fff;
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease;
}

.social-link > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--pink-600);
  font-family: "Gaegu", cursive;
  font-size: 22px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--pink-100);
}

.social-link strong {
  align-self: end;
  color: var(--berry-dark);
  font-size: 14px;
}

.social-link small {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
}

.need-me-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 91px;
  padding: 14px 45px 14px 15px;
  border: 1.5px solid rgb(127 38 63 / 22%);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 90% 50%, rgb(255 255 255 / 66%) 0 45px, transparent 46px),
    linear-gradient(145deg, #e7f5ee, var(--paper));
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease;
}

.speech-heart {
  display: grid;
  place-items: center;
  width: 48px;
  height: 42px;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: 29px;
  border: 1.5px solid rgb(127 38 63 / 25%);
  border-radius: 50%;
  background: #fff;
}

.need-me-card strong {
  display: block;
  color: var(--berry-dark);
  font-size: 16px;
}

.need-me-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.is-unavailable {
  border-style: dashed;
}

/* MUSIC */
.music-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 17px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, transparent 0 49%, rgb(184 63 98 / 5%) 50% 51%, transparent 52%) 0 0 / 22px 22px,
    rgb(255 253 248 / 97%);
}

.music-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -48px;
  width: 130px;
  height: 130px;
  border: 14px solid rgb(217 86 121 / 8%);
  border-radius: 50%;
}

.music-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: 45px;
  border: 5px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--paper) 0 10%, var(--berry) 11% 13%, transparent 14%),
    repeating-radial-gradient(circle, var(--pink-300) 0 5px, var(--pink-200) 6px 9px);
  box-shadow: var(--shadow-md);
}

.music-art i {
  position: absolute;
  right: -2px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: #fff;
  font-family: "Gaegu", cursive;
  font-size: 22px;
  font-style: normal;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--berry);
}

.music-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.music-info h2 {
  margin: 4px 0 1px;
  overflow-wrap: anywhere;
  color: var(--berry-dark);
  font-size: clamp(19px, 5.4vw, 25px);
  line-height: 1.15;
}

.music-info > p:not(.tiny-label) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.love-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  margin-top: 8px;
}

.love-wave span {
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: var(--pink-500);
}

.love-wave span:nth-child(2),
.love-wave span:nth-child(6) {
  height: 12px;
}

.love-wave span:nth-child(3),
.love-wave span:nth-child(5) {
  height: 17px;
}

.love-wave span:nth-child(4) {
  height: 10px;
}

.music-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--berry-dark);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgb(127 38 63 / 24%);
  border-radius: 999px;
  background: #fff;
  transition: transform .2s var(--ease), background-color .2s ease, border-color .2s ease;
}

.mini-btn:hover {
  border-color: var(--pink-500);
  background: var(--pink-50);
}

/* MEMORIES */
.memory-grid {
  display: grid;
  gap: 18px;
  padding: 0 7px;
}

.polaroid {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 10px 10px 38px;
  border: 1px solid rgb(127 38 63 / 16%);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 2;
  width: 68px;
  height: 20px;
  background: rgb(247 182 199 / 78%);
  clip-path: polygon(0 8%, 99% 0, 100% 94%, 3% 100%);
  transform: translateX(-50%) rotate(1deg);
}

.polaroid img,
.memory-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
}

.memory-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--berry);
  text-align: center;
  background:
    linear-gradient(rgb(184 63 98 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(184 63 98 / 9%) 1px, transparent 1px),
    linear-gradient(145deg, #ffe3ea, #fff6f8);
  background-size: 22px 22px, 22px 22px, auto;
}

.memory-placeholder-alt {
  background:
    radial-gradient(circle at 20% 18%, rgb(244 205 99 / 70%) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 72%, rgb(217 86 121 / 27%) 0 4px, transparent 5px),
    linear-gradient(145deg, #fff4d8, #fffaf0);
}

.memory-placeholder span {
  font-family: "Gaegu", cursive;
  font-size: 50px;
  line-height: 1;
}

.memory-placeholder small {
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

.polaroid figcaption {
  position: absolute;
  right: 10px;
  bottom: 7px;
  left: 10px;
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
  text-align: center;
}

.rotate-left {
  transform: rotate(-1.6deg);
}

.rotate-right {
  transform: rotate(1.6deg);
}

/* TIMELINE */
.timeline {
  padding: 24px 20px 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgb(184 63 98 / 8%) 1px, transparent 1px),
    rgb(255 253 248 / 97%);
  background-size: 100% 31px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: -3px;
  left: 8px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--pink-400) 0 6px, transparent 6px 11px);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 0 2px var(--pink-300);
}

.timeline-item small {
  display: inline-block;
  margin-right: 7px;
  color: var(--pink-600);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.timeline-item time {
  color: var(--berry);
  font-family: "Patrick Hand", cursive;
  font-size: 15px;
}

.timeline-item h3 {
  margin: 3px 0 5px;
  color: var(--berry-dark);
  font-size: 18px;
}

.timeline-item p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

/* COUNTER */
.counter-card {
  position: relative;
  padding: 25px 17px;
  overflow: hidden;
  text-align: center;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 8%, rgb(244 205 99 / 38%) 0 4px, transparent 5px),
    rgb(255 253 248 / 97%);
}

.counter-card::before {
  content: "♡";
  position: absolute;
  right: -9px;
  bottom: -31px;
  color: rgb(217 86 121 / 7%);
  font-family: "Gaegu", cursive;
  font-size: 125px;
  transform: rotate(9deg);
}

.counter-card h2 {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  color: var(--berry-dark);
  font-size: 21px;
}

.counter-card h2 time {
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 1.08em;
  font-weight: 400;
}

.counter-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.counter-grid div {
  min-width: 0;
  padding: 13px 5px 11px;
  border: 1.5px dashed rgb(184 63 98 / 36%);
  border-radius: var(--radius-md);
  background: var(--pink-50);
}

.counter-grid div:first-child {
  grid-column: 1 / -1;
}

.counter-grid strong {
  display: block;
  min-width: 0;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: clamp(26px, 7.4vw, 42px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

#minutesCount {
  font-size: clamp(23px, 6.7vw, 36px);
}

.counter-grid span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.counter-card > p:last-child {
  position: relative;
  z-index: 1;
  margin: 15px 0 0;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

/* LETTER */
.love-letter {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 35px 22px 26px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, transparent 0 30px, rgb(217 86 121 / 17%) 30px 31px, transparent 31px),
    linear-gradient(var(--line) 1px, transparent 1px),
    rgb(255 253 248 / 98%);
  background-size: 100% 100%, 100% 32px, auto;
}

.love-letter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 7px;
  background: radial-gradient(circle, var(--pink-200) 0 3px, transparent 3.5px) 0 8px / 7px 32px repeat-y;
}

.paperclip {
  position: absolute;
  top: -14px;
  right: 25px;
  z-index: 5;
  width: 18px;
  height: 53px;
  border: 3px solid var(--berry-dark);
  border-bottom-width: 2px;
  border-radius: 11px;
  transform: rotate(8deg);
}

.paperclip::after {
  content: "";
  position: absolute;
  inset: 5px 3px 8px;
  border: 2px solid var(--berry-dark);
  border-radius: 8px;
}

.letter-washi {
  top: -9px;
  left: 46%;
  transform: rotate(-2deg);
}

.letter-greeting {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--berry);
  font-family: "Gaegu", cursive;
  font-size: 28px;
  font-weight: 700;
  line-height: 32px;
}

#loveLetterText {
  position: relative;
  z-index: 1;
  max-width: 65ch;
  margin: 0 auto;
}

#loveLetterText p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
  line-height: 2;
}

#loveLetterText strong {
  color: var(--berry-dark);
}

#loveLetterText .letter-quote {
  color: var(--berry-dark);
  font-family: "Patrick Hand", cursive;
  font-size: 20px;
  text-align: center;
}

.letter-sign {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 20px;
  line-height: 1.35;
  text-align: right;
}

/* SECRET */
.secret-section {
  position: relative;
  padding: 37px 21px 29px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 17%);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 21% 13%, rgb(255 255 255 / 14%) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 21%, rgb(244 205 99 / 33%) 0 4px, transparent 5px),
    linear-gradient(145deg, var(--berry-dark), #8f2c4a);
  box-shadow: 0 20px 45px rgb(79 24 41 / 28%);
}

.secret-section::after {
  content: "♡";
  position: absolute;
  right: -18px;
  bottom: -55px;
  color: rgb(255 255 255 / 6%);
  font-family: "Gaegu", cursive;
  font-size: 155px;
  transform: rotate(11deg);
}

.secret-ticket {
  position: absolute;
  top: 13px;
  left: -21px;
  padding: 6px 24px;
  color: var(--berry-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  border-top: 1px dashed rgb(79 24 41 / 35%);
  border-bottom: 1px dashed rgb(79 24 41 / 35%);
  background: var(--yellow);
  transform: rotate(-8deg);
}

.gift-icon {
  display: block;
  color: var(--pink-200);
  font-family: "Gaegu", cursive;
  font-size: 57px;
  line-height: 1;
}

.light {
  color: rgb(255 255 255 / 86%);
}

.secret-section h2 {
  margin: 5px 0;
  font-size: clamp(25px, 7vw, 32px);
}

.secret-section > p:not(.tiny-label) {
  margin: 0 0 17px;
  color: rgb(255 255 255 / 86%);
  font-size: 15px;
}

.secondary-btn {
  position: relative;
  z-index: 2;
  padding: 11px 17px;
  color: var(--berry-dark);
  font-weight: 800;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 9px 20px rgb(0 0 0 / 16%);
  transition: transform .2s var(--ease), background-color .2s ease;
}

.secondary-btn:hover {
  background: var(--pink-100);
  transform: translateY(-2px);
}

.secret-message {
  position: relative;
  z-index: 2;
  margin-top: 17px;
  padding: 18px;
  border: 1px dashed rgb(255 255 255 / 48%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 11%);
  animation: secret-pop .35s var(--ease);
}

.secret-message[hidden] {
  display: none;
}

.secret-message p {
  margin: 0 0 8px;
  color: rgb(255 255 255 / 86%);
}

.secret-message strong {
  display: block;
  line-height: 1.65;
}

.secret-message span {
  display: block;
  margin-top: 8px;
  color: rgb(255 255 255 / 82%);
  font-size: 13px;
}

@keyframes secret-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* FOOTER */
.footer {
  margin-top: 38px;
  color: var(--muted);
  text-align: center;
}

.footer > span {
  color: var(--pink-500);
  font-family: "Gaegu", cursive;
  font-size: 34px;
  line-height: 1;
}

.footer p {
  margin: 3px 0;
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

.footer strong {
  color: var(--berry);
}

.footer small {
  color: var(--muted);
  font-size: 13px;
}

/* FLOATING PAPER DOODLES */
.floating-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.float-item {
  position: absolute;
  bottom: -60px;
  color: var(--pink-500);
  opacity: .12;
  animation: float-up linear infinite;
}

@keyframes float-up {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-118dvh) rotate(22deg);
  }
}

/* TOAST */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 3500;
  width: max-content;
  max-width: calc(100vw - 28px);
  padding: 11px 16px;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 16px;
  background: var(--berry-dark);
  box-shadow: 0 13px 29px rgb(0 0 0 / 19%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .25s ease, transform .25s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* EASTER-EGG DIALOG */
.achievement-dialog {
  width: min(360px, calc(100% - 28px));
  padding: 28px 22px 22px;
  color: var(--ink);
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 28px;
  box-shadow: 0 28px 80px rgb(79 24 41 / 30%);
}

.achievement-dialog::backdrop {
  background: rgb(79 24 41 / 54%);
  backdrop-filter: blur(2px);
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--berry-dark);
  font-size: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--pink-100);
}

.achievement-heart {
  display: block;
  color: var(--pink-500);
  font-family: "Gaegu", cursive;
  font-size: 62px;
  line-height: .9;
}

.achievement-dialog p {
  margin: 9px 0 2px;
  color: var(--pink-600);
  font-family: "Patrick Hand", cursive;
  font-size: 18px;
}

.achievement-dialog strong {
  display: block;
  color: var(--berry-dark);
  font-size: 20px;
  line-height: 1.35;
}

.dialog-btn {
  margin-top: 18px;
  padding: 10px 16px;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  background: var(--berry);
  transition: transform .2s var(--ease), background-color .2s ease;
}

.dialog-btn:hover {
  background: var(--berry-dark);
}

/* REVEAL: content stays visible if JavaScript fails */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s var(--ease);
}

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

/* RESPONSIVE */
@media (max-width: 359px) {
  .opening-card {
    padding-inline: 18px;
  }

  .primary-btn {
    padding-inline: 14px;
    font-size: 14px;
  }

  .envelope-scene {
    width: 200px;
    height: 168px;
  }

  .envelope-shell {
    width: 186px;
    height: 114px;
  }

  .envelope-letter {
    top: 54px;
    width: 143px;
    height: 95px;
  }

  .opening-screen.is-opening .envelope-letter {
    transform: translate(-50%, -51px) rotate(1deg);
  }

  .hero {
    padding-inline: 15px;
  }

  .music-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .music-art {
    width: 72px;
    font-size: 38px;
  }

  .music-actions {
    display: grid;
  }
}

@media (min-width: 420px) {
  .page-shell {
    padding-inline: 16px;
  }

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

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

  .link-card {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 178px;
    padding: 17px;
  }

  .card-symbol {
    margin-bottom: 4px;
  }
}

@media (min-width: 560px) {
  .page-shell {
    padding-top: 20px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .hero {
    padding: 43px 28px 34px;
  }

  .social-ribbon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-link {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 130px;
    text-align: center;
  }

  .social-link > span {
    grid-row: auto;
    margin: 0 auto 4px;
  }

  .memory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }

  .polaroid {
    padding: 8px 8px 34px;
  }

  .polaroid figcaption {
    font-size: 16px;
  }

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

  .counter-grid div:first-child {
    grid-column: auto;
  }

  .love-letter {
    padding: 39px 42px 30px;
    background:
      linear-gradient(90deg, transparent 0 45px, rgb(217 86 121 / 17%) 45px 46px, transparent 46px),
      linear-gradient(var(--line) 1px, transparent 1px),
      rgb(255 253 248 / 98%);
    background-size: 100% 100%, 100% 32px, auto;
  }

  .love-letter::before {
    left: 20px;
  }
}

@media (min-width: 720px) {
  .hero {
    padding: 49px 34px 38px;
  }

  .hero-grid {
    grid-template-columns: minmax(240px, .82fr) minmax(0, 1.18fr);
    gap: 31px;
  }

  .hero-visual {
    width: min(100%, 285px);
  }

  .hero-content {
    text-align: left;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero-headline {
    margin-inline: 0;
  }

  .hero-stickers {
    justify-content: flex-start;
  }
}

@media (max-height: 670px) {
  .opening-screen {
    place-items: start center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .float-item {
    display: none;
  }

  .reveal.reveal-pending {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #66404b;
    --border: rgb(79 24 41 / 48%);
  }

  .paper-card,
  .link-card,
  .note-link,
  .social-link,
  .need-me-card {
    border-color: var(--border);
  }
}
