:root {
  color-scheme: light;
  --bg: #f5efe6;
  --surface: rgba(255, 250, 244, 0.88);
  --surface-strong: #fffdf9;
  --ink: #231815;
  --muted: #65524a;
  --line: rgba(86, 57, 42, 0.12);
  --accent: #b15d3f;
  --accent-dark: #8f4327;
  --accent-soft: #ead6c5;
  --shadow: 0 24px 80px rgba(54, 31, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(232, 191, 160, 0.46), transparent 30%),
    radial-gradient(circle at right center, rgba(186, 124, 93, 0.18), transparent 24%),
    linear-gradient(180deg, #f9f3ea 0%, #f4ecdf 48%, #fcfaf6 100%);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 65%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
  overflow-x: clip;
}

.topbar,
.hero,
.info-card,
.section {
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.75);
  box-shadow: 0 12px 40px rgba(58, 37, 27, 0.06);
}

.brand,
.topbar a {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar-links a {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero {
  padding: 34px;
  border-radius: 36px;
  border: 1px solid rgba(86, 57, 42, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 249, 241, 0.95), rgba(244, 224, 207, 0.76)),
    #fff;
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  padding: 28px 6px 8px;
}

.eyebrow,
.panel-label,
.guest-kicker {
  margin: 0 0 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.98;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
}

.hero-date {
  margin: 18px 0 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--muted);
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #4d3c34;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

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

.button-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 28px rgba(163, 81, 49, 0.24);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(86, 57, 42, 0.12);
}

.hero-panel,
.info-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
}

.hero-panel {
  padding: 26px;
  align-self: end;
}

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

.countdown-item {
  padding: 18px 12px;
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
}

.countdown-item span {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.countdown-item small,
.panel-note,
.microcopy,
.message,
.detail-list,
.playlist-header p,
.guest-summary p,
.info-card p {
  color: var(--muted);
}

.panel-note,
.detail-list,
.info-card p,
.microcopy,
.message {
  line-height: 1.7;
}

.message[data-tone="success"] {
  color: #2d6a4f;
}

.message[data-tone="warning"] {
  color: #94612a;
}

.message[data-tone="error"] {
  color: #a63f2f;
}

.main-content {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  min-width: 0;
}

.section {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 30px;
  border-radius: 34px;
  border: 1px solid rgba(86, 57, 42, 0.08);
  background: rgba(255, 251, 246, 0.72);
  box-shadow: 0 16px 40px rgba(46, 28, 19, 0.05);
}

.section-heading {
  margin-bottom: 20px;
}

h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.7rem);
}

.story-grid,
.split-grid {
  display: grid;
  gap: 18px;
}

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

.split-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: start;
}

.music-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.info-card {
  padding: 24px;
  box-shadow: 0 8px 24px rgba(53, 30, 20, 0.04);
}

.accent-card {
  background: linear-gradient(180deg, rgba(255, 246, 239, 0.94), rgba(240, 218, 204, 0.9));
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.search-row {
  display: flex;
  gap: 12px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #43322d;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(86, 57, 42, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  padding: 15px 18px;
  color: var(--ink);
  font: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(177, 93, 63, 0.26);
  border-color: rgba(177, 93, 63, 0.42);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-card input + .field-label,
.form-card .microcopy + .message,
#requested-by {
  margin-top: 16px;
}

.guest-picker {
  position: relative;
  margin-top: 16px;
}

.guest-picker #requested-by {
  margin-top: 0;
}

.guest-picker-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(86, 57, 42, 0.14);
  background: rgba(255, 250, 244, 0.98);
  box-shadow: 0 20px 40px rgba(44, 27, 18, 0.12);
}

.guest-picker-option {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.guest-picker-option:hover,
.guest-picker-option.is-active {
  background: rgba(234, 214, 197, 0.9);
}

.guest-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(86, 57, 42, 0.08);
}

.guest-match-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 8px;
}

.guest-match-button {
  width: 100%;
  justify-content: flex-start;
}

.guest-summary h3 {
  margin-bottom: 6px;
}

.rsvp-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
}

.rsvp-status-row .message {
  margin: 0;
}

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

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(86, 57, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.choice-card span {
  font-weight: 600;
}

.field-confirmation {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.detail-list {
  margin: 0;
  padding-left: 18px;
}

.playlist-card-wrap {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
}

.spotify-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.spotify-status {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(86, 57, 42, 0.1);
  color: var(--muted);
  font-weight: 700;
}

.spotify-status[data-state="connected"] {
  color: #2d6a4f;
}

.spotify-status[data-state="error"] {
  color: #a63f2f;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.search-result-card img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result-copy h4,
.search-result-copy p {
  margin: 0;
}

.search-result-copy h4 {
  font-size: 1.05rem;
}

.search-result-copy p {
  color: var(--muted);
  line-height: 1.5;
}

.playlist-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.playlist-embed-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 18px;
  padding: 16px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.playlist-embed-wrap iframe {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 18px;
}

.playlist-link-row {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.playlist-link-row a {
  color: var(--accent-dark);
  font-weight: 700;
}

.playlist-items {
  display: grid;
  gap: 14px;
}

.playlist-empty {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(86, 57, 42, 0.16);
}

.page-intro {
  margin-top: 24px;
}

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

.playlist-page-section {
  overflow: visible;
}

.playlist-page-frame {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 4px 0 0;
}

.playlist-page-frame .playlist-card-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.request-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.request-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.request-card h4,
.request-card p {
  margin: 0;
}

.request-card h4 {
  font-size: 1.15rem;
}

.request-card p {
  color: var(--muted);
  line-height: 1.6;
}

.request-byline {
  font-weight: 700;
  color: var(--accent-dark);
}

.photo-wall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.slideshow-card,
.qr-card {
  min-width: 0;
}

.slideshow-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 245, 236, 0.96), rgba(239, 219, 205, 0.9));
  border: 1px solid rgba(86, 57, 42, 0.08);
}

.slideshow-stage img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.slideshow-empty {
  max-width: 420px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.slideshow-meta {
  margin: 14px 0 0;
  color: var(--muted);
}

.qr-wrap {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.qr-wrap img {
  width: min(100%, 260px);
  height: auto;
  display: block;
}

.admin-photo-grid {
  display: grid;
  gap: 16px;
}

.admin-photo-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.admin-photo-thumb {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.admin-photo-copy h3,
.admin-photo-copy p {
  margin: 0 0 8px;
}

.admin-photo-copy p {
  color: var(--muted);
}

.admin-photo-actions {
  display: grid;
  gap: 10px;
}

.registry-grid {
  display: grid;
  gap: 16px;
}

.registry-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(86, 57, 42, 0.1);
}

.registry-card.is-claimed {
  opacity: 0.58;
  background: rgba(238, 233, 228, 0.92);
}

.registry-card-copy h3,
.registry-card-copy p {
  margin: 0 0 10px;
}

.registry-card-copy a {
  color: var(--accent-dark);
  font-weight: 700;
}

.registry-cost,
.registry-claimed-label {
  font-weight: 700;
  color: var(--accent-dark);
}

.registry-claim-box {
  display: grid;
  gap: 12px;
}

.admin-card-actions {
  display: flex;
  align-items: start;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-button {
  width: auto;
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .story-grid,
  .split-grid,
  .music-grid,
  .photo-wall-grid,
  .admin-photo-card {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .admin-photo-thumb {
    width: 100%;
    height: 280px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .topbar,
  .hero,
  .section,
  .info-card {
    border-radius: 26px;
  }

  .hero,
  .section {
    padding: 22px;
  }

  .search-row,
  .hero-actions,
  .playlist-header,
  .spotify-toolbar,
  .rsvp-status-row,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .rsvp-grid,
  .countdown {
    grid-template-columns: 1fr;
  }

  .topbar-links {
    justify-content: space-between;
  }

  .button {
    width: 100%;
  }
}
