:root {
  color-scheme: light;
  --paper: #fff1f5;
  --panel: #fffdfa;
  --ink: #390d28;
  --muted: #70475d;
  --pink: #a50d55;
  --dark: #79043e;
  --line: #ebc8d6;
  --display: Georgia, 'Times New Roman', serif;
  --sans: 'Trebuchet MS', Arial, sans-serif;
  --mono: 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(#b92b5814 .75px, transparent .85px) 0 0 / 14px 14px, var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #752a85; outline-offset: 4px; }
.wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; inset: 6px auto auto 6px; transform: translateY(-150%); z-index: 5; background: white; padding: 10px; }
.skip-link:focus { transform: none; }

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font: bold 1.34rem var(--display); color: var(--dark); text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--pink); margin-right: 5px; }
.header-note, .eyebrow, .art-index, .gate-signoff { font: bold .75rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.header-note { color: var(--muted); text-align: right; }
.header-note span, .eyebrow span { color: var(--pink); margin-right: 5px; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 34px); }
.site-header nav a, .logout { font-weight: bold; text-decoration: none; }
.site-header nav a:hover, .logout:hover { color: var(--pink); text-decoration: underline; }
.logout { border: 0; color: var(--dark); background: transparent; padding: 7px 0 7px 4px; }

.gate-main { padding-block: clamp(32px, 7vh, 76px) 22px; }
.gate-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  max-width: 990px;
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 70px #7a12341a;
  overflow: hidden;
}
.gate-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 530px;
  background: radial-gradient(#7a00412b 1px, transparent 1.5px) 0 0 / 13px 13px, linear-gradient(147deg, #ffcfdf 12%, #f991b7 69%, #f6add6);
  display: grid;
  place-items: center;
}
.gate-art::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px dashed #80174f80;
  border-radius: 14px;
  z-index: -1;
}
.art-index { position: absolute; top: 32px; left: 34px; color: var(--dark); }
.art-title { z-index: 1; display: grid; justify-items: center; line-height: .95; transform: rotate(-9deg) translateY(-14px); }
.art-title > span, .art-title em {
  background: #fff7ed;
  box-shadow: 3px 5px 0 #8d165045;
  color: var(--dark);
  font: bold italic clamp(1.8rem, 4vw, 3.1rem)/1.05 var(--display);
  padding: .12em .33em .19em;
}
.art-title > span { transform: translate(-6%, 15%) rotate(2deg); }
.art-title strong {
  color: #c71e69;
  font: 900 clamp(8.2rem, 20vw, 15rem)/.89 Arial, sans-serif;
  letter-spacing: -.095em;
  padding-right: .08em;
  -webkit-text-stroke: .022em #fff7ed;
  text-shadow: .023em .034em 0 #730637, .032em .045em 0 #730637;
}
.art-title em { transform: translate(39%, -5%) rotate(6deg); }
.art-star, .art-heart { position: absolute; font-family: var(--display); line-height: 1; }
.art-star { top: 14%; right: 9%; color: #fff9ef; font-size: clamp(3rem, 7vw, 5rem); transform: rotate(13deg); text-shadow: 2px 3px #a50d55; }
.art-heart { left: 8%; bottom: 16%; z-index: 1; color: #7a0644; font-size: clamp(2.7rem, 6vw, 4.8rem); transform: rotate(-21deg); }
.disc {
  position: absolute;
  width: 190px;
  aspect-ratio: 1;
  border: 4px solid #fff4ed;
  border-radius: 50%;
  right: -43px;
  bottom: -35px;
  box-shadow: -4px -1px 18px #66275155, inset 0 0 0 2px #aa79a4;
  background: repeating-radial-gradient(circle, transparent 0 7px, #fff4 8px 9px), conic-gradient(from -10deg, #b38db8, #fffadf, #e988ae, #9a85c9, #b9eff3, #fff6df, #e787b0, #b38db8);
}
.disc::after { content: ''; position: absolute; inset: 41%; background: #ee9ebe; border: 3px double #722950; border-radius: 50%; }
.art-sticker { position: absolute; bottom: 29px; left: 34px; z-index: 1; padding: 8px 12px; transform: rotate(-5deg); background: #f9edc0; border: 1px solid #a34e67; border-radius: 8px; color: #71374e; font: bold .69rem/1.2 var(--mono); text-align: center; text-transform: uppercase; }
.gate-content { align-self: center; padding: clamp(30px, 5vw, 68px); }
.gate-content h1 { font: bold clamp(2.8rem, 5.3vw, 4.95rem)/.88 var(--display); letter-spacing: -.073em; margin-block: 17px; }
.gate-content h1 em { display: block; }
.gate-content h1 em, h2 em { font-weight: normal; color: var(--pink); }
.gate-content > p { color: var(--muted); max-width: 30ch; }
#login { margin-top: 23px; }
#login .button { width: 100%; justify-content: space-between; margin-top: 14px; }
.gate-signoff { color: var(--muted); margin-top: 28px; text-align: center; }
.gate-signoff span { color: var(--pink); }

.button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; font-weight: bold; text-align: center; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.primary { background: var(--pink); color: white; box-shadow: 0 3px 0 var(--dark); }
.primary:hover { background: var(--dark); }
.primary:disabled { opacity: .65; }
.secondary { border-color: #dca5ba; background: #fff7fb; color: var(--dark); }
.secondary:not(:disabled):hover { background: #fbe1ec; border-color: var(--pink); }
.secondary:disabled { background: #f0e8ed; color: #694d5e; }
label, legend { font-weight: bold; }
label[for] { display: block; margin-bottom: 6px; }
input + label[for] { margin-top: 13px; }
input:not([type='radio']) { width: 100%; min-height: 47px; border: 1px solid #cb97ac; border-radius: 8px; padding: 10px 13px; background: #fffdfb; color: var(--ink); }
input::placeholder { color: #805c6e; opacity: 1; }
.hint { display: block; margin-top: 7px; color: var(--muted); }
.feedback { background: #fbe3ed; border-radius: 8px; color: var(--dark); margin-top: 13px; padding: 9px 12px; font-size: .92rem; }
.feedback.error { color: #801638; border-left: 3px solid #a51f49; }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: clamp(32px, 7vw, 90px); padding-block: clamp(48px, 7vw, 86px); }
.hero-copy h1 { font: bold clamp(2.9rem, 6.1vw, 6rem)/.96 var(--display); letter-spacing: -.068em; margin-block: 15px 20px; }
.hero-copy h1 strong { display: block; color: var(--pink); font: 900 clamp(7rem, 16vw, 13rem)/.86 Arial, sans-serif; letter-spacing: -.11em; margin-left: -.055em; text-shadow: .024em .024em #f5b8d3; }
.hero-copy h1 strong span { display: inline-block; vertical-align: top; margin: .1em 0 0 .65em; font-size: .27em; color: var(--pink); }
.hero-copy h1 em { font-weight: normal; color: var(--dark); }
.hero-copy > p, .section-title p { color: var(--muted); font-size: 1.09rem; }
.party-details { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 25px; padding-block: 8px 13px; margin-block: 23px; }
.party-details dt { font: bold .73rem var(--mono); color: var(--pink); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.party-details dd { font-weight: bold; }
.date-sticker { color: var(--dark); background: #ffc5db; border: 1px solid #ea9abf; padding: 10px 15px; transform: rotate(-2deg); box-shadow: 3px 4px 0 #db8fb560; }
.date-sticker time { display: block; font: bold italic clamp(1.55rem, 3.2vw, 2.65rem)/1 var(--display); letter-spacing: -.045em; }
.date-sticker small { display: block; margin-top: 6px; }
.party-details .venue-name { max-width: 28ch; font-size: .88rem; font-weight: normal; }
.map-link, .gift-link { color: var(--dark); font-weight: bold; text-underline-offset: 3px; }
.hero-collage { isolation: isolate; position: relative; width: 100%; max-width: 420px; margin-inline: auto; }
.collage-disc { z-index: -1; right: auto; left: -34px; bottom: -19px; width: clamp(92px, 16vw, 165px); }
.collage-note { position: absolute; z-index: 2; right: -2px; top: 12%; transform: rotate(10deg); background: #ffe6f0; border: 1px solid #d7779f; color: var(--dark); box-shadow: 3px 3px 0 #ac245250; padding: 6px 9px; font: bold italic clamp(.86rem, 1.8vw, 1.25rem)/1.06 var(--display); }
.collage-heart { position: absolute; color: #d61973; top: 59%; left: -3%; font: bold clamp(2.1rem, 5vw, 4rem)/1 var(--display); transform: rotate(-17deg); text-shadow: 2px 3px #fff7f7; }
.poster { position: relative; transform: rotate(2.7deg); border: 1px solid var(--line); padding: 10px; background: white; box-shadow: 7px 12px 0 #f3d7e2, 0 20px 44px #64173f23; border-radius: 7px; max-width: 380px; margin-inline: auto; }
.poster img { display: block; width: 100%; height: auto; border-radius: 3px; }
.poster figcaption { padding: 9px 2px 1px; font: italic 1rem var(--display); color: var(--muted); }
.poster figcaption span { float: right; color: var(--pink); }
.tape { position: absolute; z-index: 1; width: 99px; height: 27px; left: calc(50% - 49px); top: -13px; transform: rotate(-7deg); background: repeating-linear-gradient(120deg, #f5bedbe0 0 7px, #fbd8e7dc 7px 14px); }
.ribbon { background: #f9dbe8; color: var(--dark); border-block: 1px solid #ecc0d3; }
.ribbon .wrap { padding-block: 11px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px clamp(8px, 2.2vw, 24px); text-align: center; font: bold .76rem var(--mono); letter-spacing: .08em; }
.album { padding-bottom: 28px; }
.photo-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 2.4vw, 23px); padding: 16px 10px; }
.polaroid { position: relative; padding: 7px 7px 9px; background: #fffdfa; border: 1px solid #e3c4d1; box-shadow: 3px 5px 0 #a727592c; transform: rotate(-4deg); }
.polaroid img { display: block; width: 100%; height: auto; object-fit: cover; }
.polaroid figcaption { color: var(--dark); font: italic .9rem/1.1 var(--display); margin-top: 7px; text-align: center; }
.photo-strip .polaroid img { aspect-ratio: 3 / 4; object-position: center 36%; }
.photo-strip .polaroid:nth-child(even) { transform: rotate(4deg) translateY(7px); }
.hero-polaroid { position: absolute; bottom: -10px; right: -13px; width: min(41%, 155px); transform: rotate(-10deg); }
.music-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 18px 28px; align-items: center; padding-block: 42px; border-bottom: 1px dashed #de9bb7; }
.music-section .section-title { margin: 0; }
#music-toggle { margin-top: 12px; }
.music-collage { display: flex; max-width: 270px; justify-self: center; }
.music-collage .polaroid { flex: 1; min-width: 0; }
.music-collage .polaroid + .polaroid { transform: rotate(7deg) translateY(9px); }
.entry-glitter { position: fixed; z-index: 9; pointer-events: none; overflow: hidden; inset: 0; }
.entry-glitter span { position: absolute; top: -2rem; color: #a50d55; font: bold 1.55rem/1 var(--display); text-shadow: 1px 1px #fff; }
.entry-glitter span:nth-child(even) { color: #ff66a3; font-size: 2.1rem; }

.section { padding-block: clamp(45px, 7vw, 78px); }
section[id] { scroll-margin-top: 20px; }
.section-title { margin-bottom: 24px; }
h2 { font: bold clamp(2.5rem, 5.8vw, 4.55rem)/.98 var(--display); letter-spacing: -.057em; margin-block: 10px; }
.rsvp-layout { display: grid; grid-template-columns: 1.25fr 1fr; align-items: start; gap: 18px; }
.panel { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.dress-note { grid-column: 2; background: repeating-linear-gradient(transparent 0 27px, #db8daf45 27px 28px), #ffd7e7; position: relative; }
.dress-note h3 { font: bold clamp(1.8rem, 4vw, 3.2rem)/.98 var(--display); letter-spacing: -.055em; margin-block: 10px; }
.dress-note h3 em { color: var(--dark); }
.dress-stamp { position: absolute; bottom: 21px; right: 16px; color: var(--dark); background: #ffe4ed; border: 1px dashed #b12b65; font: bold italic .95rem/1.1 var(--display); text-align: center; padding: 8px 13px; transform: rotate(8deg); }
.eye-photo { width: min(82%, 240px); margin: 17px 0 6px 7px; }
.eye-photo img { aspect-ratio: 16 / 9; object-position: 50% 79%; }
fieldset { padding: 0; border: 0; margin: 17px 0 0; min-width: 0; }
legend { padding: 0; margin-bottom: 7px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.choices label:has(input:checked) { background: #fbe1ec; border-color: #ab416f; }
.choices input, .companion-choice input { accent-color: var(--pink); margin: 0; }
.companion-choice { display: flex; align-items: start; gap: 10px; margin-top: 17px; padding: 11px; border: 1px dashed #c45f8f; border-radius: 8px; color: var(--dark); background: #fff1f7; cursor: pointer; }
.companion-choice input { margin-top: .38em; }
#companion-field { margin-top: 14px; }
#rsvp .button { margin-block: 20px 3px; }
.gift-name { margin: 0; font: bold 1.45rem/1.18 var(--display); }
#retry { margin-top: 10px; }
.gift-section { background: #fdebf2; border-block: 1px solid var(--line); }
.gift-intro { display: grid; grid-template-columns: minmax(0, 1fr) clamp(100px, 18vw, 174px); gap: clamp(14px, 5vw, 54px); align-items: center; }
.tongue-photo { transform: rotate(7deg); margin-right: 9px; }
.tongue-photo img { aspect-ratio: 1; object-position: 50% 58%; }
.gift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 0; margin: 16px 0 0; list-style: none; }
.gift { display: flex; flex-direction: column; align-items: stretch; }
.gift-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 15px; }
.gift-icon { display: grid; place-items: center; width: 42px; aspect-ratio: 1; color: var(--pink); background: #fbe1ec; border-radius: 11px; font: bold 1.58rem var(--display); }
.status-chip { padding: 4px 8px; background: #f8e3ec; color: var(--dark); border-radius: 20px; font: bold .73rem var(--mono); }
.gift.yours { border-color: #a93a6a; }
.gift.reserved .status-chip { color: #694d5e; background: #f0e8ed; }
.gift p { flex: 1; margin-block: 6px 15px; color: var(--muted); }
.gift-link { align-self: start; margin-bottom: 11px; }
.gift .button { width: 100%; }
.book-section { margin-top: 34px; padding-top: 22px; border-top: 1px dashed #d891b0; }
.book-section > h3 { color: var(--ink); font: bold clamp(1.8rem, 4vw, 2.85rem)/1 var(--display); letter-spacing: -.045em; }
.book-section > h3 em { color: var(--pink); font-weight: normal; }
.book-section > p:not(.feedback) { color: var(--muted); margin-top: 7px; }
.book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.book-grid .gift { padding: 14px; }
.book-grid .gift-top { margin-bottom: 9px; }
.book-grid .gift-icon { width: 32px; font-size: 1.2rem; }
.book-grid .gift-name { flex: 1; font-size: 1.22rem; margin-bottom: 12px; }
#reserve-dialog { color: var(--ink); width: min(470px, calc(100% - 26px)); box-shadow: 0 20px 50px #46062350; }
#reserve-dialog::backdrop { background: #330b22a0; }
#reserve-dialog h2 { font-size: clamp(2rem, 6vw, 3rem); }
#reserve-description { color: var(--muted); margin-bottom: 12px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.site-footer { min-height: 95px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px 16px; color: var(--muted); }
.site-footer a { text-underline-offset: 3px; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .gate-card { grid-template-columns: 1fr; max-width: 500px; }
  .gate-art { min-height: clamp(265px, 56vw, 395px); }
  .art-title { transform: rotate(-9deg) translateY(2px); }
  .disc { width: 140px; }
  .art-index { top: 28px; left: 28px; }
  .gate-content { padding: 25px 23px 28px; }
  .gate-content h1 { font-size: clamp(2.75rem, 10vw, 4.6rem); }
  .hero { gap: 32px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .site-header { min-height: 62px; gap: 8px; }
  .site-header nav { gap: 9px; font-size: .83rem; }
  .nav-music { display: none; }
  .wordmark { font-size: 1.06rem; }
  .wordmark span { margin-right: 2px; }
  .header-note { font-size: .65rem; letter-spacing: .07em; }
  .hero, .rsvp-layout { grid-template-columns: 1fr; }
  .dress-note { grid-column: auto; }
  .poster { max-width: 295px; width: 90%; }
  .gift-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .music-section { grid-template-columns: minmax(0, 1fr) minmax(0, .55fr); gap: 12px; }
  .hero-polaroid { right: 0; }
  .ribbon .wrap { font-size: .63rem; }
  .site-footer { padding-block: 14px; min-height: 66px; }
}

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