/* Warm ivory stock with a single muted gold accent; every ornament, kicker and control draws on these. */
:root {
  --canvas: #e9e3da;
  --paper: #faf7f2;
  --paper-strong: #fffdf9;
  --ink: #3a332c;
  --muted: #8a8075;
  --line: #e6ddd0;
  --accent: #a8875a;
  --accent-soft: #d6c4a6;
  --accent-dark: #5e4b35;
  --sage: var(--accent);
  --sage-dark: var(--accent-dark);
  --rose: var(--accent);
  --rose-soft: var(--paper);
  --blue-soft: var(--paper);
  --shadow: rgba(74, 56, 34, 0.12);
  --card-shadow: 0 1px 2px rgba(94, 75, 53, 0.04), 0 10px 26px rgba(94, 75, 53, 0.06);
  --paper-veil: rgba(250, 247, 242, 0.64);
  /* One warm, slightly muted grade over every photo so studio shots and phone snaps read as one set. */
  --photo-grade: saturate(0.84) contrast(0.97) sepia(0.07) brightness(1.02);
  --paper-texture: url("../../assets/images/paper-texture.jpg");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Gowun Batang", "Apple SD Gothic Neo", serif;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  word-break: keep-all;
  /* Scrolling only: no pinch or double-tap zoom on the page. The map handles its own gestures. */
  touch-action: pan-x pan-y;
}

button,
input,
textarea {
  font: inherit;
}

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

img {
  max-width: 100%;
}

.invitation-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
  background-color: var(--paper);
  background-image: var(--paper-texture);
  background-position: center top;
  background-size: 720px auto;
  background-repeat: repeat-y;
  box-shadow: 0 0 54px rgba(74, 56, 34, 0.12);
}

/* An ivory veil over both texture layers keeps the grain as a whisper instead of a grey wash. */
.invitation-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: var(--paper-veil);
}

.invitation-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: var(--paper-texture);
  background-position: center 540px;
  background-size: 720px auto;
  background-repeat: repeat-y;
  -webkit-mask-image: repeating-linear-gradient(
    to bottom,
    #000 0,
    transparent 16px,
    transparent 1064px,
    #000 1080px
  );
  mask-image: repeating-linear-gradient(
    to bottom,
    #000 0,
    transparent 16px,
    transparent 1064px,
    #000 1080px
  );
}

/* Sits in the top corner; it steps down below the menu bar only while that bar is showing. */
.audio-toggle {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top) + 10px));
  transition: top 0.35s ease;
  right: max(14px, calc((100vw - 560px) / 2 + 14px));
  z-index: 50;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 196, 166, 0.7);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 4px 14px rgba(94, 75, 53, 0.1);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.audio-toggle.is-under-nav {
  top: max(56px, calc(env(safe-area-inset-top) + 46px));
}

.audio-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.audio-visualizer {
  height: 12px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

/* Whole-pixel bar widths keep every bar equally thick at any screen density. */

/* Bars rest low when paused and rise and fall smoothly, out of step, while playing. */
.visual-bar {
  width: 2px;
  height: 12px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.92;
  transform: scaleY(0.3);
  transform-origin: bottom;
  transition: transform 0.4s ease;
}

.audio-toggle.is-playing .visual-bar {
  animation: equalizer 1.2s ease-in-out infinite;
}

.audio-toggle.is-playing .visual-bar:nth-child(1) {
  animation-duration: 1.2s;
  animation-delay: -0.4s;
}

.audio-toggle.is-playing .visual-bar:nth-child(2) {
  animation-duration: 1.1s;
  animation-delay: -0.9s;
}

.audio-toggle.is-playing .visual-bar:nth-child(3) {
  animation-duration: 1.3s;
  animation-delay: -0.2s;
}

.audio-toggle.is-playing .visual-bar:nth-child(4) {
  animation-duration: 1.15s;
  animation-delay: -0.6s;
}

.audio-toggle.is-playing .visual-bar:nth-child(5) {
  animation-duration: 1.25s;
  animation-delay: -1s;
}

/* A full-bleed poster cover: the photo fills the first screen, script title above, names and date below. */
.hero {
  position: relative;
  height: 100vh;
  height: calc(var(--stable-vh, 1vh) * 100);
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: #fffdf9;
  background: #2f271f;
}

/* Soft falloffs at the top and bottom carry the type over foliage and fabric without darkening the couple. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(32, 24, 16, 0.5) 0%, rgba(32, 24, 16, 0.14) 22%, rgba(32, 24, 16, 0) 32%, rgba(32, 24, 16, 0) 56%, rgba(32, 24, 16, 0.55) 100%);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 42%;
  filter: var(--photo-grade);
  animation: heroReveal 1.8s ease both;
}

/* Kept within the top fifth, over the darker canopy, so the title never lands on the pale backdrop. */
.hero-copy {
  position: absolute;
  z-index: 1;
  top: max(5.5svh, 40px);
  right: 0;
  left: 0;
  text-align: center;
  text-shadow: 0 2px 18px rgba(32, 24, 16, 0.45);
}

.hero-kicker {
  margin: 0 0 6px;
  font: 600 0.7rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font: 400 clamp(2.5rem, 11.5vw, 3.3rem)/1 "Great Vibes", cursive;
}

.hero-footer {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: max(36px, calc(env(safe-area-inset-bottom) + 26px));
  left: 0;
  text-align: center;
  text-shadow: 0 1px 12px rgba(32, 24, 16, 0.3);
}

.hero-names {
  margin: 0;
  font: 400 1.3rem/1.3 "Gowun Batang", serif;
  letter-spacing: 0.26em;
}

.hero-names i {
  margin: 0 0.45em 0 0.2em;
  font-style: normal;
  opacity: 0.72;
}

.hero-date {
  margin: 14px 0 0;
  font: 600 0.78rem/1 "Cormorant Garamond", serif;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.3em;
}

.hero-venue {
  margin: 8px 0 0;
  font: 400 0.74rem/1.4 "Gowun Batang", serif;
  letter-spacing: 0.08em;
  opacity: 0.88;
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 46px;
  padding: 0 max(10px, 3vw);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  border-bottom: 1px solid rgba(214, 196, 166, 0.45);
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(14px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Tucked away while reading down the page; it slides back the moment the guest scrolls up. */
.quick-nav.is-tucked {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.quick-nav a {
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: #74695d;
  font: 400 0.76rem/1 "Gowun Batang", serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.quick-nav a:active {
  color: var(--ink);
}

.section {
  position: relative;
  padding: 92px 30px;
  background-color: transparent;
}

.section-narrow {
  padding-right: 34px;
  padding-left: 34px;
}

.section.reveal-target {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.section.reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.text-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

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

.section-kicker {
  margin: 0 0 12px;
  color: var(--rose);
  font: 600 0.7rem/1.3 "Cormorant Garamond", serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-heading h2,
.intro h2,
.summary-copy h2 {
  margin: 0;
  font-family: "Gowun Batang", serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.section-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.intro {
  text-align: center;
  background-color: transparent;
}

.intro h2 {
  margin-top: 8px;
}

.botanical-mark {
  width: 90px;
  height: 28px;
  margin: 28px auto 24px;
  position: relative;
}

.botanical-mark::before,
.botanical-mark::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 34px;
  height: 1px;
  background: var(--accent-soft);
}

.botanical-mark::before {
  left: 0;
}

.botanical-mark::after {
  right: 0;
}

.botanical-mark span {
  position: absolute;
  top: 7px;
  left: 39px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--sage);
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg);
}

.intro-copy {
  margin: 0;
  color: #6b6157;
  font-family: "Gowun Batang", serif;
  font-size: 0.9rem;
  line-height: 2.1;
}

.couple-names {
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.couple-names strong {
  font-family: "Gowun Batang", serif;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.couple-names span {
  color: var(--rose);
}

.wedding-summary {
  padding-top: 62px;
  padding-bottom: 62px;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 22px;
  background-color: transparent;
}

.summary-date {
  margin: 0;
  color: var(--sage-dark);
  font: 400 5.5rem/0.86 "Cormorant Garamond", serif;
  text-align: center;
  border-right: 1px solid var(--accent-soft);
}

.summary-copy h2 {
  font-size: 1.14rem;
  font-weight: 500;
}

.summary-copy p {
  margin: 5px 0 0;
  font-size: 0.78rem;
  line-height: 1.75;
}

.muted {
  color: var(--muted);
}

.couple-section {
  background-color: transparent;
}

.couple-portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
}

.couple-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: var(--photo-grade);
}

.person-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 18px;
}

.person {
  text-align: center;
}

.person-divider {
  background: var(--line);
}

.person-role {
  margin: 0;
  color: var(--rose);
  font: 600 0.68rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.2em;
}

.person h3 {
  margin: 8px 0 10px;
  font-family: "Gowun Batang", serif;
  font-size: 0.88rem;
  font-weight: 400;
}

.person h3 strong {
  margin-left: 4px;
  font-size: 1.06rem;
  font-weight: 700;
}

.person a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--sage);
  color: var(--sage-dark);
  font-size: 0.72rem;
  text-decoration: none;
}

.story-section {
  padding-right: 24px;
  padding-left: 24px;
  color: var(--ink);
  background-color: transparent;
}

.story-section .section-heading {
  padding: 0 12px;
}

.timeline-list {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  background: var(--accent-soft);
  transform: translateX(-50%);
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  align-items: center;
  min-height: 154px;
}

/* Pin every part to one row. Otherwise, on reversed entries, the dot auto-places into a second row below the photo. */
.timeline-photo,
.timeline-dot,
.timeline-copy {
  grid-row: 1;
}

.timeline-photo {
  grid-column: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(168, 135, 90, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background-color: #f1ebe2;
  box-shadow: var(--card-shadow);
}

.timeline-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: var(--photo-grade);
}

.timeline-entry:nth-child(1) .timeline-photo img {
  object-position: 50% 56%;
}

.timeline-entry:nth-child(4) .timeline-photo img {
  object-position: 42% 50%;
}

.timeline-dot {
  grid-column: 2;
  width: 8px;
  height: 8px;
  place-self: center;
  z-index: 1;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.timeline-copy {
  grid-column: 3;
  padding-left: 10px;
}

.timeline-entry-reverse .timeline-photo {
  grid-column: 3;
}

.timeline-entry-reverse .timeline-copy {
  grid-column: 1;
  padding-right: 10px;
  padding-left: 0;
  text-align: right;
}

.timeline-badge {
  display: block;
  color: var(--accent);
  font: 400 0.64rem/1.4 "Gowun Batang", serif;
  letter-spacing: 0.04em;
}

.timeline-copy h3 {
  margin: 6px 0 8px;
  font: 400 1.12rem/1.3 "Gowun Batang", serif;
  letter-spacing: 0.1em;
}

.timeline-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.gallery-section {
  padding-right: 14px;
  padding-left: 14px;
  background-color: transparent;
}

.gallery-section .section-heading {
  padding: 0 16px;
}

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

.gallery-tile {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #efe9e0;
  cursor: zoom-in;
}

.gallery-tile-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-tile-tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-tile-wide {
  grid-column: span 2;
  aspect-ratio: auto;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: var(--photo-grade);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-tile:hover img,
.gallery-tile:focus-visible img {
  transform: scale(1.025);
  filter: var(--photo-grade) brightness(0.94);
}

.calendar-section {
  text-align: center;
  background-color: transparent;
}

.calendar-section .section-heading h2 {
  font: 500 2.4rem/1.1 "Cormorant Garamond", serif;
}

.calendar-grid {
  padding: 18px 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar-row + .calendar-row {
  margin-top: 6px;
}

.calendar-weekday,
.calendar-cell {
  min-height: 36px;
  display: grid;
  place-items: center;
  font: 500 0.9rem/1 "Cormorant Garamond", serif;
  font-variant-numeric: lining-nums;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.calendar-cell.is-empty {
  opacity: 0;
}

.calendar-cell.is-wedding span {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--rose);
}

.calendar-cell.is-wedding span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage-dark);
}

.countdown {
  margin-top: 30px;
}

.countdown-units {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.countdown-units span {
  width: 64px;
  padding: 12px 0 10px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-strong);
  box-shadow: var(--card-shadow);
}

.countdown-units b {
  color: var(--sage-dark);
  font: 400 1.6rem/1 "Cormorant Garamond", serif;
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown-units small {
  color: var(--muted);
  font: 600 0.56rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.2em;
}

.countdown > p:last-child {
  margin: 0;
  font-size: 0.78rem;
}

.countdown strong {
  color: var(--rose);
  font-weight: 600;
}

.location-section {
  background-color: transparent;
}

.address-copy {
  width: 100%;
  margin-bottom: 18px;
  padding: 14px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.address-copy span {
  font-size: 0.78rem;
}

.address-copy strong {
  flex: 0 0 auto;
  color: var(--sage);
  font-size: 0.68rem;
}

.map-embed {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #efe9e0;
  box-shadow: var(--card-shadow);
}

#naver-map {
  width: 100%;
  min-height: 300px;
}

/* Tap-to-unlock veil over the map on phones. */
.map-unlock {
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 0 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 0;
  background: rgba(250, 247, 242, 0.14);
  cursor: pointer;
  touch-action: pan-y;
  transition: opacity 0.3s ease, visibility 0s;
}

.map-unlock span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(58, 51, 44, 0.72);
  font: 400 0.74rem/1.2 "Gowun Batang", serif;
  letter-spacing: -0.01em;
}

.is-map-interactive .map-unlock {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.map-links {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.map-link {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper-strong);
  font-size: 0.67rem;
  text-decoration: none;
}

/* Brand marks stay recognisable but are toned down to sit within the ivory palette. */
.map-icon {
  width: 18px;
  height: 18px;
  filter: saturate(0.5);
}

.transport-list {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.transport-list article {
  position: relative;
  padding: 20px 0 20px 88px;
  border-bottom: 1px solid var(--line);
}

.transport-list article > span {
  position: absolute;
  top: 24px;
  left: 0;
  color: var(--rose);
  font: 600 0.64rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.16em;
}

.transport-list h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.transport-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.75;
}

.account-section {
  background-color: transparent;
}

.account-section .section-kicker {
  color: var(--sage);
}

.account-groups {
  display: grid;
  gap: 10px;
}

.account-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: var(--card-shadow);
}

.account-group summary {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 400 0.86rem/1.4 "Gowun Batang", serif;
  list-style: none;
  cursor: pointer;
}

.account-group summary::-webkit-details-marker {
  display: none;
}

.account-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s ease;
}

.account-group[open]:not(.is-collapsing) summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.account-list {
  margin: 0 18px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.account-list .account-row:last-child {
  border-bottom: 0;
}

.account-row {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.account-row div > span {
  margin-right: 8px;
  color: var(--sage);
  font-size: 0.66rem;
}

.account-row div > strong {
  font-size: 0.84rem;
}

.account-row p {
  margin: 4px 0 0;
  font: 500 0.88rem/1.5 "Cormorant Garamond", "Gowun Batang", serif;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.03em;
}

.account-row button {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-dark);
  background: transparent;
  font-size: 0.68rem;
  cursor: pointer;
}

.account-row-pending p {
  color: var(--muted);
}

.account-row-pending button:disabled {
  border-color: var(--line);
  color: #b0a597;
  background: transparent;
  cursor: default;
}

#copy-status,
#guestbook-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--sage-dark);
  font-size: 0.72rem;
  text-align: center;
}

.guestbook-section {
  background-color: transparent;
}

.guestbook-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.guestbook-item {
  position: relative;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: var(--card-shadow);
}

.guestbook-item::before {
  content: "MESSAGE";
  position: absolute;
  top: 13px;
  right: 14px;
  color: var(--rose);
  font: 600 0.58rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.18em;
}

.guestbook-meta {
  padding-right: 58px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.guestbook-meta strong {
  font-size: 0.8rem;
}

.guestbook-meta time {
  color: var(--muted);
  font-size: 0.62rem;
}

.guestbook-item > p {
  margin: 10px 0 0;
  color: #6b6157;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.guestbook-actions {
  display: flex;
  justify-content: flex-end;
}

.guestbook-delete {
  margin-top: 8px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 0.62rem;
  cursor: pointer;
}

.guestbook-empty {
  padding: 30px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.guestbook-form {
  margin-top: 34px;
  display: grid;
  gap: 8px;
}

.guestbook-form label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper-strong);
  font-size: 0.78rem;
  outline: none;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: #b5aa9c;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(168, 135, 90, 0.12);
}

.button.primary {
  min-height: 50px;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  color: #fffdf9;
  background: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(94, 75, 53, 0.18);
  font-family: "Gowun Batang", serif;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.closing-section {
  position: relative;
  min-height: 440px;
  color: #fff;
  background: var(--sage-dark);
}

.closing-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 30, 20, 0.36);
}

.closing-section img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: var(--photo-grade);
}

.closing-section > div {
  position: relative;
  z-index: 1;
  min-height: 440px;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.closing-section p {
  margin: 0;
  font: 400 1.9rem/1.1 "Great Vibes", cursive;
}

.closing-section h2 {
  margin: 15px 0 18px;
  font-family: "Gowun Batang", serif;
  font-size: 1.38rem;
  font-weight: 400;
  line-height: 1.55;
}

.closing-section span {
  font: italic 400 0.95rem/1.3 "Cormorant Garamond", serif;
}

.footer {
  padding: 25px 16px calc(25px + env(safe-area-inset-bottom));
  color: var(--muted);
  background: transparent;
  text-align: center;
}

.footer small {
  font: 600 0.62rem/1 "Cormorant Garamond", serif;
  letter-spacing: 0.16em;
}

.footer p {
  margin: 12px 0 0;
  font: italic 400 0.75rem/1.4 "Cormorant Garamond", serif;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.gallery-lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(20, 17, 14, 0.96);
  /* No pinch or double-tap zoom on the enlarged photo; swipes still reach the pointer handlers. */
  touch-action: none;
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  grid-template-rows: 54px minmax(0, 1fr) 48px;
  place-items: center;
}

.gallery-lightbox::backdrop {
  background: rgba(20, 17, 14, 0.96);
}

.gallery-lightbox figure {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 12px 24px;
  display: grid;
  place-items: center;
}

.gallery-lightbox figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-nav {
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font: 300 2.2rem/1 "Cormorant Garamond", serif;
  cursor: pointer;
}

.lightbox-close {
  grid-column: 3;
  grid-row: 1;
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 2;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 2;
}

.lightbox-counter {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  font: 500 0.78rem/1 "Cormorant Garamond", serif;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.1em;
}

.toast {
  position: fixed;
  right: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 80;
  min-width: 180px;
  padding: 11px 18px;
  border-radius: 999px;
  color: #fffdf9;
  background: rgba(58, 51, 44, 0.92);
  font-size: 0.72rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

@keyframes heroReveal {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes equalizer {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@media (max-width: 370px) {
  .hero {
    min-height: 570px;
    padding-right: 32px;
    padding-left: 32px;
  }

  .section {
    padding-right: 24px;
    padding-left: 24px;
  }

  .gallery-section {
    padding-right: 0;
    padding-left: 0;
  }

  .story-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .gallery-section .section-heading {
    padding-right: 24px;
    padding-left: 24px;
  }

  .timeline-list {
    gap: 24px;
  }

  .timeline-entry {
    min-height: 136px;
  }
}

@media (min-width: 768px) {
  .invitation-shell {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .hero {
    height: 820px;
  }
}

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

  .hero-image,
  .visual-bar,
  .section.reveal-target,
  .text-reveal,
  .gallery-tile img,
  .toast {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Hidden wedding developer mode */
#dev-trigger { border:0; background:none; color:inherit; font:inherit; padding:14px 4px; cursor:pointer; touch-action:manipulation; }
#dev-trigger:focus-visible { outline:1px solid currentColor; outline-offset:4px; }
#dev-mode { box-sizing:border-box; width:min(460px, calc(100% - 24px)); max-height:90vh; max-height:90dvh; padding:0; border:1px solid #343b5d; border-radius:16px; background:#101426; color:#d5def7; box-shadow:0 24px 100px #0009; overflow:auto; font-family:Consolas,monospace; }
#dev-mode::backdrop { background:#060916d9; backdrop-filter:blur(6px); }
.dev-bar { display:flex; align-items:center; gap:16px; position:sticky; top:0; z-index:1; background:#191e34; border-bottom:1px solid #303652; padding:10px 16px; font-size:12px; }
.dev-lights { color:#c2a0ff; letter-spacing:3px; }
#dev-close { margin-left:auto; border:0; background:none; color:#d5def7; font-size:28px; width:44px; height:44px; cursor:pointer; }
.dev-body { padding:28px 22px 20px; }
.dev-eyebrow { font-size:10px; letter-spacing:1.5px; color:#8495bb; }
#dev-mode h2 { font:600 clamp(19px,5vw,25px)/1.5 Consolas,monospace; color:#61d9ef; margin:15px 0 4px; }
#dev-mode h2 span { color:#c2a0ff; }
.dev-subtitle { color:#8b99bb; font-size:11px; margin-bottom:25px; }
.dev-terminal { background:#171e37; border:1px solid #293454; border-radius:10px; padding:14px; min-height:220px; }
.dev-tab { color:#92a6d9; font-size:11px; margin-bottom:18px; }
.dev-tab span { float:right; color:#607197; }
#dev-output { white-space:pre-wrap; overflow-wrap:anywhere; font:12px/1.9 Consolas,monospace; color:#a8bef0; margin:0; }
.dev-cursor { color:#61d9ef; animation:dev-blink 1s steps(2) infinite; }
.dev-branches { width:100%; height:110px; margin:14px 0; }
.dev-branches path { fill:none; stroke-width:2; stroke-dasharray:200; animation:dev-merge 2s ease both; }
.dev-readme { border-top:1px solid #293454; padding-top:20px; }
#dev-mode h3 { font-size:18px; font-weight:500; margin:18px 0; color:#e4e8fb; }
/* Written as a plain README: the joke is the format, so the text itself stays dry. */
.dev-spec { margin:0 0 28px; }
.dev-spec dt { margin-top:22px; color:#c2a0ff; font-size:13px; }
.dev-spec dd { margin:6px 0 0; color:#d5def7; font-size:13px; line-height:1.9; word-break:keep-all; }
#dev-replay { border:1px solid #39496c; border-radius:6px; background:#1b2440; color:#b4c8f1; padding:12px 16px; min-height:44px; cursor:pointer; font:12px Consolas,monospace; }
.dev-signoff { color:#6e7e9e; font-size:10px; margin-top:24px; }
@keyframes dev-blink { 50% { opacity:0; } }
@keyframes dev-merge { from { stroke-dashoffset:200; } to { stroke-dashoffset:0; } }
@media (prefers-reduced-motion:reduce) { .dev-cursor,.dev-branches path { animation:none; } }

.creator-credit { margin:0; padding:17px 56px 10px; font-family:"Gowun Batang",serif; font-size:10px; font-weight:400; color:var(--muted); text-align:center; letter-spacing:.03em; }
/* Matches the music control: a small ivory glass chip that sits back until it is wanted. */
#dev-trigger { position:fixed; bottom:max(20px, env(safe-area-inset-bottom)); right:max(18px, calc((100vw - 560px) / 2 + 18px)); z-index:60; display:flex; align-items:center; gap:6px; min-height:40px; padding:6px 13px 6px 11px; border:1px solid rgba(214,196,166,.7); border-radius:999px; background:rgba(255,253,249,.82); color:var(--accent-dark); box-shadow:0 4px 14px rgba(94,75,53,.1); backdrop-filter:blur(8px); font:italic 15px/1.2 "Cormorant Garamond",serif; letter-spacing:.3px; cursor:pointer; touch-action:manipulation; }
#dev-trigger svg { width:16px; height:16px; flex-shrink:0; image-rendering:pixelated; }
#dev-trigger:hover { background:var(--paper-strong); border-color:var(--accent-soft); }
#dev-trigger:active { background:#f3ede4; transform:none; box-shadow:none; }
#dev-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.footer { padding-bottom:90px; }

#dev-trigger.is-tucked { opacity:0; visibility:hidden; transform:translateY(12px); transition:opacity .4s ease, transform .4s ease, visibility 0s .4s; }
#dev-trigger.is-tucked.is-shown { opacity:1; visibility:visible; transform:none; transition:opacity .4s ease, transform .4s ease; }

/* Back to top: the same ivory glass as the Cookie chip, centred on the same baseline, and shown with it. */
#to-top { position:fixed; bottom:max(20px, env(safe-area-inset-bottom)); left:50%; z-index:60; display:grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid rgba(214,196,166,.7); border-radius:50%; background:rgba(255,253,249,.82); color:var(--accent-dark); box-shadow:0 4px 14px rgba(94,75,53,.1); backdrop-filter:blur(8px); cursor:pointer; touch-action:manipulation; opacity:0; visibility:hidden; transform:translate(-50%, 12px); transition:opacity .4s ease, transform .4s ease, visibility 0s .4s; }
#to-top.is-shown { opacity:1; visibility:visible; transform:translate(-50%, 0); transition:opacity .4s ease, transform .4s ease; }
#to-top:hover { background:var(--paper-strong); border-color:var(--accent-soft); }
#to-top:active { background:#f3ede4; box-shadow:none; }
#to-top:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#to-top svg { width:16px; height:16px; }
