:root {
  --bg: #f8f3ec;
  --bg-soft: rgba(255, 250, 245, 0.82);
  --card: rgba(255, 255, 255, 0.8);
  --card-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(97, 58, 67, 0.12);
  --line-strong: rgba(97, 58, 67, 0.2);
  --text: #22362b;
  --muted: #627369;
  --accent: #613a43;
  --accent-deep: #56384c;
  --coral: #f49b84;
  --sage: #b5c29d;
  --forest: #274234;
  --shadow: 0 22px 60px rgba(48, 35, 30, 0.12);
  --shadow-soft: 0 14px 38px rgba(48, 35, 30, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(181, 194, 157, 0.38), transparent 34%),
    radial-gradient(circle at top right, rgba(244, 155, 132, 0.25), transparent 30%),
    linear-gradient(180deg, #fbf7f2 0%, #f6efe8 54%, #f8f3ec 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
}

body::before {
  width: 240px;
  height: 240px;
  top: -70px;
  right: -70px;
  background: rgba(132, 153, 116, 0.16);
  filter: blur(10px);
}

body::after {
  width: 280px;
  height: 280px;
  bottom: -120px;
  left: -110px;
  background: rgba(97, 58, 67, 0.08);
  filter: blur(12px);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  animation: floatBlob 14s ease-in-out infinite;
}

.ambient-a {
  width: 140px;
  height: 140px;
  top: 18%;
  left: -50px;
  background: rgba(244, 155, 132, 0.24);
}

.ambient-b {
  width: 160px;
  height: 160px;
  top: 62%;
  right: -52px;
  background: rgba(181, 194, 157, 0.3);
  animation-delay: -5s;
}

.ambient-c {
  width: 200px;
  height: 200px;
  top: 12%;
  right: -80px;
  background: rgba(97, 58, 67, 0.12);
}

.ambient-d {
  width: 220px;
  height: 220px;
  top: 8%;
  left: -90px;
  background: rgba(244, 155, 132, 0.18);
}

.page-shell,
.admin-shell {
  position: relative;
  z-index: 1;
}

.page-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 28px 18px 56px;
}

.page-shell-narrow {
  width: min(100%, 520px);
  padding-top: 40px;
}

.hero {
  text-align: center;
  display: grid;
  gap: 20px;
}

.hero-tight {
  gap: 14px;
}

.section-overline {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-copy h1,
.admin-header h1,
.login-card h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hero-headline {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.02;
}

.hero-date {
  margin: 0;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-subheadline,
.admin-subtitle,
.spotlight-card p,
.footer-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.portrait-card {
  padding: 12px;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.portrait-card-left {
  transform: translateY(12px);
}

.portrait-card-right {
  transform: translateY(-6px);
}

.portrait-figure {
  aspect-ratio: 0.78;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 24% 20%, rgba(241, 221, 211, 0.92), transparent 34%),
    linear-gradient(140deg, rgba(132, 153, 116, 0.28), rgba(97, 58, 67, 0.22));
}

.portrait-figure::before,
.portrait-figure::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.portrait-figure::before {
  width: 80%;
  height: 80%;
  left: 10%;
  top: 12%;
  background: linear-gradient(180deg, rgba(39, 66, 52, 0.2), rgba(39, 66, 52, 0));
}

.portrait-figure::after {
  width: 64%;
  height: 52%;
  left: 18%;
  bottom: -8%;
  background: rgba(39, 66, 52, 0.22);
}

.portrait-figure-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 78% 18%, rgba(244, 155, 132, 0.68), transparent 32%),
    linear-gradient(140deg, rgba(181, 194, 157, 0.28), rgba(86, 56, 76, 0.22));
}

.monogram-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(34, 54, 43, 0.14);
}

.portrait-label {
  margin: 10px 2px 0;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.detail-ribbon,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.detail-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}

.cta-stack {
  display: grid;
  gap: 12px;
}

.cta-button,
.ghost-button {
  min-height: 58px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.cta-button:hover,
.ghost-button:hover,
.copy-button:hover {
  transform: translateY(-1px);
}

.cta-button:active,
.ghost-button:active,
.copy-button:active {
  transform: translateY(1px);
}

.cta-button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fffaf8;
  box-shadow: 0 18px 40px rgba(97, 58, 67, 0.24);
}

.cta-button-secondary {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest);
  border: 1px solid rgba(39, 66, 52, 0.12);
  box-shadow: var(--shadow-soft);
}

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

.spotlight-card,
.countdown-section,
.footer-note,
.form-card,
.result-card,
.admin-card,
.login-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.spotlight-card h2,
.section-heading h2,
.result-card h2,
.admin-card h2,
.modal-card h2 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.04;
  font-weight: 600;
}

.section-heading {
  text-align: center;
  margin-bottom: 18px;
}

.section-heading-left {
  text-align: left;
}

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

.countdown-card {
  padding: 18px 10px;
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(97, 58, 67, 0.12);
}

.countdown-value {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  line-height: 0.9;
  color: var(--accent);
}

.countdown-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-note {
  text-align: center;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
  z-index: 12;
}

.modal-shell[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 28, 27, 0.46);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: min(100%, 560px);
  margin: 20px;
  padding: 22px;
  border-radius: 32px 32px 24px 24px;
  background: var(--card-strong);
  box-shadow: 0 26px 80px rgba(19, 15, 14, 0.22);
  transform: translateY(18px);
  transition: transform 220ms ease;
}

.modal-shell[data-open="true"] .modal-card {
  transform: translateY(0);
}

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

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(97, 58, 67, 0.08);
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

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

.field,
.field-group,
.field-compact {
  display: grid;
  gap: 8px;
}

.field span,
.field-group-head span {
  font-weight: 700;
  font-size: 0.95rem;
}

.field-label-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field input,
.field select,
.field textarea,
.inline-form input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(97, 58, 67, 0.12);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input,
.field select,
.inline-form input {
  min-height: 52px;
}

.field textarea {
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-form input:focus,
.assignment-form select:focus,
.assignment-form input:focus {
  border-color: rgba(97, 58, 67, 0.34);
  box-shadow: 0 0 0 4px rgba(97, 58, 67, 0.08);
}

.info-trigger {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(97, 58, 67, 0.1);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.info-popover {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(97, 58, 67, 0.08);
  color: var(--accent);
  font-size: 0.86rem;
  line-height: 1.5;
}

.guest-name-grid,
.assignment-tiles,
.table-list {
  display: grid;
  gap: 12px;
}

.rsvp-list {
  display: block;
}

.dual-fields,
.assignment-form-row {
  display: grid;
  gap: 12px;
}

.form-message {
  min-height: 1.2em;
  margin: 0;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.form-message[data-state="error"] {
  color: #9b3452;
}

.form-message[data-state="success"] {
  color: var(--forest);
}

.result-card {
  display: grid;
  gap: 16px;
}

.assignment-tile {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.assignment-tile strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  color: var(--accent);
}

.assignment-tile span {
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.back-link-wrap {
  text-align: center;
  margin-top: 20px;
}

.admin-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 20px 16px 56px;
}

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

.login-card {
  width: min(100%, 460px);
  text-align: center;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button {
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid rgba(39, 66, 52, 0.12);
  box-shadow: var(--shadow-soft);
}

.ghost-button-danger {
  color: #8a3a4c;
}

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

.stat-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.66)),
    rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.76);
}

.stat-card strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 0.9;
}

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

.settings-card {
  display: grid;
  gap: 16px;
}

.settings-grid {
  display: grid;
  gap: 12px;
}

.settings-span-2 {
  grid-column: 1 / -1;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.inline-form {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.table-card {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.table-top,
.assignment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.table-top strong {
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.assignment-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.assignment-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(248, 243, 236, 0.9);
  border: 1px solid rgba(97, 58, 67, 0.08);
}

.assignment-item strong {
  display: block;
}

.assignment-item small,
.table-person small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.assignment-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.assignment-form select,
.assignment-form input {
  min-height: 48px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(97, 58, 67, 0.12);
  background: rgba(255, 255, 255, 0.82);
  padding: 0 14px;
}

.table-rename-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.danger-link {
  border: none;
  background: transparent;
  color: #8a3a4c;
  font-weight: 700;
  padding: 0;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(97, 58, 67, 0.18);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(97, 58, 67, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

.rsvp-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.rsvp-table th,
.rsvp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(97, 58, 67, 0.08);
  vertical-align: top;
  text-align: left;
}

.rsvp-table thead th {
  position: sticky;
  top: 0;
  background: rgba(248, 243, 236, 0.98);
  z-index: 1;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.rsvp-table tbody tr:last-child td {
  border-bottom: none;
}

.table-person-stack {
  display: grid;
  gap: 8px;
}

.table-person {
  display: block;
  min-width: 180px;
}

.copy-button {
  border: 1px solid rgba(97, 58, 67, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: var(--shadow-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 42px 24px 64px;
  }

  .dual-fields,
  .inline-form,
  .assignment-form-row,
  .table-rename-form,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: start;
  }

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

  .admin-header {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }
}
