@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f5f3eb;
  --ink: #262b31;
  --accent: #2954c8;
  --muted: #626665;
  --line: #d6d8cd;
  --yellow: #f8e16c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 25px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Manrope', Arial, sans-serif; font-size: 14px; line-height: 1.75; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #de6a2b; outline-offset: 5px; }
h1, h2, h3, p { margin-top: 0; }
em { color: var(--accent); font-style: normal; }

.topbar { max-width: 1280px; margin: auto; padding: 24px 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { font-size: 24px; font-weight: 800; letter-spacing: -1px; text-decoration: none; white-space: nowrap; }
.brand span { display: inline-block; margin-left: 10px; color: var(--accent); }
.top-note, .edition, .eyebrow, .section-mark, .quest-label, .paper-heading, .paper-bottom, footer { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.top-note { background: var(--yellow); padding: 5px 12px; transform: rotate(-2deg); }
.edition { color: var(--muted); }
main { max-width: 1188px; margin: auto; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 60px; padding: 75px 36px 85px; }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 9px; }
.eyebrow span { width: 7px; height: 7px; flex: 0 0 7px; background: var(--accent); border-radius: 50%; }
h1 { font-size: clamp(50px, 5.5vw, 72px); line-height: 1.08; font-weight: 800; letter-spacing: -3px; margin: 26px 0; }
h1 em { display: inline-block; transform: rotate(-2deg); }
p.intro { color: var(--muted); font-size: 14px; line-height: 1.95; margin-bottom: 28px; }
.button { display: inline-flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--accent); color: #fff; border: 2px solid var(--ink); padding: 15px 23px; text-decoration: none; border-radius: 8px; font-size: 12px; font-weight: 800; min-height: 54px; box-shadow: 4px 4px 0 var(--ink); transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button span { font-size: 20px; }
.tiny { font-size: 10px; color: var(--muted); margin: 16px 0 0; }
.art { position: relative; min-height: 525px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse, #dfebdf 0, transparent 67%); }
.paper { background: #fffdf5; width: 310px; min-height: 414px; box-shadow: 8px 8px 0 #262b31; transform: rotate(-5deg); text-align: center; position: relative; padding: 24px 18px; border: 2px solid var(--ink); border-radius: 5px; }
.paper-heading { font-size: 9px; border-bottom: 2px dashed var(--line); display: block; padding-bottom: 15px; }
.cake-art { height: 235px; width: 100%; display: block; margin: 5px auto 0; }
.paper-message { font-size: 23px; font-weight: 800; line-height: 1.25; display: block; color: var(--ink); }
.paper-bottom { display: block; font-size: 8px; margin-top: 18px; color: var(--muted); }
.seal { position: absolute; bottom: 46px; right: 8px; background: var(--yellow); color: var(--ink); width: 110px; height: 110px; border-radius: 50%; text-align: center; display: flex; flex-direction: column; justify-content: center; font-size: 14px; font-weight: 700; transform: rotate(10deg); box-shadow: 3px 3px 0 var(--ink); border: 2px solid var(--ink); }
.seal strong { font-size: 14px; }
.art-star { position: absolute; color: var(--accent); font-size: 53px; font-weight: 800; }
.star-one { top: 6px; right: 8px; }
.star-two { bottom: 25px; left: 1px; font-size: 38px; transform: rotate(15deg); }
.vertical-note { position: absolute; right: -26px; top: 180px; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; writing-mode: vertical-rl; color: var(--muted); }
.art-caption { position: absolute; bottom: -8px; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
h2 { font-size: 36px; line-height: 1.25; font-weight: 800; letter-spacing: -1.2px; }
.section-mark { color: var(--muted); display: block; margin-bottom: 20px; font-size: 9px; }
.wishes { padding: 60px 36px 68px; border-top: 1px solid var(--line); }
.wishes > h2 { margin-bottom: 38px; }
.wish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.wish-grid article + article { border-left: 1px solid var(--line); padding-left: 30px; }
.wish-grid article > span { color: var(--accent); font-size: 28px; display: block; margin-bottom: 12px; font-weight: 800; }
.wish-grid h3 { font-size: 18px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.wish-grid p { color: var(--muted); font-size: 12px; margin: 0; }
.journey { padding: 60px 36px 75px; background: #e9eddf; border-top: 1px solid var(--line); scroll-margin-top: 15px; }
.journey-heading { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 30px; }
.journey-heading h2 { margin-bottom: 0; }
.journey-heading p { font-size: 12px; color: var(--muted); margin: 20px 0 0; }
.quest-shell { display: grid; grid-template-columns: 255px 1fr; background: #fffdf5; border: 2px solid var(--ink); border-radius: 10px; min-height: 430px; overflow: hidden; box-shadow: 5px 5px 0 #c9cdbc; }
aside { padding: 32px 26px; background: #f2eed7; border-right: 1px solid var(--line); }
.quest-label { font-size: 9px; color: var(--muted); }
ol { padding: 0; margin: 26px 0; list-style: none; }
ol li { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #70756b; margin: 18px 0; }
ol li span { flex: 0 0 27px; height: 27px; border: 1px solid #aeb3a4; border-radius: 6px; display: grid; place-items: center; font-size: 9px; }
ol li.active { color: var(--accent); font-weight: 800; }
ol li.active span { background: var(--accent); color: white; border-color: var(--accent); }
ol li.done span { background: #d8e2c4; color: #40502e; border-color: #afbf99; }
.spark-count { font-size: 23px; color: var(--accent); letter-spacing: 5px; }
.aside-note { font-size: 10px; color: var(--muted); margin-top: 10px; }
.quest-content { padding: 42px 40px; align-self: center; min-width: 0; }
.game-kicker { color: var(--accent); letter-spacing: 1.3px; font-weight: 800; font-size: 9px; margin-bottom: 14px; }
.game-icon { font-size: 35px; color: var(--accent); margin-bottom: 12px; }
.quest-content h3 { font-size: 29px; letter-spacing: -.8px; line-height: 1.2; font-weight: 800; margin-bottom: 14px; }
.game-text { color: var(--muted); font-size: 12px; max-width: 410px; margin-bottom: 24px; }
.code-form { display: flex; gap: 10px; flex-wrap: wrap; }
.code-form label { width: 100%; font-size: 11px; font-weight: 700; color: var(--muted); }
input { background: #fffdf5; border: 2px solid #a4ab9b; border-radius: 8px; min-height: 54px; padding: 12px 15px; width: min(100%, 240px); min-width: 0; font-size: 16px; }
.code-form .button { padding: 12px 22px; }
.privacy { font-size: 10px; color: var(--muted); margin-top: 17px; }
#feedback { font-size: 12px; color: var(--accent); margin: 15px 0 0; min-height: 21px; }
.answers { display: grid; gap: 10px; max-width: 350px; }
.answer, .memory-card, .candle { border: 2px solid var(--line); background: var(--paper); border-radius: 8px; min-height: 48px; color: var(--ink); }
.answer { font-weight: 600; padding: 10px 12px; }
.answer:hover { border-color: var(--accent); background: #e4eafb; }
.memory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; }
.memory-card { height: 70px; font-size: 28px; color: var(--accent); }
.memory-card.matched { background: #e2edcc; border-color: #a9be8c; }
.memory-card:disabled { opacity: 1; cursor: default; }
.candles { display: flex; gap: 10px; margin: 22px 0; flex-wrap: wrap; }
.candle { width: 51px; height: 80px; font-size: 30px; background: #fff0b0; }
.candle.blown { background: #e2edcc; color: #52653d; }
.candle.blown:disabled { opacity: 1; }
.gift { background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; padding: 24px; margin: 20px 0; }
.gift .gift-title { font-size: 24px; line-height: 1.25; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.gift p { font-size: 12px; color: #4d503d; margin: 0; }
.gift-link { margin-top: 10px; }
.closing { text-align: center; padding: 65px 24px 70px; }
.closing > span:first-child { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 15px; padding: 0 15px; font-size: 30px; transform: rotate(-7deg); }
.closing h2 { font-size: 35px; margin: 24px 0 20px; }
.closing p { font-size: 13px; color: var(--muted); }
.signature { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 800; color: var(--accent); }
footer { border-top: 1px solid var(--line); max-width: 1188px; margin: auto; padding: 23px 36px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 8px; }
footer span:last-child { letter-spacing: 0; font-size: 10px; font-weight: 500; }
.confetti { position: fixed; pointer-events: none; top: -20px; z-index: 9; width: 8px; height: 13px; background: var(--accent); }
.confetti:nth-of-type(3n) { background: var(--yellow); }
.confetti:nth-of-type(3n + 1) { background: #f5894d; }

@media (min-width: 1500px) {
  .hero { padding-top: 95px; padding-bottom: 100px; }
}

@media (max-width: 800px) {
  .topbar { padding: 18px 24px; }
  .edition { display: none; }
  .hero { gap: 20px; padding: 50px 24px 65px; }
  .art { min-height: 440px; }
  .paper { width: 255px; min-height: 370px; }
  .cake-art { height: 210px; }
  .paper-message { font-size: 20px; }
  .seal { width: 95px; height: 95px; right: -5px; bottom: 20px; font-size: 12px; }
  .seal strong { font-size: 12px; }
  .vertical-note { right: -12px; }
  .wish-grid { gap: 25px; }
  .wish-grid article + article { padding-left: 20px; }
  .quest-shell { grid-template-columns: 205px 1fr; }
  aside { padding: 24px 18px; }
  .quest-content { padding: 30px 25px; }
  .journey-heading { display: block; }
  .journey-heading p { margin-top: 15px; }
}

@media (max-width: 600px) {
  .topbar { padding: 16px 20px; gap: 12px; }
  .brand { font-size: 22px; }
  .top-note { font-size: 8px; letter-spacing: .8px; padding: 4px 8px; }
  .hero { grid-template-columns: 1fr; padding: 42px 24px 45px; gap: 24px; }
  .eyebrow { font-size: 8px; letter-spacing: .6px; }
  h1 { font-size: clamp(41px, 11.5vw, 62px); margin: 23px 0; letter-spacing: -2px; }
  p.intro { font-size: 12px; }
  .hero-copy > .button { width: 100%; font-size: 12px; }
  .tiny { text-align: center; font-size: 9px; }
  .art { min-height: 420px; margin: 2px 12px 10px; }
  .paper { width: min(265px, calc(100% - 20px)); min-height: 365px; }
  .cake-art { height: 205px; }
  .paper-message { font-size: 20px; }
  .seal { right: -2px; bottom: 16px; }
  .star-one { top: 0; right: -4px; font-size: 42px; }
  .star-two { bottom: 4px; }
  .art-caption { bottom: -25px; font-size: 9px; }
  .vertical-note { right: -14px; font-size: 7px; }
  .wishes { padding: 42px 24px; }
  .section-mark { font-size: 8px; letter-spacing: 1px; }
  h2 { font-size: 28px; letter-spacing: -.8px; }
  .wish-grid { grid-template-columns: 1fr; gap: 25px; }
  .wish-grid article { position: relative; padding-left: 42px; }
  .wish-grid article + article { border-left: 0; padding-left: 42px; border-top: 1px solid var(--line); padding-top: 24px; }
  .wish-grid article > span { position: absolute; left: 0; top: 0; }
  .wish-grid article + article > span { top: 24px; }
  .wish-grid h3 { font-size: 18px; }
  .wish-grid p { font-size: 12px; }
  .journey { padding: 42px 18px; }
  .journey-heading { padding: 0 6px; }
  .journey-heading h2 { font-size: 28px; }
  .quest-shell { grid-template-columns: 1fr; }
  aside { padding: 18px 20px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  ol { display: flex; justify-content: space-between; margin: 15px 0 0; gap: 6px; }
  ol li { font-size: 0; margin: 0; gap: 0; }
  ol li span { flex-basis: 31px; width: 31px; height: 31px; font-size: 11px; }
  .aside-note, .spark-count { display: none; }
  .quest-content { padding: 28px 20px; min-height: 350px; }
  .quest-content h3 { font-size: 25px; }
  .code-form { display: block; }
  .code-form label { display: block; margin-bottom: 7px; }
  input { width: 100%; max-width: none; }
  .code-form .button { width: 100%; margin-top: 12px; justify-content: center; }
  .game-text { font-size: 12px; }
  .memory-card { height: 72px; }
  .candle { width: 46px; }
  .candles { gap: 7px; }
  .gift { padding: 18px; }
  .gift .gift-title { font-size: 21px; }
  .closing { padding: 45px 24px; }
  .closing h2 { font-size: 28px; }
  .closing p { font-size: 12px; }
  footer { padding: 20px; gap: 15px; flex-wrap: wrap; }
  .button { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}
