:root {
  color-scheme: dark;
  --bg: #0f0d0a;
  --bg-2: #17120e;
  --surface: #1b1611;
  --surface-2: #251d16;
  --surface-3: #2f2419;
  --ink: #fff8ee;
  --muted: #c7b7a6;
  --faint: #8f7f70;
  --line: rgba(255, 248, 238, 0.15);
  --line-strong: rgba(255, 248, 238, 0.28);
  --accent: #d9b76b;
  --accent-2: #b84f3f;
  --accent-3: #f1dfbd;
  --ok: #84c98a;
  --warn: #e7bf67;
  --danger: #dd7b70;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --max: 1180px;
  --radius: 8px;
  --topbar-height: 64px;
  --heading: Didot, "Bodoni 72", Georgia, "Times New Roman", serif;
  --body: "Aptos", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--topbar-height);
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 183, 107, 0.12), transparent 30%),
    linear-gradient(135deg, var(--bg), #080706 58%, #150f0b);
  color: var(--ink);
  font-family: var(--body);
  max-width: 100%;
  overflow-x: hidden;
}

body[data-route="print"] {
  padding-top: 0;
  background: #f7f1e8;
  color: #17120e;
}

body[data-route="print"] .topbar {
  display: none;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 64px;
  padding: 10px clamp(16px, 3vw, 32px);
  background: rgba(15, 13, 10, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.menu-toggle {
  display: none;
  width: 42px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0;
  place-items: center;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

body.is-menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.is-menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.is-menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

[id] {
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.context-nav {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.context-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.lang-pill,
.ghost-button,
.solid-button,
.danger-button,
.gallery-status-button,
.icon-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
}

.nav-link.is-active,
.lang-pill.is-active,
.solid-button {
  background: var(--accent);
  color: #17120e;
  border-color: var(--accent);
  font-weight: 800;
}

.language-switch {
  display: flex;
  gap: 6px;
}

.lang-pill {
  width: 42px;
  padding: 0;
}

.ghost-button:hover,
.nav-link:hover,
.lang-pill:hover,
.icon-button:hover {
  border-color: var(--accent);
}

.danger-button {
  color: var(--danger);
}

.gallery-status-button {
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.gallery-status-button.is-pending {
  border-color: rgba(231, 191, 103, 0.58);
  background: rgba(231, 191, 103, 0.07);
  color: var(--warn);
}

.gallery-status-button.is-approved {
  border-color: rgba(132, 201, 138, 0.68);
  background: rgba(132, 201, 138, 0.08);
  color: #b9efbd;
}

.gallery-status-button.is-hidden {
  border-color: rgba(221, 123, 112, 0.66);
  background: rgba(221, 123, 112, 0.07);
  color: var(--danger);
}

.gallery-status-button.is-pending.is-active {
  border-color: var(--warn);
  background: var(--warn);
  color: #17120e;
}

.gallery-status-button.is-approved.is-active,
.gallery-status-button.is-approved.is-primary-action {
  border-color: var(--ok);
  background: var(--ok);
  color: #102113;
}

.gallery-status-button.is-hidden.is-active {
  border-color: var(--danger);
  background: var(--danger);
  color: #210c09;
}

.gallery-status-button:hover {
  filter: brightness(1.08);
}

.hero {
  position: relative;
  min-height: calc(92vh - 64px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero::before {
  background-image: url("Bilder/Ilenia_Nino_Verlobung_extra-123.jpg");
  background-size: cover;
  background-position: center 44%;
  filter: contrast(1.04) saturate(0.82);
}

.hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.18)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(15, 13, 10, 0.86));
}

.hero-content {
  width: min(860px, calc(100% - 36px));
  margin: 0 clamp(18px, 7vw, 92px) clamp(44px, 10vh, 100px);
}

.eyebrow,
.kicker,
.micro-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(4.3rem, 11vw, 10.5rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 5vw, 5.2rem);
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 2.2vw, 2.25rem);
}

h4 {
  margin-bottom: 10px;
  color: var(--accent-3);
  font-size: 1rem;
}

.hero-date {
  margin-bottom: 18px;
  color: var(--accent-3);
  font-family: var(--heading);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.hero-copy {
  max-width: 690px;
  margin-bottom: 30px;
  color: rgba(255, 248, 238, 0.9);
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.button-row,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.section {
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
  padding: clamp(54px, 9vw, 108px) 0;
}

.section-tight {
  padding-block: clamp(34px, 6vw, 68px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(300px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.section-heading {
  max-width: 720px;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.home-copy {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.home-copy p {
  margin-bottom: 0;
}

.home-card,
.home-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 22, 17, 0.78);
  box-shadow: var(--shadow);
}

.home-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 3vw, 30px);
}

.home-card p:last-child,
.home-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-note {
  padding: clamp(24px, 5vw, 46px);
}

.home-note h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.admin-login-panel {
  width: min(560px, 100%);
  margin-inline: auto;
}

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

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

.panel,
.tool-panel,
.event-card,
.guest-card,
.wish-card,
.gallery-card,
.timeline-list,
.map-panel,
.qr-panel,
.stat-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 22, 17, 0.82);
  box-shadow: var(--shadow);
}

.panel,
.tool-panel {
  padding: clamp(22px, 4vw, 36px);
}

.feature-grid,
.event-grid,
.wishlist-grid,
.gallery-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

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

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

.stat-tile {
  padding: 18px;
}

.stat-value {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--heading);
  font-size: 2.4rem;
  line-height: 1;
}

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

.event-card,
.guest-card,
.wish-card,
.gallery-card {
  min-height: 220px;
  padding: 22px;
}

.event-card {
  display: flex;
  flex-direction: column;
}

.event-meta,
.chip-row,
.field-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-meta {
  margin-top: auto;
  padding-top: 22px;
}

.chip,
.status-chip,
.field-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-3);
  font-size: 0.86rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

.wish-card .item-head {
  align-items: flex-start;
}

.wish-card .item-head .chip {
  min-width: max-content;
  max-width: 100%;
  min-height: auto;
  padding-block: 7px;
  white-space: normal;
}

.status-chip.is-ok {
  color: var(--ok);
  border-color: rgba(132, 201, 138, 0.38);
}

.status-chip.is-warn {
  color: var(--warn);
  border-color: rgba(231, 191, 103, 0.38);
}

.status-chip.is-danger {
  color: var(--danger);
  border-color: rgba(221, 123, 112, 0.38);
}

.guest-shell {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 88px;
}

.guest-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 13, 10, 0.76);
  padding: 18px;
}

.guest-sidebar strong {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-3);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
}

.side-nav a:hover {
  background: rgba(255, 248, 238, 0.06);
  color: var(--ink);
}

.side-nav a.is-active {
  background: var(--accent);
  color: #17120e;
  font-weight: 800;
}

.guest-content {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.welcome-panel {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  gap: 28px;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(15, 13, 10, 0.92), rgba(15, 13, 10, 0.62)),
    url("Bilder/Ilenia_Nino_Verlobung_extra-141.jpg") center 43% / cover;
  padding: clamp(24px, 5vw, 48px);
  min-width: 0;
}

.welcome-panel > * {
  min-width: 0;
}

#rsvp-form,
.admin-rsvp-form {
  display: grid;
  gap: 12px;
}

.rsvp-person {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.035);
}

.rsvp-person.is-expanded {
  background: rgba(255, 248, 238, 0.055);
}

.rsvp-person .collapsible-body {
  margin-top: 0;
  padding: 0 18px 18px;
}

.person-head,
.item-head,
.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.person-head {
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
}

.person-head:hover,
.person-head:focus-visible {
  background: rgba(217, 183, 107, 0.08);
  outline: none;
}

.person-head > div:first-child,
.item-head > div:first-child,
.admin-card-head > div:first-child {
  min-width: 0;
}

.overview-head {
  align-items: center;
  margin-bottom: 18px;
}

.overview-head h2 {
  margin-bottom: 0;
}

.moderate-cta {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0 24px;
  background: var(--accent);
  color: #17120e;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: 0 16px 42px rgba(217, 183, 107, 0.2);
}

.moderate-cta:hover,
.moderate-cta:focus-visible {
  background: var(--accent-3);
  border-color: var(--accent-3);
  outline: none;
}

.person-actions {
  justify-content: flex-end;
}

.person-toggle-indicator {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 800;
}

.event-response {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.035);
}

.general-response {
  background: rgba(217, 183, 107, 0.07);
}

.rsvp-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.045);
}

.rsvp-status.is-saved {
  border-color: rgba(113, 167, 128, 0.55);
  background: rgba(113, 167, 128, 0.12);
}

.rsvp-status.is-open {
  border-color: rgba(231, 191, 103, 0.48);
  background: rgba(231, 191, 103, 0.1);
}

.rsvp-status p {
  margin: 4px 0 0;
  color: var(--muted);
}

.rsvp-edit-row {
  margin-top: 16px;
}

.add-person-panel {
  margin: 20px 0 8px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(217, 183, 107, 0.06);
}

.warning-banner {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(231, 191, 103, 0.48);
  border-radius: var(--radius);
  background: rgba(231, 191, 103, 0.12);
  color: var(--accent-3);
}

.warning-banner p {
  margin-bottom: 0;
  color: var(--muted);
}

.response-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.program-offer {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.full-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.06);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

select {
  color-scheme: light;
}

select option {
  background: #fffaf2;
  color: #17120e;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.attendance-toggle {
  align-self: start;
  min-height: 46px;
  border: 1px solid rgba(217, 183, 107, 0.46);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  background: rgba(217, 183, 107, 0.1);
  color: var(--accent-3);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.attendance-toggle:hover {
  border-color: var(--accent);
  background: rgba(217, 183, 107, 0.16);
}

.attendance-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #17120e;
  box-shadow: 0 10px 28px rgba(217, 183, 107, 0.18);
}

.attendance-toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.attendance-toggle:has(input:checked) input {
  accent-color: #17120e;
}

.timeline-list {
  padding: 10px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

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

.timeline-time {
  color: var(--accent);
  font-weight: 800;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.map-panel {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(217, 183, 107, 0.16), transparent 32%),
    linear-gradient(45deg, rgba(255, 248, 238, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 248, 238, 0.08) 50%, rgba(255, 248, 238, 0.08) 75%, transparent 75%);
  background-size: auto, 46px 46px;
}

.map-panel::before {
  content: "";
  position: absolute;
  left: 23%;
  top: 62%;
  width: 54%;
  height: 2px;
  background: var(--accent);
  transform: rotate(-24deg);
  transform-origin: left;
}

.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  color: #17120e;
  font-weight: 900;
  transform: rotate(-45deg);
}

.marker span {
  transform: rotate(45deg);
}

.marker-parking {
  left: 18%;
  top: 56%;
}

.marker-venue {
  right: 20%;
  top: 24%;
  background: var(--accent-2);
  color: var(--ink);
}

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

.wish-image {
  width: calc(100% + 44px);
  max-width: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -22px -22px 18px;
  border-bottom: 1px solid var(--line);
  filter: saturate(0.82) contrast(1.08);
}

.wish-admin-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.progress-track {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.payment-area {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.payment-flow {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.qr-panel {
  display: grid;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  justify-items: center;
  padding: 16px;
  background: #fffaf2;
  color: #17120e;
}

.qr-target {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 196px;
  height: 196px;
  padding: 8px;
  box-sizing: border-box;
  background: #fff;
}

.qr-target canvas,
.qr-target svg {
  width: 180px;
  height: 180px;
  flex: 0 0 auto;
  display: block;
}

.swiss-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  background: #111;
  border: 2px solid #fff;
  pointer-events: none;
}

.swiss-cross::before,
.swiss-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  background: #fff;
  transform: translate(-50%, -50%);
}

.swiss-cross::before {
  width: 15px;
  height: 5px;
}

.swiss-cross::after {
  width: 5px;
  height: 15px;
}

.pseudo-qr {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  width: 180px;
  aspect-ratio: 1;
  padding: 8px;
  background: #fff;
}

.pseudo-qr i {
  display: block;
  min-width: 0;
  min-height: 0;
}

.pseudo-qr span {
  display: block;
  width: 100%;
  height: 100%;
  background: #111;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 80;
  max-width: calc(100% - 32px);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(15, 13, 10, 0.92);
  color: var(--accent-3);
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

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

.gallery-card {
  min-height: auto;
  padding: 0;
  overflow: hidden;
}

.gallery-image-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.gallery-card img,
.gallery-image-button img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.08);
}

.gallery-card-body {
  padding: 14px;
}

.gallery-load-more {
  justify-content: center;
  margin-top: 24px;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
}

.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  height: min(86vh, 840px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.gallery-lightbox-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.gallery-lightbox-toolbar > span {
  margin-right: auto;
  color: var(--accent-3);
  font-weight: 800;
}

.gallery-lightbox-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: contain;
  background: #080706;
  box-shadow: var(--shadow);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(15, 13, 10, 0.78);
  font-size: 2rem;
  line-height: 1;
}

.gallery-lightbox-nav span {
  display: block;
  line-height: 1;
  transform: translateY(-2px);
}

.gallery-lightbox-nav.is-prev {
  left: 10px;
}

.gallery-lightbox-nav.is-next {
  right: 10px;
}

.moderation-panel {
  display: grid;
  gap: 18px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 28px);
  background: rgba(255, 248, 238, 0.04);
}

.moderation-review-frame {
  height: 90vh;
  height: 90svh;
  max-height: 900px;
  min-height: 520px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.moderation-image-frame {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0a0806;
}

.moderation-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

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

.moderation-actions > * {
  min-height: 48px;
}

.gallery-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.upload-panel {
  display: grid;
  gap: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
}

.upload-panel label {
  display: grid;
  gap: 10px;
}

.upload-status {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 248, 238, 0.05);
}

.upload-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-status-head span {
  font-weight: 800;
}

.upload-status-head strong {
  color: var(--accent-3);
  font-variant-numeric: tabular-nums;
}

.upload-progress-track {
  margin: 0;
}

.upload-status.is-complete .progress-fill {
  background: var(--ok);
}

.upload-status.is-error {
  border-color: rgba(221, 123, 112, 0.5);
  background: rgba(221, 123, 112, 0.08);
}

.upload-status.is-error .progress-fill {
  background: var(--danger);
}

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  width: min(1460px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 88px;
}

.admin-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 13, 10, 0.86);
}

.admin-logout-button {
  width: 100%;
  margin-top: 14px;
}

.admin-content {
  display: grid;
  gap: 22px;
}

.admin-section {
  scroll-margin-top: 88px;
}

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

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 248, 238, 0.04);
}

.admin-collapsible-card,
.attendee-event-card,
.admin-program-card,
.admin-wish-card {
  min-height: 0;
}

.collapsible-head {
  align-items: center;
  cursor: pointer;
  border-radius: var(--radius);
}

.collapsible-head:hover,
.collapsible-head:focus-visible {
  background: rgba(217, 183, 107, 0.08);
  outline: none;
}

.card-summary,
.wish-admin-summary {
  min-width: 0;
}

.card-summary p,
.card-summary h3,
.wish-admin-summary h4,
.wish-admin-summary p {
  overflow-wrap: anywhere;
}

.admin-card-actions {
  justify-content: flex-end;
}

.admin-card-actions .person-toggle-indicator,
.collapsible-head .person-toggle-indicator {
  width: 32px;
  flex: 0 0 32px;
}

.collapsible-body {
  margin-top: 18px;
}

.admin-program-card.is-collapsed .admin-grid > :not(.admin-card-head) {
  display: none;
}

.wish-admin-summary {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wish-admin-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

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

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

.admin-add-person-form {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(217, 183, 107, 0.06);
}

.config-field-list {
  margin: 18px 0;
}

.config-field-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.035);
}

.general-fields-admin {
  margin: 18px 0;
}

.attendee-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.attendee-row {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.attendee-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.attendee-main,
.attendee-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.attendee-main {
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 2px;
}

.detail-list dt {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.offer-change-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.offer-change-list div {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.04);
}

.offer-change-list dt {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.offer-change-list dd {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.05);
}

.link-box code {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--accent-3);
}

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

.gallery-link-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.gallery-link-card .link-box {
  grid-template-columns: 1fr;
  align-items: start;
  margin-top: 0;
}

.gallery-link-main {
  min-width: 0;
}

.gallery-link-main code {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  overflow-wrap: normal;
}

.gallery-link-actions {
  justify-content: start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 5, 4, 0.74);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 14, 10, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.print-sheet {
  width: min(720px, calc(100% - 32px));
  margin: 32px auto;
  padding: 42px;
  border: 1px solid #d8cdbb;
  background: #fffaf2;
  color: #17120e;
}

.print-sheet h1,
.print-sheet h2,
.print-sheet h3 {
  color: #17120e;
}

.print-sheet .qr-target {
  margin: 24px auto;
}

.print-actions {
  width: min(720px, calc(100% - 32px));
  margin: 24px auto 0;
}

.print-actions .ghost-button {
  color: #17120e;
  border-color: #d8cdbb;
}

.hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .guest-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .guest-sidebar,
  .admin-sidebar {
    position: static;
  }

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

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

  .welcome-panel,
  .split,
  .map-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    overflow: visible;
  }

  .menu-toggle {
    display: grid;
    gap: 4px;
  }

  .language-switch {
    justify-self: end;
    grid-column: 3;
  }

  .context-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    display: grid;
    width: auto;
    max-width: none;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(15, 13, 10, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  body.is-menu-open .context-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .context-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: 78vh;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72) 55%, rgba(15, 13, 10, 0.92));
  }

  .hero-content {
    width: calc(100% - 28px);
    margin-inline: 14px;
    margin-bottom: 38px;
  }

  h1 {
    font-size: clamp(3.1rem, 15vw, 5.5rem);
  }

  .welcome-panel h1 {
    font-size: clamp(2.75rem, 12vw, 3.8rem);
    line-height: 1.04;
  }

  .item-head,
  .person-head,
  .admin-card-head,
  .rsvp-status {
    display: grid;
  }

  h2 {
    font-size: clamp(2.1rem, 10vw, 3.55rem);
  }

  .hero-actions,
  .button-row,
  .inline-actions {
    display: grid;
  }

  .hero-actions > *,
  .button-row > *,
  .inline-actions > *,
  .rsvp-status > * {
    width: 100%;
  }

  .person-actions {
    display: flex;
    justify-content: flex-start;
  }

  .person-actions > * {
    width: auto;
  }

  .person-actions .person-toggle-indicator {
    width: 32px;
  }

  .section,
  .guest-shell,
  .admin-shell {
    width: calc(100% - 28px);
    max-width: calc(100vw - 28px);
  }

  .guest-shell,
  .admin-shell {
    display: block;
  }

  .guest-sidebar,
  .admin-sidebar {
    margin-bottom: 24px;
  }

  .welcome-panel {
    width: 100%;
    max-width: 100%;
    padding: 24px;
  }

  .feature-grid,
  .event-grid,
  .stats-grid,
  .wishlist-grid,
  .gallery-grid,
  .gallery-link-grid,
  .moderation-actions,
  .form-grid,
  .admin-grid,
  .attendee-detail-grid,
  .response-fields {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .payment-area,
  .link-box {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    padding: 10px;
  }

  .gallery-lightbox-panel {
    height: calc(100vh - 20px);
  }

  .gallery-lightbox-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .moderation-review-frame {
    height: 90vh;
    height: 90svh;
    min-height: 420px;
    max-height: none;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .modal-backdrop {
    padding: 10px;
    place-items: stretch;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .modal-head {
    display: grid;
    padding: 18px;
  }

  .modal-body {
    padding: 18px;
  }

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

@media print {
  body {
    background: #fffaf2;
  }

  .topbar,
  .print-actions {
    display: none !important;
  }

  .print-sheet {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }
}
