html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f4f3ef;
  color: #1e2220;
}

.login-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem;
}

.invite-page {
  max-width: 760px;
  margin: 2rem auto;
}

.invite-panel {
  padding: 2rem;
}

.event-hero-image {
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.invite-hero-image {
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
}

.dashboard-hero-image {
  aspect-ratio: 21 / 9;
  max-height: 360px;
}

.invite-details dt {
  color: #52606d;
  font-weight: 600;
}

.public-event-body {
  background: #f4f3ef;
  color: #1e2220;
  margin-bottom: 0;
}

.public-event-body main {
  overflow-x: hidden;
}

.public-invite-page {
  --forest-green-dark: #6A6A45;
  --moss-green-mid: #4a5c4e;
  --wood-tan-light: #c5a059;
  --wood-brown-mid: #937143;
  --wood-shadow-dark: #503d25;
  --linen-white: #f4f3ef;
  --shadow-charcoal: #1e2220;
  --public-ink: var(--shadow-charcoal);
  --public-muted: var(--moss-green-mid);
  --public-primary: var(--forest-green-dark);
  --public-primary-hover: var(--shadow-charcoal);
  --public-accent: var(--wood-tan-light);
  --public-accent-dark: var(--wood-brown-mid);
  --public-surface: var(--linen-white);
  --public-soft-green: rgba(74, 92, 78, 0.12);
  --public-soft-wood: rgba(197, 160, 89, 0.16);
  --public-border: rgba(45, 59, 50, 0.18);
  --public-card: rgba(244, 243, 239, 0.94);
  background: var(--public-surface);
  font-family: Georgia, "Times New Roman", serif;
}

.public-invite-page p,
.public-invite-page label,
.public-invite-page select,
.public-invite-page input,
.public-invite-page button {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.public-hero {
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(244, 243, 239, 0.9), rgba(244, 243, 239, 0.42) 48%, rgba(30, 34, 32, 0.3)),
    var(--event-hero-image);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  justify-content: flex-start;
  min-height: 100svh;
  padding: clamp(3rem, 7vw, 7rem);
  position: relative;
}

.public-hero-content {
  max-width: 52rem;
  text-align: center;
}

.public-script {
  color: var(--public-accent-dark);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.public-hero h1 {
  color: var(--public-primary);
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0.25rem 2rem rgba(244, 243, 239, 0.82);
  text-wrap: balance;
}

.public-hero-divider {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 16rem;
}

.public-hero-divider::before,
.public-hero-divider::after {
  background: var(--public-accent);
  content: "";
  display: block;
  height: 1px;
  width: 100%;
}

.public-hero-divider::marker {
  content: "";
}

.public-hero-date {
  color: var(--public-primary);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.public-hero-location {
  color: var(--public-ink);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.invite-section {
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
}

.invite-section-inner {
  margin: 0 auto;
  max-width: 72rem;
}

.invite-section h2 {
  color: var(--public-primary);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 1rem;
}

.invite-section h3 {
  color: var(--public-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0;
}

.invite-section p {
  color: var(--public-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.section-number {
  color: var(--public-accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.section-heading.centered {
  margin-bottom: 2.5rem;
  text-align: center;
}

.welcome-section {
  background: var(--public-surface);
}

.welcome-grid,
.story-grid,
.rsvp-grid,
.location-grid,
.info-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.welcome-copy {
  border-left: 1px solid var(--public-accent);
  padding-left: clamp(1.5rem, 4vw, 3rem);
}

.welcome-copy p {
  color: var(--public-ink);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.65;
}

.details-section,
.program-section,
.additional-section {
  background: linear-gradient(180deg, var(--public-surface), rgba(197, 160, 89, 0.13));
}

.details-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-item {
  border-left: 1px solid var(--public-border);
  min-height: 13rem;
  padding: 1rem 1.5rem;
  text-align: center;
}

.detail-item:first-child {
  border-left: 0;
}

.detail-icon {
  align-items: center;
  border: 1px solid rgba(147, 113, 67, 0.48);
  border-radius: 50%;
  color: var(--public-accent-dark);
  display: inline-flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  height: 3rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 3rem;
}

.detail-item p {
  margin-bottom: 0;
}

.story-section,
.stay-section {
  background: linear-gradient(135deg, var(--public-soft-green), var(--public-surface) 52%, var(--public-soft-wood));
}

.story-grid {
  align-items: center;
}

.story-photo-stack {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.story-photo-stack div {
  --story-photo-image: var(--story-photo-left);
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(180deg, rgba(30, 34, 32, 0.03), rgba(30, 34, 32, 0.24)),
    var(--story-photo-image);
  background-position: center;
  background-size: cover;
  border: 0.5rem solid var(--public-surface);
  box-shadow: 0 1.25rem 3rem rgba(30, 34, 32, 0.16);
}

.story-photo-stack div:nth-child(2) {
  --story-photo-image: var(--story-photo-mid);
  margin-top: 2.5rem;
}

.story-photo-stack div:nth-child(3) {
  --story-photo-image: var(--story-photo-right);
  margin-top: 1rem;
}

.rsvp-section {
  background: var(--public-surface);
}

.rsvp-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rsvp-form-column {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.rsvp-card,
.location-panel,
.info-grid article,
.additional-grid article {
  background: var(--public-card);
  border: 1px solid var(--public-border);
  border-radius: 8px;
  box-shadow: 0 1.5rem 4rem rgba(30, 34, 32, 0.09);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.rsvp-card {
  background: linear-gradient(180deg, var(--public-card), rgba(197, 160, 89, 0.12));
}

.event-location-map-panel {
  background: linear-gradient(180deg, var(--public-card), rgba(197, 160, 89, 0.12));
  border: 1px solid var(--public-border);
  border-radius: 8px;
  box-shadow: 0 1.5rem 4rem rgba(30, 34, 32, 0.09);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.event-location-map-panel h3 {
  color: var(--public-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 1.25rem;
}

.public-event-location-map {
  border: 1px solid var(--public-border);
  border-radius: 6px;
  height: min(32rem, 52vw);
  min-height: 22rem;
  overflow: hidden;
}

.public-event-location-map iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.event-location-map-address {
  margin-top: 1rem;
}

.event-location-map-address p {
  color: var(--public-ink);
  margin-bottom: 0.5rem;
}

.event-location-map-address a {
  color: var(--public-accent-dark);
  font-weight: 700;
}

.rsvp-card .form-label {
  color: var(--public-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rsvp-card .form-select {
  border-color: var(--public-border);
  border-radius: 6px;
  color: var(--public-ink);
  min-height: 3rem;
}

.rsvp-card .form-select:focus {
  border-color: var(--public-accent-dark);
  box-shadow: 0 0 0 0.2rem rgba(147, 113, 67, 0.2);
}

.public-primary-button {
  background: var(--public-primary);
  border: 1px solid var(--public-primary);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  text-transform: uppercase;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.public-primary-button:hover,
.public-primary-button:focus {
  background: var(--public-primary-hover);
  border-color: var(--public-primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

.public-primary-button:disabled {
  background: var(--moss-green-mid);
  border-color: var(--moss-green-mid);
}

.public-alert {
  border-color: rgba(147, 113, 67, 0.28);
  border-radius: 8px;
  color: var(--public-ink);
}

.location-section {
  background: linear-gradient(135deg, rgba(45, 59, 50, 0.16), rgba(197, 160, 89, 0.16));
}

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

.location-panel h2,
.info-grid h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.location-time {
  color: var(--public-accent-dark) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  line-height: 1.1 !important;
  margin-bottom: 0.5rem;
}

.muted-copy {
  color: var(--public-muted) !important;
  font-style: italic;
  margin-bottom: 0;
}

.program-timeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 2rem 0 0;
  position: relative;
}

.program-timeline::before {
  background: var(--public-accent);
  content: "";
  height: 2px;
  left: 8%;
  position: absolute;
  right: 8%;
  top: 2.55rem;
}

.program-timeline li {
  color: var(--public-ink);
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  position: relative;
  text-align: center;
}

.program-timeline li::before {
  background: var(--public-accent);
  border: 4px solid var(--public-surface);
  border-radius: 50%;
  content: "";
  height: 1rem;
  width: 1rem;
}

.program-timeline span {
  color: var(--public-muted);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
}

.program-timeline strong {
  color: var(--public-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.dress-swatches {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.swatch {
  border-radius: 50%;
  display: inline-block;
  height: 2.5rem;
  width: 2.5rem;
}

.swatch.forest {
  background: var(--forest-green-dark);
}

.swatch.moss {
  background: var(--moss-green-mid);
}

.swatch.tan {
  background: var(--wood-tan-light);
}

.swatch.linen {
  background: var(--linen-white);
  border: 1px solid rgba(45, 59, 50, 0.22);
}

.additional-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.additional-grid article {
  box-shadow: none;
  text-align: center;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.surface {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}

.event-list {
  display: grid;
  gap: 0.75rem;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: inherit;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.event-row:hover {
  border-color: #9bb8e8;
  box-shadow: 0 0.5rem 1.5rem rgba(31, 41, 51, 0.08);
  color: inherit;
  transform: translateY(-1px);
}

.event-row-meta {
  display: grid;
  justify-items: end;
  min-width: 9rem;
  color: #52606d;
}

.event-table-surface {
  padding: 0;
  overflow: hidden;
}

.event-table th {
  color: #52606d;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.event-table td,
.event-table th {
  padding: 0.9rem 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
}

.rsvp-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.rsvp-summary > div {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.summary-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.summary-label {
  color: #52606d;
}

.guest-table-surface {
  padding: 0;
  overflow: hidden;
}

.guest-list-toolbar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.guest-list-search {
  max-width: 26rem;
}

.guest-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: end;
}

.guest-edit-form {
  max-width: 42rem;
}

.guest-edit-plus-one {
  max-width: 8rem;
}

.import-preview-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem;
}

.guest-preview-search {
  width: 100%;
  max-width: 34rem;
}

.guest-table th {
  color: #52606d;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.guest-table td,
.guest-table th {
  padding: 0.9rem 1rem;
}

.add-guest-row {
  background: #f9fafb;
}

.plus-one-input {
  min-width: 5rem;
}

.copy-invite-button {
  min-width: 6.75rem;
  white-space: nowrap;
}

.link-used-mark {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #15803d;
  color: #fff;
  font-weight: 700;
}

.rsvp-badge {
  border-radius: 999px;
  font-weight: 600;
}

.rsvp-pending {
  background: #e5e7eb;
  color: #374151;
}

.rsvp-yes {
  background: #dcfce7;
  color: #166534;
}

.rsvp-no {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 767.98px) {
  .page-heading,
  .event-row,
  .import-preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .event-row-meta {
    justify-items: start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .public-hero {
    align-items: flex-start;
    background-attachment: scroll;
    justify-content: center;
    min-height: 92svh;
    padding: 3rem 1.25rem;
  }

  .public-hero h1 {
    font-size: clamp(2.6rem, 14vw, 4.4rem);
  }

  .public-hero-date {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-wrap: balance;
  }

  .invite-section {
    padding: 3.5rem 1rem;
  }

  .welcome-grid,
  .story-grid,
  .rsvp-grid,
  .location-grid,
  .info-grid,
  .details-grid,
  .additional-grid {
    grid-template-columns: 1fr;
  }

  .welcome-copy {
    border-left: 0;
    border-top: 1px solid var(--public-accent);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .detail-item {
    border-left: 0;
    border-top: 1px solid var(--public-border);
    min-height: auto;
  }

  .detail-item:first-child {
    border-top: 0;
  }

  .story-photo-stack {
    gap: 0.75rem;
  }

  .story-photo-stack div:nth-child(2),
  .story-photo-stack div:nth-child(3) {
    margin-top: 0;
  }

  .program-timeline {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .public-event-location-map {
    height: 20rem;
    min-height: 20rem;
  }

  .program-timeline::before {
    bottom: 0;
    height: auto;
    left: 0.5rem;
    right: auto;
    top: 0.5rem;
    width: 2px;
  }

  .program-timeline li {
    align-items: start;
    gap: 0.25rem 1rem;
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .program-timeline li::before {
    grid-row: span 2;
    margin-top: 0.2rem;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
