:root {
  --bg: #fbf5ec;
  --surface: #fffdf8;
  --surface-2: #f6eee2;
  --sand: #f2e7d6;
  --ink: #3d2f27;
  --muted: #6b5a4e;
  --line: #e9ddcb;
  --line-strong: #dccbb3;
  --sage: #7c9a74;
  --sage-deep: #56734e;
  --sage-hover: #4b6744;
  --sage-soft: #e5ecdd;
  --rose: #d98e88;
  --rose-deep: #a9524c;
  --rose-soft: #f9e6e2;
  --rose-line: #f0cec8;
  --gold: #e0b45c;
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(61, 47, 39, 0.04), 0 12px 30px -14px rgba(92, 64, 44, 0.22);
  --shadow-lift: 0 2px 0 rgba(61, 47, 39, 0.05), 0 24px 48px -18px rgba(92, 64, 44, 0.32);
  --font-display: 'Calistoga', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Caveat', cursive;
  --font-body: 'Nunito', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(176, 146, 112, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--sage-deep);
  overflow-x: hidden;
  /* viewport-fit=cover lets the background reach under the notch in landscape; the content stays clear of it. */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
}

::selection {
  background: var(--sage-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 28px;
}
.brand-mark {
  width: 40px;
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    background-color 0.2s;
}
.pill:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.pill .icon {
  color: var(--sage-deep);
}
.pill-cta {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: #fff;
}
.pill-cta .icon {
  color: #fff;
}
.pill-cta:hover {
  background: var(--sage-hover);
  border-color: var(--sage-hover);
}

@media (max-width: 720px) {
  .nav .pill:not(.pill-cta) {
    display: none;
  }
  .brand {
    font-size: 24px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 16px;
  border: 1.5px solid transparent;
  font: 700 17px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--sage-deep);
  color: #fff;
  box-shadow:
    0 4px 0 #3f5839,
    var(--shadow);
}
.btn-primary:hover {
  background: var(--sage-hover);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.btn-rose {
  background: var(--rose-deep);
  color: #fff;
  box-shadow:
    0 4px 0 #84403b,
    var(--shadow);
}
.btn-rose:hover {
  background: #974842;
  transform: translateY(-1px);
}
.btn-small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  border-radius: 12px;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Hero */

.hero {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(240px, 0.55fr);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(8px, 2vw, 24px) var(--gutter) 40px;
}

.hero h1 {
  font-size: clamp(52px, 7.4vw, 112px);
  margin: 8px 0 22px;
  line-height: 0.98;
}
.hero h1 em {
  font-style: normal;
  color: var(--sage-deep);
}

.lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--muted);
  max-width: 34ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 34px;
}

.features {
  list-style: none;
  margin: 0;
  padding: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 2px dotted var(--line);
}
.features li {
  display: grid;
  gap: 10px;
  align-content: start;
}
.features strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
}
.features span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--rose-deep);
}

/* Hero stage: a fan of invites on a soft platform */

.hero-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.stage {
  position: relative;
  aspect-ratio: 1 / 0.92;
  border-radius: 40px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(160deg, var(--sage-soft), var(--sand) 70%);
  border: 1.5px solid var(--line);
  box-shadow:
    inset 0 -18px 0 rgba(198, 168, 128, 0.16),
    var(--shadow);
  overflow: hidden;
}
.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(124, 154, 116, 0.22) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.stage-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fan {
  position: absolute;
  inset: 0;
}
.fan .invite-wrap {
  position: absolute;
  width: 42%;
  left: 29%;
  top: 12%;
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.3s;
  filter: drop-shadow(0 18px 24px rgba(92, 64, 44, 0.22));
  text-decoration: none;
}
.fan .invite-wrap:nth-child(1) {
  transform: translate(-58%, 6%) rotate(-10deg);
}
.fan .invite-wrap:nth-child(2) {
  z-index: 2;
  transform: translateY(-2%);
}
.fan .invite-wrap:nth-child(3) {
  transform: translate(58%, 6%) rotate(10deg);
}
.stage:hover .fan .invite-wrap:nth-child(1) {
  transform: translate(-68%, 4%) rotate(-13deg);
}
.stage:hover .fan .invite-wrap:nth-child(2) {
  transform: translateY(-5%) scale(1.03);
}
.stage:hover .fan .invite-wrap:nth-child(3) {
  transform: translate(68%, 4%) rotate(13deg);
}

.fan-in .invite-wrap {
  animation: deal 0.8s var(--ease) both;
}
.fan-in .invite-wrap:nth-child(2) {
  animation-delay: 0.1s;
}
.fan-in .invite-wrap:nth-child(3) {
  animation-delay: 0.2s;
}
@keyframes deal {
  from {
    opacity: 0;
    translate: 0 30px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.toolbar {
  container-type: inline-size;
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 22px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  overflow-x: auto;
  scrollbar-width: none;
}
.toolbar a {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 14px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  transition: background-color 0.2s;
}
.toolbar a:hover {
  background: var(--surface-2);
}
@container (max-width: 620px) {
  .toolbar a {
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    padding: 6px 4px;
    font-size: 13px;
  }
}
.toolbar .tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--sage-deep);
}

/* Hero side widgets */

.hero-side {
  display: grid;
  gap: 16px;
}

.widget {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 14px;
}
.widget-title::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
}
.widget-title .icon {
  color: var(--sage-deep);
}

.pick {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  text-decoration: none;
}
.pick > div > strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
}
.pick > div > span {
  color: var(--muted);
  font-size: 14px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.stat p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.widget-rose {
  background: var(--rose-soft);
  border-color: var(--rose-line);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--rose-line);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.2s;
}
.chip-link:hover {
  background: #fff;
}

@media (max-width: 1240px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
  .hero-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    text-align: left;
  }
  .hero-side {
    grid-template-columns: 1fr 1fr;
  }
  .hero-side .widget-rose {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .features li {
    grid-template-columns: 44px 1fr;
    align-items: center;
  }
  .cta-row .btn {
    flex: 1 1 100%;
  }
  .hero-side {
    grid-template-columns: 1fr;
  }
  .stage {
    border-radius: 28px;
    aspect-ratio: 1 / 1.05;
  }
  .fan .invite-wrap {
    width: 48%;
    left: 26%;
  }
}

/* Sections */

.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 56px);
}
.section-head p {
  color: var(--muted);
  font-size: 18px;
  max-width: 46ch;
  margin-top: 10px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: 700 15px var(--font-body);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.filter:hover {
  border-color: var(--line-strong);
}
.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.card-art {
  padding: 22px 22px 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.card-art .invite-wrap {
  max-width: 260px;
  margin: 0 auto;
  transition: transform 0.4s var(--ease);
}
.card:hover .card-art .invite-wrap {
  transform: rotate(-2deg) scale(1.02);
}
.card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 20px;
}
.card-body h3 {
  font-size: 21px;
}
.card-body p {
  color: var(--muted);
  font-size: 14px;
}
.card-link {
  text-decoration: none;
}
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card-go {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--sage-soft);
  color: var(--sage-deep);
  transition:
    background-color 0.2s,
    color 0.2s;
}
.card:hover .card-go {
  background: var(--sage-deep);
  color: #fff;
}
.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 3px 10px;
  border-radius: 8px;
  pointer-events: none;
  background: var(--rose-soft);
  border: 1px solid var(--rose-line);
  color: var(--rose-deep);
  font-weight: 800;
  font-size: 12px;
}

/* How it works */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px;
  border-radius: 26px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--line);
}
.step .feature-icon {
  margin-bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.step h3 {
  font-size: 24px;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
}
@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Closing banners */

.banners {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(16px, 2vw, 28px);
}
.banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 30px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.banner > div > h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  margin-bottom: 12px;
}
.banner > div > p {
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 22px;
}
.banner-rose {
  background: var(--rose-soft);
  border-color: var(--rose-line);
}
.banner-art {
  width: clamp(110px, 14vw, 180px);
}
/* The invite card tilts; the envelope drawing in the second banner does not. */
div.banner-art {
  transform: rotate(4deg);
}
@media (max-width: 900px) {
  .banners {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .banner {
    grid-template-columns: 1fr;
  }
  .banner-art {
    justify-self: end;
    margin-top: -10px;
  }
}

.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  border-top: 2px dotted var(--line);
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
/* Touch screens get the 44px iOS minimum target for links that are not part of a sentence. */
@media (pointer: coarse) {
  .brand,
  .chip-link,
  .site-footer a {
    min-height: 44px;
  }
}

/* Invite card: every size is in container units so one markup scales from thumbnail to download. */

.invite-wrap {
  container-type: inline-size;
  display: block;
  width: 100%;
}

.invite {
  position: relative;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8cqw 8cqw 7cqw;
  gap: 3cqw;
  background: var(--i-bg);
  color: var(--i-ink);
  border-radius: 4.5cqw;
  text-align: center;
  font-family: var(--font-body);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.invite::before {
  content: '';
  position: absolute;
  inset: 3.4cqw;
  border-radius: 2.6cqw;
  border: 0.5cqw dashed var(--i-accent);
  opacity: 0.4;
  pointer-events: none;
}

.invite-frame {
  flex: none;
  overflow: hidden;
  background: var(--i-soft);
}
.invite-frame svg {
  width: 100%;
  height: 100%;
}
.invite-photo {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
}
.frame-arch {
  width: 48cqw;
  height: 42cqw;
  border-radius: 25cqw 25cqw 3cqw 3cqw;
}
.frame-circle {
  width: 42cqw;
  height: 42cqw;
  border-radius: 50%;
}
.frame-rect {
  width: 70cqw;
  height: 40cqw;
  border-radius: 4cqw;
}
.frame-blob {
  width: 60cqw;
  height: 42cqw;
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
}

.invite-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1cqw;
  min-height: 0;
  width: 100%;
  flex: 1;
  line-height: 1.35;
}
.invite-body > * {
  flex-shrink: 0;
  max-width: 100%;
}
.invite-eyebrow {
  font-size: 3.4cqw;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--i-accent);
}
.invite-title {
  font-size: 9cqw;
  line-height: 1.02;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.font-display .invite-title {
  font-family: var(--font-display);
}
.font-serif .invite-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: 10cqw;
}
.invite-hosts {
  font-family: var(--font-script);
  font-size: 6cqw;
  line-height: 1;
  color: var(--i-accent);
}
.invite-rule {
  display: flex;
  align-items: center;
  gap: 2cqw;
  width: 40%;
  margin: 1cqw 0;
}
.invite-rule::before,
.invite-rule::after {
  content: '';
  flex: 1;
  height: 0.4cqw;
  background: var(--i-accent);
  opacity: 0.45;
  border-radius: 1cqw;
}
.invite-rule span {
  width: 1.8cqw;
  height: 1.8cqw;
  transform: rotate(45deg);
  background: var(--i-accent);
}
.invite-when {
  font-size: 3.9cqw;
  font-weight: 800;
}
.invite-venue {
  font-size: 3.9cqw;
  font-weight: 700;
}
.invite-address {
  font-size: 3.5cqw;
  opacity: 0.85;
}
.invite-message {
  font-size: 3.5cqw;
  line-height: 1.4;
  margin-top: 0.8cqw;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.invite-rsvp {
  margin-top: auto;
  font-size: 3.2cqw;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1.2cqw 3.4cqw;
  border-radius: 99cqw;
  border: 0.45cqw solid var(--i-accent);
  color: var(--i-accent);
}

/* Editor */

.editor {
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px var(--gutter) 60px;
  align-items: start;
}
.editor-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.editor-head h1 {
  font-size: clamp(36px, 4.6vw, 60px);
}
.editor-head p {
  color: var(--muted);
  font-size: 17px;
  margin-top: 6px;
}

.panel {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 16px;
}
.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  margin-bottom: 16px;
}
.panel h2 .icon {
  color: var(--sage-deep);
}

.picker-tabs {
  margin-bottom: 14px;
}
.picker-tabs .filter {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}
.picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.picker-item {
  position: relative;
  padding: 6px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s var(--ease);
}
.picker-item:hover {
  transform: translateY(-2px);
}
.picker-item:has(input:checked) {
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.picker-item:has(input:focus-visible) {
  outline: 3px solid var(--sage-deep);
  outline-offset: 2px;
}
.picker-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.picker-item .invite {
  border-radius: 8px;
}
.picker-name {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field:last-child {
  margin-bottom: 0;
}
.field label,
.field-label {
  font-weight: 700;
  font-size: 15px;
}
/* A row of fields keeps the spacing of a single field, whether its fields sit side by side or stack. */
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 12px;
  margin-bottom: 14px;
}
.field-row .field {
  margin-bottom: 0;
}
.hint {
  font-size: 13px;
  color: var(--muted);
}
/* Single-line inputs share one fixed height: date and time controls size to their content and differ by browser. */
.input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 16px var(--font-body);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
/* Safari centers date and time values. */
.input::-webkit-date-and-time-value {
  text-align: left;
}
textarea.input {
  height: auto;
  min-height: 84px;
  padding: 10px 14px;
  resize: vertical;
}
.input:hover {
  border-color: var(--line-strong);
}
.input:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  text-align: center;
  border: 2px dashed var(--line-strong);
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.dropzone:hover,
.dropzone.is-over {
  border-color: var(--sage-deep);
  background: var(--sage-soft);
}
.dropzone:focus-within {
  outline: 3px solid var(--sage-deep);
  outline-offset: 2px;
}
.dropzone input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.dropzone .icon {
  width: 28px;
  height: 28px;
  color: var(--sage-deep);
}
.dropzone strong {
  font-size: 16px;
}
.photo-tools {
  display: none;
  gap: 12px;
  margin-top: 14px;
}
.has-photo .photo-tools {
  display: grid;
}
.range {
  width: 100%;
  accent-color: var(--sage-deep);
  min-height: 32px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--line);
  transition: transform 0.2s var(--ease);
}
.swatch:hover {
  transform: scale(1.06);
}
.swatch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.swatch:has(input:checked) {
  box-shadow: 0 0 0 3px var(--ink);
}
.swatch:has(input:focus-visible) {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
}
.swatch-default {
  background: conic-gradient(var(--rose) 0 33%, var(--sage) 0 66%, var(--gold) 0);
}

.preview-col {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.preview-stage {
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
  border-radius: 32px;
  border: 1.5px solid var(--line);
  background: linear-gradient(160deg, var(--sage-soft), var(--sand) 75%);
}
/* The sticky column keeps the card, share buttons and status on screen: about 350px of the viewport height
   goes to the stage padding, buttons, note, status and sticky offset, and the card is 5 by 7. */
.preview-card {
  width: min(100%, 440px, max(240px, (100dvh - 350px) * 5 / 7));
  filter: drop-shadow(0 22px 30px rgba(92, 64, 44, 0.25));
}
/* Below this height even a 240px card does not fit, so the column scrolls with the form at full card size. */
@media (min-width: 961px) and (max-height: 685px) {
  .preview-col {
    position: static;
  }
  .preview-card {
    width: min(100%, 440px);
  }
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.share-note {
  text-align: center;
  max-width: 44ch;
}
.status {
  min-height: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--sage-deep);
  text-align: center;
}

.jump-preview {
  display: none;
}

@media (max-width: 960px) {
  html:has(.jump-preview) {
    scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .editor {
    grid-template-columns: 1fr;
  }
  .preview-col {
    position: static;
    order: -1;
  }
  .editor-head {
    order: -2;
  }
  .preview-card {
    width: min(100%, 360px);
  }
  .jump-preview {
    display: inline-flex;
    position: fixed;
    /* The insets keep the button on the panels' right edge and above the home indicator. */
    right: calc(var(--gutter) + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 10;
    box-shadow: var(--shadow-lift);
  }
}

@media (max-width: 420px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .picker {
    grid-template-columns: repeat(2, 1fr);
  }
  .actions .btn {
    flex: 1 1 100%;
  }
}

/* Publishing, guest replies and the management page */

.panel > .hint {
  margin-bottom: 14px;
}
.panel .status {
  margin-top: 12px;
  text-align: left;
}
.published {
  margin-top: 16px;
}
/* The instruction to keep a private link stands out. Losing the link loses access. */
.warning {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--rose-line);
  background: var(--rose-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}
.copy-row {
  display: flex;
  gap: 8px;
}
.copy-row .btn {
  flex: none;
}
.published > .field-label {
  display: block;
  margin-bottom: 6px;
}

.rsvp {
  width: 100%;
  max-width: 520px;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-weight: 700;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.choice input {
  accent-color: var(--sage-deep);
}
.input:disabled {
  opacity: 0.6;
}
@media (max-width: 420px) {
  .choices {
    grid-template-columns: 1fr;
  }
}

.manage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px var(--gutter) 60px;
}
.manage-head {
  margin-bottom: 20px;
}
.manage-head h1 {
  font-size: clamp(32px, 4.6vw, 52px);
}
.manage-head .status {
  text-align: left;
}
.manage-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.total {
  display: grid;
  padding: 10px;
  border-radius: 12px;
  background: var(--sage-soft);
  text-align: center;
  font-size: 14px;
}
.total strong {
  font-size: 26px;
}
.reply-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.reply {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.reply span:last-child {
  font-size: 13px;
  color: var(--muted);
}
#noReplies {
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .manage-body {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .totals {
    grid-template-columns: 1fr 1fr;
  }
}

/* Shared view mode for guests */

.view-mode .editor-form,
.view-mode .editor-head p,
.view-mode .jump-preview,
.view-mode .owner-only {
  display: none;
}
.view-mode .editor-head {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.guest-only {
  display: none;
}
.view-mode .guest-only {
  display: inline-flex;
}
.view-mode .editor {
  grid-template-columns: 1fr;
  max-width: 760px;
}
.view-mode .preview-col {
  position: static;
}
.invite-hidden .preview-stage,
.invite-hidden #share-panel {
  display: none;
}

/* Reduced motion keeps color and border feedback and removes movement: no deal-in, lifts, tilts or smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fan-in .invite-wrap {
    animation: none;
  }
  .pill,
  .btn,
  .card,
  .card-art .invite-wrap,
  .fan .invite-wrap,
  .picker-item,
  .swatch {
    transition-property: background-color, border-color, color, box-shadow;
  }
  .pill:hover,
  .btn:hover,
  .btn:active,
  .card:hover,
  .card:hover .card-art .invite-wrap,
  .picker-item:hover,
  .swatch:hover {
    transform: none;
  }
  .stage:hover .fan .invite-wrap:nth-child(1) {
    transform: translate(-58%, 6%) rotate(-10deg);
  }
  .stage:hover .fan .invite-wrap:nth-child(2) {
    transform: translateY(-2%);
  }
  .stage:hover .fan .invite-wrap:nth-child(3) {
    transform: translate(58%, 6%) rotate(10deg);
  }
}

.invite.is-tight {
  gap: 2cqw;
}
.invite.is-tight .invite-body {
  gap: 0.7cqw;
}
.invite.is-tight .invite-message {
  -webkit-line-clamp: 1;
}

/* Privacy page */

.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 24px var(--gutter) 56px;
}
.prose h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin-bottom: 16px;
}
.prose h2 {
  font-size: 24px;
  margin: 36px 0 8px;
}
.prose p {
  margin: 0 0 12px;
  line-height: 1.6;
}
