:root {
  --ivory: #faf7f2;
  --ivory-deep: #f3ebe3;
  --blush: #e8c4c0;
  --blush-deep: #c98984;
  --champagne: #c4a574;
  --champagne-soft: #e6d5b8;
  --ink: #2c2420;
  --ink-soft: #5c514a;
  --muted: #8a7e74;
  --line: rgba(44, 36, 32, 0.1);
  --card: rgba(255, 252, 248, 0.92);
  --shadow: 0 18px 50px rgba(70, 45, 40, 0.1);
  --radius: 18px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(232, 196, 192, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 10%, rgba(198, 165, 116, 0.22), transparent 50%),
    linear-gradient(180deg, #fffdf9 0%, var(--ivory) 40%, #f7efe8 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
body.locked > :not(#login-gate):not(#float-layer) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
.login-gate {
  z-index: 100;
  background: rgba(35, 26, 22, 0.55);
}
.login-gate .modal {
  pointer-events: auto;
}
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  background: rgba(35, 26, 22, 0.06);
  border-radius: 999px;
}
.login-tab {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 0.2s ease;
}
.login-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(35, 26, 22, 0.08);
}
.login-error {
  min-height: 1.2em;
  margin: -0.4rem 0 0.6rem;
  color: #9a4a45;
  font-size: 0.85rem;
}

.visitor-app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 0 0 3rem;
}
.visitor-top {
  position: relative;
  text-align: center;
  padding: 2.5rem 1.25rem 1.5rem;
}
.visitor-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0.35rem 0 0;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.visitor-brand span {
  font-weight: 400;
  color: var(--blush-deep);
  margin: 0 0.2em;
}
.visitor-exit {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
}
.visitor-main {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

.invite-card {
  position: relative;
  text-align: center;
  padding: 2.6rem 1.6rem 2.2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,252,248,0.96), rgba(250,244,236,0.92)),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232,196,192,0.28), transparent 70%);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}
.invite-ornament {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(196,165,116,0.35);
  border-radius: calc(var(--radius) + 2px);
  pointer-events: none;
}
.invite-eyebrow {
  position: relative;
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}
.invite-names {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin: 0.7rem 0 0.35rem;
  color: var(--ink);
}
.invite-event {
  position: relative;
  margin: 0;
  color: var(--blush-deep);
  letter-spacing: 0.12em;
}
.invite-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.2rem auto;
  color: var(--champagne);
  max-width: 14rem;
}
.invite-divider::before,
.invite-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(196,165,116,0.45);
}
.invite-meta {
  position: relative;
  display: grid;
  gap: 0.45rem;
  margin: 0 auto 1.1rem;
  max-width: 22rem;
  text-align: left;
}
.invite-meta p {
  margin: 0;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.invite-meta strong {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}
.invite-message {
  position: relative;
  margin: 0 auto 1.2rem;
  max-width: 28rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.invite-foot {
  position: relative;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.invite-foot p { margin: 0.2rem 0; }
.invite-rsvp { font-style: italic; }

.venue-card {
  display: grid;
  gap: 1.4rem;
}
.venue-info h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 0.4rem;
}
.venue-city,
.venue-address,
.venue-transport,
.venue-note,
.venue-hours {
  margin: 0.35rem 0;
  color: var(--ink-soft);
  line-height: 1.7;
}
.venue-address strong,
.venue-transport strong,
.venue-hours strong {
  display: inline-block;
  min-width: 4.5rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.86rem;
  margin-right: 0.35rem;
}
.venue-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.7rem;
}
.venue-rating-chip {
  display: grid;
  gap: 0.1rem;
  min-width: 4.2rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.75);
  text-align: center;
}
.venue-rating-chip span {
  font-size: 0.72rem;
  color: var(--muted);
}
.venue-rating-chip strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 600;
}
.venue-rating-chip.primary {
  border-color: rgba(201,137,132,0.45);
  background: rgba(232,196,192,0.28);
}
.venue-rating-chip.primary strong {
  color: var(--blush-deep);
}
.venue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.venue-links .btn { display: inline-flex; }
.venue-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
}
.venue-rating-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.venue-rating-inputs label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.venue-rating-inputs input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: #fff;
}
@media (max-width: 640px) {
  .venue-rating-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.venue-photo,
.sight-photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.venue-photo img,
.sight-photo img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.venue-photo figcaption,
.sight-photo figcaption {
  padding: 0.45rem 0.6rem 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.sight-section { margin-top: 1.4rem; }
.sight-head h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
}
.sight-head p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}
.sight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gallery-sections {
  display: grid;
  gap: 1rem;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 0.2rem;
}
.gallery-section-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  padding: 0.85rem;
}
.gallery-section-card.drag-over,
.gallery-section-card.group-dragging {
  outline: 2px dashed var(--champagne);
}
.gallery-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}
.gallery-section-titles {
  flex: 1;
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.gallery-section-title,
.gallery-section-desc {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fff;
}
.gallery-section-title { font-weight: 600; }
.gallery-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.gallery-section-drop {
  margin-top: 0.65rem;
}
.gallery-guest-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.gallery-thumb.dragging { opacity: 0.55; }
.gallery-thumb.drag-over { outline: 2px solid var(--blush-deep); }

.admin-app {
  position: relative;
  z-index: 1;
}

#float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.float-item {
  position: absolute;
  top: -10%;
  opacity: 0;
  animation: fall linear infinite;
  color: var(--blush-deep);
  font-family: var(--font-display);
  user-select: none;
}
.float-item.heart { color: rgba(201, 137, 132, 0.45); }
.float-item.xi { color: rgba(196, 165, 116, 0.4); font-weight: 700; }
@keyframes fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.35; }
  100% { transform: translateY(110vh) rotate(28deg); opacity: 0; }
}

.hero, main, footer { position: relative; z-index: 1; }

.hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8rem 1.5rem 2.5rem;
  background:
    linear-gradient(180deg, rgba(255,253,249,0.28) 0%, rgba(250,247,242,0.62) 55%, rgba(250,247,242,0.88) 100%),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?w=1800&q=80") center/cover no-repeat;
  position: relative;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,252,248,0.72) 0%,
    rgba(255,252,248,0.62) 38%,
    rgba(250,247,242,0.58) 68%,
    rgba(250,247,242,0.82) 100%
  );
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 820px;
  z-index: 1;
  padding: 1.1rem 1.4rem 1.2rem;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(70, 45, 40, 0.06);
}
.brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}
.brand span {
  display: inline-block;
  font-style: italic;
  color: var(--champagne);
  margin: 0 0.35rem;
  font-weight: 400;
}
.tagline {
  margin: 0.55rem 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 300;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}
.eyebrow {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--blush-deep);
  margin: 0 0 0.45rem;
  font-weight: 500;
  text-shadow: none;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.person { min-width: 120px; }
.person .role {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.person .name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.section {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 3.5rem;
}
.section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.gallery-section .section-head {
  margin-bottom: 0.45rem;
}
.gallery-section .section-head h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  margin-bottom: 0.1rem;
}
.gallery-section .section-head p {
  font-size: 0.82rem;
}
.section-head.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 300;
}

.countdowns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 3.2rem;
  margin-bottom: 0;
  width: min(1100px, calc(100% - 0rem));
}
.countdown-card {
  background: rgba(255, 252, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 0.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-align: center;
}
.countdown-card.accent {
  background: linear-gradient(160deg, #fffaf6, #f4e4dc);
  border-color: rgba(201, 137, 132, 0.25);
}
.cd-label {
  margin: 0 0 0.45rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--blush-deep);
}
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}
.cd-unit {
  background: rgba(255,255,255,0.65);
  border-radius: 10px;
  padding: 0.4rem 0.15rem;
}
.cd-unit .num {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1;
}
.cd-unit .unit {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.cd-date {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.cd-passed {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--champagne);
}

.gallery-section {
  margin-bottom: 2.5rem;
}

.carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #ddd;
}
.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 70% 65% at 0% 0%, rgba(44, 36, 32, 0.55), transparent 72%),
    radial-gradient(ellipse 70% 65% at 100% 0%, rgba(44, 36, 32, 0.55), transparent 72%),
    radial-gradient(ellipse 70% 65% at 0% 100%, rgba(44, 36, 32, 0.55), transparent 72%),
    radial-gradient(ellipse 70% 65% at 100% 100%, rgba(44, 36, 32, 0.55), transparent 72%);
}
.carousel .nav-btn,
.carousel-dots {
  z-index: 2;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-slide .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(transparent, rgba(30, 22, 18, 0.55));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,252,248,0.9);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: 0.2s ease;
}
.nav-btn:hover { background: #fff; transform: scale(1.05); }
.carousel .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.carousel .prev { left: 0.8rem; }
.carousel .next { right: 0.8rem; }
.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.55);
  padding: 0;
}
.carousel-dots button.active { background: #fff; width: 18px; border-radius: 8px; }

.pwd-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.2rem 0 1rem;
}
.admin-badge {
  font-size: 0.75rem;
  color: var(--blush-deep);
  border: 1px solid rgba(201,137,132,0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
}
.stage-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stage-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  max-width: 720px;
}
.stage-dot {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  transition: 0.2s ease;
}
.stage-dot.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.stage-dot.done {
  background: rgba(196,165,116,0.18);
  border-color: rgba(196,165,116,0.45);
  color: #8a6d3d;
}
.stage-dot.done.active {
  background: var(--champagne);
  color: #fff;
  border-color: var(--champagne);
}

.stage-viewport {
  overflow: hidden;
  touch-action: pan-y;
  border-radius: calc(var(--radius) + 4px);
}
.stage-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage-card {
  min-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem 1.5rem;
  position: relative;
  max-height: 72vh;
  overflow: auto;
}
.stage-card.completed {
  background: linear-gradient(180deg, #f4f1ed, #ebe4dc);
  filter: saturate(0.75);
}
.stage-card.completed::after {
  content: "囍";
  position: absolute;
  right: 1.2rem;
  top: 1rem;
  width: 72px;
  height: 72px;
  border: 3px solid rgba(180, 70, 70, 0.55);
  color: rgba(180, 70, 70, 0.55);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  transform: rotate(-12deg);
  pointer-events: none;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.25);
}
.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-right: 4rem;
}
.stage-head h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0;
  font-weight: 600;
}
.stage-head .sub {
  color: var(--blush-deep);
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}
.stage-head .range {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}
.progress-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.group {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0;
}
.group-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.group-drag-handle {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  cursor: grab;
  user-select: none;
  letter-spacing: -0.08em;
  font-size: 0.85rem;
  background: rgba(44,36,32,0.04);
}
.group-drag-handle:active { cursor: grabbing; }
.group-head .group-toggle { flex: 1; min-width: 0; width: auto; }
.group-dragging {
  opacity: 0.55;
  outline: 2px dashed var(--blush-deep);
  border-radius: 12px;
}
.group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: transparent;
  border: 0;
  padding: 0.75rem 0.2rem;
  text-align: left;
  color: var(--ink);
}
.group-toggle .title {
  font-weight: 500;
  font-size: 1rem;
}
.group-toggle .meta {
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chevron {
  transition: transform 0.25s ease;
  display: inline-block;
}
.group.open .chevron { transform: rotate(180deg); }
.group-body {
  display: none;
  padding: 0 0 0.6rem;
}
.group.open .group-body { display: block; }

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.55rem;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.todo-item:hover { background: rgba(255,255,255,0.65); }
.todo-item.done .todo-text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(138,126,116,0.45);
}
.check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid rgba(201,137,132,0.7);
  background: #fff;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
  flex-shrink: 0;
  color: transparent;
  transition: 0.2s ease;
}
.todo-item.done .check {
  background: var(--blush-deep);
  border-color: var(--blush-deep);
  color: #fff;
}
.todo-main { min-width: 0; }
.todo-text {
  margin: 0;
  line-height: 1.45;
  cursor: pointer;
}
.todo-extra {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--champagne);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.note-tag,
.meta-tag {
  border: 0;
  background: rgba(196,165,116,0.16);
  color: #8a6d3d;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}
.note-tag {
  cursor: pointer;
}
.note-tag:hover {
  background: rgba(196,165,116,0.28);
}

.gallery-manager {
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255,255,255,0.72);
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.gallery-thumb {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.gallery-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.gallery-thumb-meta {
  padding: 0.45rem;
  display: grid;
  gap: 0.35rem;
}
.gallery-caption-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
}
.danger-text {
  color: #9a4a45 !important;
}
.carousel-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: rgba(44,36,32,0.04);
}
.children {
  margin: 0.4rem 0 0 0.4rem;
  padding-left: 0.7rem;
  border-left: 2px solid rgba(196,165,116,0.3);
}
.admin-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  position: relative;
}
.more-toggle {
  white-space: nowrap;
}
.more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 7.5rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(35, 26, 22, 0.12);
  flex-direction: column;
  gap: 0.25rem;
}
.more-menu.open {
  display: flex;
}
.more-menu .mini-btn {
  width: 100%;
  text-align: left;
  padding: 0.35rem 0.55rem;
}
.mini-btn {
  border: 0;
  background: rgba(44,36,32,0.06);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
}
.mini-btn:hover { background: rgba(44,36,32,0.12); }

.pool-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.pool {
  background: rgba(255,255,255,0.55);
  border: 1px dashed rgba(196,165,116,0.45);
  border-radius: 14px;
  padding: 0.7rem 0.65rem 0.75rem;
  min-height: 12rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pool[data-pool="groom"] {
  border-color: rgba(90, 120, 160, 0.35);
}
.pool[data-pool="bride"] {
  border-color: rgba(201,137,132,0.45);
}
.pool-dropzone {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 3.2rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  border: 1.5px dashed rgba(196,165,116,0.55);
  background: rgba(196,165,116,0.12);
  color: #8a6d3d;
  text-align: center;
  transition: 0.2s ease;
}
.pool-dropzone span {
  font-size: 0.82rem;
  font-weight: 500;
}
.pool-dropzone small {
  font-size: 0.7rem;
  opacity: 0.8;
}
.pool[data-pool="unassigned"] .pool-dropzone {
  border-color: rgba(196,165,116,0.55);
  background: rgba(196,165,116,0.14);
  color: #8a6d3d;
}
.pool[data-pool="groom"] .pool-dropzone {
  border-color: rgba(90, 120, 160, 0.5);
  background: rgba(90, 120, 160, 0.12);
  color: #4a6280;
}
.pool[data-pool="bride"] .pool-dropzone {
  border-color: rgba(201,137,132,0.55);
  background: rgba(201,137,132,0.14);
  color: #9a5f5a;
}
.pool-dropzone.drag-over {
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px currentColor;
  filter: brightness(0.98);
}
.group.drag-over {
  outline: 2px solid var(--blush-deep);
  background: rgba(201,137,132,0.1);
  border-radius: 12px;
}
.gallery-admin-entry {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}
.pool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(44,36,32,0.06);
}
.pool-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.pool-head p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}
.pool-count {
  flex-shrink: 0;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: rgba(44,36,32,0.06);
  color: var(--ink-soft);
}
.pool-body {
  min-height: 4rem;
}
.pool-empty-hint {
  margin: 0.4rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.group-admin-actions,
.stage-admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}
.stage-admin-actions {
  margin-top: 0.85rem;
}
.todo-item[draggable="true"] {
  cursor: grab;
}
.todo-item.dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.pool-add-btn {
  margin-top: 0.5rem;
  width: 100%;
}
.move-pool-actions,
.move-group-actions {
  display: grid;
  gap: 0.45rem;
}
.move-pool-actions {
  grid-template-columns: repeat(3, 1fr);
}
.move-pool-btn.active,
.move-group-btn.active {
  border-color: var(--blush-deep);
  color: var(--blush-deep);
  background: rgba(201,137,132,0.1);
}
.admin-stage-range {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-group-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.admin-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
}
.admin-group-main {
  min-width: 0;
}
.admin-group-main strong {
  display: block;
}
.admin-group-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.admin-group-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
.admin-locked {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
}
.admin-add-group-btn {
  width: 100%;
}

@media (max-width: 640px) {
  .admin-group-row {
    flex-direction: column;
    align-items: stretch;
  }
  .move-pool-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .pool-board {
    grid-template-columns: 1fr;
  }
}

.btn {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  transition: 0.2s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.danger { background: #9a4a45; }
.btn.secondary { background: var(--champagne); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 26, 22, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
  backdrop-filter: blur(4px);
}
.modal {
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: #fffdf9;
  border-radius: 20px;
  padding: 1.5rem 1.35rem 1.25rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.6);
}
.modal.slim { width: min(400px, 100%); }
.modal.wide { width: min(760px, 100%); }
.modal.preview { width: min(860px, 100%); }
.modal h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 1.5rem 0.5rem 0;
}
.modal-close {
  position: absolute;
  right: 0.8rem;
  top: 0.7rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  color: var(--muted);
}
.modal-item-text {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  line-height: 1.45;
}
.hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 1rem; }
.field {
  display: block;
  margin-bottom: 1rem;
}
.field > span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.field textarea,
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.upload-zone {
  position: relative;
  border: 1.5px dashed rgba(196,165,116,0.55);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.7);
}
.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}
.file-list .actions { display: flex; gap: 0.35rem; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

#preview-body {
  min-height: 180px;
  margin: 0.5rem 0 1rem;
  background: #f5efe8;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
#preview-body img {
  max-width: 100%;
  max-height: 60vh;
  display: block;
}
#preview-body iframe {
  width: 100%;
  height: 60vh;
  border: 0;
}
.preview-fallback {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
}

.admin-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-stage {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 0.8rem;
  background: #fff;
}
.admin-stage h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.admin-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.admin-row input {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}
.admin-group {
  margin: 0.55rem 0 0.3rem 0.4rem;
  padding-left: 0.6rem;
  border-left: 2px solid rgba(201,137,132,0.35);
}
.admin-item-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0.3rem 0;
}

.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

/* Background music player */
.music-player {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 58px;
  height: 58px;
}
.music-btn {
  width: 58px;
  height: 58px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
.music-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f7ebe3 0 18%, transparent 19%),
    repeating-radial-gradient(circle at 50% 50%,
      #2c2420 0 2px,
      #3a312c 2px 4px,
      #2c2420 4px 6px);
  box-shadow:
    0 10px 28px rgba(70, 45, 40, 0.28),
    inset 0 0 0 2px rgba(255, 252, 248, 0.35);
  transition: transform 0.25s ease;
}
.music-disc-inner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8c4c0, #c98984);
  color: #fffaf6;
  font-size: 0.75rem;
  box-shadow: 0 0 0 3px rgba(250, 247, 242, 0.85);
}
.music-player.playing .music-disc {
  animation: spin-disc 6s linear infinite;
}
.music-player:not(.playing) .music-disc {
  filter: grayscale(0.25);
  opacity: 0.92;
}
.music-player:not(.playing) .music-disc::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: rgba(255, 250, 245, 0.85);
  transform: rotate(-35deg);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(44, 36, 32, 0.15);
}
@keyframes spin-disc {
  to { transform: rotate(360deg); }
}

.music-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.music-note {
  position: absolute;
  left: 50%;
  top: 50%;
  color: var(--blush-deep);
  font-size: 0.95rem;
  opacity: 0;
  animation: note-float 2.8s ease-out forwards;
  text-shadow: 0 2px 8px rgba(255, 252, 248, 0.8);
}
@keyframes note-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }
  15% { opacity: 0.9; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(var(--rot));
  }
}

@media (max-width: 720px) {
  .music-player {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 50px;
    height: 50px;
  }
  .music-btn,
  .music-disc {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 720px) {
  .hero { padding: 6.4rem 1rem 1.8rem; }
  .countdowns {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: 2.4rem;
    margin-bottom: 0;
  }
  .countdown-card { padding: 0.65rem 0.45rem 0.55rem; }
  .cd-unit .num { font-size: 1.05rem; }
  .section-head.row { flex-direction: column; align-items: flex-start; }
  .stage-card { max-height: none; }
  .stage-head { flex-direction: column; padding-right: 0; }
  .stage-card.completed::after {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    top: 0.7rem;
    right: 0.7rem;
  }
  .carousel {
    aspect-ratio: 4 / 3;
  }
}
