:root {
  --primary: #c97862;
  --accent: #7d4b37;
  --paper: #fff8f4;
  --background: #f8ede7;
  --ink: #58362c;
  --muted: #8b665b;
  --line: rgba(125, 75, 55, 0.18);
  --shadow: 0 20px 70px rgba(77, 39, 26, 0.16);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--primary) 82%, white 18%) 0 38px,
      color-mix(in srgb, var(--paper) 86%, white 14%) 38px 68px
    ),
    var(--background);
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

img,
svg,
video {
  max-width: 100%;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.config-loading [data-config] {
  visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .has-custom-cursor,
  .has-custom-cursor body {
    cursor: var(--custom-cursor);
  }

  .has-custom-cursor a,
  .has-custom-cursor button,
  .has-custom-cursor input,
  .has-custom-cursor textarea,
  .has-custom-cursor select,
  .has-custom-cursor label {
    cursor: pointer;
  }

  .has-custom-cursor input,
  .has-custom-cursor textarea {
    cursor: text;
  }
}

.site-hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 22px clamp(16px, 4vw, 56px) 44px;
  background:
    linear-gradient(rgba(255, 248, 244, 0.22), rgba(255, 248, 244, 0.22)),
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--primary) 88%, white 12%) 0 42px,
      color-mix(in srgb, var(--paper) 88%, white 12%) 42px 72px
    );
}

.topbar,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100%);
  max-width: 100%;
  margin: 0 auto;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-links a,
.secondary-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 248, 244, 0.74);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 750;
}

.hero-grid {
  width: min(1120px, 100%);
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.invitation {
  position: relative;
  width: min(820px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 58px);
  background: color-mix(in srgb, var(--paper) 92%, white 8%);
  border: 2px solid color-mix(in srgb, var(--primary) 65%, white 35%);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.54), var(--shadow);
}

.invitation::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid color-mix(in srgb, var(--primary) 70%, transparent);
  pointer-events: none;
}

.kicker,
.eyebrow {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  max-width: 9ch;
  font-size: clamp(4rem, 11vw, 8.8rem);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2.2rem, 6vw, 4.7rem);
}

.date {
  margin: 26px 0 0;
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-style: italic;
}

.intro {
  max-width: 58ch;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.event-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.event-facts div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.event-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-facts dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.event-facts small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

.primary-action,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--paper);
  text-align: center;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(93, 51, 35, 0.18);
}

button.secondary-action,
.secondary-action {
  background: rgba(255, 248, 244, 0.84);
  color: var(--accent);
  box-shadow: none;
}

.section-band {
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 56px);
  background: color-mix(in srgb, var(--paper) 78%, white 22%);
}

.section-inner {
  display: grid;
  width: min(1120px, 100%);
  max-width: 100%;
  margin: 0 auto;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.section-inner > * {
  min-width: 0;
}

.wishlist-band {
  background:
    linear-gradient(rgba(255, 248, 244, 0.7), rgba(255, 248, 244, 0.7)),
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--primary) 62%, white 38%) 0 34px,
      color-mix(in srgb, var(--paper) 82%, white 18%) 34px 62px
    ),
    var(--background);
}

.section-copy {
  max-width: 380px;
}

.section-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.form-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 4vw, 32px);
  background: rgba(255, 248, 244, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-panel.narrow {
  max-width: 460px;
  margin: 0 auto;
}

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

.field-grid.compact {
  grid-template-columns: repeat(2, minmax(120px, 180px));
}

label,
legend {
  display: grid;
  gap: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 34%, transparent);
  outline-offset: 2px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented legend {
  width: 100%;
  margin-bottom: 2px;
}

.segmented label {
  display: block;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: inline-flex;
  min-width: 96px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  color: var(--accent);
}

.segmented input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-status {
  margin: 0;
  min-height: 1.4em;
  color: var(--accent);
  font-weight: 760;
}

.settings-group {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 244, 0.68);
}

.settings-group > legend {
  padding: 0 6px;
}

.wishlist-content {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.wishlist-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 244, 0.9);
}

.wishlist-controls label {
  min-width: min(100%, 220px);
}

.wishlist-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.checkbox-control {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
}

.checkbox-control input {
  width: 18px;
  height: 18px;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  min-width: 0;
  gap: 18px;
}

.wishlist-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-width: 0;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 244, 0.96);
  box-shadow: 0 12px 34px rgba(77, 39, 26, 0.1);
}

.wishlist-card.reserved {
  opacity: 0.64;
}

.wishlist-card img,
.wishlist-image-fallback {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.wishlist-image-fallback {
  display: grid;
  place-items: center;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  font-weight: 800;
}

.wishlist-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
}

.wishlist-main {
  display: grid;
  gap: 12px;
}

.wishlist-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.wishlist-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.wishlist-price {
  color: var(--accent);
  font-weight: 850;
}

.wishlist-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.wishlist-actions form {
  display: grid;
}

.link-action {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reserved-button,
.reserved-button:disabled {
  cursor: not-allowed;
  background: color-mix(in srgb, var(--accent) 28%, white 72%);
  color: var(--accent);
  box-shadow: none;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.intro-overlay img {
  width: min(46vw, 420px);
  max-height: 70svh;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(77, 39, 26, 0.28));
  animation-duration: var(--intro-duration, 2800ms);
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-overlay.effect-zoom-spin img {
  animation-name: introZoomSpin;
}

.intro-overlay.effect-zoom img {
  animation-name: introZoom;
}

.intro-overlay.effect-bounce img {
  animation-name: introBounce;
}

.intro-overlay.effect-slide img {
  animation-name: introSlide;
}

.intro-overlay.effect-fade img {
  animation-name: introFade;
}

.audio-toggle {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 90;
  gap: 10px;
  min-height: 46px;
  padding: 11px 15px;
  background: color-mix(in srgb, var(--accent) 92%, black 8%);
}

.audio-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
}

.audio-toggle-icon::before,
.audio-toggle-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.audio-toggle-icon::before {
  width: 6px;
  height: 10px;
  top: 3px;
  left: -5px;
  border-radius: 2px;
}

.audio-toggle-icon::after {
  width: 2px;
  height: 18px;
  top: -1px;
  right: -6px;
  border-radius: 2px;
  opacity: 0;
  transform: rotate(42deg);
}

.audio-toggle.is-muted .audio-toggle-icon::after,
.audio-toggle.is-paused .audio-toggle-icon::after {
  opacity: 1;
}

@keyframes introZoomSpin {
  0% {
    opacity: 0;
    transform: scale(0.26) rotate(-24deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.08) rotate(18deg);
  }
  62% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.34) rotate(720deg);
  }
}

@keyframes introZoom {
  0% {
    opacity: 0;
    transform: scale(0.36);
  }
  22%,
  68% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes introBounce {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.72);
  }
  22% {
    opacity: 1;
    transform: translateY(-12px) scale(1.08);
  }
  38%,
  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(28px) scale(0.78);
  }
}

@keyframes introSlide {
  0% {
    opacity: 0;
    transform: translateX(-34vw) rotate(-8deg);
  }
  24%,
  68% {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translateX(34vw) rotate(8deg);
  }
}

@keyframes introFade {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  24%,
  72% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.admin-page {
  background: var(--paper);
}

.admin-header {
  padding: 24px clamp(16px, 4vw, 56px);
  width: 100%;
  max-width: 1240px;
}

.admin-header h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 4rem);
}

.admin-shell {
  width: min(1240px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px) 64px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-button {
  background: white;
  color: var(--accent);
  border: 1px solid var(--line);
  box-shadow: none;
}

.tab-button.active {
  background: var(--accent);
  color: white;
}

.admin-tab {
  display: none;
}

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

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

.toggle-row input {
  width: auto;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.summary-item,
.admin-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 248, 244, 0.9);
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.8rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.admin-list-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.admin-list-item img,
.admin-thumb-fallback {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--primary);
}

.admin-thumb-fallback {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 850;
}

.admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-list-actions button,
td button {
  min-height: 36px;
  padding: 8px 12px;
}

@media (max-width: 860px) {
  .site-hero {
    min-height: auto;
  }

  .hero-grid,
  .section-inner {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 26px;
  }

  .section-copy {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .topbar,
  .admin-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .field-grid,
  .field-grid.compact {
    grid-template-columns: 1fr;
  }

  .event-facts {
    grid-template-columns: 1fr;
  }

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

  .invitation {
    padding: 26px 20px;
  }

  .invitation::before {
    inset: 9px;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5rem);
  }

  .date {
    font-size: clamp(1.8rem, 11vw, 3rem);
  }

  .admin-list-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-list-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay img {
    animation-name: introFade !important;
    animation-duration: 1200ms;
  }
}
