:root {
  --porcelain: #FBFAF6;
  --font-blue: #E4EDF5;
  --chapel: #3D5D7B;
  --chapel-deep: #2E4860;
  --ink: #22303C;
  --slate: #5A6876;
  --gilt: #B38F55;
  --edge: #BCCAD7;
  --error: #9B2C2C;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --arch-w: min(68vw, 280px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--serif);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--chapel); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--chapel); outline-offset: 3px; border-radius: 4px; }
p { margin: 0; }
h1, h2 { font-weight: 400; margin: 0; }

/* Buttons */
.btn {
  display: inline-block;
  min-height: 52px;
  padding: 15px 40px;
  border: 0;
  border-radius: 999px;
  background: var(--chapel);
  color: #fff;
  font: 500 1.15rem/1.2 var(--serif);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--chapel-deep); }
.btn:disabled { opacity: .6; cursor: progress; }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--chapel);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Hero: the photo in a church-window arch, a dove settling above it */
.hero { padding: 28px 20px 0; text-align: center; }
.arch {
  position: relative;
  width: var(--arch-w);
  aspect-ratio: 4 / 5;
  margin: 22px auto 22px;
  border-radius: calc(var(--arch-w) / 2) calc(var(--arch-w) / 2) 4px 4px;
  animation: appear 1s ease-out both;
}
.arch::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--gilt);
  border-radius: calc(var(--arch-w) / 2 + 10px) calc(var(--arch-w) / 2 + 10px) 6px 6px;
}
.arch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: var(--font-blue);
}
.dove {
  display: block;
  width: 58px;
  height: 48px;
  margin: 0 auto;
  fill: var(--gilt);
  transform: rotate(10deg);
  animation: descend 1.6s .6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes appear { from { opacity: 0; } }
@keyframes descend { from { opacity: 0; transform: translateY(-18px) rotate(18deg); } }

.name {
  display: block;
  margin-top: 2px;
  color: var(--chapel);
  font: 400 clamp(4.4rem, 22vw, 6rem)/1.15 var(--script);
}
.title {
  display: block;
  margin-top: 2px;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: .01em;
}
.full-name { margin-top: 8px; color: var(--slate); font-style: italic; }
.when { margin-top: 18px; font-size: 1.3rem; }
.hosts { margin-top: 4px; color: var(--slate); font-style: italic; }
.hero .btn { margin-top: 26px; }
.by { margin-top: 12px; color: var(--slate); font-size: 1.05rem; }

.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 15rem;
  margin: 44px auto 36px;
  color: var(--gilt);
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.rule svg { width: 12px; height: 18px; fill: currentColor; }

/* Details read like the inside of an invitation card: centred, quiet */
.details { max-width: 30rem; margin: 0 auto; padding: 0 20px; text-align: center; }
.detail + .detail { margin-top: 30px; }
.detail h2 { margin-bottom: 4px; color: var(--chapel); font-size: 1.4rem; }
.detail ul { margin: 0; padding: 0; list-style: none; }
.place { font-weight: 500; }
.addr { color: var(--slate); }
.detail a { display: inline-block; margin-top: 6px; }
.verse { margin: 34px auto 0; max-width: 24rem; font-style: italic; color: var(--slate); }
.gift { margin-top: 34px; font-style: italic; color: var(--slate); }

/* RSVP: a pale-blue band with a soft curved top, like water in a font */
.rsvp {
  margin-top: 52px;
  padding: 52px 0 72px;
  background: var(--font-blue);
  border-radius: 50% 50% 0 0 / 36px 36px 0 0;
}
.wrap { max-width: 30rem; margin: 0 auto; padding: 0 20px; }
.rsvp h2 { text-align: center; font-size: 2.1rem; letter-spacing: .04em; color: var(--chapel); margin-bottom: 22px; }
.rsvp label { display: block; margin: 20px 0 6px; }
#viewFind label { margin-top: 0; }
input[type="search"], input[type="text"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 1.125rem/1.4 var(--serif);
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--chapel); }
.hint { margin-top: 8px; color: var(--slate); font-size: 1rem; }
.opt { color: var(--slate); }
.error { margin-top: 14px; color: var(--error); }
.details .error { margin-bottom: 24px; }
.note { margin-top: 8px; padding: 10px 14px; border-left: 2px solid var(--gilt); background: rgb(255 255 255 / .55); font-size: 1.05rem; }

.results { margin: 14px 0 0; padding: 0; list-style: none; }
.results button {
  width: 100%;
  margin-bottom: 8px;
  padding: 14px 16px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.results button:hover { border-color: var(--chapel); }

.hello { font-size: 1.5rem; }
.choice { margin: 22px 0 0; padding: 0; border: 0; }
.choice legend { margin-bottom: 10px; padding: 0; }
.choice button {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-bottom: 10px;
  padding: 12px 16px;
  border: 1px solid var(--chapel);
  border-radius: 999px;
  background: #fff;
  color: var(--chapel);
  font: 500 1.125rem/1.2 var(--serif);
  cursor: pointer;
}
.choice button[aria-pressed="true"] { background: var(--chapel); color: #fff; }

.ask { margin-top: 18px; }
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 14px;
  background: #fff;
}
.step-label { flex: 1; }
.step-label small { display: block; color: var(--slate); font-size: .95rem; }
.step {
  width: 46px;
  height: 46px;
  border: 1px solid var(--chapel);
  border-radius: 50%;
  background: #fff;
  color: var(--chapel);
  font: 400 1.6rem/1 var(--serif);
  cursor: pointer;
}
.step:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 2ch; text-align: center; font-size: 1.5rem; }

.plus { margin-top: 18px; }
.rsvp .check { display: flex; align-items: center; gap: 10px; margin: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--chapel); }

#viewForm .btn { width: 100%; margin-top: 26px; }
#notUs { display: block; margin: 18px auto 0; font-size: 1rem; }

.thanks { text-align: center; }
.thanks:focus { outline: none; }
.salamat { color: var(--chapel); font: 400 3.2rem/1.3 var(--script); }
.heart { font-size: .45em; vertical-align: .35em; }
.summary { margin-top: 10px; color: var(--slate); }
.actions { display: grid; gap: 10px; margin-top: 24px; }
.actions a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--chapel);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}
#changeReply { margin-top: 22px; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arch, .dove { animation: none; }
}

/* Private page */
.admin { font-size: 1.0625rem; }
.admin main { max-width: 46rem; margin: 0 auto; padding: 28px 16px 64px; }
.a-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.a-head h1 { color: var(--chapel); font-size: 1.9rem; }
.btn.small { min-height: 44px; padding: 10px 20px; font-size: 1rem; }
.btn.ghost { background: #fff; color: var(--chapel); border: 1px solid var(--chapel); }
.btn.ghost:hover { background: var(--font-blue); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.tile { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #E3E8ED; }
.tile b { display: block; font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.tile span { color: var(--slate); font-size: .95rem; }
.tile.big { grid-column: 1 / -1; background: var(--chapel); color: #fff; border: 0; }
.tile.big b { font-size: 2.6rem; }
.tile.big span { color: #DCE6EF; }

.tabs { display: flex; gap: 6px; margin-top: 26px; border-bottom: 1px solid var(--edge); }
.tabs button {
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--slate);
  font: inherit;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--chapel); border-bottom-color: var(--chapel); font-weight: 500; }
.panel { padding-top: 16px; }
.panel > .hint:first-child { margin-top: 0; }

.list { margin: 0; padding: 0; list-style: none; }
.card { padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; background: #fff; border: 1px solid #E3E8ED; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-top strong { font-weight: 500; font-size: 1.15rem; }
.card p { margin-top: 4px; }
.card .meta { color: var(--slate); font-size: .95rem; }
.yes { color: #2F6B45; font-weight: 500; }
.no { color: var(--slate); font-weight: 500; }
.badge { display: inline-block; margin: 6px 6px 0 0; padding: 1px 10px; border-radius: 999px; font-size: .85rem; background: var(--font-blue); color: var(--chapel); }
.badge.warn { background: #F6E3E3; color: var(--error); }
.row-actions { display: flex; gap: 16px; margin-top: 8px; font-size: 1rem; }
.danger { color: var(--error); }

.add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px; margin-bottom: 16px; border-radius: 14px; background: var(--font-blue); }
.add label { display: block; font-size: .95rem; margin-bottom: 4px; }
.add .full { grid-column: 1 / -1; }
.add .check { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.0625rem; }
.add .btn { width: 100%; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
}
.gate { max-width: 26rem; margin: 18vh auto 0; text-align: center; color: var(--slate); }
