:root {
  --ink: #eaf1ff;
  --muted: #9fb0c8;
  --line: #243146;
  --paper: #fffaf7;
  --panel: #101825;
  --rose: #2f80ed;
  --sage: #18a058;
  --gold: #f0b429;
  --danger: #e44757;
  --shadow: 0 22px 70px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #f2ddd4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button, .file-btn {
  min-height: 40px;
  border: 1px solid #28313d;
  background: #f6f6f3;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
}
button:hover, .file-btn:hover { filter: brightness(.97); }
.ghost { background: transparent; }
.danger { background: #ffe9e9; border-color: #e36d73; color: #9f2f36; }
.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.file-btn { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: #f9f3ef;
  border-right: 1px solid rgba(38, 48, 61, .16);
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 2px solid var(--rose);
  border-radius: 50%;
  color: var(--rose);
  font-family: Georgia, serif;
  font-weight: 900;
}
.brand span, .sidebar-card label { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.nav-list { display: grid; gap: 8px; }
.nav-item {
  justify-content: flex-start;
  display: flex;
  gap: 10px;
  border-color: transparent;
  background: transparent;
}
.nav-item.active { background: var(--rose); color: white; border-color: var(--rose); }
.sidebar-card { margin-top: 24px; display: grid; gap: 8px; }
.sidebar-card select, input, select, textarea {
  width: 100%;
  border: 1px solid #aeb7c4;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }

.main { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: #cf898c;
  border-bottom: 1px solid rgba(38, 48, 61, .16);
}
.topbar h1 { margin: 0 0 3px; font-size: 26px; }
.topbar p { margin: 0; color: #3d4754; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tab-panel { display: none; padding: 22px 24px 34px; }
.tab-panel.active { display: block; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 14px; }
.metric {
  background: #f8f8f6;
  border: 2px solid #68717d;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.metric strong { display: block; font-size: 32px; line-height: 1; margin-bottom: 6px; }
.metric span { font-weight: 800; color: #202733; }
.metric.good { background: var(--sage); }
.metric.warn { background: var(--gold); }
.metric.bad { background: var(--danger); color: white; }
.metric.bad span { color: black; }

.split-view, .designer-grid, .reports-grid, .entrance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 18px;
  margin-top: 18px;
}
.owner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-top: 18px;
}
.owner-grid .panel:last-child { grid-column: 1 / -1; }
.owner-music-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.owner-color-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.owner-color-form input[type="color"],
.inline-fields input[type="color"] {
  min-height: 44px;
  padding: 4px;
}
.music-status-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(159, 176, 200, .26);
  border-radius: 8px;
  background: rgba(7, 16, 28, .58);
}
.music-status-card.ready {
  border-color: rgba(24, 160, 88, .46);
  background:
    linear-gradient(135deg, rgba(24, 160, 88, .16), transparent),
    rgba(7, 16, 28, .68);
}
.music-status-card span,
.music-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.music-status-card b { color: #eaf1ff; }
.music-status-card audio {
  width: 100%;
  margin-top: 6px;
}
.owner-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, .18), transparent 40%),
    linear-gradient(100deg, #101825, #0b1422);
}
.owner-hero h2 {
  max-width: 720px;
  margin: 6px 0 8px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
}
.owner-hero p {
  max-width: 760px;
  margin: 0;
  color: #b9c8dc;
  font-size: 17px;
}
.eyebrow {
  display: inline-flex;
  color: #8ec5ff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
}
.owner-actions {
  display: grid;
  gap: 10px;
  min-width: 230px;
}
.owner-project-card {
  display: grid;
  gap: 18px;
}
.owner-project-card h3 {
  margin: 12px 0 4px;
  font-size: 32px;
}
.owner-project-card p {
  margin: 0;
  color: #a9bad3;
}
.owner-project-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.owner-project-card dl div,
.portal-link-card,
.template-count-row {
  border: 1px solid #273a52;
  background: #0b1422;
  border-radius: 8px;
  padding: 12px;
}
.owner-project-card dt {
  color: #8fa4bd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.owner-project-card dd {
  margin: 5px 0 0;
  color: #f4f8ff;
  font-size: 24px;
  font-weight: 900;
}
.portal-links,
.owner-template-list {
  display: grid;
  gap: 10px;
}
.portal-link-card {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 10px;
  align-items: center;
}
.portal-link-card span {
  color: #dbe8ff;
  font-weight: 900;
}
.portal-link-card code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9cc7ff;
}
.portal-link-card a {
  color: #bdf2d1;
  font-weight: 900;
}
.template-count-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.template-count-row b {
  color: #18a058;
  font-size: 22px;
}
.reports-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entrance-grid { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); margin-top: 0; }
.panel {
  background: var(--panel);
  border: 1px solid rgba(38, 48, 61, .18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel h2, .panel-head h2 { margin: 0 0 12px; font-size: 18px; }
.panel-head h2 { margin: 0; }
.panel-head p { margin: 4px 0 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
.form-grid h2, .wide { grid-column: 1 / -1; }
label span { display: block; font-size: 13px; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.inline-fields, .media-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.inline-fields label { flex: 1 1 130px; }
.hidden { display: none !important; }
.media-library {
  display: grid;
  gap: 12px;
  border: 1px solid #24364d;
  border-radius: 8px;
  padding: 12px;
  background: #0b1422;
}
.media-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.media-library h3 { margin: 0; font-size: 16px; }
.media-library-head span,
.empty-note {
  color: #9fb0c8;
  font-size: 13px;
}
.photo-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.photo-manager-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  border: 1px solid #273a52;
  border-radius: 8px;
  padding: 8px;
  background: #08101c;
}
.photo-manager-card.cover {
  border-color: #18a058;
  box-shadow: 0 0 0 2px rgba(24, 160, 88, .18);
}
.photo-manager-card img {
  width: 84px;
  height: 94px;
  object-fit: cover;
  border-radius: 6px;
  grid-row: span 2;
}
.photo-manager-card b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-manager-card small {
  color: #9fb0c8;
}
.photo-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  grid-column: 2;
}

.template-panel { margin-bottom: 18px; }
.template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}
.template-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid #273a52;
  border-radius: 8px;
  padding: 10px;
  background: #0b1422;
}
.template-card.active {
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px rgba(47, 128, 237, .22);
}
.template-card small {
  display: block;
  color: #9fb0c8;
  margin-top: 3px;
}
.template-card p {
  color: #bfcbda;
  font-size: 13px;
  margin: 8px 0 0;
}
.template-swatch {
  min-height: 92px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
}
.template-swatch::before {
  content: "";
  position: absolute;
  inset: auto 12px 12px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
}
.template-swatch span {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85);
}

.mini-invite, .phone-card {
  min-height: 430px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(38, 48, 61, .18);
  background: var(--paper);
}
.phone-preview {
  max-width: 390px;
  margin: 0 auto;
  border: 10px solid #202733;
  border-radius: 30px;
  background: #202733;
  box-shadow: var(--shadow);
}
.phone-card { border-radius: 20px; border: 0; min-height: 650px; }
.invite-hero {
  min-height: 260px;
  padding: 30px 24px;
  color: white;
  display: grid;
  align-content: end;
  background-size: cover;
  background-position: center;
  position: relative;
}
.invite-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, .05));
}
.invite-hero > * { position: relative; }
.invite-hero h2 { font-size: 40px; line-height: 1; margin: 0 0 8px; }
.hero-content h2 {
  font-family: "Brush Script MT", "Snell Roundhand", "Apple Chancery", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}
.hero-content span {
  display: inline-flex;
  margin-top: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}
.invite-body { padding: 22px; display: grid; gap: 16px; }
.invite-body b { color: var(--invite-accent, #26303d); }
.invite-body p { margin: 0; color: #4a5564; }
.invite-intro {
  display: grid;
  gap: 8px;
  text-align: center;
}
.invite-intro span,
.section-kicker {
  color: var(--invite-accent, #26303d);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .12em;
}
.invite-intro h3 {
  margin: 0;
  color: #26303d;
  font-size: 28px;
}
.photo-story { display: grid; gap: 14px; }
.gallery-title {
  margin: 0;
  color: #a8834a;
  font-family: var(--festive-script);
  font-size: clamp(40px, 8.4vw, 72px);
  font-weight: 400;
  line-height: .95;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .72);
}
.moment-carousel {
  min-height: 330px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, .38);
  background: #111827;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .18);
}
.moment-slides,
.moment-slide {
  position: absolute;
  inset: 0;
}
.moment-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .85s ease, transform 1.2s ease;
  display: grid;
  align-items: end;
}
.moment-slide.active {
  opacity: 1;
  transform: scale(1);
}
.moment-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, .18), transparent 42%);
}
.moment-slide span {
  position: relative;
  color: white;
  padding: 18px 20px;
  font-weight: 900;
  font-size: 22px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .48);
}
.moment-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 52px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(2, 6, 23, .42);
  color: white;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}
.moment-control.prev { left: 12px; }
.moment-control.next { right: 12px; }
.moment-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  align-items: center;
}
.moment-dots button {
  min-height: 0;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .58);
}
.moment-dots button.active {
  width: 24px;
  background: white;
}
.event-details { display: grid; gap: 10px; }
.music-player {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 12px 12px 16px;
  border: 1px solid rgba(212, 139, 42, .34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,247,237,.72)),
    radial-gradient(circle at 12% 12%, rgba(47, 143, 163, .18), transparent 34%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
}
.music-player div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.music-player span,
.music-player small,
.music-player em {
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.music-player em {
  display: none;
  color: #8b1e3f;
  font-style: normal;
}
.music-player.blocked em {
  display: block;
}
.music-player b {
  min-width: 0;
  overflow: hidden;
  color: #26303d;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-player button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #173b66, #0f766e);
  color: white;
  padding: 9px 16px;
  box-shadow: 0 10px 22px rgba(23, 59, 102, .18);
}
.music-player.playing button {
  background: linear-gradient(135deg, #8b1e3f, #d48b2a);
}
.music-player.blocked {
  border-color: rgba(232, 140, 165, .62);
  box-shadow: 0 18px 36px rgba(139, 30, 63, .18);
}
.music-player.compact {
  width: fit-content;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
}
.music-player.compact button {
  min-width: 168px;
}
.music-player.compact em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.music-player.compact.blocked em {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0 10px;
  white-space: normal;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-card {
  border: 1px solid color-mix(in srgb, var(--invite-accent, #26303d) 32%, transparent);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .78);
}
.detail-card span {
  display: block;
  color: #7a8495;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.detail-card b {
  display: block;
  margin-top: 5px;
  color: #26303d;
}
.wide-detail { grid-column: span 2; }
.date-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.date-box div, .rsvp-card {
  border: 1px solid color-mix(in srgb, var(--invite-accent, #26303d) 32%, transparent);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .78);
}
.template-wedding .invite-body,
.template-anniversary .invite-body,
.template-confirmation .invite-body { border-top: 5px solid var(--invite-accent, #d4af37); }
.template-anniversary .invite-hero::before {
  background:
    linear-gradient(to top, rgba(3, 7, 18, .62), rgba(248,250,252,.16)),
    radial-gradient(circle at 70% 10%, rgba(255,255,255,.36), transparent 28%);
}
.template-anniversary .hero-content h2 {
  color: #f8fafc;
  text-shadow: 0 1px 0 #94a3b8, 0 18px 40px rgba(0, 0, 0, .45);
}
.template-birthday .invite-hero h2 { font-family: Inter, Arial, sans-serif; font-weight: 900; }
.template-birthday .gallery-strip img { border-radius: 50%; }
.template-communion .invite-hero { color: #1e3a5f; }
.template-communion .invite-hero::before { background: linear-gradient(to top, rgba(255,255,255,.52), rgba(255,255,255,.08)); }
.template-confirmation .invite-hero::before { background: linear-gradient(to top, rgba(69, 10, 10, .7), rgba(69, 10, 10, .12)); }
.layout-minimal .gallery-strip { display: none; }
.layout-gallery .gallery-strip { grid-template-columns: repeat(2, 1fr); }
.layout-gallery .gallery-strip img:first-child { grid-column: span 2; aspect-ratio: 1.8; }
.gallery-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.reference-box { margin-top: 14px; }
.reference-box video { width: 100%; margin-top: 10px; border-radius: 8px; }

.guest-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 210px 180px;
  gap: 10px;
  margin-bottom: 12px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #68717d;
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 14px 16px; border-bottom: 1px solid #89909a; text-align: left; }
th { font-family: Georgia, serif; background: #f7f8f6; text-transform: uppercase; font-size: 13px; }
td.actions { white-space: nowrap; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  border: 1px solid #aeb7c4;
  font-weight: 800;
  font-size: 13px;
}
.status-confirmed { background: #dce8cf; }
.status-rejected { background: #ffdede; }
.status-pending { background: #f1f2f4; }

.report-bars { display: grid; gap: 12px; }
.bar-row span { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.bar-track { height: 16px; background: #e9edf2; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--rose); }
.summary-list, .compact-list { display: grid; gap: 10px; }
.summary-item, .compact-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f5;
}

.public-shell { max-width: 880px; margin: 0 auto; }
.public-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.public-controls label { min-width: 280px; }
.public-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.public-card .invite-hero { min-height: 360px; }
.public-card .invite-hero h2 { font-size: 58px; }
.rsvp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-actions button { min-height: 48px; }
.pass-stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; align-items: center; text-align: center; }
.pass-stepper strong { font-size: 28px; }
.qr-pass {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid rgba(38, 48, 61, .14);
  border-radius: 8px;
  padding: 16px;
  background: white;
  text-align: center;
}
.qr-pass img, .qr-pass canvas { width: 190px; height: 190px; }
.entry-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
  letter-spacing: .04em;
  background: #f1f4f8;
  border-radius: 8px;
  padding: 8px 10px;
}
.scanner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scanner-panel video {
  width: 100%;
  min-height: 320px;
  background: #202733;
  border-radius: 8px;
  object-fit: cover;
}
.manual-scan {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}
.scan-result {
  margin-top: 14px;
  border: 1px solid #aeb7c4;
  border-radius: 8px;
  padding: 14px;
  background: #f8f9fb;
  min-height: 78px;
}
.scan-result.valid { background: #e7f2dc; border-color: #a8bf8f; }
.scan-result.invalid { background: #ffe4e4; border-color: #df7777; }
.scan-result.neutral { color: var(--muted); }

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  width: min(560px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(38, 48, 61, .42); }
.dialog-form { padding: 22px; display: grid; gap: 14px; }
.dialog-form h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #202733;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s ease;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }

body.public-mode {
  background: #f7f2ef;
  color: #26303d;
}
.public-mode .app-shell {
  display: block;
  min-height: 100vh;
}
.public-mode .sidebar,
.public-mode .topbar,
.public-mode .public-controls {
  display: none;
}
.public-mode .main {
  min-height: 100vh;
}
.public-mode .tab-panel {
  padding: 0;
}
.public-mode .public-shell {
  max-width: none;
  margin: 0;
}
.public-mode #publicInvitation {
  min-height: 100vh;
  display: grid;
  justify-items: center;
  background:
    radial-gradient(circle at 16% 4%, rgba(255, 178, 122, .45), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(89, 179, 196, .34), transparent 32%),
    radial-gradient(circle at 50% 45%, rgba(244, 191, 205, .32), transparent 34%),
    #fff7ef;
}
.public-mode .public-card {
  width: min(100%, 760px);
  min-height: 100vh;
  border-left: 1px solid #b7d3df;
  border-right: 1px solid #b7d3df;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(90deg, rgba(89, 179, 196, .2), transparent 7%, transparent 93%, rgba(255, 183, 77, .22)),
    var(--paper);
}
.public-mode .public-card .invite-hero {
  min-height: 82vh;
  border-bottom-left-radius: 50% 8%;
  border-bottom-right-radius: 50% 8%;
  overflow: hidden;
  align-content: start;
  padding: 34px 30px;
}
.public-mode .public-card .invite-hero::before {
  background:
    linear-gradient(to bottom, rgba(255,255,255,.82), rgba(255,255,255,.12) 32%, rgba(0,0,0,.22)),
    linear-gradient(to top, rgba(0,0,0,.3), transparent 50%);
}
.public-mode .hero-content {
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .38);
}
.public-mode .hero-content h2 {
  font-size: clamp(88px, 18vw, 190px);
  line-height: .72;
  color: #efcc7f;
  -webkit-text-stroke: 1.2px rgba(40, 25, 10, .94);
  text-shadow:
    0 1px 0 rgba(255,255,255,.9),
    0 2px 0 rgba(58, 36, 14, .7),
    0 0 20px rgba(255, 247, 237, .62),
    0 14px 34px rgba(0,0,0,.54);
}
.public-mode .hero-content p {
  color: #26303d;
  font-size: 24px;
  font-weight: 900;
  text-shadow: none;
}
.public-mode .hero-content span {
  color: #d9848e;
  background: rgba(255,255,255,.72);
  text-shadow: none;
}
.public-mode .public-card .invite-body {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 42px;
  gap: 0;
}
.public-language-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.7), rgba(255,247,237,.95)),
    var(--paper);
}
.public-language-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .1);
  backdrop-filter: blur(12px);
}
.public-language-pill span {
  color: #314155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.public-language-pill select {
  width: auto;
  min-width: 108px;
  border: 0;
  border-radius: 999px;
  padding: 7px 28px 7px 10px;
  background: linear-gradient(135deg, #173b66, #0f766e);
  color: white;
  font-weight: 900;
}
.public-mode .public-intro {
  width: min(92%, 620px);
  margin: -72px auto 22px;
  background: white;
  border-radius: 50% 50% 12px 12px / 24% 24% 12px 12px;
  box-shadow: 0 -12px 35px rgba(38, 48, 61, .14);
  padding: 54px 32px 36px;
  position: relative;
  z-index: 2;
}
.public-mode .public-intro h3 {
  font-size: clamp(32px, 8vw, 62px);
}
.public-mode .public-intro p {
  font-size: clamp(20px, 4.5vw, 32px);
  line-height: 1.25;
  color: #151922;
}
.public-mode .music-player {
  width: min(92%, 620px);
  margin: 0 auto 24px;
  border-color: rgba(47, 143, 163, .34);
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,247,237,.86)),
    radial-gradient(circle at 18% 20%, rgba(232, 140, 165, .18), transparent 38%);
}
.ornate-panel {
  width: min(92%, 650px);
  margin: 22px auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 249, 242, .96));
  border: 1px solid rgba(212, 139, 42, .22);
  border-radius: 44% 44% 10px 10px / 12% 12% 10px 10px;
  box-shadow: 0 12px 30px rgba(38, 48, 61, .12);
  padding: 46px 32px;
  text-align: center;
  position: relative;
  isolation: isolate;
}
.ornate-panel > * {
  position: relative;
  z-index: 1;
}
.ornate-panel::before,
.ornate-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 64px;
  height: 52px;
  opacity: .9;
  background: url("assets/elegant-lilies-corner.svg?v=56") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(82, 68, 56, .14));
}
.ornate-panel::before { left: 16px; top: 20px; }
.ornate-panel::after { right: 16px; bottom: 18px; transform: rotate(180deg); }
.invitation-message::before,
.invitation-message::after {
  width: 112px;
  height: 76px;
  opacity: .9;
  background-image: url("assets/enhanced-wedding-rings.svg?v=57");
  filter: drop-shadow(0 4px 5px rgba(82, 68, 56, .16));
}
.invitation-message::before { left: 18px; top: 16px; }
.invitation-message::after { right: 16px; bottom: 14px; transform: none; }
.flourish {
  color: #f4bfcd;
  font-size: 64px;
  line-height: .5;
}
.invitation-message p,
.hosts-panel h3,
.location-panel b,
.quote-panel {
  font-family: Georgia, "Times New Roman", serif;
}
.invitation-message p {
  color: #111827;
  font-size: clamp(23px, 4.8vw, 34px);
  line-height: 1.32;
}
.calendar-block {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 32px;
}
.calendar-block > span {
  color: #2f8fa3;
  font-size: clamp(48px, 10vw, 82px);
  font-weight: 300;
}
.calendar-block div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.calendar-block b {
  color: #111827;
  border-top: 2px solid #9fb7ca;
  border-bottom: 2px solid #9fb7ca;
  padding: 8px 4px;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 400;
  text-transform: capitalize;
}
.calendar-block strong {
  color: #050505;
  font-size: clamp(88px, 18vw, 150px);
  font-weight: 400;
  line-height: .78;
}
.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
}
.calendar-actions > span {
  width: 100%;
  color: #a8834a;
  font-family: var(--festive-serif);
  font-size: clamp(18px, 4.2vw, 28px);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.calendar-button {
  min-height: 44px;
  padding: 9px 22px;
  border: 1px solid rgba(255, 247, 237, .62);
  font-family: var(--festive-serif);
  font-size: clamp(16px, 3.8vw, 22px);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(16, 24, 39, .14);
}
.hosts-panel span,
.ornate-panel h3 {
  font-family: "Brush Script MT", "Snell Roundhand", "Apple Chancery", Georgia, serif;
  color: #a8834a;
  font-weight: 400;
  letter-spacing: 0;
}
.hosts-panel span,
.ornate-panel h3 {
  font-size: clamp(42px, 9vw, 74px);
}
.hosts-panel h3 {
  color: #050505;
  font-size: clamp(42px, 8vw, 70px);
  margin: 18px 0 0;
}
.feature-photo {
  width: min(94%, 690px);
  min-height: 660px;
  margin: 24px auto;
  border-radius: 50% 50% 8px 8px / 10% 10% 8px 8px;
  background:
    linear-gradient(135deg, rgba(16, 24, 39, .78), rgba(47, 143, 163, .48)),
    linear-gradient(90deg, rgba(248, 227, 189, .3), rgba(232, 140, 165, .22));
  background-size: cover;
  background-position: center;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -46px 52px rgba(255,255,255,.48);
}
.feature-photo-title {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 88%;
  padding: 12px 26px 14px;
  border: 1px solid rgba(248, 227, 189, .66);
  border-radius: 999px;
  background: rgba(255, 250, 247, .82);
  color: #9d6e2d;
  font-family: var(--festive-script);
  font-size: clamp(36px, 7.4vw, 68px);
  line-height: .9;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  box-shadow: 0 18px 36px rgba(16, 24, 39, .18);
  backdrop-filter: blur(6px);
}
.countdown-panel {
  width: min(94%, 690px);
  margin: -42px auto 24px;
  padding: 26px 12px;
  text-align: center;
  background: linear-gradient(to top, rgba(255,255,255,.92), rgba(255,255,255,.48));
  position: relative;
}
.countdown-panel > span {
  color: white;
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-size: 48px;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.countdown-panel div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown-panel b {
  display: grid;
  justify-items: center;
  color: #050505;
  font-size: clamp(44px, 10vw, 74px);
  font-weight: 400;
  background: radial-gradient(circle at 50% 44%, #f8cbd5 0 48%, transparent 49%);
  padding: 18px 0 8px;
}
.countdown-panel small {
  font-size: 20px;
  color: #111827;
}
.quote-panel {
  width: min(92%, 650px);
  margin: 26px auto;
  text-align: center;
  color: #050505;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.12;
}
.location-panel strong,
.dress-panel strong {
  display: block;
  color: #050505;
  font-size: clamp(46px, 10vw, 76px);
  font-weight: 400;
}
.location-panel p,
.dress-panel p,
.gift-panel p {
  color: #050505;
  font-size: clamp(20px, 4.2vw, 30px);
}
.soft-button {
  border: 0;
  min-height: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f8fa3, #e88ca5);
  color: white;
  padding: 10px 28px;
  font-size: 28px;
  font-weight: 400;
  text-decoration: underline;
}
.dress-code-layout {
  display: grid;
  grid-template-columns: minmax(130px, .42fr) 1fr;
  gap: 30px;
  align-items: center;
  margin-top: 10px;
  text-align: left;
}
.attire-badge {
  width: min(158px, 100%);
  min-height: 132px;
  justify-self: center;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px 16px 18px;
  border: 1px solid rgba(248, 227, 189, .62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 247, 237, .13), rgba(248, 227, 189, .08)),
    radial-gradient(circle at 50% 12%, rgba(248, 227, 189, .2), transparent 46%),
    linear-gradient(155deg, rgba(7, 23, 41, .34), rgba(15, 92, 105, .12));
  box-shadow: inset 0 0 0 1px rgba(255, 247, 237, .08), 0 18px 32px rgba(2, 6, 23, .18);
  overflow: hidden;
  text-align: center;
}
.attire-badge::before,
.attire-badge::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(248, 227, 189, .34);
  border-radius: 6px;
  pointer-events: none;
}
.attire-badge::after {
  inset: auto 22px 16px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(248, 227, 189, .68), transparent);
}
.attire-badge span {
  color: rgba(248, 227, 189, .78);
  font-family: Avenir, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.attire-badge b {
  color: #fff7ed;
  font-family: var(--festive-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.attire-badge i {
  width: 48px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #dfb15a, transparent);
}
.attire-swatches {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.attire-swatches em {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 237, .72);
  box-shadow: 0 4px 10px rgba(2, 6, 23, .22);
}
.swatch-silver { background: linear-gradient(135deg, #f8fafc, #94a3b8); }
.swatch-black { background: #05070d; }
.swatch-white { background: #fff7ed; }
.swatch-navy { background: #123e5a; }
}
.schedule-list {
  width: min(94%, 560px);
  margin: 24px auto 0;
  display: grid;
  gap: 0;
  text-align: left;
}
.schedule-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  position: relative;
  padding: 0 0 28px;
}
.schedule-row::before {
  content: "";
  position: absolute;
  left: 108px;
  top: 4px;
  bottom: -2px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(248, 227, 189, .3), rgba(248, 227, 189, .86), rgba(248, 227, 189, .22));
}
.schedule-row:last-child {
  padding-bottom: 0;
}
.schedule-row:last-child::before {
  bottom: 16px;
}
.schedule-row time {
  color: rgba(255, 247, 237, .72);
  font-family: var(--festive-serif);
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1;
  text-align: right;
}
.schedule-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-left: 4px;
}
.ceremony-row .schedule-body {
  grid-template-columns: 1fr 92px;
  gap: 18px;
  align-items: center;
}
.schedule-body b {
  display: block;
  color: #fff7ed;
  font-family: var(--festive-serif);
  font-size: clamp(20px, 4.4vw, 30px);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.schedule-body span,
.schedule-body small {
  display: block;
  color: rgba(255, 247, 237, .84);
  font-size: clamp(16px, 3.6vw, 22px);
  line-height: 1.2;
}
.church-sketch {
  width: 86px;
  height: 92px;
  position: relative;
  opacity: .9;
}
.church-cross {
  position: absolute;
  left: 38px;
  top: 0;
  width: 6px;
  height: 36px;
  border-radius: 999px;
  background: #f8e3bd;
}
.church-cross::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 11px;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: #f8e3bd;
}
.church-roof {
  position: absolute;
  left: 10px;
  top: 30px;
  width: 64px;
  height: 64px;
  border-left: 4px solid #f8e3bd;
  border-top: 4px solid #f8e3bd;
  transform: rotate(45deg);
  border-radius: 5px;
}
.church-building {
  position: absolute;
  left: 14px;
  bottom: 0;
  width: 58px;
  height: 42px;
  border: 4px solid #f8e3bd;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.church-door {
  position: absolute;
  left: 34px;
  bottom: 0;
  width: 18px;
  height: 28px;
  border: 3px solid #f8e3bd;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.rsvp-section h3 {
  color: #0e1a33;
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 400;
  margin: 0 0 26px;
}
.rsvp-ticket-grid {
  display: grid;
  grid-template-columns: minmax(210px, .85fr) 1fr;
  gap: 24px;
  align-items: center;
}
.ticket-preview {
  min-height: 250px;
  border: 5px double #111827;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
}
.ticket-preview span {
  color: #111827;
  font-weight: 900;
}
.ticket-preview b,
.ticket-preview small {
  color: #111827;
  font-size: 18px;
}
.public-mode .rsvp-card {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
}
.public-mode .pass-stepper {
  grid-template-columns: 64px 1fr 64px;
  margin: 16px 0 6px;
}
  .public-mode .pass-stepper button {
    min-height: 64px;
    border-radius: 10px;
  }
.public-mode .pass-stepper strong {
  color: #111827;
  font-size: 58px;
}
.public-mode .rsvp-actions button {
  font-size: 26px;
  min-height: 62px;
}
.public-mode .qr-pass {
  margin-top: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.public-mode .qr-pass b {
  font-family: Georgia, serif;
  color: var(--invite-accent, #26303d);
  font-size: 30px;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav-list { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .nav-item { justify-content: center; }
  .metrics-grid, .split-view, .designer-grid, .reports-grid, .entrance-grid, .owner-grid { grid-template-columns: 1fr; }
  .owner-grid .panel:last-child { grid-column: auto; }
  .owner-color-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-hero { align-items: stretch; flex-direction: column; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 660px) {
  .tab-panel, .topbar, .sidebar { padding-left: 14px; padding-right: 14px; }
  .nav-list { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid, .form-grid, .guest-tools { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .public-controls, .rsvp-actions, .manual-scan { grid-template-columns: 1fr; display: grid; }
  .music-player {
    grid-template-columns: 1fr;
    border-radius: 18px;
    text-align: center;
  }
  .public-controls label { min-width: 0; }
  .owner-project-card dl, .portal-link-card { grid-template-columns: 1fr; }
  .public-card .invite-hero h2 { font-size: 42px; }
  .public-mode .public-card .invite-hero { min-height: 74vh; padding: 26px 20px; }
  .public-mode .public-card .invite-body { padding-left: 12px; padding-right: 12px; }
  .public-mode .public-intro { width: 96%; padding: 42px 20px 28px; }
  .ornate-panel { width: 96%; padding: 38px 20px; }
  .ornate-panel::before,
  .ornate-panel::after {
    width: 46px;
    height: 38px;
    opacity: .44;
    filter: drop-shadow(0 1px 2px rgba(82, 68, 56, .1));
  }
  .ornate-panel::before { left: 10px; top: 12px; }
  .ornate-panel::after { right: 10px; bottom: 12px; }
  .invitation-message::before,
  .invitation-message::after {
    width: 78px;
    height: 54px;
    opacity: .38;
    filter: drop-shadow(0 2px 3px rgba(82, 68, 56, .1));
  }
  .invitation-message::before { left: 8px; top: 8px; }
  .invitation-message::after { right: 8px; bottom: 8px; }
  .calendar-block div { gap: 10px; }
  .feature-photo { width: 98%; min-height: 500px; }
  .countdown-panel { width: 98%; }
  .rsvp-ticket-grid { grid-template-columns: 1fr; }
  .dress-code-layout { grid-template-columns: 1fr; text-align: center; }
  .schedule-row { grid-template-columns: 74px 1fr; gap: 18px; }
  .schedule-row::before { left: 86px; }
  .ceremony-row .schedule-body { grid-template-columns: 1fr; }
  .church-sketch { justify-self: start; }
  .moment-carousel { min-height: 280px; }
  .moment-control { width: 36px; height: 46px; }
}

/* Dark editor shell: keep the invitation canvas visually independent. */
body { background: #050810; }
button, .file-btn {
  border-color: #36557c;
  background: #173b66;
  color: #eaf1ff;
}
.ghost {
  background: #0b1422;
  border-color: #2c405d;
  color: #dbe8ff;
}
.danger {
  background: #40131b;
  border-color: #e44757;
  color: #ffd8dd;
}
.sidebar {
  background: #080d15;
  border-right-color: #1c2a3f;
}
.brand-mark {
  border-color: #2f80ed;
  color: #9cc7ff;
  background: #07111f;
}
.nav-item { color: #dbe8ff; }
.nav-item.active {
  background: #123e6d;
  border-color: #2f80ed;
  color: #ffffff;
}
.sidebar-card select,
input,
select,
textarea {
  border-color: #304662;
  background: #070d16;
  color: #eaf1ff;
}
input::placeholder,
textarea::placeholder { color: #7386a0; }
.topbar {
  background: linear-gradient(90deg, #07111f, #112947 52%, #07111f);
  border-bottom-color: #1d314c;
}
.topbar p { color: #a9bad3; }
.metric {
  background: #0d1624;
  border-color: #315071;
}
.metric span { color: #b7c7de; }
.metric.good {
  background: #092b1c;
  border-color: #18a058;
}
.metric.warn {
  background: #302509;
  border-color: #f0b429;
}
.metric.bad {
  background: #351018;
  border-color: #e44757;
  color: #ffffff;
}
.metric.bad span { color: #ffc6cd; }
.panel {
  background: #101825;
  border-color: #23344b;
}
.phone-preview {
  border-color: #02050a;
  background: #02050a;
}
.table-wrap {
  background: #0b111c;
  border-color: #315071;
}
th,
td { border-bottom-color: #263950; }
th {
  background: #111b29;
  color: #cbd8ea;
}
.status-pill { border-color: #304662; }
.status-confirmed {
  background: #0b3320;
  color: #bdf2d1;
  border-color: #18a058;
}
.status-rejected {
  background: #3c1119;
  color: #ffcbd1;
  border-color: #e44757;
}
.status-pending {
  background: #101a28;
  color: #c6d5ea;
}
.bar-track { background: #07101c; }
.bar-fill { background: linear-gradient(90deg, #2f80ed, #18a058); }
.summary-item,
.compact-item { border-bottom-color: #25374e; }
.scanner-panel video { background: #02050a; }
.scan-result {
  background: #0b1422;
  border-color: #304662;
}
.scan-result.valid {
  background: #0b3320;
  border-color: #18a058;
  color: #cdf8da;
}
.scan-result.invalid {
  background: #3c1119;
  border-color: #e44757;
  color: #ffd6dc;
}
dialog {
  background: #101825;
  color: #eaf1ff;
}
dialog::backdrop { background: rgba(0, 0, 0, .68); }
#toast { background: #07111f; }

.public-mode .template-anniversary .hero-content {
  max-width: 58%;
}
.public-mode .template-anniversary .hero-content h2 {
  max-width: 6.3em;
  font-size: clamp(56px, 9.2vw, 100px);
  line-height: .8;
}
.public-mode .template-anniversary .hero-anniversary-mark {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: start;
  column-gap: 6px;
  row-gap: 2px;
  max-width: 8.5em;
  margin: 0 0 12px;
  color: #e9e4dc;
  font-family: var(--festive-serif);
  line-height: .82;
  text-shadow:
    0 1px 0 rgba(255,255,255,.82),
    0 2px 0 rgba(90, 92, 96, .42),
    0 10px 22px rgba(255,247,237,.6);
}
.public-mode .template-anniversary .hero-anniversary-number {
  font-size: clamp(78px, 15vw, 140px);
  font-weight: 400;
  letter-spacing: -.03em;
  -webkit-text-stroke: .7px rgba(100, 104, 108, .72);
}
.public-mode .template-anniversary .hero-anniversary-suffix {
  margin-top: .18em;
  font-family: var(--festive-script);
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 400;
  color: #f4efe7;
  -webkit-text-stroke: .35px rgba(100, 104, 108, .62);
}
.public-mode .template-anniversary .hero-anniversary-label {
  grid-column: 1 / -1;
  color: #26303d;
  font-family: var(--festive-serif);
  font-size: clamp(20px, 4.2vw, 36px);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255,255,255,.92),
    0 8px 18px rgba(255,247,237,.56);
}
.public-mode .template-anniversary {
  --invite-accent: #d48b2a;
}
.public-mode .template-anniversary .public-intro {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 178, 122, .24), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(89, 179, 196, .22), transparent 34%),
    white;
}
.public-mode .template-anniversary .public-intro span,
.public-mode .template-anniversary .section-kicker {
  color: #c76c41;
}
.public-mode .template-anniversary .rsvp-actions button:not(.danger) {
  background: linear-gradient(135deg, #173b66, #2f8fa3);
  border-color: #2f8fa3;
}
.public-mode .template-anniversary .rsvp-actions .danger {
  background: linear-gradient(135deg, #6b1220, #c24158);
}

.public-mode #publicInvitation .photo-story {
  width: min(94%, 690px);
  margin: 30px auto 18px;
}
.public-mode #publicInvitation .photo-story .section-kicker {
  display: block;
  margin-bottom: 12px;
  text-align: center;
  color: #8b7348;
  font-size: 14px;
}
.public-mode #publicInvitation .moment-carousel {
  min-height: clamp(520px, 88vw, 680px);
  border-radius: 34px 34px 10px 10px;
  border-color: rgba(212, 139, 42, .46);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .22);
}
.public-mode #publicInvitation .moment-slide span {
  display: none;
}
.public-mode #publicInvitation .moment-dots {
  bottom: 22px;
}

.public-mode #publicInvitation {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--invite-page-background, #1e3b53) 86%, #101827), color-mix(in srgb, var(--invite-page-background, #1e3b53) 72%, var(--invite-accent, #d48b2a)) 52%, color-mix(in srgb, var(--invite-panel-background, #fff7ed) 42%, var(--invite-page-background, #1e3b53))),
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 1px, transparent 1px 12px);
}
.public-mode .public-card {
  --silver-blue: #9fb7c8;
  --deep-ink: #101827;
  --champagne: #f8e3bd;
  --blush: #ed9cac;
  --sea: #2f8fa3;
  --festive-script: "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
  --festive-serif: Didot, Baskerville, "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-family: Baskerville, "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  background:
    linear-gradient(90deg, rgba(159, 183, 200, .36), transparent 8%, transparent 92%, rgba(212, 139, 42, .3)),
    linear-gradient(180deg, color-mix(in srgb, var(--invite-background, #fff7ed) 80%, white) 0%, color-mix(in srgb, var(--invite-panel-background, #fff7ed) 82%, var(--invite-accent, #d48b2a)) 48%, color-mix(in srgb, var(--invite-background, #fff7ed) 68%, var(--invite-page-background, #1e3b53)) 100%);
}
.public-language-bar {
  border-bottom: 1px solid rgba(212, 139, 42, .28);
  background:
    linear-gradient(90deg, rgba(16, 24, 39, .92), rgba(28, 86, 107, .82)),
    linear-gradient(180deg, rgba(255,255,255,.18), transparent);
}
.public-language-pill {
  border-color: rgba(248, 227, 189, .48);
  background: rgba(255, 247, 237, .95);
}
.public-mode .public-card .invite-body {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--invite-background, #fff7ed) 76%, transparent), color-mix(in srgb, var(--invite-panel-background, #fff7ed) 66%, transparent) 38%, color-mix(in srgb, var(--invite-page-background, #1e3b53) 16%, transparent)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 1px, transparent 1px 18px);
}
.public-mode .public-intro {
  border: 1px solid rgba(212, 139, 42, .34);
  background:
    linear-gradient(155deg, rgba(255,255,255,.92), color-mix(in srgb, var(--invite-panel-background, #fff7ed) 76%, white) 46%, color-mix(in srgb, var(--invite-background, #fff7ed) 80%, white)),
    linear-gradient(90deg, rgba(232, 140, 165, .18), transparent 46%, rgba(47, 143, 163, .18));
  box-shadow: 0 -16px 34px rgba(16, 24, 39, .2), 0 18px 42px rgba(123, 76, 83, .14);
}
.public-mode .music-player {
  border: 1px solid rgba(248, 227, 189, .48);
  background:
    linear-gradient(135deg, rgba(16, 24, 39, .92), rgba(27, 80, 98, .9)),
    linear-gradient(90deg, rgba(248, 227, 189, .2), transparent);
  box-shadow: 0 18px 38px rgba(16, 24, 39, .24);
}
.public-mode .music-player span,
.public-mode .music-player small,
.public-mode .music-player em {
  color: #f8e3bd;
}
.public-mode .music-player.blocked em {
  color: #ffd8dd;
}
.public-mode .music-player b {
  color: #fff7ed;
}
.ornate-panel {
  border: 1px solid rgba(248, 227, 189, .5);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--invite-panel-background, #fff7ed) 74%, white), color-mix(in srgb, var(--invite-panel-background, #fff7ed) 74%, var(--invite-accent, #d48b2a)) 45%, color-mix(in srgb, var(--invite-background, #fff7ed) 78%, white)),
    linear-gradient(90deg, rgba(232, 140, 165, .16), transparent 50%, rgba(47, 143, 163, .16));
  box-shadow: 0 18px 42px rgba(16, 24, 39, .16), inset 0 1px 0 rgba(255,255,255,.86);
}
.invitation-message {
  background:
    linear-gradient(160deg, rgba(255, 249, 242, .96), rgba(245, 210, 220, .72) 42%, rgba(234, 244, 245, .84)),
    linear-gradient(35deg, rgba(212, 139, 42, .16), transparent 45%);
}
.hosts-panel,
.gift-panel {
  background:
    linear-gradient(150deg, rgba(255, 247, 237, .92), rgba(248, 227, 189, .68) 52%, rgba(255,255,255,.8)),
    linear-gradient(90deg, rgba(47, 143, 163, .12), transparent);
}
.location-panel,
.mass-panel,
.magic-panel {
  background:
    linear-gradient(155deg, rgba(234, 244, 245, .94), rgba(255,255,255,.78) 44%, rgba(248, 227, 189, .62)),
    linear-gradient(90deg, rgba(47, 143, 163, .2), transparent 45%, rgba(232, 140, 165, .14));
}
.dress-panel,
.itinerary-panel,
.rsvp-section {
  background:
    linear-gradient(155deg, rgba(16, 24, 39, .94), rgba(28, 64, 86, .92) 48%, rgba(123, 76, 83, .86)),
    linear-gradient(90deg, rgba(248, 227, 189, .16), transparent);
  color: #fff7ed;
}
.dress-panel h3,
.itinerary-panel h3,
.rsvp-section h3,
.dress-panel strong,
.dress-panel p,
.schedule-body span,
.schedule-body small,
.schedule-body b {
  color: #fff7ed;
}
.dress-panel strong {
  color: #f8e3bd;
}
.calendar-block {
  padding: 22px 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.62), rgba(234,244,245,.6)),
    linear-gradient(90deg, rgba(47,143,163,.16), transparent 42%, rgba(232,140,165,.16));
}
.calendar-block strong {
  color: #142033;
}
.quote-panel {
  width: min(92%, 650px);
  padding: 34px 28px;
  border-radius: 8px;
  border: 1px solid rgba(248, 227, 189, .42);
  background:
    linear-gradient(135deg, rgba(16, 24, 39, .96), rgba(35, 72, 92, .92)),
    linear-gradient(90deg, rgba(248, 227, 189, .18), transparent);
  color: #fff7ed;
  box-shadow: 0 20px 45px rgba(16, 24, 39, .22);
}
.public-mode .hero-content h2,
.public-mode .hosts-panel span,
.public-mode .ornate-panel h3,
.public-mode .countdown-panel > span,
.public-mode .rsvp-section h3 {
  font-family: var(--festive-script);
  font-weight: 500;
}
.public-mode .public-intro h3,
.public-mode .hosts-panel h3,
.public-mode .ticket-preview span {
  font-family: var(--festive-script) !important;
  font-weight: 400;
  letter-spacing: 0;
}
.public-mode .public-intro h3 {
  color: #172033;
  font-size: clamp(54px, 11vw, 92px);
  line-height: .9;
}
.public-mode .public-intro p,
.public-mode .invitation-message p {
  font-family: var(--festive-serif) !important;
  color: #111827;
  font-size: clamp(22px, 4.8vw, 34px);
  font-weight: 500;
  line-height: 1.32;
}
.public-mode .quote-panel {
  font-family: var(--festive-serif) !important;
  font-size: clamp(26px, 5.6vw, 42px);
  font-weight: 700;
  line-height: 1.18;
}
.public-mode .quote-panel small {
  display: block;
  margin-top: 18px;
  font-family: var(--festive-serif);
  font-size: clamp(18px, 3.8vw, 28px);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f8e3bd;
}
.public-mode .hosts-panel span {
  display: block;
  white-space: nowrap;
  font-family: var(--festive-serif) !important;
  font-size: clamp(28px, 7vw, 56px);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a8834a;
}
.rsvp-deadline-note {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 227, 189, .72);
  border-radius: 8px;
  color: #fff7ed;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, .16), rgba(248, 227, 189, .08)),
    rgba(16, 24, 39, .34);
  font-family: var(--festive-serif);
  font-size: clamp(18px, 4.4vw, 30px);
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 8px rgba(16, 24, 39, .82);
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 237, .08), 0 12px 28px rgba(16, 24, 39, .18);
}
.public-mode .ticket-preview p,
.public-mode .rsvp-card p {
  font-family: var(--festive-serif);
}
.mass-panel {
  position: relative;
  overflow: hidden;
}
.mass-panel::before {
  content: "✦";
  position: absolute;
  right: 22px;
  top: 14px;
  color: rgba(212, 139, 42, .36);
  font-size: 42px;
}
.mass-panel strong {
  display: block;
  color: #12233a;
  font-size: clamp(42px, 12vw, 78px);
  line-height: .9;
  margin: 8px 0 10px;
}
.mass-panel b {
  display: block;
  color: #1f5770;
  font-size: clamp(24px, 6vw, 38px);
  margin-bottom: 6px;
}
.mass-panel p {
  color: #253247;
  font-size: clamp(15px, 3.8vw, 20px);
  margin-bottom: 16px;
}
.feature-photo {
  border: 1px solid rgba(248, 227, 189, .5);
  box-shadow:
    inset 0 -76px 64px rgba(16, 24, 39, .28),
    0 24px 46px rgba(16, 24, 39, .26);
}
.countdown-panel {
  border: 1px solid rgba(248, 227, 189, .42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(16, 24, 39, .9), rgba(47, 143, 163, .74)),
    linear-gradient(90deg, rgba(232, 140, 165, .2), transparent);
  box-shadow: 0 16px 36px rgba(16, 24, 39, .2);
}
.countdown-panel b {
  color: #fff7ed;
  background: radial-gradient(circle at 50% 44%, rgba(232, 140, 165, .72) 0 48%, rgba(248, 227, 189, .22) 49% 63%, transparent 64%);
}
.countdown-panel small {
  color: #f8e3bd;
}
.ticket-preview {
  border-color: #f8e3bd;
  background:
    linear-gradient(155deg, rgba(255,247,237,.95), rgba(234,244,245,.82)),
    linear-gradient(90deg, rgba(212,139,42,.12), transparent);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 39, .12);
}
.public-mode .rsvp-card label span,
.public-mode .rsvp-card p {
  color: #fff7ed;
  text-shadow: 0 2px 8px rgba(16, 24, 39, .74);
}
.public-mode .pass-stepper strong {
  color: #f8e3bd;
  text-shadow: 0 3px 10px rgba(16, 24, 39, .86);
}
.public-mode .qr-pass {
  border: 1px solid rgba(248, 227, 189, .38);
  border-radius: 8px;
  background: rgba(255, 247, 237, .88);
  padding: 18px;
}
.soft-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 24px;
  border-radius: 999px;
  color: #fff7ed;
  background: linear-gradient(120deg, rgba(47, 143, 163, .86), rgba(232, 140, 165, .78));
  font-family: var(--festive-serif);
  font-size: clamp(18px, 4vw, 25px);
  font-weight: 700;
  text-decoration: none;
}
.album-link-note {
  display: inline-block;
  width: min(92%, 520px);
  margin: 6px auto 0;
  color: rgba(37, 50, 71, .78);
  font-family: var(--festive-serif);
  font-size: clamp(15px, 3.5vw, 20px);
  line-height: 1.35;
}
.album-upload-link {
  text-decoration: none;
}
.owner-album-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.owner-album-form .wide {
  grid-column: 1 / -1;
}
.album-status-card {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}
.album-status-card.ready {
  border-color: rgba(52, 211, 153, .36);
  background: rgba(20, 184, 166, .08);
}
.album-status-card span,
.album-status-card small {
  color: var(--muted);
}
.album-status-card a,
.album-status-card b {
  color: var(--text);
}
.author-mark {
  width: min(94%, 690px);
  margin: 22px auto 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.author-logo {
  width: 116px;
  height: auto;
  display: block;
  opacity: .96;
}
.public-mode #publicInvitation .photo-story {
  padding: 18px 14px 22px;
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(255,247,237,.62), rgba(234,244,245,.54)),
    linear-gradient(90deg, rgba(47, 143, 163, .12), transparent 50%, rgba(232, 140, 165, .12));
}
.public-mode .itinerary-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 8vw, 64px) clamp(24px, 6vw, 48px) clamp(34px, 7vw, 54px);
  background:
    radial-gradient(circle at 18% 10%, rgba(248, 227, 189, .34), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(234, 244, 245, .72), transparent 26%),
    linear-gradient(160deg, rgba(255, 252, 248, .98), rgba(255, 247, 237, .94) 56%, rgba(234, 244, 245, .86));
  color: #253247;
}
.public-mode .itinerary-panel::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 34px;
  height: 64px;
  border-top: 2px solid rgba(64, 76, 90, .28);
  border-radius: 50%;
  transform: translateY(-34px);
}
.public-mode .itinerary-panel h3 {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 26px;
  color: rgba(53, 63, 76, .86);
  font-family: var(--festive-script) !important;
  font-size: clamp(60px, 13vw, 106px);
  font-weight: 400;
  line-height: .78;
  text-transform: none;
}
.public-mode .itinerary-panel h3::before,
.public-mode .itinerary-panel h3::after {
  content: "";
  position: absolute;
  top: 56%;
  width: clamp(42px, 12vw, 92px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(64, 76, 90, .42));
}
.public-mode .itinerary-panel h3::before {
  right: calc(100% + 16px);
}
.public-mode .itinerary-panel h3::after {
  left: calc(100% + 16px);
  transform: scaleX(-1);
}
.public-mode .itinerary-panel .schedule-list {
  width: min(94%, 560px);
  margin: 0 auto;
  gap: 0;
}
.public-mode .itinerary-panel .schedule-row {
  grid-template-columns: 82px 1fr;
  gap: 22px;
  padding: 0 0 25px;
}
.public-mode .itinerary-panel .schedule-row::before {
  left: 93px;
  top: 4px;
  bottom: -4px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(64, 76, 90, .18), rgba(64, 76, 90, .62), rgba(212, 139, 42, .32));
}
.public-mode .itinerary-panel .schedule-row:last-child::before {
  bottom: 12px;
}
.public-mode .itinerary-panel .schedule-row time {
  color: rgba(64, 76, 90, .68);
  font-family: var(--festive-serif);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 600;
  letter-spacing: .02em;
}
.public-mode .itinerary-panel .schedule-body {
  gap: 5px;
  padding-left: 2px;
}
.public-mode .itinerary-panel .schedule-body b {
  color: #414c5a;
  font-family: var(--festive-serif);
  font-size: clamp(17px, 4.1vw, 26px);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.14;
  text-transform: uppercase;
}
.public-mode .itinerary-panel .schedule-body span,
.public-mode .itinerary-panel .schedule-body small {
  color: rgba(37, 50, 71, .78);
  font-family: var(--festive-serif);
  font-size: clamp(14px, 3.5vw, 20px);
  letter-spacing: .03em;
}
.public-mode .itinerary-panel .ceremony-row .schedule-body {
  grid-template-columns: 1fr 84px;
  align-items: center;
}
.public-mode .itinerary-panel .church-sketch {
  width: 78px;
  height: 84px;
  justify-self: end;
  opacity: .86;
}
.public-mode .itinerary-panel .church-cross,
.public-mode .itinerary-panel .church-cross::before {
  background: #d48b2a;
}
.public-mode .itinerary-panel .church-roof {
  border-left-color: #d48b2a;
  border-top-color: #d48b2a;
}
.public-mode .itinerary-panel .church-building,
.public-mode .itinerary-panel .church-door {
  border-color: #d48b2a;
}

@media (max-width: 660px) {
  .public-language-pill {
    padding: 7px 8px;
  }
  .public-language-pill span {
    display: none;
  }
  .public-language-pill select {
    min-width: 104px;
  }
  .public-mode #publicInvitation .moment-carousel {
    min-height: min(118vw, 620px);
  }
  .public-mode .itinerary-panel {
    padding-inline: 18px;
  }
  .public-mode .itinerary-panel .schedule-row {
    grid-template-columns: 66px 1fr;
    gap: 16px;
  }
  .public-mode .itinerary-panel .schedule-row::before {
    left: 75px;
  }
  .public-mode .itinerary-panel .ceremony-row .schedule-body {
    grid-template-columns: 1fr;
  }
  .public-mode .itinerary-panel .church-sketch {
    justify-self: start;
    margin-top: 8px;
    transform: scale(.88);
    transform-origin: left top;
  }
  .public-mode .template-anniversary .hero-content {
    max-width: 58%;
  }
  .public-mode .template-anniversary .hero-content h2 {
    max-width: 6.1em;
    font-size: clamp(38px, 12vw, 54px);
    line-height: .86;
  }
  .public-mode .template-anniversary .hero-anniversary-mark {
    max-width: 7.4em;
    margin-bottom: 8px;
  }
  .public-mode .template-anniversary .hero-anniversary-number {
    font-size: clamp(58px, 18vw, 82px);
  }
  .public-mode .template-anniversary .hero-anniversary-suffix {
    font-size: clamp(24px, 7vw, 34px);
  }
  .public-mode .template-anniversary .hero-anniversary-label {
    font-size: clamp(14px, 4.4vw, 20px);
    letter-spacing: .08em;
  }
}
