:root { color-scheme: dark; font-size: 16px; --ivory: #fbf6ed; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #665c4f; }
body { color: var(--ivory); -webkit-font-smoothing: antialiased; }
.cover { position: relative; isolation: isolate; min-height: 100svh; min-height: 100vh; overflow: hidden; display: grid; place-items: center; }
@supports (height: 100svh) { .cover { min-height: 100svh; } }
.landscape, .shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.landscape { z-index: -3; object-fit: cover; object-position: 50% 53%; }
.shade { z-index: -2; background: linear-gradient(180deg, rgba(34,29,23,.34), transparent 26%, rgba(26,23,20,.23) 50%, transparent 73%, rgba(26,23,20,.12)); }
.header { position: absolute; z-index: 2; inset: 27px 44px auto auto; }
.navigation > summary { display: none; }
.navigation > nav { display: flex; gap: 31px; align-items: center; }
.navigation:not([open]) > nav { display: flex; }
nav button, nav a { appearance: none; border: 0; margin: 0; padding: 10px 0; background: transparent; color: var(--ivory); opacity: 1; font: 400 .9375rem/1.6 Georgia, 'Times New Roman', serif; letter-spacing: .025em; text-shadow: 0 1px 8px rgba(15,12,9,.65); -webkit-text-fill-color: var(--ivory); }
nav a { text-decoration: none; text-underline-offset: 6px; }
nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
nav a:focus-visible { outline: 1px solid var(--ivory); outline-offset: 5px; }
html { scroll-behavior: smooth; }
.story { color-scheme: light; background: #f5f0e7; color: #494238; padding: clamp(64px, 9vw, 136px) 28px; }
.story:focus { outline: none; }
.story-inner { max-width: 680px; margin: 0 auto; }
.story h2 { margin: 0 0 52px; font: 400 clamp(2.25rem, 4vw, 3rem)/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; color: #76634e; }
.letter { font: 400 1.1875rem/1.85 Georgia, 'Times New Roman', serif; overflow-wrap: break-word; }
.letter p { margin: 0 0 1.45em; }
.letter .birthday { margin: 56px 0 0; padding-top: 30px; border-top: 1px solid #d5c9b8; font-size: clamp(1.35rem, 3vw, 1.75rem); font-style: italic; line-height: 1.5; color: #76634e; text-wrap: balance; }
.dedication { width: 100%; padding: 110px 28px; text-align: center; animation: arrive 1.6s ease-out both; }
h1 { margin: 0; font: 400 clamp(1.75rem, 3.25vw, 3.125rem)/1.35 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; text-wrap: balance; text-shadow: 0 2px 22px rgba(18,16,13,.45), 0 1px 3px rgba(18,16,13,.3); }
.mobile-break { display: none; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
  .header { inset: 19px 22px auto auto; }
  .navigation > summary { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none; border-radius: 50%; background: rgba(40,33,25,.13); }
  summary::-webkit-details-marker { display: none; }
  summary:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }
  .menu-icon { width: 21px; height: 8px; border-top: 1px solid var(--ivory); border-bottom: 1px solid var(--ivory); transition: transform .25s; }
  .navigation[open] .menu-icon { transform: rotate(-45deg); }
  .navigation:not([open]) > nav { display: none; }
  .navigation[open] > nav { position: absolute; top: 55px; right: 0; width: 164px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 17px 25px; border: 1px solid rgba(251,246,237,.16); background: rgba(50,43,34,.88); backdrop-filter: blur(18px); border-radius: 3px; }
  nav button, nav a { text-align: left; font-size: 1rem; min-height: 44px; }
  .story { padding: 65px 24px 80px; }
  .story h2 { margin-bottom: 34px; }
  .letter { font-size: 1.0625rem; line-height: 1.85; }
  .landscape { object-position: 54% center; }
  .dedication { padding-inline: 22px; }
  h1 { font-size: clamp(1.65rem, 7.7vw, 2.75rem); line-height: 1.5; }
  .mobile-break { display: inline; }
}
.gallery { color-scheme: light; background: #e9e2d6; color: #494238; padding: clamp(64px, 8vw, 120px) 40px; }
.gallery:focus { outline: none; }
.gallery-inner { max-width: 1160px; margin: 0 auto; }
.gallery-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 42px; }
.gallery h2 { margin: 0; font: 400 clamp(2.25rem, 4vw, 3rem)/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; color: #76634e; }
.photo-total { font: 400 .875rem/1.5 Georgia, 'Times New Roman', serif; color: #76634e; }
.photo-grid { columns: 3; column-gap: 24px; }
.photo-card { display: block; break-inside: avoid; margin-bottom: 24px; padding: 8px; background: #fcf9f2; box-shadow: 0 3px 13px #453a2710; transition: transform .3s, box-shadow .3s; cursor: zoom-in; }
.photo-card img { display: block; width: 100%; height: auto; }
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px #453a2720; }
.photo-card:focus-visible { outline: 2px solid #76634e; outline-offset: 5px; }
.lightbox { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #211e19fa; color: var(--ivory); color-scheme: dark; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: #211e19; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 30px 14px; }
.viewer-counter { font: 400 .875rem/1.5 Georgia, 'Times New Roman', serif; white-space: nowrap; }
.viewer-actions { display: flex; align-items: center; gap: 24px; }
.lightbox button, .lightbox a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 0; background: none; color: var(--ivory); font: 400 .9375rem/1.4 Georgia, 'Times New Roman', serif; cursor: pointer; text-decoration: none; text-underline-offset: 5px; }
.lightbox button:hover, .lightbox a:hover { text-decoration: underline; }
.lightbox :focus-visible { outline: 1px solid #e1c7a0; outline-offset: 3px; }
.viewer-stage { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 10px 24px; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.viewer-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; }
.viewer-stage.is-zoomed { display: block; touch-action: pan-x pan-y pinch-zoom; }
.is-zoomed .viewer-image { max-width: none; max-height: none; height: auto; margin: 0 auto; cursor: zoom-out; }
.viewer-footer { display: flex; justify-content: center; gap: 50px; padding: 10px 24px max(14px, env(safe-area-inset-bottom)); }
@media (max-width: 900px) { .photo-grid { columns: 2; } }
@media (max-width: 640px) {
  .gallery { padding: 65px 20px 70px; }
  .gallery-heading { gap: 12px; margin-bottom: 30px; }
  .photo-grid { column-gap: 12px; }
  .photo-card { margin-bottom: 12px; padding: 5px; }
  .viewer-toolbar { padding-inline: 16px; gap: 8px; }
  .viewer-actions { gap: 14px; }
  .viewer-stage { padding: 8px; }
  .lightbox button, .lightbox a { font-size: .875rem; }
}
@media (max-width: 360px) { .photo-grid { columns: 1; } .viewer-actions { gap: 8px; } }
.videos { background: #39342d; padding: clamp(64px, 8vw, 120px) 40px; color: var(--ivory); }
.videos:focus { outline: none; }
.videos-inner { max-width: 1160px; margin: 0 auto; }
.videos h2 { margin: 0 0 42px; font: 400 clamp(2.25rem, 4vw, 3rem)/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 28px; }
.video-card { margin: 0; min-width: 0; }
.video-frame { position: relative; background: #211e19; border: 1px solid #756858; }
.video-frame video { display: block; width: 100%; height: auto; object-fit: contain; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid #fbf6ed80; border-radius: 50%; background: #211e197a; backdrop-filter: blur(5px); color: #fbf6ed; font: 400 1rem/1.3 Georgia, 'Times New Roman', serif; cursor: pointer; }
.video-play[hidden] { display: none; }
.video-play:hover { background: #211e19b3; }
.video-play:focus-visible { outline: 2px solid #fbf6ed; outline-offset: 5px; }
.video-card figcaption { display: flex; justify-content: space-between; padding-top: 14px; color: #d7cbb9; font: 400 .875rem/1.5 Georgia, 'Times New Roman', serif; }
@media (max-width: 760px) {
  .videos { padding: 65px 24px 80px; }
  .video-grid { grid-template-columns: 1fr; max-width: 420px; margin: auto; gap: 38px; }
  .videos h2 { margin-bottom: 30px; }
}
.quiz { color-scheme: light; background: #f5f0e7; color: #494238; padding: clamp(64px, 9vw, 136px) 28px; }
.quiz:focus, .quiz-result:focus { outline: none; }
.quiz-inner { max-width: 760px; margin: 0 auto; }
.quiz h2 { margin: 0 0 24px; color: #76634e; font: 400 clamp(2.25rem, 4vw, 3rem)/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.quiz-intro { max-width: 540px; margin: 0 0 54px; font: 400 1.375rem/1.6 Georgia, 'Times New Roman', serif; text-wrap: balance; }
.quiz-question { min-width: 0; border: 0; margin: 0 0 42px; padding: 0 0 42px; border-bottom: 1px solid #d5c9b8; }
.quiz-question legend { width: 100%; padding: 0; margin-bottom: 22px; font: 400 1.1875rem/1.65 Georgia, 'Times New Roman', serif; }
.question-number { display: block; margin-bottom: 12px; color: #76634e; font: 400 .875rem/1.5 Georgia, 'Times New Roman', serif; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quiz-option { position: relative; display: flex; gap: 13px; align-items: center; min-height: 64px; padding: 14px 16px; border: 1px solid #d5c9b8; background: #fcf9f2; font: 400 1rem/1.5 Georgia, 'Times New Roman', serif; cursor: pointer; }
.quiz-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option-letter { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border: 1px solid #c6b8a4; border-radius: 50%; font-size: .875rem; color: #76634e; }
.quiz-option:has(input:checked) { border-color: #76634e; background: #e7ddce; }
.quiz-option:has(input:checked) .option-letter { background: #76634e; color: #fffaf2; border-color: #76634e; }
.quiz-option:has(input:focus-visible) { outline: 2px solid #76634e; outline-offset: 3px; }
.quiz-option:hover { border-color: #76634e; }
.quiz-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.quiz-progress { color: #76634e; font: 400 .9375rem/1.5 Georgia, 'Times New Roman', serif; }
.quiz-submit, .quiz-retry, .quiz-gift { min-height: 48px; padding: 14px 24px; border: 1px solid #76634e; background: #76634e; color: #fffaf2; font: 400 1rem/1.5 Georgia, 'Times New Roman', serif; cursor: pointer; }
.quiz button:focus-visible, .quiz-gift:focus-visible { outline: 2px solid #76634e; outline-offset: 4px; }
.quiz-gift { display: inline-block; margin-top: 28px; text-decoration: none; }
.quiz-gift:hover { background: #5f4e3c; }
.quiz-submit:disabled { background: #e4dccf; border-color: #d5c9b8; color: #746958; cursor: default; }
.quiz-result { padding: 42px 32px; border: 1px solid #d5c9b8; text-align: center; background: #fcf9f2; }
.quiz-result[hidden], .quiz-form[hidden], .quiz-retry[hidden], .quiz-gift[hidden] { display: none; }
.quiz-score { margin: 0 0 18px; color: #76634e; font: 400 1rem/1.5 Georgia, 'Times New Roman', serif; }
.quiz-result h3 { margin: 0 0 18px; color: #76634e; font: 400 clamp(1.75rem, 4vw, 2.5rem)/1.3 Georgia, 'Times New Roman', serif; }
.quiz-message { margin: 0 auto; max-width: 480px; font: 400 1.125rem/1.7 Georgia, 'Times New Roman', serif; }
.quiz-retry { margin-top: 28px; }
@media (max-width: 640px) { .quiz { padding: 65px 24px 80px; } .quiz-intro { font-size: 1.1875rem; margin-bottom: 40px; } .quiz-options { grid-template-columns: 1fr; } .quiz-question legend { font-size: 1.0625rem; } .quiz-result { padding: 32px 20px; } }
.song { color-scheme: light; background: #e9e2d6; color: #494238; padding: clamp(64px, 9vw, 136px) 28px; }
.song:focus { outline: none; }
.song-inner { max-width: 680px; margin: 0 auto; }
.song h2 { margin: 0 0 36px; color: #76634e; font: 400 clamp(2.25rem, 4vw, 3rem)/1.2 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.song-letter { margin: 0 0 44px; font: 400 1.1875rem/1.85 Georgia, 'Times New Roman', serif; }
.song-player { background: #fcf9f2; border: 1px solid #d5c9b8; padding: 26px 30px 22px; }
.song-player-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.song-track { color: #76634e; font: italic 400 1.5rem/1.4 Georgia, 'Times New Roman', serif; }
.song-toggle { min-height: 46px; min-width: 108px; border: 1px solid #76634e; padding: 11px 20px; background: #76634e; color: #fffaf2; font: 400 1rem/1.4 Georgia, 'Times New Roman', serif; cursor: pointer; }
.song-toggle:hover { background: #5f4e3c; }
.song-player :focus-visible { outline: 2px solid #76634e; outline-offset: 4px; }
.song-seek { display: block; width: 100%; margin: 0; height: 28px; accent-color: #76634e; cursor: pointer; }
.song-times { display: flex; justify-content: space-between; gap: 16px; margin-top: 5px; color: #76634e; font: 400 .875rem/1.5 Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums; }
.song-error { margin: 20px 0 0; font: 400 1rem/1.6 Georgia, 'Times New Roman', serif; }
.song-error[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .song { padding: 65px 24px 80px; } .song-letter { font-size: 1.0625rem; } .song-player { padding: 22px 20px 18px; } .song-track { font-size: 1.25rem; } .song-toggle { min-width: 96px; padding-inline: 14px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .dedication { animation: none; } .menu-icon, .photo-card { transition: none; } }
