:root {
  --blush: #f3e4dc;
  --blush-deep: #e8cfc4;
  --blush-soft: #faf3ef;
  --ink: #2c211f;
  --ink-soft: #5c4a45;
  --plum: #4a2f38;
  --seal: #c99a8f;
  --seal-deep: #a8756c;
  --cream: #fffaf7;
  --line: rgba(74, 47, 56, 0.14);
  --shadow: 0 18px 50px rgba(74, 47, 56, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-sans: "Outfit", system-ui, sans-serif;
  --max: min(100%, 480px);
}

@media (min-width: 720px) {
  :root {
    --max: min(100%, 760px);
  }
}

@media (min-width: 1024px) {
  :root {
    --max: min(100%, 1080px);
  }
}

@media (min-width: 1280px) {
  :root {
    --max: min(100%, 1180px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  background: var(--blush-soft);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* display:* rules must not beat the hidden attribute (desktop cover used grid) */
[hidden] {
  display: none !important;
}

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

button,
input,
textarea {
  font: inherit;
}

/* ——— Cover: zoomed sealed envelope; flap opens, then zoom into site ——— */
.cover {
  --paper: #f3e6d6;
  --paper-deep: #e4cbb6;
  --paper-light: #fbf5ed;
  --band: #cbb59f;
  --flap-h: 78%;
  /* Fixed so it never leaves a blank gap above the invite after open */
  position: fixed;
  inset: 0;
  z-index: 80;
  width: 100%;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  background: var(--band);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.cover.is-leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.envelope {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  animation: envelope-in 1s ease both;
}

/* Perspective stays on zoom — never put transform here (flattens 3D flap) */
.envelope__zoom {
  position: relative;
  min-height: 0;
  overflow: hidden;
  perspective: 1400px;
  background: linear-gradient(180deg, #efe0d0 0%, var(--paper) 55%, #d9c0ab 100%);
}

.envelope__zoom::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

/* Scale this layer on open so the hinged flap can still rotate in 3D */
.envelope__scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 42%;
  transition: transform 1.1s cubic-bezier(0.22, 0.7, 0.25, 1) 0.35s;
}

/* Pocket under the flap — shows when flap lifts */
.envelope__under {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, #f7efe6 0%, #f0e2d3 45%, #e6d2c0 100%);
}

.envelope__under::before,
.envelope__under::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 0;
  width: 52%;
  opacity: 0.45;
  pointer-events: none;
}

.envelope__under::before {
  left: 0;
  background: linear-gradient(118deg, rgba(140, 100, 75, 0.16), transparent 72%);
  clip-path: polygon(0 0, 100% 42%, 0 100%);
}

.envelope__under::after {
  right: 0;
  background: linear-gradient(242deg, rgba(140, 100, 75, 0.16), transparent 72%);
  clip-path: polygon(100% 0, 0 42%, 100% 100%);
}

/* Triangular flap hinged on the top edge */
.envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--flap-h);
  z-index: 3;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0.08, 0.2, 1) 0.1s;
}

.envelope__flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #faf3eb 0%, var(--paper) 48%, #dfc7b2 100%);
  backface-visibility: hidden;
}

.envelope__flap-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 42%),
    linear-gradient(122deg, transparent 48.7%, rgba(110, 75, 52, 0.22) 50%, transparent 51.3%),
    linear-gradient(58deg, transparent 48.7%, rgba(110, 75, 52, 0.22) 50%, transparent 51.3%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Wax seal rides on the flap tip so it opens with the flap */
.cover__seal {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 5;
  width: min(34vw, 132px);
  aspect-ratio: 1;
  border: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transform: translate(-50%, -48%) rotate(-3deg);
  animation: seal-in 1.05s ease 0.2s both;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.cover__seal::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.cover__seal:hover,
.cover__seal:focus-visible {
  transform: translate(-50%, -48%) rotate(0deg) scale(1.06);
  outline: none;
}

.cover__seal:active {
  transform: translate(-50%, -48%) rotate(-4deg) scale(0.97);
}

.cover__seal-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 10px rgba(40, 15, 12, 0.42));
}

.envelope__caption {
  position: relative;
  z-index: 2;
  padding: 1.35rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: linear-gradient(180deg, #d2bda8 0%, var(--band) 40%, #c2ab94 100%);
  pointer-events: none;
  animation: fade-up 1s ease 0.35s both;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.cover__welcome {
  margin: 0 0 0.2rem;
  font-family: var(--font-script);
  font-size: clamp(1.85rem, 7vw, 2.4rem);
  color: #5a3d32;
  line-height: 1;
}

.cover__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #3f2a22;
}

.cover__names [data-editable="name-amp"] {
  font-family: var(--font-script);
  font-size: 1.15em;
  margin: 0 0.12em;
  color: #7a4a3c;
}

.cover__hint {
  margin: 0.65rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5c4034;
  opacity: 0.8;
}

/* Open: seal breaks → flap lifts (stays hinged) → zoom into invite */
.envelope.is-opening .cover__seal {
  opacity: 0;
  transform: translate(-50%, -40%) rotate(10deg) scale(0.8);
  pointer-events: none;
  animation: none;
}

.envelope.is-opening .envelope__flap {
  /* Partial open keeps hinge attached — full 180° looked disconnected */
  transform: rotateX(148deg);
}

.envelope.is-opening .envelope__scene {
  transform: scale(1.35);
}

.envelope.is-opening .envelope__caption {
  opacity: 0;
  transform: translateY(14px);
}

@keyframes envelope-in {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes seal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) rotate(-12deg) scale(0.86);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -48%) rotate(-3deg) scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Main invite ——— */
.invite {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.invite[hidden] {
  display: none;
}

.section {
  padding: 3.25rem 1.4rem 3.5rem;
  text-align: center;
}

.section--blush {
  background: linear-gradient(180deg, #f7ebe4 0%, var(--blush) 100%);
}

.section--soft {
  background: var(--blush-soft);
}

.section__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.75rem;
  color: var(--plum);
  opacity: 0.7;
}

.section__icon svg {
  width: 100%;
  height: 100%;
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.2rem, 8vw, 2.75rem);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.section__kicker {
  margin: 0.55rem 0 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section__note {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  text-align: center;
}

/* Home */
.home {
  background: var(--cream);
  text-align: center;
}

.home__photo-wrap {
  --home-frame: 80;
  position: relative;
  overflow: hidden;
  /* Phones/tablets: edge-to-edge hero. --home-frame is desktop-only (see 1024px). */
  width: 100%;
  max-width: none;
  margin: 0;
  height: min(70svh, 36rem);
  min-height: 18rem;
  aspect-ratio: auto;
  background: #f3e6dc;
}

.home__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  will-change: transform;
  /* Slow Ken Burns: zoom + drift so the background feels alive */
  animation: kenburns 28s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from {
    transform: scale(1.08) translate3d(-2.5%, -1.5%, 0);
  }
  to {
    transform: scale(1.16) translate3d(2.5%, 1.5%, 0);
  }
}

.home__copy {
  padding: 1.75rem 1.4rem 0.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.names span {
  display: block;
}

.names__amp {
  font-family: var(--font-script);
  font-size: 0.55em;
  letter-spacing: 0;
  text-transform: none;
  margin: 0.15em 0;
  opacity: 0.95;
}

.scratch {
  position: relative;
  margin: 1.15rem auto 0;
  width: min(100%, 22rem);
  border-radius: 16px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scratch__reveal {
  padding: 1.1rem 1rem 1rem;
  text-align: center;
}

.home__date {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--plum);
}

.home__venue {
  margin: 0.7rem 0 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.home__place {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.scratch__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  border-radius: 16px;
  z-index: 2;
}

.scratch__canvas:active {
  cursor: grabbing;
}

.scratch__hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  margin: 0;
  transform: translate(-50%, -50%);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(44, 33, 31, 0.55);
  color: #faf4ee;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.scratch.is-scratching .scratch__hint,
.scratch.is-revealed .scratch__hint {
  opacity: 0;
}

.scratch.is-revealed .scratch__canvas {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

body.is-editing .scratch__canvas,
body.is-editing .scratch__hint {
  display: none !important;
}

.home__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.1rem;
  padding: 1.4rem 1.25rem 1.75rem;
}

.home__nav a {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 47, 56, 0.25);
  padding-bottom: 0.15rem;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-top: 1.75rem;
}

.countdown__cell {
  padding: 0.9rem 0.25rem;
  border-radius: 12px;
  background: rgba(255, 250, 247, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.countdown__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Carousel */
.carousel {
  position: relative;
  margin: 1.75rem auto 0;
  max-width: 100%;
}

.carousel__track {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 5;
  background: var(--blush);
}

.carousel--square .carousel__track {
  aspect-ratio: 1;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  translate: 0 -50%;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 247, 0.72);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.carousel__nav--prev {
  left: 0.6rem;
}

.carousel__nav--next {
  right: 0.6rem;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.carousel__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(74, 47, 56, 0.22);
  cursor: pointer;
}

.carousel__dots button.is-active {
  background: var(--plum);
}

.story__blurb {
  margin: 1.4rem auto 0;
  max-width: 28ch;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* Timeline — centered under the Schedule heading */
.timeline {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  width: min(100%, 26rem);
  text-align: center;
}

.timeline__item {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.timeline__item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline__time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--plum);
  white-space: nowrap;
}

.timeline__body {
  text-align: center;
}

.timeline__body h3 {
  margin: 0.1rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.timeline__body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Map / venue */
.map-frame {
  margin: 1.6rem 0 1.25rem;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 11;
  background: var(--blush);
  box-shadow: var(--shadow);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.venue-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  font-style: italic;
  text-transform: none;
}

.venue-address {
  margin: 0.35rem 0 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: min(100%, 320px);
  padding: 0.95rem 1.25rem;
  border: 0;
  border-radius: 12px;
  background: rgba(74, 47, 56, 0.12);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: rgba(74, 47, 56, 0.18);
  transform: translateY(-1px);
}

.btn--ghost {
  margin-top: 1.25rem;
  background: transparent;
  border: 1px solid var(--line);
}

.btn__main {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.btn__sub {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Dress + mannequins */
.dress__level {
  margin: 1.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
}

.dress__hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.mannequins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.65rem auto 0;
  max-width: 400px;
}

.mannequin {
  margin: 0;
  text-align: center;
}

.mannequin__svg {
  display: block;
  width: min(100%, 168px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  /* Avoid SVG filter:drop-shadow — Chromium smears dark blobs on complex paths */
  transition: transform 0.45s cubic-bezier(0.22, 0.7, 0.25, 1);
}

.mannequin__gown,
.mannequin__suit,
.mannequin__tie {
  transition: fill 0.45s ease;
}

.mannequins.is-recoloring .mannequin__svg {
  transform: translateY(-4px) scale(1.03);
}

.mannequin figcaption {
  margin-top: 0.65rem;
}

.dress__who {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dress__what {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dress__swatch-label {
  margin: 1.6rem 0 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatch {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.swatch:hover,
.swatch:focus-visible {
  transform: scale(1.12);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    0 0 0 3px rgba(74, 47, 56, 0.18);
}

.swatch.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    0 0 0 3px rgba(74, 47, 56, 0.35);
}

/* Hotels */
.hotels {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.hotels__item {
  padding: 1.15rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.hotels__item + .hotels__item {
  margin-top: 0.75rem;
}

.hotels__item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.hotels__address {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.hotels__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-top: 0.55rem;
}

.hotels__links .text-link {
  margin-top: 0;
}

.text-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
}

/* Wedding Party */
.party {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.2rem 4rem;
  color: #f7f1ea;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.55), rgba(20, 12, 8, 0.72)),
    url("https://images.unsplash.com/photo-1541124112122-47112273c88e?auto=format&fit=crop&w=1400&q=80")
      center / cover;
}

.party__intro {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.party__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.2rem, 8vw, 2.8rem);
}

.party__kicker {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
}

.party__blurb {
  margin: 0.9rem auto 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  opacity: 0.9;
}

.party__group {
  position: relative;
  z-index: 1;
  margin-top: 2.25rem;
}

.party__group-title {
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
}

.party__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 1rem;
}

/* Lone last card on a 2-col row → center (e.g. odd counts on mobile) */
.party__grid .party-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - 1rem) / 2);
}

@media (min-width: 720px) {
  .party__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.25rem;
  }

  /* Reset 2-col orphan rule; use 3-col orphan (Travis / Namie) */
  .party__grid .party-card:last-child:nth-child(odd) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .party__grid .party-card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 2 * 1.25rem) / 3);
  }
}

@media (min-width: 1024px) {
  .party__grid {
    /* Keep 3 cols so the last groomsman / bridesmaid stays centered */
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem 1.5rem;
  }

  .party__grid .party-card:last-child:nth-child(3n + 1) {
    width: calc((100% - 2 * 1.5rem) / 3);
  }
}

.party-card__photo {
  position: relative;
  width: min(42vw, 148px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #2a1c16;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

@media (min-width: 720px) {
  .party-card__photo {
    width: min(22vw, 160px);
  }
}

@media (min-width: 1024px) {
  .party-card__photo {
    width: 168px;
  }
}

.party-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
}

.party-card__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: rgba(247, 241, 234, 0.9);
  background: linear-gradient(160deg, #6a4a3d, #3a261c);
}

.party-card__photo:not(.is-fallback) .party-card__initials {
  display: none;
}

.party-card__name {
  margin: 0.7rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 400;
  line-height: 1.15;
}

.party-card__role {
  margin: 0.25rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}

.party__decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.party__decor--leaf {
  left: -8%;
  bottom: 4%;
  width: 42%;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(90, 130, 70, 0.45), transparent 60%),
    radial-gradient(ellipse at 55% 40%, rgba(70, 110, 55, 0.35), transparent 55%);
  filter: blur(0.5px);
  opacity: 0.85;
}

.party__decor--lights {
  right: -10%;
  bottom: 2%;
  width: 70%;
  height: 120px;
  background:
    radial-gradient(circle at 10% 60%, #f6e7b0 0 3px, transparent 4px),
    radial-gradient(circle at 28% 35%, #f6e7b0 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 46% 55%, #f6e7b0 0 3px, transparent 4px),
    radial-gradient(circle at 64% 30%, #f6e7b0 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 82% 58%, #f6e7b0 0 3px, transparent 4px);
  opacity: 0.7;
  transform: rotate(-8deg);
}

/* Registry */
.section--registry {
  background: linear-gradient(180deg, #f7ebe4, var(--blush));
}

.registry__copy {
  margin: 1rem auto 0;
  max-width: 34ch;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.registry__grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.registry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.35rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 247, 0.72);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.registry-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 250, 247, 0.95);
}

.registry-card[aria-disabled="true"] {
  cursor: default;
  opacity: 0.9;
}

.registry-card__label {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 500;
}

.registry-card__hint {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* RSVP */
.section--rsvp {
  background: linear-gradient(180deg, var(--cream), #f0ddd4);
}

.rsvp {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.75rem;
  text-align: left;
}

.rsvp label,
.rsvp fieldset {
  display: grid;
  gap: 0.35rem;
}

.rsvp span,
.rsvp legend {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rsvp input,
.rsvp textarea {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.rsvp fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.choice input[type="radio"],
.choice input[type="checkbox"] {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  accent-color: var(--plum);
}

.choice span {
  flex: 0 1 auto;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
}

.rsvp .btn {
  width: 100%;
  margin-top: 0.35rem;
}

.rsvp .btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.rsvp__plus {
  display: grid;
  gap: 0.55rem;
}

.rsvp__plus-name {
  display: grid;
  gap: 0.35rem;
}

.rsvp__hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: none;
}

.rsvp__error {
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #8a2f2f;
}

.rsvp__thanks {
  margin: 0.25rem 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--plum);
}

.rsvp-inbox__list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
  max-height: min(60vh, 520px);
  overflow: auto;
  text-align: left;
}

.rsvp-inbox__item {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.rsvp-inbox__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.rsvp-inbox__meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.rsvp-inbox__badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #efe2d8;
  color: var(--plum);
}

.rsvp-inbox__badge.is-pending {
  background: #f3e0b8;
  color: #6a4a12;
}

.rsvp-inbox__badge.is-approved {
  background: #d7ead8;
  color: #1f5a2a;
}

.rsvp-inbox__badge.is-denied {
  background: #f0d4d4;
  color: #7a2a2a;
}

.rsvp-inbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.rsvp-inbox__actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.rsvp-inbox__actions button:hover {
  border-color: var(--plum);
  color: var(--plum);
}

.rsvp-inbox__actions .rsvp-inbox__delete {
  margin-left: auto;
  border-color: rgba(122, 42, 42, 0.35);
  color: #7a2a2a;
}

.rsvp-inbox__actions .rsvp-inbox__delete:hover {
  border-color: #7a2a2a;
  background: #f8eaea;
  color: #5c1d1d;
}

.rsvp-inbox__empty {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer {
  padding: 2.5rem 1.4rem 3.5rem;
  text-align: center;
  background: var(--blush-deep);
  color: var(--plum);
}

.footer__mono {
  margin: 0;
  font-family: var(--font-script);
  font-size: 2.4rem;
  line-height: 1;
}

.footer p:nth-child(2) {
  margin: 0.4rem 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer__top {
  color: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(ellipse at top, #f7ebe4, transparent 55%),
      #e7d2c7;
  }

  .invite {
    margin: 1.5rem auto 3rem;
    border-radius: 20px;
    overflow: hidden;
  }

  .cover {
    max-width: none;
    margin: 0;
    box-shadow: none;
  }

  .cover__seal {
    width: min(22vw, 148px);
  }

  /* Keep mobile stack on desktop: photo alone on top, copy + nav centered under */
  .home {
    display: block;
    text-align: center;
  }

  .home__photo-wrap {
    width: min(26rem, 72%, calc(min(70vh, 38rem) * 0.75));
    max-width: 26rem;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-height: none;
    margin-inline: auto;
  }

  .carousel {
    max-width: 40rem;
  }

  .carousel--square .carousel__track {
    aspect-ratio: 3 / 2;
  }

  .home__copy {
    padding: 2.25rem 2.5rem 1rem;
  }

  .home__nav {
    justify-content: center;
    padding: 0 2.5rem 2.25rem;
  }

  .section {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .party {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

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

  .mannequins {
    max-width: 480px;
  }
}

@media (min-width: 1024px) {
  .home__photo-wrap {
    width: min(32rem, 42vw, calc(min(68vh, 40rem) * 0.75));
    max-width: 32rem;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-height: none;
    margin-inline: auto;
  }

  .names {
    font-size: clamp(3rem, 5vw, 3.8rem);
  }

  .section {
    padding-left: 3.25rem;
    padding-right: 3.25rem;
  }

  .party {
    padding-left: 3.25rem;
    padding-right: 3.25rem;
  }
}

@media (min-width: 1280px) {
  .invite {
    margin: 2rem auto 3.5rem;
  }

  .party-card__photo {
    width: 176px;
  }
}

/* Staff admin / God CMS */
.admin-bar {
  position: fixed;
  z-index: 200;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  left: auto;
  bottom: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  background: rgba(36, 22, 16, 0.94);
  color: #f7f1ea;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  max-width: calc(100vw - 1.2rem);
}

/* Edit tools sit at the bottom; Sign out stays top-right via #adminSignOutTop */
.admin-bar.is-signed-in {
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  flex-wrap: wrap;
  justify-content: center;
}

#adminLoginBtn,
#adminSignOutTop {
  position: fixed;
  z-index: 201;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.admin-bar__login,
.admin-bar__btn,
.admin-bar__signout,
.footer__staff {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: #2b1a14;
  background: #f3ddd2;
}

.admin-bar__signout,
.admin-bar__btn--signout {
  background: #e8cfc4;
  color: #2b1a14;
  font-weight: 600;
}

.footer__staff {
  display: inline-block;
  margin-top: 0.85rem;
  text-decoration: none;
}

.admin-bar__btn--ghost {
  background: transparent;
  color: #f7f1ea;
  border: 1px solid rgba(247, 241, 234, 0.28);
}

.admin-bar__btn--save {
  background: #c4a27a;
  color: #1d120e;
  font-weight: 600;
}

.admin-bar__signed {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.admin-bar__who {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.admin-bar__role {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.admin-bar__role[data-role="god"] {
  color: #f0d59a;
  opacity: 1;
}

.admin-login .btn__sub {
  display: none;
}

.admin-panel {
  position: fixed;
  z-index: 119;
  left: 50%;
  bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(94vw, 480px);
  max-height: min(68vh, 560px);
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 18px;
  background: rgba(250, 244, 238, 0.97);
  color: #2b1a14;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.admin-panel__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.admin-panel__section {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(43, 26, 20, 0.12);
}

.admin-panel__heading {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
  font-weight: 600;
}

.admin-panel__grid {
  display: grid;
  gap: 0.55rem;
}

.admin-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.admin-field input,
.admin-panel textarea {
  width: 100%;
  border: 1px solid rgba(43, 26, 20, 0.18);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: #2b1a14;
}

.admin-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  resize: vertical;
}

.admin-panel__hint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.78;
}

.admin-panel__god {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(43, 26, 20, 0.12);
}

.admin-bar[hidden],
.admin-bar__login[hidden],
.admin-bar__signout[hidden],
.admin-bar__signed[hidden],
.admin-bar__btn[hidden],
.admin-modal[hidden],
.admin-panel[hidden],
.admin-toast[hidden],
.footer__staff[hidden] {
  display: none !important;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(20, 12, 8, 0.55);
}

.admin-modal__card {
  position: relative;
  width: min(100%, 360px);
  padding: 1.5rem 1.35rem 1.4rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #faf4ee, #f0ddd3);
  color: #2b1a14;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.admin-modal__card--wide {
  width: min(100%, 520px);
}

.admin-modal__card--xl {
  width: min(100%, 640px);
  max-height: min(88vh, 760px);
  overflow: auto;
}

.invite-inbox__summary {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.invite-inbox__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.invite-inbox__add {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.invite-inbox__add input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.invite-inbox__email {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.invite-inbox__email input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--ink);
}

@media (max-width: 640px) {
  .invite-inbox__add {
    grid-template-columns: 1fr;
  }
}

.admin-modal__card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
}

.admin-modal__sub {
  margin: 0.35rem 0 1rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

.admin-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
}

.admin-login {
  display: grid;
  gap: 0.75rem;
}

.admin-login label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-login input {
  border: 1px solid rgba(43, 26, 20, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  background: #fff;
}

.admin-login__error {
  margin: 0;
  color: #8b2e2e;
  font-size: 0.85rem;
}

.admin-toast {
  position: fixed;
  z-index: 95;
  left: 50%;
  top: calc(0.9rem + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(36, 22, 16, 0.94);
  color: #f7f1ea;
  font-size: 0.85rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

body.is-editing [data-editable].is-live-edit,
body.is-editing .is-live-edit {
  outline: 2px dashed rgba(196, 162, 122, 0.95);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
}

.about {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.about__lead {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.2vw, 1.4rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.about__body {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(43, 26, 20, 0.86);
}

.about__body--close {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-style: italic;
}

.details-teaser {
  text-align: center;
}

.details-teaser__copy {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(43, 26, 20, 0.84);
}

.music-toggle {
  position: fixed;
  z-index: 40;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(43, 26, 20, 0.14);
  border-radius: 999px;
  background: rgba(250, 244, 238, 0.92);
  color: #2b1a14;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 22px rgba(43, 26, 20, 0.12);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.music-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}

.music-toggle.is-muted {
  opacity: 0.72;
}

.music-toggle.is-muted .music-toggle__icon {
  text-decoration: line-through;
}

.admin-panel__lead {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0.88;
}

.admin-panel__section--first {
  margin-top: 0.35rem;
  padding-top: 0;
  border-top: 0;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.35rem 0 0.25rem;
}

.admin-tabs__btn {
  border: 1px solid rgba(43, 26, 20, 0.14);
  border-radius: 999px;
  padding: 0.55rem 0.2rem;
  background: rgba(255, 255, 255, 0.65);
  color: #2b1a14;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
}

.admin-tabs__btn.is-active {
  background: #2b1a14;
  color: #f7f1ea;
  border-color: #2b1a14;
}

.admin-steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.admin-steps li + li {
  margin-top: 0.35rem;
}

.admin-music-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.admin-music-actions .admin-bar__btn,
.admin-file-btn {
  position: static;
  box-shadow: none;
}

.admin-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Visually hidden but still "activatable" for file dialogs (avoid [hidden]/display:none). */
.admin-file-input {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.admin-field input[type="file"] {
  padding: 0.45rem 0.35rem;
  font-size: 0.82rem;
  background: #fff;
}

.admin-upload-btn {
  margin-top: 0.4rem;
  width: fit-content;
}

body.is-editing .home__photo {
  animation: none !important;
}

body.is-editing .is-photo-editable,
body.is-editing .party-card__photo.is-photo-editable {
  cursor: grab;
  touch-action: none;
  overflow: hidden;
  outline: 2px dashed rgba(196, 162, 122, 0.95);
  outline-offset: 3px;
}

body.is-editing .is-photo-editable img,
body.is-editing .party-card__photo.is-photo-editable img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
  cursor: grab;
}

body.is-editing .is-photo-editable.is-dragging,
body.is-editing .party-card__photo.is-dragging,
body.is-editing .is-photo-editable.is-dragging img {
  cursor: grabbing;
}

.photo-edit-chrome {
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  transform: translateX(-50%);
  z-index: 3;
  width: auto;
  max-width: calc(100% - 0.5rem);
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.photo-edit-chrome__tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(20, 12, 8, 0.78);
  pointer-events: auto;
}

.photo-edit-chrome__btn {
  border: 0;
  border-radius: 999px;
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  background: rgba(250, 244, 238, 0.95);
  color: #2b1a14;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.photo-edit-chrome__btn--studio {
  background: #c4a27a;
  color: #2b1a14;
}

.admin-field input[type="range"] {
  width: 100%;
  accent-color: var(--plum);
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.photo-studio[hidden] {
  display: none !important;
}

.photo-studio {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: end center;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 12, 8, 0.62);
}

.photo-studio__card {
  position: relative;
  width: min(100%, 420px);
  max-height: min(92svh, 760px);
  overflow: auto;
  padding: 1.15rem 1.1rem 1.2rem;
  border-radius: 20px 20px 16px 16px;
  background: linear-gradient(180deg, #faf4ee, #f0ddd3);
  color: #2b1a14;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.photo-studio__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.photo-studio__card h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
}

.photo-studio__hint,
.photo-studio__note {
  margin: 0.4rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(43, 26, 20, 0.78);
}

.photo-studio__note {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.photo-studio__close {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.photo-studio__stage {
  position: relative;
  overflow: hidden;
  width: min(100%, 280px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  background: #e8d5c8;
  touch-action: none;
  cursor: grab;
}

.photo-studio__stage.is-home {
  width: min(100%, 300px);
}

.photo-studio__stage.is-circle {
  width: min(72vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
}

.photo-studio__stage.is-dragging {
  cursor: grabbing;
}

.photo-studio__stage img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-studio__slider {
  display: grid;
  gap: 0.2rem;
  margin: 0.45rem 0;
  font-size: 0.78rem;
}

.photo-studio__slider span {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.04em;
}

.photo-studio__slider input[type="range"] {
  width: 100%;
  accent-color: var(--plum);
}

.photo-studio__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.photo-studio__actions .admin-bar__btn {
  position: static;
  box-shadow: none;
}

.home__photo-wrap,
.party-card__photo {
  position: relative;
}

.carousel__slide.is-photo-editable {
  overflow: hidden;
}

.carousel__slide img,
.home__photo,
.party-card__photo img {
  transform-origin: center center;
}

.home__photo-wrap.has-custom-frame .home__photo {
  animation: none;
}

.party-edit {
  display: grid;
  gap: 1rem;
}

.party-edit__group {
  display: grid;
  gap: 0.55rem;
}

.party-edit__title {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.party-edit__row {
  display: grid;
  gap: 0.4rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(43, 26, 20, 0.1);
}

.admin-panel {
  width: min(94vw, 520px);
  max-height: min(72vh, 640px);
}

body.is-staff [data-gate="details"][hidden] {
  display: none !important;
}

body.is-editing .details-teaser {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cover__seal,
  .envelope,
  .envelope__caption,
  .home__photo {
    animation: none;
  }

  .envelope__scene,
  .envelope__flap,
  .cover__seal,
  .cover,
  .mannequin__svg,
  .swatch {
    transition-duration: 0.01ms !important;
  }
}
