/* A five-chapter keepsake: local assets and system fonts, no external requests. */
:root {
  color-scheme: light;
  --paper: #f7f2e9;
  --ink: #382b2b;
  --muted: #81716c;
  --wine: #923f4e;
  --line: #ded3c8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; background: var(--paper); color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at 85% 40%, #ead6ca66, transparent 55%), repeating-linear-gradient(0deg, #9a806006 0, #9a806006 1px, transparent 1px, transparent 4px); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--wine); outline-offset: 6px; }
h1:focus, h2:focus { outline: none; }
.masthead { margin: 0 5.5%; height: 105px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { color: var(--wine); text-decoration: none; font: italic 23px Georgia, serif; }
.wordmark > span { font: 32px Georgia, serif; vertical-align: -3px; margin-right: 9px; }
.edition { font-size: 9px; letter-spacing: 2.6px; color: var(--muted); }
.header-note { font: italic 19px Georgia, serif; color: var(--muted); }
main { width: 100%; flex: 1; display: grid; align-items: center; }
.scene { width: min(1100px, 86%); margin: 0 auto; animation: appear .65s ease both; }
.intro { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 7%; padding: 64px 0 72px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; color: var(--wine); font-size: 10px; font-weight: 600; letter-spacing: 2.1px; line-height: 1.7; }
.eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: var(--wine); flex: 0 0 auto; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -2.8px; }
h1 { font-size: clamp(48px, 5.3vw, 78px); line-height: 1.09; margin: 0 0 25px; }
em { font-weight: 400; color: var(--wine); }
.description { color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 30px; }
.btn { border: 1px solid var(--wine); border-radius: 3px; background: var(--wine); color: #fff8f0; min-height: 54px; padding: 15px 26px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 30px; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: #77303e; transform: translateY(-2px); box-shadow: 0 7px 18px #79384620; }
.btn > span { font-size: 21px; line-height: 1; }
.small-note { font-size: 11px; color: var(--muted); margin: 18px 0 0; }
.keepsake { position: relative; padding: 36px 12px 80px; }
.paper-behind { position: absolute; inset: 42px 15px 87px; background: #eaded0; border: 1px solid #dfcebb; transform: rotate(-7deg); }
.polaroid { position: relative; background: #fffdf7; padding: 17px 17px 25px; margin: 0; transform: rotate(5deg); box-shadow: 0 20px 40px #4e30221a, 0 2px 5px #4e302210; }
.cover-art { aspect-ratio: 1; overflow: hidden; background: #eee7dc; }
.cover-art img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.polaroid figcaption { margin-top: 23px; text-align: center; font: italic clamp(16px, 1.65vw, 23px) Georgia, serif; color: #71514d; }
.tape { position: absolute; z-index: 1; width: 112px; height: 36px; background: #d7bda87a; top: -15px; left: calc(50% - 56px); transform: rotate(-8deg); border-left: 2px dotted #fff8; border-right: 2px dotted #fff8; }
.love-seal { position: absolute; right: -13px; bottom: 65px; display: grid; place-content: center; text-align: center; width: 88px; height: 88px; background: var(--wine); border-radius: 50%; border: 5px double #c68e95; color: #fff1e5; font: italic 20px/1.3 Georgia, serif; transform: rotate(12deg); }
.hand-note { position: absolute; left: 24px; bottom: -6px; font: italic 19px/1.5 Georgia, serif; color: var(--wine); transform: rotate(-6deg); }
.orbit-heart { position: absolute; font: 62px Georgia, serif; color: var(--wine); }
.heart-one { top: -27px; right: 4px; transform: rotate(18deg); }
.heart-two { left: -49px; bottom: 110px; transform: rotate(-22deg); font-size: 37px; }
.page-footer { min-height: 88px; margin: 0 5.5%; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-note { color: var(--muted); font: italic 14px Georgia, serif; }
.progress { display: flex; gap: 9px; }
.progress span { width: 6px; height: 6px; border-radius: 10px; background: #d8c9bd; transition: width .3s; }
.progress .active { width: 27px; background: var(--wine); }
.page-number { font-size: 11px; letter-spacing: 2px; color: var(--wine); }
.page-number span { color: var(--muted); }
.chapter { max-width: 900px; padding: 40px 0; text-align: center; }
.chapter .eyebrow { justify-content: center; margin-bottom: 14px; }
h2 { font-size: clamp(35px, 4vw, 56px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -1.6px; }
.chapter .description { margin-bottom: 25px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 28px auto; max-width: 760px; }
.character { padding: 10px; border: 1px solid #e6dbcf; color: var(--ink); background: #fffdf7; box-shadow: 0 8px 18px #4e30220a; transition: transform .2s, box-shadow .2s; }
.character:nth-child(1) { transform: rotate(-3deg); }
.character:nth-child(3) { transform: rotate(3deg); }
.character:hover, .character:focus-visible { transform: translateY(-7px) rotate(0); box-shadow: 0 14px 25px #4e30221a; }
.character img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.character > span { display: flex; justify-content: space-between; padding: 15px 5px 5px; font: italic 19px Georgia, serif; }
.character > span > span { color: var(--wine); }
.scene-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px auto 0; max-width: 760px; }
.text-btn { min-height: 44px; border: none; background: transparent; color: var(--wine); font-size: 13px; padding: 10px 0; text-underline-offset: 5px; }
.text-btn:hover { text-decoration: underline; }
.chosen-photo, .memory-photo { background: #fffdf7; padding: 12px 12px 22px; margin: 26px auto 0; width: min(100%, 360px); box-shadow: 0 12px 30px #4e302215; transform: rotate(-2deg); }
.chosen-photo img { width: 100%; height: 320px; object-fit: cover; object-position: top; display: block; }
.chosen-photo figcaption, .memory-photo figcaption, .kitten-card figcaption { font: italic 18px/1.5 Georgia, serif; color: #71514d; padding: 14px 6px 0; }
.memory-photo { width: min(100%, 400px); transform: rotate(2deg); }
.memory-photo img { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.movie-frame { max-width: 760px; padding: 12px; background: #322a2b; border-radius: 5px; margin: 0 auto; box-shadow: 0 15px 35px #4e30221a; }
.movie-label { display: flex; justify-content: space-between; align-items: center; padding: 2px 5px 13px; color: #e3cbbb; font-size: 9px; letter-spacing: 2px; }
video { display: block; width: 100%; max-height: 440px; background: #171415; }
.kitten-pair { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 16px; max-width: 700px; margin: 30px auto 0; }
.kitten-card { margin: 0; padding: 12px 12px 20px; background: #fffdf7; box-shadow: 0 10px 24px #4e302210; transform: rotate(-3deg); }
.kitten-card:last-child { transform: rotate(3deg); }
.kitten-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.comparison { color: var(--wine); font: italic 40px Georgia, serif; }
.reveal-card { aspect-ratio: 1; width: 100%; background: #ede1d7; border: 1px dashed #b58d82; color: var(--wine); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; transform: rotate(3deg); transition: background .2s; }
.reveal-card:hover { background: #e7d4c8; }
.reveal-heart { font: 72px Georgia, serif; }
.reveal-card > span:not(.reveal-heart) { font: italic 24px Georgia, serif; }
.reveal-card small { color: #78605a; font-size: 11px; }
.final-message { color: var(--wine); font: italic 27px/1.4 Georgia, serif; margin: 30px 0 0; animation: appear .6s ease both; }
.login-scene { max-width: 660px; padding-block: 55px; }
.login-scene h1 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -2px; }
.login-heart { display: block; color: var(--wine); font: 76px/1.2 Georgia, serif; margin-bottom: 22px; }
.login-form { width: min(100%, 340px); margin: 0 auto; text-align: left; }
.login-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.login-form input { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 3px; background: #fffdf7; padding: 12px 15px; font: 18px "Segoe UI", sans-serif; color: var(--ink); }
.login-form input:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.login-form .btn { width: 100%; margin-top: 18px; }
.login-error { color: var(--wine); font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.noscript-note { text-align: center; padding: 16px; }
@keyframes appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1500px) { .intro { padding-top: 90px; padding-bottom: 100px; } }
@media (max-width: 760px) {
  .masthead { height: 80px; margin-inline: 6%; }
  .edition { display: none; }
  .header-note { font-size: 15px; }
  .wordmark { font-size: 20px; }
  .scene { width: 86%; }
  .intro { grid-template-columns: 1fr; gap: 34px; padding: 42px 0 46px; }
  h1 { font-size: clamp(48px, 9.5vw, 70px); }
  .eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 22px; }
  .intro-copy { text-align: center; }
  .intro-copy .eyebrow { justify-content: center; }
  .description { font-size: 14px; }
  .keepsake { width: min(340px, 90%); margin: 0 auto; padding-top: 25px; }
  .heart-one { top: -12px; right: -12px; font-size: 46px; }
  .heart-two { left: -28px; font-size: 30px; }
  .love-seal { width: 72px; height: 72px; font-size: 17px; }
  .polaroid figcaption { font-size: 19px; }
  .page-footer { margin-inline: 6%; flex-wrap: wrap; padding: 20px 0; gap: 18px; }
  .footer-note { flex-basis: 100%; text-align: center; font-size: 13px; }
  .chapter { padding: 35px 0; }
  .choices { gap: 10px; }
  .character { padding: 6px; }
  .character > span { font-size: 14px; padding: 12px 0 4px; }
  .character > span > span { display: none; }
  .scene-nav .btn { gap: 16px; padding: 13px 17px; font-size: 12px; }
  .kitten-pair { gap: 8px; grid-template-columns: 1fr 20px 1fr; }
  .kitten-card { padding: 7px 7px 14px; }
  .kitten-card figcaption { font-size: 14px; }
  .comparison { font-size: 26px; }
  .reveal-card { gap: 8px; padding: 8px; }
  .reveal-heart { font-size: 44px; }
  .reveal-card > span:not(.reveal-heart) { font-size: 18px; }
  .reveal-card small { font-size: 10px; }
  .final-message { font-size: 24px; }
}
/* Original animated stickers behind the gift; pointer hearts above it. */
.masthead, main, .page-footer { position: relative; z-index: 1; }
.gift-effects, .falling, .rising { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.gift-effects { display: contents; }
.falling { z-index: 0; }
.falling img { position: absolute; left: var(--x); top: -90px; width: var(--size); height: auto; animation: sticker-fall var(--duration) linear var(--delay) infinite; }
.rising { z-index: 5; }
.trail-heart { position: absolute; width: 30px; height: 30px; object-fit: contain; animation: heart-trail 1s ease-out forwards; }
.paused .falling img { animation-play-state: paused; }
@keyframes sticker-fall {
  from { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(25px, 55vh, 0); }
  to { transform: translate3d(-10px, calc(100vh + 180px), 0); }
}
@keyframes heart-trail {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.7); }
  to { opacity: 0; transform: translate(calc(-50% + var(--shift-x)), -110px) rotate(var(--rotation)) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
