/* ---------- menu ---------- */
.site-head nav a[aria-current="page"] { color: var(--spruce); text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 0.4em; }

/* ---------- page openers ---------- */
.page-top { padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-top h1 { font-size: clamp(2.75rem, 10vw, 5.5rem); font-weight: 300; }
.page-top .lede { max-width: 36rem; margin: 1rem 0 0; color: var(--spruce-soft); font-size: 1.15rem; }
main > section:last-child { padding-bottom: clamp(3rem, 8vw, 5.5rem); }

/* ---------- home: countdown ---------- */
.count { display: inline-block; margin: 1.1rem 0 0; padding: 0.4rem 1.1rem; border-radius: 999px; background: var(--sage-wash); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- home: schedule ---------- */
.days .detail { display: grid; gap: 0.15rem; justify-items: start; }
.days .detail .time { color: var(--spruce); font-weight: 600; }
.days .detail .note { margin-top: 0.35rem; }
.days .detail a.small, .links a { color: var(--spruce); }
.days .detail a.small { font-size: 0.95rem; }
.days li.has-photo { grid-template-columns: 8.5rem 1fr 6.5rem; }
.days .thumb { width: 6.5rem; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 12px 12px; }
@media (max-width: 30rem) { .days li.has-photo { grid-template-columns: 1fr 5rem; } .days li.has-photo .what { grid-column: 1 / -1; } .days .thumb { width: 5rem; } }

/* ---------- home: doors to the other pages ---------- */
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.doors a { display: flex; flex-direction: column; gap: 0.5rem; padding: 2.25rem 1.25rem 1.5rem; min-height: 11rem; text-decoration: none; background: var(--paper); border-radius: 999px 999px 18px 18px; text-align: center; transition: transform 200ms ease, background-color 200ms ease; }
.doors a:nth-child(1) { background: var(--blush); }
.doors a:nth-child(2) { background: var(--sage-wash); }
.doors a:nth-child(3) { background: #dbe6ea; }
.doors a:nth-child(4) { background: #efe9d6; }
.doors a:hover { transform: translateY(-4px); }
.doors b { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 340; font-size: 1.6rem; line-height: 1.1; margin-top: auto; }
.doors span { font-size: 0.95rem; color: var(--spruce-soft); line-height: 1.4; }
@media (max-width: 52rem) { .doors { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .doors a { transition: none; } .doors a:hover { transform: none; } }

/* ---------- home: gifts ---------- */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.picks a { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 1rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; }
.picks a:hover { background: var(--sage-wash); border-color: var(--sage); }
.picks b { font-weight: 500; }
.picks span { font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 1.3rem; }
@media (max-width: 30rem) { .picks { grid-template-columns: 1fr; } }
#own-amount { margin: 1rem 0 0; }
.links { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.links li { padding-block: 0.8rem; border-top: 1px solid var(--line); font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 1.3rem; }

/* ---------- story ---------- */
.chapters { display: grid; gap: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(3rem, 8vw, 5.5rem); }
.chapters:empty { display: none; }
.chapter { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.chapter.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.chapter.flip > figure { order: 2; }
.chapter.plain { grid-template-columns: minmax(0, 40rem); }
.chapter .arch { aspect-ratio: 3 / 4; }
.chapter h2 { font-size: clamp(1.9rem, 5vw, 2.75rem); margin-bottom: 1rem; }
.chapter p { margin: 0 0 1rem; max-width: 38rem; font-size: 1.1rem; line-height: 1.7; }
@media (max-width: 46rem) { .chapter, .chapter.flip { grid-template-columns: 1fr; } .chapter.flip > figure { order: 0; } .chapter .arch { width: min(100%, 20rem); } }

.saids { display: grid; gap: 1rem; margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.said { background: var(--paper); border-radius: 24px; padding: clamp(1.25rem, 4vw, 2rem); }
.said h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.said .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.said p { margin: 0; padding: 1rem 1.1rem; border-radius: 16px; background: var(--blush); }
.said p + p { background: #dbe6ea; }
.said b { display: block; font-size: 0.9rem; font-weight: 600; color: var(--spruce-soft); margin-bottom: 0.2rem; }
@media (max-width: 34rem) { .said .pair { grid-template-columns: 1fr; } }

.places { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 2.5rem); margin-top: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
#map { height: min(70vh, 30rem); border-radius: 24px; overflow: hidden; background: var(--sage-wash); z-index: 0; }
#place-list { margin: 0; padding: 0; list-style: none; counter-reset: place; }
#place-list li { counter-increment: place; display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.75rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
#place-list li::before { content: counter(place); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--spruce); color: var(--paper); display: grid; place-items: center; font-size: 0.9rem; font-weight: 600; }
#place-list b { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 340; font-size: 1.25rem; }
#place-list span { grid-column: 2; color: var(--spruce-soft); }
.pin { background: var(--spruce); color: var(--paper); border-radius: 50%; display: grid; place-items: center; font: 600 0.85rem var(--body); border: 2px solid var(--paper); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
@media (max-width: 46rem) { .places { grid-template-columns: 1fr; } }

/* ---------- fun ---------- */
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 1.75rem 0 0; }
.who label { font-weight: 600; }
.who input { width: min(100%, 18rem); }
#prompts .field { margin-top: 1.75rem; }
.note-form .done { margin: 1rem 0 0; color: var(--spruce); font-weight: 500; text-align: center; }

.jar { position: relative; width: 7.5rem; height: 9.5rem; margin-top: 2rem; border: 3px solid var(--sage); border-top-width: 0; border-radius: 12px 12px 34px 34px; background: linear-gradient(to top, rgba(138,155,130,.18), rgba(138,155,130,.04)); }
.jar::before { content: ""; position: absolute; left: -0.6rem; right: -0.6rem; top: -0.9rem; height: 0.9rem; border: 3px solid var(--sage); border-radius: 8px; background: var(--mist); }
.jar i { position: absolute; bottom: 0.7rem; left: 1rem; width: 2.6rem; height: 1rem; border-radius: 3px; background: var(--sandstone); transform: rotate(-12deg); }
.jar i:nth-child(2) { left: 3.3rem; bottom: 1rem; background: var(--dusk); transform: rotate(18deg); }
.jar i:nth-child(3) { left: 1.9rem; bottom: 2rem; background: var(--sage); transform: rotate(4deg); }
.jar i:nth-child(4) { left: 2.2rem; bottom: 3.2rem; background: #e9c46a; transform: rotate(-20deg); opacity: 0; }
.jar.drop i:nth-child(4) { opacity: 1; animation: slip 900ms cubic-bezier(.3,.7,.3,1) both; }
@keyframes slip { from { transform: translateY(-9rem) rotate(40deg); opacity: 0; } 30% { opacity: 1; } to { transform: rotate(-20deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .jar.drop i:nth-child(4) { animation: none; } }

#quiz .progress { margin: 0 0 0.5rem; color: var(--spruce-soft); font-size: 0.95rem; }
#quiz h3 { font-size: 1.6rem; line-height: 1.2; }
#quiz .options { display: grid; gap: 0.6rem; margin-top: 1.25rem; }
#quiz .options button { font: inherit; text-align: left; padding: 0.9rem 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: inherit; cursor: pointer; }
#quiz .options button:hover:not(:disabled) { border-color: var(--sage); background: var(--sage-wash); }
#quiz .options button:disabled { cursor: default; opacity: 0.75; }
#quiz .options .right { background: var(--sage-wash); border-color: var(--sage); opacity: 1; font-weight: 600; }
#quiz .options .right::after { content: " ✓"; }
#quiz .options .wrong { background: #f6e3de; border-color: #d9a79c; opacity: 1; }
#quiz .after { min-height: 1.6em; margin: 1rem 0; font-weight: 500; }
#quiz .score { font-size: clamp(2.5rem, 9vw, 4rem); font-weight: 300; }

/* ---------- photos ---------- */
.gallery figure { position: relative; }
.gallery figcaption { position: absolute; left: 0.6rem; bottom: 0.6rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: rgba(251,251,247,.9); font-size: 0.8rem; text-transform: capitalize; }
#guest-gallery:empty { display: none; }

/* ---------- our firsts ---------- */
.firsts { display: grid; }
.first { display: grid; grid-template-columns: 9rem 1fr; gap: clamp(1rem, 4vw, 3rem); padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.first .date { margin: 0.5rem 0 0; color: var(--spruce-soft); font-weight: 500; }
.first h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.first .note { margin: 0.9rem 0 0; max-width: 38rem; font-size: 1.1rem; line-height: 1.7; white-space: pre-line; }
.first-photos { display: grid; gap: 0.75rem; margin-top: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.first-photos.n1 { grid-template-columns: minmax(0, 34rem); }
.first-photos.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.first-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; background: var(--sage-wash); }
.first-photos.n1 img { aspect-ratio: auto; }
.first-empty { font-family: var(--display); font-variation-settings: "SOFT" 100; font-style: italic; font-size: clamp(1.3rem, 4vw, 1.8rem); color: var(--spruce-soft); padding-block: 2rem 4rem; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 40rem) { .first { grid-template-columns: 1fr; gap: 0.25rem; } .first .date { margin: 0; } .first-photos, .first-photos.n2 { grid-template-columns: 1fr 1fr; } }

/* ---------- studio (hosts) ---------- */
.studio details { background: var(--paper); border-radius: 20px; margin-top: 0.75rem; }
.studio summary { cursor: pointer; padding: 1.1rem 1.4rem; font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 1.35rem; }
.studio summary small { font-family: var(--body); font-size: 0.9rem; color: var(--spruce-soft); margin-left: 0.6rem; }
.studio .body { padding: 0 1.4rem 1.4rem; }
.studio .item { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin-bottom: 0.75rem; background: #fff; }
.studio .item-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--spruce-soft); font-size: 0.9rem; }
.studio .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.studio .f { display: grid; gap: 0.25rem; align-content: start; }
.studio .f.wide { grid-column: 1 / -1; }
.studio .f > label, .studio .f > span { font-size: 0.9rem; font-weight: 600; }
.studio input[type="text"], .studio input[type="date"], .studio input[type="number"], .studio textarea, .studio select { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem; }
.studio textarea { min-height: 5rem; }
.studio .thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.studio .thumbs figure { margin: 0; position: relative; }
.studio .thumbs img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 10px; display: block; }
.studio .thumbs figure button { position: absolute; top: -0.4rem; right: -0.4rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 0; background: var(--spruce); color: #fff; cursor: pointer; line-height: 1; }
.studio .bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }
.studio .saved { color: var(--spruce); font-weight: 500; }
.studio .hint { color: var(--spruce-soft); font-size: 0.92rem; margin: 0 0 0.9rem; }
.studio h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); margin-top: 3rem; }
.studio .pending { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.studio .pending img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--sage-wash); }
.studio .pending p { margin: 0.35rem 0; font-size: 0.9rem; text-transform: capitalize; }
.studio table td { white-space: pre-line; }
