@font-face {
  font-family: 'Wedding Noto Serif SC';
  src: url('assets/fonts/noto-serif-sc-subset.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-garamond-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-garamond-italic-500.woff2') format('woff2');
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'DM Serif Display';
  src: url('assets/fonts/dm-serif-display-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #302c29;
  --cream: #f6f1e9;
  --paper: #fcfaf6;
  --rose: #b98985;
  --sage: #8e9a88;
  --gold: #b49a6a;
  --line: rgba(62, 51, 42, 0.14);
  --font-serif-cn: 'Wedding Noto Serif SC', 'Source Han Serif SC', 'Noto Serif CJK SC', serif;
  --font-serif-display: 'Cormorant Garamond', serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif-cn);
  overflow-x: hidden;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
.hero {
  height: 100svh;
  min-height: 650px;
  position: relative;
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('assets/web/wedding-hero.jpg') center/cover;
  transform: scale(1.035);
  animation: breathe 12s ease-in-out infinite alternate;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(23, 20, 18, 0.3),
    rgba(23, 20, 18, 0.06) 44%,
    rgba(23, 20, 18, 0.36)
  );
}
.hero-copy {
  position: relative;
  margin-top: -18vh;
  padding: 20px;
}
.eyebrow {
  font:
    500 11px/1.4 Arial,
    sans-serif;
  letter-spacing: 0.34em;
  color: var(--gold);
  text-transform: uppercase;
}
.hero .eyebrow {
  color: #fff;
}
.hero h1 {
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 400;
  letter-spacing: 0.12em;
  margin: 18px 0;
}
.hero h1 i {
  font-family: var(--font-serif-display);
  font-weight: 400;
  font-style: normal;
  margin: 0 0.18em;
}
.hairline {
  height: 1px;
  width: 82px;
  background: rgba(255, 255, 255, 0.65);
  margin: 0 auto 20px;
}
.hero-date {
  font: 500 15px Arial;
  letter-spacing: 0.22em;
}
.hero-date span {
  display: block;
  margin-top: 8px;
  font-size: .72em;
  letter-spacing: .16em;
  opacity: .86;
}.hero-place {
  font-size: 13px;
  letter-spacing: 0.17em;
}
.icon-btn {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: white;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}
.music {
  top: 24px;
  right: 22px;
}
.music svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.music.playing svg {
  animation: spin 3s linear infinite;
  transform-origin: center;
}
.music .slash {
  transition: opacity 0.2s;
  opacity: 0;
}
.music.muted .slash {
  opacity: 1;
}
.scroll-hint {
  position: absolute;
  bottom: 24px;
  color: white;
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.2em;
}
.scroll-hint span {
  display: block;
  width: 1px;
  height: 42px;
  background: white;
  margin: 0 auto 10px;
  animation: pulse 1.6s infinite;
}
.section {
  padding: 100px max(24px, calc((100vw - 1040px) / 2));
  text-align: center;
}
.section h2 {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: 0.13em;
  margin: 12px 0 48px;
}
.countdown {
  background: var(--cream);
}
.count-grid {
  display: flex;
  width: min(100%, 600px);
  max-width: 600px;
  margin: auto;
  justify-content: center;
}
.count-grid div {
  flex: 1;
  min-width: 0;
  padding: 0 clamp(7px, 2.5vw, 18px);
  border-right: 1px solid var(--line);
}
.count-grid div:last-child {
  border: 0;
}
.count-grid b {
  display: block;
  font:
    400 clamp(34px, 7vw, 62px)/1 'DM Serif Display', serif;
  letter-spacing: 0.01em;
}
.count-grid span {
  display: block;
  font-size: 11px;
  color: #81766d;
  margin-top: 12px;
}
.passed {
  font-size: 13px;
  color: var(--rose);
  min-height: 20px;
}
.story-section {
  text-align: left;
}
.story-section > .eyebrow,
.story-section > h2 {
  text-align: center;
}
.timeline {
  max-width: 710px;
  margin: auto;
  position: relative;
}
.timeline:before {
  content: '';
  position: absolute;
  left: 33px;
  top: 61px;
  bottom: 61px;
  width: 1px;
  background: var(--line);
}
.story {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 26px;
  padding: 28px 0;
}
.story > div {
  align-self: start;
  transform: translateY(-8px);
}
.story > span {
  width: 66px;
  height: 66px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  position: relative;
  font: italic 20px var(--font-serif-display);
  color: var(--gold);
}
.story time {
  font: 11px Arial;
  letter-spacing: 0.18em;
  color: var(--rose);
}
.story h3 {
  font-size: 21px;
  letter-spacing: 0.1em;
  margin: 7px 0;
}
.story p {
  color: #817870;
  line-height: 1.9;
  margin: 0;
  font-size: 14px;
}
.gallery-section {
  background: #2d312e;
  color: white;
}
.gallery {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
}
.gallery button {
  border: 0;
  cursor: pointer;
  background-image:
    linear-gradient(0deg, rgba(20, 20, 18, 0.45), transparent 55%),
    url('assets/web/wedding-hero.jpg');
  background-position: var(--p);
  background-size: cover;
  color: white;
  position: relative;
  overflow: hidden;
}
.gallery button:nth-child(2) {
  grid-row: span 2;
}
.gallery button:nth-child(4) {
  grid-column: 3;
}
.gallery span {
  position: absolute;
  bottom: 18px;
  left: 20px;
  letter-spacing: 0.25em;
}
.detail-card {
  max-width: 680px;
  border: 1px solid var(--line);
  padding: 60px clamp(24px, 8vw, 80px);
  box-shadow: 0 30px 80px rgba(83, 66, 50, 0.08);
}
.detail-row {
  display: grid;
  grid-template-columns: 75px 1fr;
  text-align: left;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  line-height: 1.8;
}
.detail-row span {
  font-size: 12px;
  color: #9c8e82;
}
.detail-row strong {
  font-weight: 500;
}
.btn {
  margin-top: 28px;
  width: 100%;
  border: 0;
  background: #75685f;
  color: white;
  padding: 16px 22px;
  font: 14px var(--font-serif-cn);
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: 0.25s;
}
.btn:hover {
  background: var(--rose);
  transform: translateY(-2px);
}
.schedule {
  max-width: 760px;
  margin: 80px auto 0;
  text-align: left;
}
.schedule > div {
  display: grid;
  grid-template-columns: 65px 26px 1fr;
  gap: 18px;
  min-height: 92px;
}
.schedule time {
  font: 500 13px Arial;
  color: var(--rose);
  padding-top: 12px;
}
.schedule span {
  width: 9px;
  height: 9px;
  margin-top: 14px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
}
.schedule span:after {
  content: '';
  position: absolute;
  width: 1px;
  background: var(--line);
  top: 12px;
  bottom: -77px;
  left: 2px;
}
.schedule > div:last-child span:after {
  display: none;
}
.schedule p {
  margin: 0;
  color: #877c73;
  font-size: 13px;
}
.schedule b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 5px;
}
.rsvp-section {
  background: #e7ddd1;
}
.rsvp-form {
  max-width: 620px;
  margin: auto;
  text-align: left;
}
.rsvp-form > label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin: 20px 0;
}
.rsvp-form input[type='text'],
.rsvp-form input[type='tel'],
.rsvp-form input:not([type]),
.rsvp-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #b9aa9d;
  background: transparent;
  padding: 12px 2px;
  font: 14px inherit;
  outline: 0;
}
.rsvp-form input:focus,
.rsvp-form textarea:focus {
  border-color: var(--rose);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
legend {
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 15px;
}
fieldset label {
  margin-right: 28px;
  font-size: 14px;
}
.form-status {
  text-align: center;
  font-size: 13px;
  min-height: 20px;
  color: #657661;
}
.transport-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.transport-grid article {
  padding: 38px 28px;
  background: var(--cream);
}
.transport-grid i {
  display: grid;
  place-items: center;
  margin: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-style: normal;
}
.transport-grid h3 {
  letter-spacing: 0.12em;
}
.transport-grid p {
  font-size: 13px;
  color: #847a73;
  line-height: 1.8;
}
.wishes-section {
  background: #f2eee7;
}
.wish-form {
  display: flex;
  max-width: 700px;
  gap: 12px;
}
.wish-form input {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 13px;
  background: white;
  font: 13px inherit;
}
.wish-form input:first-child {
  flex: 0.35;
}
.wish-form input:nth-child(2) {
  flex: 1;
}
.wish-form button {
  border: 0;
  background: var(--sage);
  color: white;
  padding: 0 20px;
}
.wish-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}
.wish-card {
  background: white;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(80, 70, 60, 0.05);
}
.wish-card p {
  font-size: 14px;
  line-height: 1.8;
}
.wish-card span {
  font-size: 11px;
  color: var(--rose);
}
.ending {
  min-height: 82vh;
  background:
    linear-gradient(rgba(33, 31, 27, 0.52), rgba(33, 31, 27, 0.58)),
    url('assets/web/wedding-hero.jpg') center/cover fixed;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  padding: 30px;
}
.ending .script {
  font: italic 72px var(--font-serif-display);
  margin: 0;
}
.ending h2 {
  font-weight: 400;
  letter-spacing: 0.16em;
}
.ending p {
  font-size: 12px;
  letter-spacing: 0.14em;
}
.easter-egg {
  width: min(82vw, 390px);
  margin: 28px auto 0;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(30, 28, 25, .28);
  backdrop-filter: blur(8px);
}
.ending .easter-egg > span {
  color: #e5c98e;
  font-size: 10px;
  letter-spacing: .3em;
}
.ending .easter-egg p {
  margin: 8px 0;
  line-height: 1.8;
  letter-spacing: .08em;
}
.ending .easter-egg strong {
  display: block;
  color: #fff;
  font: italic 500 24px/1.25 var(--font-serif-display);
  letter-spacing: .05em;
}
.to-top {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  background: transparent;
  padding: 11px 20px;
  margin-top: 20px;
}
.share-fab {
  position: fixed;
  right: 18px;
  bottom: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #76685f;
  color: #fff;
  font-size: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}
.share-fab svg {
  position: absolute;
  top: 51%;
  left: 47%;
  transform: translate(-50%, -50%);
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.94);
  z-index: 80;
  display: none;
  place-items: center;
}
.lightbox.open {
  display: grid;
  touch-action: none;
  overscroll-behavior: contain;
}
html.lightbox-open {
  overflow: hidden;
  scroll-snap-type: none;
}
.lightbox div {
  width: min(86vw, 680px);
  height: min(80vh, 900px);
  background: url('assets/web/wedding-hero.jpg') center/cover;
}
.lightbox button {
  position: absolute;
  top: 18px;
  right: 25px;
  border: 0;
  background: 0;
  color: white;
  font-size: 36px;
}
.toast {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -80px);
  background: #2f2c29;
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 12px;
  transition: 0.35s;
}
.toast.show {
  transform: translate(-50%, 0);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s,
    transform 0.8s;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@keyframes breathe {
  to {
    transform: scale(1.09);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.2;
    transform: scaleY(0.7);
  }
}
@media (max-width: 700px) {
  .section {
    padding: 80px 20px;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 230px 180px;
  }
  .gallery button:nth-child(2) {
    grid-row: span 2;
  }
  .gallery button:nth-child(4) {
    grid-column: span 2;
  }
  .transport-grid,
  .wish-wall {
    grid-template-columns: 1fr;
  }
  .wish-form {
    display: grid;
  }
  .wish-form input,
  .wish-form button {
    min-height: 46px;
  }
  .hero-copy {
    margin-top: -10vh;
  }
  .ending {
    background-attachment: scroll;
  }
  .detail-card {
    padding: 45px 23px;
  }
  .story {
    gap: 18px;
  }
  .section h2 {
    margin-bottom: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Full-screen, one-page-at-a-time navigation. --app-height is kept in sync
   with the visible mobile viewport by script.js (with modern CSS fallbacks). */
html {
  height: 100%;
  scroll-snap-type: y mandatory;
  scroll-padding: 0;
  overscroll-behavior-y: none;
}
body {
  min-height: 100%;
}
.hero,
main > .section,
main > .ending {
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: var(--app-height, 100dvh);
  min-height: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
main > .section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
main > .ending {
  min-height: 0;
}

@media (max-width: 700px) {
  .section {
    padding: clamp(22px, 5dvh, 52px) 20px;
  }
  .section h2 {
    margin: 8px 0 clamp(18px, 3dvh, 36px);
  }
  .story {
    padding: clamp(9px, 1.8dvh, 20px) 0;
  }
  .story p {
    line-height: 1.55;
  }
  .gallery {
    grid-template-rows: repeat(3, minmax(82px, 1fr));
    min-height: 0;
    max-height: 62dvh;
  }
  .detail-card {
    padding: clamp(20px, 4dvh, 38px) 23px;
  }
  .details-section .detail-card h2 {
    margin-bottom: clamp(12px, 2dvh, 24px);
  }
  .detail-row {
    padding: clamp(8px, 1.5dvh, 14px) 0;
    line-height: 1.5;
  }
  .details-section .btn {
    margin-top: clamp(12px, 2dvh, 22px);
    padding: 12px 20px;
  }
  .schedule {
    margin: clamp(16px, 3dvh, 34px) auto 0;
    width: 100%;
  }
  .schedule > div {
    min-height: clamp(47px, 7dvh, 72px);
  }
  .schedule span:after {
    bottom: clamp(-57px, -7dvh, -32px);
  }
  .rsvp-form > label {
    margin: clamp(9px, 1.8dvh, 18px) 0;
  }
  fieldset {
    margin: clamp(12px, 2dvh, 22px) 0;
  }
  .rsvp-form textarea {
    max-height: 68px;
  }
  .rsvp-form .btn {
    margin-top: clamp(12px, 2dvh, 22px);
    padding: 13px 20px;
  }
  .transport-grid {
    gap: clamp(8px, 1.5dvh, 16px);
  }
  .transport-grid article {
    padding: clamp(12px, 2.3dvh, 26px) 22px;
  }
  .transport-grid h3 {
    margin: 8px 0;
  }
  .transport-grid p {
    line-height: 1.55;
    margin: 0;
  }
  .wish-form {
    margin-bottom: clamp(14px, 2.5dvh, 30px);
  }
  .wish-wall {
    gap: 8px;
  }
  .wish-card {
    padding: clamp(11px, 2dvh, 20px);
  }
  .wish-card p {
    line-height: 1.5;
    margin: 0 0 6px;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  .eyebrow {
    font-size: 9px;
  }
  .section h2 {
    font-size: 24px;
  }
  .story {
    grid-template-columns: 50px 1fr;
    gap: 14px;
  }
  .story > div {
  align-self: start;
  transform: translateY(-8px);
}
.story > span {
    width: 50px;
    height: 50px;
    font-size: 17px;
  }
  .timeline:before {
    left: 25px;
    top: calc(clamp(9px, 1.8dvh, 20px) + 25px);
    bottom: calc(clamp(9px, 1.8dvh, 20px) + 25px);
  }
  .story h3 {
    font-size: 17px;
    margin: 3px 0;
  }
  .story p {
    font-size: 12px;
  }
  .gallery {
    max-height: 58dvh;
  }
  .detail-row {
    font-size: 13px;
  }
  .schedule {
    font-size: 12px;
  }
  .schedule > div {
    grid-template-columns: 52px 18px 1fr;
    gap: 10px;
  }
  .schedule p {
    font-size: 11px;
  }
  .schedule b {
    font-size: 13px;
    margin-bottom: 1px;
  }
  .transport-grid i {
    width: 34px;
    height: 34px;
  }
  .transport-grid p {
    font-size: 11px;
  }
  .wish-card p {
    font-size: 12px;
  }
}

/* Multi-page wedding photo gallery */
.gallery-section > .eyebrow { margin-bottom: 6px; }
.gallery-section > h2 { margin-top: 0; }
.gallery-wrap { width: 100%; position: relative; }
.gallery { position: relative; display: block; min-height: 616px; touch-action: pan-y; user-select: none; }
.gallery-page { display: none; grid-template-columns: .9fr 1.1fr 1.1fr .9fr; grid-template-rows: 294px 294px; gap: 14px; animation: gallery-in .55s ease both; }
.gallery-page.active { display: grid; }
.gallery button { background-image: linear-gradient(0deg,rgba(20,20,18,.45),transparent 55%),var(--image); transition: filter .35s ease,transform .35s ease; }
.gallery button:hover { filter: brightness(1.08); }
.gallery button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gallery-page .feature { grid-row: span 2; }
.gallery-page button:nth-child(2):not(.feature) { grid-row: auto; }
.gallery-page button:nth-child(4) { grid-column: auto; }
.gallery-page button:nth-child(6) { grid-column: span 2; }
.gallery-pagination { position:absolute; z-index:4; left:50%; bottom:16px; transform:translateX(-50%); display:flex; justify-content:center; align-items:center; gap:18px; margin:0; padding:9px 14px; border:1px solid rgba(255,255,255,.22); border-radius:999px; background:rgba(31,34,31,.68); backdrop-filter:blur(8px); }
.gallery-pagination button { border:0; color:rgba(255,255,255,.55); background:none; cursor:pointer; font-family:var(--font-serif-display); transition:color .25s ease; }
.gallery-pagination button:hover, .gallery-pagination button.active { color:#fff; }
.gallery-arrow { font-size:20px; padding:4px 8px; }
.gallery-pages { display:flex; align-items:center; gap:12px; }
.gallery-pages button { padding:6px 4px; font-size:15px; line-height:1.2; letter-spacing:.12em; }
.gallery-pages span { position:static; width:34px; height:1px; background:rgba(255,255,255,.32); }
.lightbox-title {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: white;
  background: rgba(18, 18, 17, .55);
  backdrop-filter: blur(8px);
  font-size: 13px;
  letter-spacing: .18em;
  white-space: nowrap;
  pointer-events: none;
}.lightbox img { display:block; width:auto; height:auto; max-width:min(90vw,1100px); max-height:86vh; object-fit:contain; box-shadow:0 20px 70px rgba(0,0,0,.38); }
@keyframes gallery-in { from { opacity:0; transform:translateX(var(--gallery-from, 0)); } to { opacity:1; transform:translateX(0); } }
@media (max-width:700px) {
  .gallery { min-height:607px; max-height:none; }
  .gallery-page { height:auto; grid-template-columns:1fr 1fr; grid-template-rows:repeat(4, 145px); gap:9px; }
  .gallery-pagination { position:static; width:max-content; transform:none; margin:16px auto 0; }
  .gallery-page .feature { grid-row:span 2; }
  .gallery-page button:nth-child(4) { grid-column:1; }
  .gallery-page button:nth-child(5) { grid-column:2; }
  .gallery-page button:nth-child(6) { grid-column:span 2; }
}
@media (max-width:700px) and (max-height:760px) {
  .gallery-page { grid-template-rows:repeat(4, 145px); }
  .gallery { min-height:607px; max-height:none; }
}
/* Welcome poster inside countdown */
.countdown-layout {
  width: min(100%, 960px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  align-items: center;
  gap: clamp(50px, 8vw, 100px);
}
.welcome-poster {
  margin: 0;
  position: relative;
}
.poster-frame {
  display: block;
  width: 100%;
  color: inherit;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 2 / 3;
  padding: 9px;
  background: #fffdf9;
  border: 1px solid rgba(161, 137, 112, .34);
  box-shadow: 0 24px 60px rgba(77, 58, 42, .18);
  transform: rotate(-1.2deg);
}
.poster-frame::before {
  content: '';
  position: absolute;
  inset: 14px -15px -14px 14px;
  z-index: -1;
  border: 1px solid rgba(161, 137, 112, .38);
}
.poster-frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.poster-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-mark {
  position: absolute;
  right: -23px;
  bottom: 48px;
  padding: 6px 15px;
  color: #fff;
  background: rgba(91, 75, 63, .84);
  font: 10px/1.2 Arial, sans-serif;
  letter-spacing: .28em;
  writing-mode: vertical-rl;
}
.welcome-poster figcaption {
  margin-top: 20px;
  color: #9a8878;
  font: 10px/1.2 Arial, sans-serif;
  letter-spacing: .24em;
}
.countdown-copy { min-width: 0; }
.countdown-copy h2 { margin-bottom: clamp(34px, 6vh, 58px); }
.countdown-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 0;
  color: #8b7b6e;
  font-size: 12px;
  letter-spacing: .12em;
}
.countdown-note i {
  width: 26px;
  height: 1px;
  background: var(--line);
}
@media (max-width: 700px) {
  .countdown { padding-top: clamp(18px, 3dvh, 30px); padding-bottom: clamp(18px, 3dvh, 30px); }
  .countdown-layout { display: flex; flex-direction: column; gap: clamp(16px, 2.5dvh, 24px); }
  .welcome-poster { width: min(58vw, 280px); }
  .poster-frame { padding: 6px; box-shadow: 0 16px 38px rgba(77,58,42,.16); }
  .poster-frame::before { inset: 10px -10px -10px 10px; }
  .poster-mark { right: -17px; bottom: 30px; padding: 5px 10px; font-size: 8px; }
  .welcome-poster figcaption { margin-top: 12px; font-size: 8px; }
  .countdown-copy { width: 100%; }
  .countdown-copy .eyebrow { margin-bottom: 5px; }
  .countdown-copy h2 { margin: 5px 0 clamp(14px, 2.5dvh, 22px); font-size: clamp(23px, 6vw, 30px); }
  .countdown-copy .count-grid b { font-size: clamp(30px, 9vw, 44px); }
  .countdown-copy .count-grid span { margin-top: 7px; }
  .countdown-copy .passed { margin: 7px 0 0; min-height: 0; }
  .countdown-note { margin-top: 12px; font-size: 10px; gap: 8px; }
  .countdown-note i { width: 16px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .welcome-poster { width: min(40vw, 190px); }
  .welcome-poster figcaption { display: none; }
  .countdown-layout { gap: 10px; }
  .countdown-note { margin-top: 7px; }
}
@media (max-width: 700px) {
  .schedule time { padding-top: 8px; }
  .schedule span { margin-top: 10px; }
}
/* Tap-to-open entrance: guarantees a user gesture for audio playback. */
body.invitation-locked { overflow: hidden; height: 100%; }
.invitation-cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: #2d312e url('assets/web/wedding-hero.jpg') center/cover no-repeat;
  transition: opacity .7s ease, visibility .7s ease;
  touch-action: none;
}
.invitation-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,24,21,.38), rgba(24,24,21,.66));
}
.invitation-cover-shade {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.3);
  pointer-events: none;
}
.invitation-cover.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.invitation-cover-card {
  position: relative;
  z-index: 1;
  width: min(86vw, 430px);
  padding: 48px 26px;
  animation: cover-arrive 1s ease both;
}
.cover-eyebrow {
  margin: 0 0 22px;
  color: #ead3a5;
  font: 10px/1.4 Arial, sans-serif;
  letter-spacing: .38em;
}
.cover-ornament { color: #d7bb82; font-size: 13px; }
.invitation-cover h2 {
  margin: 20px 0 14px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 400;
  letter-spacing: .12em;
}
.invitation-cover h2 i {
  margin: 0 .16em;
  font-family: Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
}
.cover-date {
  margin: 0 0 42px;
  font: 15px/1.4 var(--font-serif-display);
  letter-spacing: .26em;
}
#openInvitation {
  width: 154px;
  height: 154px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(55,50,44,.42);
  backdrop-filter: blur(7px);
  cursor: pointer;
  transition: transform .3s ease, background .3s ease;
  animation: cover-pulse 2.2s ease-in-out infinite;
}
#openInvitation:hover { transform: scale(1.04); background: rgba(55,50,44,.62); }
#openInvitation span { display:block; font: 500 18px/1.4 var(--font-serif-cn); letter-spacing:.18em; }
#openInvitation small { display:block; margin-top:8px; font:8px/1.2 Arial,sans-serif; letter-spacing:.18em; opacity:.72; }
@keyframes cover-arrive { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes cover-pulse { 50% { box-shadow:0 0 0 12px rgba(255,255,255,.05); } }
@media (max-height: 650px) {
  .invitation-cover-card { padding: 22px; }
  .cover-eyebrow { margin-bottom: 12px; }
  .invitation-cover h2 { margin: 12px 0 8px; }
  .cover-date { margin-bottom: 22px; }
  #openInvitation { width: 126px; height: 126px; }
}
