:root {
  --navy: #17283a;
  --burgundy: #5b2028;
  --sage: #818c79;
  --ivory: #f2eee4;
  --brass: #b39a70;
  --bg: var(--ivory);
  --panel: rgba(255, 253, 248, 0.86);
  --panel-strong: #fcfaf4;
  --ink: var(--navy);
  --muted: #626b61;
  --line: rgba(23, 40, 58, 0.15);
  --gold: var(--brass);
  --gold-deep: #826d4b;
  --rose: var(--burgundy);
  --green: #68785f;
  --red: var(--burgundy);
  --radius-box: 16px;
  --shadow: 0 20px 50px rgba(23, 40, 58, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(129, 140, 121, 0.14), transparent 38%),
    linear-gradient(135deg, #f8f5ed 0%, var(--ivory) 60%, #e9e8dc 100%);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
[role="button"] {
  cursor: pointer;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 18px 80px;
}

.narrow-page {
  max-width: 560px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 26px;
}

.brand {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.1rem, 3vw, 3.2rem);
  letter-spacing: 0.08em;
  font-weight: 300;
}

.brand span {
  color: var(--gold-deep);
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 28px;
  background: rgba(252, 250, 244, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: clamp(26px, 4vw, 52px);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.hero-copy h1,
.auth-card h1,
.admin-header h1 {
  margin: 0 0 18px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 0.95;
}

.eyebrow,
.small-label {
  margin: 0 0 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold-deep);
  font-weight: 700;
}

.guest-page .eyebrow,
.guest-page .small-label {
  color: var(--gold-deep);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
  max-width: 620px;
}

.cta-row {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #6b2930 0%, var(--burgundy) 100%);
  color: var(--ivory);
  box-shadow: 0 10px 24px rgba(91, 32, 40, 0.2);
}

.button.secondary {
  background: rgba(252, 250, 244, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.full-width {
  width: 100%;
}

.button.small {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}

.info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: rgba(129, 140, 121, 0.12);
  padding: 24px;
}

.date-box {
  background: var(--burgundy);
  border-radius: var(--radius-box);
  padding: 18px;
  border: 1px solid rgba(179, 154, 112, 0.28);
}

.date-box span,
.date-box strong {
  display: block;
}

.date-box span {
  color: rgba(242, 238, 228, 0.74);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.date-box strong {
  margin-top: 10px;
  color: var(--ivory);
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.info-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 12px;
}

.detail-card,
.panel,
.auth-card,
.stat-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow);
}

.detail-card {
  padding: 24px;
}

.detail-card h3 {
  margin: 0 0 10px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  font-weight: 300;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card {
  padding: 32px;
}

.stack-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 0.8rem 0.95rem;
  background: rgba(252, 250, 244, 0.88);
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(179, 154, 112, 0.28);
  border-color: var(--brass);
}

.subtle-link {
  text-align: center;
  margin-top: 18px;
}

.subtle-link a {
  color: var(--ink);
  text-decoration: none;
}

.home-admin-footer {
  max-width: 560px;
  width: 100%;
  margin: auto auto 0;
  padding: 24px 18px 0;
  text-align: center;
}

.home-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding-bottom: 24px;
}

.home-admin-footer a {
  color: var(--muted);
  font-size: 0.72rem;
  opacity: 0.42;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.home-admin-footer a:hover,
.home-admin-footer a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.flash {
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: var(--radius-box);
  font-weight: 600;
}

.flash.success {
  background: rgba(129, 140, 121, 0.18);
  color: var(--green);
}

.flash.error {
  background: rgba(91, 32, 40, 0.08);
  color: var(--red);
}

.admin-page {
  padding-bottom: 90px;
}

.admin-page > main {
  display: grid;
  gap: 26px;
}

.admin-page > main > * {
  margin-block: 0;
}

.save-the-date-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.save-the-date-settings h2 {
  margin-bottom: 8px;
}

.save-the-date-settings .section-label {
  margin-bottom: 6px;
}

.admin-header {
  margin: 18px 0 26px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.stat-card {
  padding: 20px 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: clamp(2rem, 3vw, 3rem);
  font-family: 'Manrope', sans-serif;
  font-weight: 300;
}

.panel-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}

.panel {
  padding: 24px;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 2vw, 2.6rem);
  font-weight: 300;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-panel-heading h2 {
  margin: 0;
}

.guest-list {
  display: grid;
  gap: 14px;
}

.guest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-box);
  background: rgba(252, 250, 244, 0.74);
  border: 1px solid var(--line);
}

.guest-item strong,
.guest-item small {
  display: block;
}

.guest-item small {
  color: var(--muted);
}

.guest-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.guest-actions a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.tiny-meta {
  margin-top: 8px;
}

.chip {
  display: inline-block;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.chip.yes {
  color: var(--green);
  background: rgba(129, 140, 121, 0.18);
}

.chip.no {
  color: var(--red);
  background: rgba(91, 32, 40, 0.08);
}

.chip.pending {
  color: var(--gold-deep);
  background: rgba(179, 154, 112, 0.16);
}

.guest-shell {
  display: grid;
  gap: 26px;
}

.guest-shell > * {
  margin-block: 0;
}

.save-the-date-page {
  min-height: min(70vh, 680px);
  align-content: center;
}

.save-the-date-home {
  min-height: 100vh;
  padding: 32px 18px 80px;
}

.save-the-date-home > .topbar,
.save-the-date-home > .guest-shell {
  max-width: 900px;
  margin-inline: auto;
}

.save-the-date-card {
  display: grid;
  justify-items: center;
  gap: clamp(22px, 4vw, 40px);
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--navy);
  color: var(--ivory);
  box-shadow: var(--shadow);
  text-align: center;
}

.save-the-date-card .section-label {
  justify-content: center;
  margin: 0;
}

.save-the-date-countdown {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.save-the-date-countdown .section-label {
  margin: 0;
}

.save-the-date-countdown h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
}

.save-the-date-card .countdown-clock {
  margin-top: 8px;
}

.save-the-date-card .countdown-unit span {
  color: rgba(242, 238, 228, 0.74);
}

.save-the-date-download {
  width: fit-content;
  max-width: 100%;
}

.save-the-date-card h1 {
  margin: -12px 0 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
}

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

.guest-photo-card {
  margin: 0;
  padding: 10px;
}

.guest-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--radius-box) - 6px);
  object-fit: cover;
}

.downloads-panel {
  display: grid;
  gap: 14px;
}

.downloads-panel .section-label,
.downloads-panel h2,
.downloads-description {
  margin: 0;
}

.downloads-description {
  color: var(--muted);
  line-height: 1.6;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.countdown-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: var(--navy);
  color: var(--ivory);
}

.countdown-heading .small-label {
  margin-bottom: 6px;
}

.countdown-heading h2 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1.9rem;
  font-weight: 300;
}

.countdown-clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(60px, 1fr));
  gap: 10px;
}

.countdown-unit {
  display: grid;
  min-width: 64px;
  gap: 3px;
  text-align: center;
}

.countdown-unit strong {
  font-family: 'Manrope', sans-serif;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.countdown-unit span {
  color: rgba(242, 238, 228, 0.74);
  font-size: 0.68rem;
}

.invitation-extras {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.venue-panel,
.schedule-panel {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2,
.schedule-panel h2 {
  margin: 0 0 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 2rem;
  font-weight: 300;
}

.section-heading p,
.map-note {
  margin: 0;
  color: var(--muted);
}

.section-heading .small-label {
  margin-bottom: 6px;
}

.venue-map {
  display: block;
  width: 100%;
  height: 310px;
  border: 0;
  border-radius: var(--radius-box);
  background: rgba(129, 140, 121, 0.2);
}

.map-note {
  margin-top: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.map-actions {
  margin-top: 16px;
}

.schedule-panel .small-label {
  margin-bottom: 6px;
}

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

.schedule-list li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.schedule-list time {
  color: var(--gold-deep);
  font-size: 0.85rem;
  font-weight: 700;
}

.schedule-list h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.schedule-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.faq-panel > .small-label {
  margin-bottom: 6px;
}

.faq-panel h2 {
  margin-top: 0;
}

.faq-list {
  border-bottom: 1px solid var(--line);
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  color: var(--gold-deep);
  content: '+';
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.faq-answer {
  padding: 0 28px 14px 2px;
  color: var(--muted);
  line-height: 1.65;
}

.faq-answer p {
  margin: 0 0 8px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--burgundy);
  font-weight: 600;
}

.form-panel {
  padding: 30px;
}

.family-member-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  background: rgba(252, 250, 244, 0.78);
}

.family-member-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.family-member-header h3 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.family-member-header .pill {
  color: var(--muted);
  font-size: 0.85rem;
}

.edit-invitation-panel {
  max-width: 920px;
}

.edit-member-list {
  display: grid;
  gap: 14px;
}

.edit-member-list h2 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.edit-member-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  align-items: end;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.remove-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  white-space: nowrap;
}

.remove-member input {
  width: auto;
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 780px) {
  .hero-card,
  .details-grid,
  .panel-grid,
  .two-col,
  .invitation-extras,
  .countdown-panel {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-item {
    display: grid;
  }

  .family-member-header {
    display: grid;
  }

  .save-the-date-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    display: grid;
  }

  .venue-map {
    height: 260px;
  }

  .countdown-panel {
    gap: 18px;
    padding: 22px;
  }

  .countdown-clock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countdown-unit {
    min-width: 0;
  }

  .edit-member-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .remove-member {
    padding-bottom: 0;
  }
}
