:root {
  --bg: #f7f7fb;
  --panel: #ffffff;
  --text: #16202a;
  --muted: #5f6b77;
  --line: #e3e8ef;
  --accent: #e94e8a;
  --accent-dark: #c43d73;
  --accent-soft: #fff0f6;
  --warn: #fff7e7;
  --warn-line: #f2d285;
  --ok: #ecfdf3;
  --ok-line: #98ddb1;
}

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

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff7fb, var(--bg));
}

img, svg, video { max-width: 100%; }
img:not([class]) { height: auto; }

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

a[href],
button,
.button,
[role="button"],
input[type=submit],
input[type=button],
summary {
  cursor: pointer;
}


code {
  background: #f2f4f8;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  overflow: hidden;
  width: 100%;
}

.nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav a:not(.button),
.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}

.main-nav a:not(.button):hover,
.nav-link:hover {
  color: var(--text);
}

.main-nav .nav-link.is-active,
.desktop-nav .nav-link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.hero,
.section {
  padding: 2rem 0;
}

.section-sm {
  padding-top: 1.25rem;
}

.hero-grid,
.grid {
  display: grid;
  gap: 1rem;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

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

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

.eyebrow,
.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

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

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(233, 78, 138, 0.28);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  box-shadow: none;
}

.button.small {
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.button.secondary {
  background: white;
  color: var(--text);
  border-color: var(--line);
}

.button.secondary:hover {
  background: var(--bg);
  border-color: #c8d3dd;
  box-shadow: 0 4px 12px rgba(20, 32, 42, 0.08);
  transform: translateY(-1px);
}

.button-row,
.button-stack,
.subnav,
.row-head {
  display: flex;
  gap: 0.75rem;
}

.button-stack {
  flex-direction: column;
}

.button-row.compact {
  flex-wrap: wrap;
}

.subnav {
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.subnav a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.subnav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.subnav a.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

.row-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 1.25rem;
  box-shadow: 0 12px 24px rgba(20, 32, 42, 0.04);
}

.stat-card {
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
}

.list-stack {
  display: grid;
  gap: 1rem;
}

.row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.right-copy {
  text-align: right;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

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

.large-form label,
.form-grid label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 0.9rem;
  background: white;
  padding: 0.85rem 0.95rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #b0bbc6;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
}

.invite-card,
.invite-panel,
.invite-view-card {
  background: linear-gradient(180deg, white, #fff9fc);
}

.invite-view-bg {
  background: linear-gradient(180deg, #fff0f8, #fffaf2);
}

.detail-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.subtle-card {
  background: #fff7fb;
  margin-bottom: 0.9rem;
}

.status-box {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
}

.status-box.ok {
  background: var(--ok);
  border-color: var(--ok-line);
}

.status-box.warn {
  background: var(--warn);
  border-color: var(--warn-line);
}

.site-footer {
  padding: 2rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.site-footer ul {
  padding-left: 1rem;
  color: var(--muted);
}

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

@media (max-width: 860px) {
  .hero-grid,
  .cols-3,
  .cols-4,
  .large-form,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .row-head,
  .row-card,
  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Keep nav-row and main-nav horizontal on mobile */
  .nav-row {
    flex-direction: row !important;
    align-items: center !important;
  }

  .main-nav {
    flex-direction: row !important;
    align-items: center !important;
  }

  .right-copy {
    text-align: left;
  }
}

.simple-list {
  margin: 1rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.alert {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
}

.alert.success {
  background: var(--ok);
  border-color: var(--ok-line);
}

.alert.error {
  background: var(--warn);
  border-color: var(--warn-line);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-brand {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.footer-logo {
  height: 28px;
  width: auto;
  display: block;
  opacity: 0.7;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.14s;
}
.footer-links a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

.split-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

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

.compact-stack {
  gap: 0.6rem;
}

.subtle-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: #fff8fb;
}

@media (max-width: 900px) {
  .hero-grid,
  .cols-3,
  .cols-4,
  .split-grid,
  .responsive-2,
  .footer-grid,
  .large-form {
    grid-template-columns: 1fr;
  }

  .nav-row,
  .main-nav,
  .row-card,
  .row-head,
  .button-row {
    flex-wrap: wrap;
  }

  .mobile-stack {
    align-items: flex-start;
  }

  .right-copy {
    text-align: left;
  }
}

.wrap-row {
  flex-wrap: wrap;
}

.button-column {
  display: grid;
  gap: 0.6rem;
}

.compact-column {
  align-self: stretch;
}

.full-width {
  width: 100%;
}

.muted-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.align-top {
  align-items: flex-start;
}

.request-card p {
  margin-bottom: 0.5rem;
}

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

.file-field small,
.template-preview small {
  color: var(--muted);
}

.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.template-option {
  display: block;
  cursor: pointer;
}

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

.template-option.selected .template-preview,
.template-option input:checked + .template-preview {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.14);
}

.template-preview {
  display: grid;
  gap: 0.55rem;
  min-height: 170px;
  border-radius: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--line);
}

.template-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  font-size: 0.8rem;
  font-weight: 700;
}

.template-empty {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.template-confetti {
  background: linear-gradient(135deg, #fce7f3, #fef3c7) !important;
}

.template-spotlight {
  background: linear-gradient(135deg, #dbeafe, #e0e7ff) !important;
}

.template-golden {
  background: linear-gradient(135deg, #fef3c7, #fed7aa) !important;
}

.template-bloom {
  background: linear-gradient(135deg, #fce7f3, #dbeafe) !important;
}

.template-night {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  color: white;
}

.template-night small,
.template-night .template-badge {
  color: rgba(255,255,255,0.88);
}

.template-sunny {
  background: linear-gradient(135deg, #fef9c3, #bae6fd) !important;
}

.current-image-card,
.event-list-card {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.current-event-image,
.event-image-preview,
.event-list-image,
.invite-preview-image,
.invite-hero-image {
  display: block;
  object-fit: cover;
}

.current-event-image {
  width: 120px;
  height: 90px;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  flex-shrink: 0;
  object-fit: cover;
}

@media (max-width: 600px) {
  .current-image-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .current-event-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    max-height: 150px;
  }
}

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

.event-image-preview {
  width: 100%;
  height: 200px;
  border-radius: 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--line);
}

.image-placeholder,
.event-list-placeholder,
.invite-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  color: var(--muted);
  background: #fbfcfe;
}

.image-placeholder {
  min-height: 200px;
}

.event-list-media {
  flex: 0 0 120px;
}

.event-list-main {
  flex: 1;
}

.event-list-image,
.event-list-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 1rem;
}

.event-list-placeholder {
  font-size: 2rem;
  font-weight: 800;
}

.invite-preview-shell {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 1rem;
  align-items: center;
  overflow: hidden;
}

.invite-preview-copy {
  padding: 0.25rem;
}

.invite-preview-media {
  min-height: 280px;
}

.invite-preview-image,
.invite-preview-fallback {
  width: 100%;
  min-height: 220px;
  border-radius: 1.2rem;
}


@media (max-width: 900px) {
  .template-picker-grid,
  .event-overview-grid,
  .invite-preview-shell {
    grid-template-columns: 1fr;
  }

  .event-list-card,
  .current-image-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-list-media {
    flex-basis: auto;
  }
}

.invite-preview-card,
.invite-template-shell {
  border-width: 2px;
}

.invite-template-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.invite-template-name {
  margin: 0;
  color: var(--muted);
}

.template-option .template-preview {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.template-option:hover .template-preview {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(20, 32, 42, 0.08);
}

.template-confetti {
  background:
    radial-gradient(circle at 12% 18%, rgba(233,78,138,0.5) 0 12px, transparent 13px),
    radial-gradient(circle at 84% 20%, rgba(245,158,11,0.55) 0 12px, transparent 13px),
    radial-gradient(circle at 26% 78%, rgba(59,130,246,0.45) 0 12px, transparent 13px),
    radial-gradient(circle at 60% 55%, rgba(233,78,138,0.35) 0 16px, transparent 17px),
    linear-gradient(135deg, #fce7f3, #fef3c7) !important;
}

.template-spotlight {
  background:
    radial-gradient(circle at 25% 25%, rgba(147,197,253,0.5) 0 16px, transparent 17px),
    radial-gradient(circle at 75% 70%, rgba(196,181,253,0.45) 0 14px, transparent 15px),
    linear-gradient(135deg, #dbeafe, #e0e7ff) !important;
}

.template-golden {
  background:
    radial-gradient(circle at 20% 30%, rgba(251,191,36,0.5) 0 14px, transparent 15px),
    radial-gradient(circle at 80% 65%, rgba(251,146,60,0.4) 0 12px, transparent 13px),
    linear-gradient(135deg, #fef3c7, #fed7aa) !important;
}

.template-bloom {
  background:
    radial-gradient(circle at 18% 22%, rgba(244,114,182,0.4) 0 20px, transparent 21px),
    radial-gradient(circle at 78% 28%, rgba(96,165,250,0.35) 0 20px, transparent 21px),
    radial-gradient(circle at 50% 75%, rgba(244,114,182,0.3) 0 16px, transparent 17px),
    linear-gradient(135deg, #fce7f3, #dbeafe) !important;
}

.template-night {
  background:
    radial-gradient(circle at 30% 30%, rgba(148,163,184,0.15) 0 18px, transparent 19px),
    radial-gradient(circle at 70% 70%, rgba(148,163,184,0.1) 0 14px, transparent 15px),
    linear-gradient(135deg, #1e293b, #334155) !important;
}

.template-sunny {
  background:
    radial-gradient(circle at 80% 18%, rgba(250,204,21,0.5) 0 30px, transparent 31px),
    radial-gradient(circle at 20% 75%, rgba(186,230,253,0.4) 0 22px, transparent 23px),
    linear-gradient(135deg, #fef9c3, #bae6fd) !important;
}

.event-image-preview,
.invite-preview-image,
.invite-hero-image {
  object-position: center;
}

.event-image-preview,
.invite-preview-image {
  max-height: 240px;
}

.invite-preview-media,
.invite-preview-image,
.invite-preview-fallback {
  min-height: 220px;
}


.template-note {
  font-size: 0.95rem;
  color: var(--muted);
}


.image-frame {
  background: rgba(255,255,255,0.82);
  padding: 0.7rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 12px 28px rgba(20, 32, 42, 0.08);
}

.hero-frame {
  width: min(100%, 430px);
  margin: 0 auto 1rem;
}

.postcard-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.postcard-image {
  width: 100%;
  height: 190px;
  max-width: 340px;
}

.invite-preview-card,
.invite-view-card,
.invite-panel {
  overflow: hidden;
}

.invite-theme-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  background: rgba(255,255,255,0.48);
  border: 1px solid rgba(255,255,255,0.58);
}

.theme-swatches {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.theme-swatches.right {
  margin-top: 0.35rem;
}

.theme-swatches span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.06);
}

.template-confetti .theme-swatches span:nth-child(1) { background: #e94e8a; }
.template-confetti .theme-swatches span:nth-child(2) { background: #f59e0b; }
.template-confetti .theme-swatches span:nth-child(3) { background: #60a5fa; }
.template-spotlight .theme-swatches span:nth-child(1) { background: #93c5fd; }
.template-spotlight .theme-swatches span:nth-child(2) { background: #c4b5fd; }
.template-spotlight .theme-swatches span:nth-child(3) { background: #ffffff; }
.template-golden .theme-swatches span:nth-child(1) { background: #fbbf24; }
.template-golden .theme-swatches span:nth-child(2) { background: #fb923c; }
.template-golden .theme-swatches span:nth-child(3) { background: #fff7ed; }
.template-bloom .theme-swatches span:nth-child(1) { background: #f9a8d4; }
.template-bloom .theme-swatches span:nth-child(2) { background: #93c5fd; }
.template-bloom .theme-swatches span:nth-child(3) { background: #ffffff; }
.template-night .theme-swatches span:nth-child(1) { background: #111827; }
.template-night .theme-swatches span:nth-child(2) { background: #6b7280; }
.template-night .theme-swatches span:nth-child(3) { background: #f9fafb; }
.template-sunny .theme-swatches span:nth-child(1) { background: #fde68a; }
.template-sunny .theme-swatches span:nth-child(2) { background: #7dd3fc; }
.template-sunny .theme-swatches span:nth-child(3) { background: #ffffff; }

.invite-preview-image,
.invite-hero-image {
  display: block;
  margin: 0 auto;
  object-position: center;
}

.invite-preview-image {
  width: 100%;
  height: 190px;
  max-width: 340px;
  border-radius: 1rem;
}

.invite-hero-image {
  width: 100%;
  max-width: 400px;
  height: 220px;
  max-height: 220px;
  border-radius: 1rem;
}

.invite-template-shell h1 {
  margin-bottom: 0.7rem;
}

@media (max-width: 900px) {
  .invite-theme-banner {
    flex-direction: column;
  }

  .hero-frame {
    width: 100%;
  }

  .invite-preview-image,
  .postcard-image,
  .invite-hero-image {
    max-width: 100%;
    height: 190px;
  }
}


img {
  max-width: 100%;
}

.locked-invite-placeholder {
  margin: 1rem 0 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  border: 1px dashed rgba(22, 32, 42, 0.18);
  background: rgba(255,255,255,0.66);
  text-align: center;
}

.locked-invite-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(20, 32, 42, 0.08);
}

.hero-frame {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 1rem;
}

.invite-hero-image,
.invite-preview-image,
.postcard-image,
.event-image-preview,
.event-list-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.invite-hero-image {
  aspect-ratio: 4 / 3;
  max-height: 220px !important;
  object-fit: cover;
  border-radius: 1rem;
}

.invite-preview-image,
.postcard-image {
  aspect-ratio: 4 / 3;
  max-height: 190px !important;
  object-fit: cover;
  border-radius: 1rem;
}

@media (max-width: 700px) {
  .invite-panel,
  .invite-view-card,
  .invite-preview-card {
    padding: 1rem;
  }

  .hero-frame {
    max-width: 280px;
  }

  .invite-hero-image {
    max-height: 180px !important;
  }

  .invite-preview-image,
  .postcard-image {
    max-height: 160px !important;
  }
}


/* fixpack-4 mobile invite image hardening */
.hero-frame {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 1rem;
}

.invite-hero-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0 auto;
  border-radius: 1rem;
  background: #f5f7fb;
}

.invite-hero-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
}

@media (max-width: 700px) {
  .hero-frame,
  .invite-hero-stage {
    max-width: 260px;
  }
}

@supports (-webkit-touch-callout: none) {
  .invite-hero-stage {
    max-width: 260px;
  }

  .invite-hero-image {
    width: 260px !important;
    height: 195px !important;
    min-width: 260px !important;
    min-height: 195px !important;
    margin: 0 auto;
  }
}

.button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.align-start {
  align-items: flex-start;
}

.compact-grid {
  gap: 0.85rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chips.compact-inline {
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.activity-list {
  display: grid;
  gap: 0.75rem;
}

.activity-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.event-list-card,
.event-list-main,
.event-list-actions {
  display: flex;
}

.event-list-card {
  justify-content: space-between;
  gap: 1rem;
}

.event-list-main {
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.event-list-actions {
  min-width: 220px;
}

.mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: var(--muted);
}

.muted-note,
.muted-copy {
  color: var(--muted);
}

textarea {
  min-height: 120px;
}

.alert {
  border-radius: 1rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .split-grid,
  .event-overview-grid,
  .cols-3,
  .cols-4,
  .large-form {
    grid-template-columns: 1fr;
  }

  .filter-chips.compact-inline {
    justify-content: flex-start;
  }

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

  .event-list-actions {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .container,
  .narrow {
    width: min(100%, calc(100% - 1rem));
  }

  .hero,
  .section {
    padding: 1.25rem 0;
  }

  .card {
    padding: 1rem;
    border-radius: 1rem;
  }

  .button-row,
  .row-head,
  .subnav {
    gap: 0.55rem;
  }

  .button-row.mobile-stack,
  .mobile-stack,
  .row-card.mobile-stack {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .button.secondary,
  button,
  select,
  input,
  textarea {
    width: 100%;
  }

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

  .main-nav {
    gap: 0.6rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .nav-row {
    align-items: center !important;
    padding: 0.5rem 0;
  }

  .brand {
    font-size: 1.15rem;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
}

.helper-links {
  margin-top: 1rem;
}

.button.success {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.button.tertiary {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.guest-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.desktop-nav { display: flex; }

.event-header-card { margin-bottom: 1rem; }
.event-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.event-header-info { flex: 1; min-width: 0; }
.event-header-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.event-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.pill-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid rgba(233,78,138,0.2);
  cursor: pointer;
  transition: background 0.14s;
  white-space: nowrap;
}
.pill-copy-btn:hover { background: rgba(233,78,138,0.15); }
.invite-preview-message {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ── Show page bottom grid: 2-col on desktop ──────────────── */
.show-bottom-grid {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.show-card-full {
  height: 100%;
}
@media (max-width: 800px) {
  .show-bottom-grid { grid-template-columns: 1fr; }
  .event-header-top { flex-direction: column; }
  .event-header-actions { width: 100%; }
}

/* ── Compact guest list ───────────────────────────────────── */
.compact-guest-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.compact-guest-row {
  border-bottom: 1px solid var(--line);
}
.compact-guest-row:last-child { border-bottom: none; }
.compact-guest-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.25rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
}
.compact-guest-summary::-webkit-details-marker { display: none; }
.compact-guest-name {
  flex: 1;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-guest-summary::after {
  content: '›';
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.14s;
  flex-shrink: 0;
}
.compact-guest-row[open] .compact-guest-summary::after { transform: rotate(90deg); }
.compact-guest-detail {
  padding: 0.4rem 0.25rem 0.75rem 1rem;
}
.compact-guest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.compact-guest-actions .icon-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.event-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
}
.event-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.stack-lg {
  display: grid;
  gap: 1rem;
}
.accordion-card {
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(20, 32, 42, 0.04);
  overflow: hidden;
}
.accordion-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.accordion-card summary::-webkit-details-marker { display: none; }
.accordion-card summary h2 { margin-bottom: 0.2rem; }
.accordion-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fffafc;
}
.accordion-card summary::after {
  content: '+';
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  flex-shrink: 0;
}
.accordion-card[open] summary::after { content: '−'; }
.accordion-count {
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--muted);
}
.accordion-body {
  padding: 1rem 1.25rem 1.25rem;
}
.activity-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.activity-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}
.button.danger {
  background: #fff1f2;
  color: #b42318;
  border-color: #fecdd3;
}
.button.tertiary {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--line);
}
.button.success {
  background: #166534;
  border-color: #166534;
  color: white;
}

@media (max-width: 980px) {
  .event-page-grid,
  .event-summary-grid {
    grid-template-columns: 1fr;
  }
}




@media (max-width: 900px) {
  .accordion-card summary {
    align-items: flex-start;
  }
  .accordion-count {
    margin-left: auto;
    padding-right: 0.35rem;
  }
}

.dashboard-event-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.1rem;
}

.dashboard-event-title h3 {
  margin: 0;
}

.event-list-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

/* ── Status badges ─────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.status-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.7;
}

.status-badge.draft {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.published {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.cancelled {
  background: #fff1f2;
  color: #b42318;
}

.status-badge.rsvp-accepted {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.rsvp-declined {
  background: #fff1f2;
  color: #b42318;
}

.status-badge.rsvp-maybe {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge.rsvp-pending {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.attended {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.no-show {
  background: #fff1f2;
  color: #b42318;
}

/* ── Form section dividers ─────────────────────────────── */
.form-section {
  grid-column: 1 / -1;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
}

.form-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.form-section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.form-section-label h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.form-section-label p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}

.form-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Onboarding step cards ─────────────────────────────── */
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.step-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 1.25rem;
  display: grid;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.step-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(233, 78, 138, 0.12);
  transform: translateY(-2px);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
}

.step-card h3 {
  font-size: 1rem;
  margin: 0;
}

.step-card p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 700px) {
  .onboarding-steps {
    grid-template-columns: 1fr;
  }
}

/* ── Guest action strip ────────────────────────────────── */
.guest-card-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.guest-card-info {
  flex: 1;
  min-width: 0;
}

.guest-card-info h3 {
  margin-bottom: 0.25rem;
}

.guest-card-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.15rem 0;
}

.guest-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.guest-passcode {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.guest-passcode-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: inherit;
}

.guest-action-strip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 170px;
  flex-shrink: 0;
}

.guest-action-primary {
  display: grid;
  gap: 0.4rem;
}

.guest-action-row {
  display: flex;
  gap: 0.4rem;
}

.guest-action-row form {
  flex: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
  text-decoration: none;
  width: 100%;
  white-space: nowrap;
}

.icon-btn:hover {
  background: var(--bg);
  border-color: #c8d3dd;
}

.icon-btn.danger {
  color: #b42318;
  border-color: #fecdd3;
  background: #fff1f2;
}

.icon-btn.danger:hover {
  background: #ffe4e6;
}

.icon-btn.success {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.icon-btn.success:hover {
  background: #dcfce7;
}

.icon-btn.accent {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.icon-btn.accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.no-email-note {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 700px) {
  .guest-card-body {
    flex-direction: column;
  }

  .guest-action-strip {
    min-width: 0;
    width: 100%;
  }

  .guest-action-row {
    flex-wrap: wrap;
  }
}

/* ── Chip hover ────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* ── Improved danger / success / tertiary buttons ──────── */
.button.danger {
  background: #fff1f2;
  color: #b42318;
  border-color: #fecdd3;
}

.button.danger:hover {
  background: #ffe4e6;
  border-color: #fca5a5;
  box-shadow: none;
  transform: none;
}

.button.success {
  background: #166534;
  border-color: #166534;
  color: white;
}

.button.success:hover {
  background: #15803d;
  border-color: #15803d;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.25);
  transform: translateY(-1px);
}

.button.tertiary {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--line);
}

.button.tertiary:hover {
  background: #f1f5f9;
  transform: none;
  box-shadow: none;
}

/* ── Add-guest panel ───────────────────────────────────── */
.assign-guest-panel {
  background: var(--accent-soft);
  border: 1.5px solid rgba(233, 78, 138, 0.2);
  border-radius: 1.4rem;
  padding: 1.25rem;
}

.assign-guest-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.assign-guest-panel p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

/* ── Empty state ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.empty-state p {
  max-width: 360px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

/* ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── */

/* ── Mobile navigation ─────────────────────────────────── */
.nav-inline-form {
  margin: 0;
}

.nav-link-button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-link-button:hover {
  color: var(--text);
}

/* Hidden by default — shown only on mobile */
.hamburger-button,
.mobile-menu-wrap {
  display: none;
}

/* Hamburger button */
.hamburger-button {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(20, 32, 42, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.hamburger-button:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(233, 78, 138, 0.15);
}

.hamburger-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.22s cubic-bezier(0.4, 0, 0.2, 1),
              width    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* X state */
.hamburger-button.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-button.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger-button.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Dropdown wrapper */
.mobile-menu-wrap {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* The nav panel itself */
.mobile-menu {
  display: none;
  padding: 0.6rem 0 0.75rem;
}

.mobile-menu.is-open {
  display: block;
  animation: menuSlideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Menu rows */
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.82rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.mobile-menu-item:hover,
.mobile-menu-item:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.mobile-menu-item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.mobile-menu-item.is-active .mobile-menu-icon {
  color: var(--accent);
}

/* Icon badge */
.mobile-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.14s, color 0.14s;
}

.mobile-menu-item:hover .mobile-menu-icon,
.mobile-menu-item:focus-visible .mobile-menu-icon {
  background: #fce4ef;
  color: var(--accent);
}

.mobile-menu-label {
  flex: 1;
}

.mobile-menu-chevron {
  color: var(--line);
  flex-shrink: 0;
  transition: color 0.14s;
}

.mobile-menu-item:hover .mobile-menu-chevron {
  color: var(--accent);
}

/* Log out row */
.mobile-menu-form {
  margin: 0;
}

.mobile-menu-logout {
  margin-top: 0.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  border-radius: 0 0 12px 12px;
  color: var(--muted);
}

.mobile-menu-logout:hover {
  background: #fff4f4;
  color: #c0392b;
}

.mobile-menu-logout:hover .mobile-menu-icon {
  background: #fde8e8;
  color: #c0392b;
}

/* ── Responsive breakpoints ────────────────────────────── */
@media (max-width: 860px) {
  .site-header {
    position: sticky;
  }

  .desktop-nav {
    display: none !important;
  }

  .hamburger-button {
    display: inline-flex;
  }

  .mobile-menu-wrap {
    display: block;
  }

  .mobile-menu {
    display: none;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .nav-row {
    min-height: 60px;
    align-items: center !important;
    justify-content: space-between;
    padding: 0.5rem 0;
  }

  .main-nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

@media (min-width: 861px) {
  .mobile-menu-wrap,
  .hamburger-button {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════

/* ═══════════════════════════════════════════════════════════
   TEMPLATES v2 — visible colors, static patterns, optional animations
   ═══════════════════════════════════════════════════════════ */

/* Shared animation keyframes */
@keyframes floatUp    { 0%,100%{transform:translateY(0)}   50%{transform:translateY(-8px)} }


/* ── Helper: ensure template classes have position relative for ::before ── */
.invite-template-shell, .template-preview {
  position: relative;
  overflow: hidden;
}

/* ── BIRTHDAY: Balloon Party ────────────────────────────── */
.template-balloons {
  background:
    radial-gradient(circle at 10% 18%, #f472b6 0, #f472b6 22px, transparent 22px),
    radial-gradient(circle at 35% 12%, #fb923c 0, #fb923c 18px, transparent 18px),
    radial-gradient(circle at 68% 15%, #60a5fa 0, #60a5fa 20px, transparent 20px),
    radial-gradient(circle at 88% 22%, #a78bfa 0, #a78bfa 16px, transparent 16px),
    radial-gradient(circle at 22% 70%, #34d399 0, #34d399 15px, transparent 15px),
    radial-gradient(circle at 52% 78%, #fbbf24 0, #fbbf24 17px, transparent 17px),
    radial-gradient(circle at 80% 65%, #f472b6 0, #f472b6 13px, transparent 13px),
    linear-gradient(160deg, #93c5fd 0%, #c4b5fd 40%, #fbcfe8 100%) !important;
}
.template-balloons .template-badge { background:rgba(255,255,255,0.8); color:#1d4ed8; }

/* ── BIRTHDAY: Birthday Cake ─────────────────────────────── */
.template-cake {
  background:
    radial-gradient(circle at 15% 20%, #f9a8d4 0, #f9a8d4 18px, transparent 18px),
    radial-gradient(circle at 55% 15%, #fbbf24 0, #fbbf24 12px, transparent 12px),
    radial-gradient(circle at 82% 25%, #c084fc 0, #c084fc 15px, transparent 15px),
    radial-gradient(circle at 30% 72%, #f9a8d4 0, #f9a8d4 14px, transparent 14px),
    radial-gradient(circle at 72% 80%, #fbbf24 0, #fbbf24 11px, transparent 11px),
    linear-gradient(150deg, #fce7f3 0%, #fdf2f8 30%, #fde68a33 100%),
    linear-gradient(to bottom, #fbcfe8 0%, #f9a8d4 100%) !important;
}
.template-cake .template-badge { background:rgba(255,255,255,0.75); color:#9d174d; }

/* ── BIRTHDAY: Sprinkles ─────────────────────────────────── */
.template-sprinkles {
  background:
    repeating-linear-gradient( 45deg, #f472b6 0, #f472b6 4px, transparent 4px, transparent 18px),
    repeating-linear-gradient(-45deg, #fbbf24 0, #fbbf24 4px, transparent 4px, transparent 22px),
    repeating-linear-gradient( 20deg, #60a5fa 0, #60a5fa 4px, transparent 4px, transparent 16px),
    repeating-linear-gradient(-65deg, #34d399 0, #34d399 4px, transparent 4px, transparent 20px),
    linear-gradient(135deg, #fce7f3 0%, #fef3c7 100%) !important;
}
.template-sprinkles .template-badge { background:rgba(255,255,255,0.85); color:#be185d; }

/* ── BIRTHDAY: Princess ──────────────────────────────────── */
.template-princess {
  background:
    radial-gradient(circle at 12% 18%, #d8b4fe 0, #d8b4fe 20px, transparent 20px),
    radial-gradient(circle at 80% 12%, #fbbf24 0, #fbbf24 12px, transparent 12px),
    radial-gradient(circle at 48% 55%, #f9a8d4 0, #f9a8d4 22px, transparent 22px),
    radial-gradient(circle at 88% 68%, #d8b4fe 0, #d8b4fe 14px, transparent 14px),
    radial-gradient(circle at 25% 82%, #fbbf24 0, #fbbf24 10px, transparent 10px),
    linear-gradient(135deg, #e9d5ff 0%, #f5d0fe 40%, #fbcfe8 100%) !important;
}
.template-princess .template-badge { background:rgba(255,255,255,0.7); color:#6b21a8; }

/* ── BIRTHDAY: Monster Trucks ────────────────────────────── */
.template-trucks {
  background:
    repeating-linear-gradient(90deg, rgba(251,146,60,0.25) 0, rgba(251,146,60,0.25) 2px, transparent 2px, transparent 24px),
    repeating-linear-gradient(0deg,  rgba(251,146,60,0.15) 0, rgba(251,146,60,0.15) 2px, transparent 2px, transparent 24px),
    radial-gradient(circle at 20% 30%, rgba(251,146,60,0.3) 0, rgba(251,146,60,0.3) 30px, transparent 30px),
    radial-gradient(circle at 80% 70%, rgba(234,88,12,0.25) 0, rgba(234,88,12,0.25) 25px, transparent 25px),
    linear-gradient(160deg, #1c1917 0%, #292524 100%) !important;
  color: #fafaf9;
}
.template-trucks .template-badge { background:rgba(251,146,60,0.3); color:#fb923c; }
.template-trucks strong { color:#fef3c7; }
.template-trucks small  { color:#a8a29e; }

/* ── BIRTHDAY: Dinosaurs ─────────────────────────────────── */
.template-dinos {
  background:
    radial-gradient(ellipse at 20% 75%, rgba(74,222,128,0.5) 0, rgba(74,222,128,0.5) 45px, transparent 45px),
    radial-gradient(ellipse at 78% 80%, rgba(34,197,94,0.45) 0, rgba(34,197,94,0.45) 55px, transparent 55px),
    radial-gradient(ellipse at 50% 90%, rgba(22,163,74,0.35) 0, rgba(22,163,74,0.35) 35px, transparent 35px),
    radial-gradient(circle at 65% 20%, rgba(74,222,128,0.25) 0, rgba(74,222,128,0.25) 20px, transparent 20px),
    linear-gradient(170deg, #052e16 0%, #14532d 50%, #166534 100%) !important;
  color: #dcfce7;
}
.template-dinos .template-badge { background:rgba(74,222,128,0.25); color:#4ade80; }
.template-dinos strong { color:#bbf7d0; }
.template-dinos small  { color:#86efac; }

/* ── BIRTHDAY: Dolls & Bows ──────────────────────────────── */
.template-dolls {
  background:
    radial-gradient(circle at 15% 20%, #f9a8d4 0, #f9a8d4 18px, transparent 18px),
    radial-gradient(circle at 72% 25%, #f472b6 0, #f472b6 13px, transparent 13px),
    radial-gradient(circle at 40% 68%, #d8b4fe 0, #d8b4fe 16px, transparent 16px),
    radial-gradient(circle at 85% 72%, #f9a8d4 0, #f9a8d4 11px, transparent 11px),
    radial-gradient(circle at 55% 90%, #f472b6 0, #f472b6 9px, transparent 9px),
    linear-gradient(135deg, #fce7f3 0%, #fbcfe8 50%, #f5d0fe 100%) !important;
}
.template-dolls .template-badge { background:rgba(255,255,255,0.7); color:#9d174d; }

/* ── BIRTHDAY: Under the Sea ─────────────────────────────── */
.template-fish {
  background:
    radial-gradient(circle at 18% 85%, rgba(125,211,252,0.9) 0, rgba(125,211,252,0.9) 16px, transparent 16px),
    radial-gradient(circle at 55% 90%, rgba(186,230,253,0.8) 0, rgba(186,230,253,0.8) 12px, transparent 12px),
    radial-gradient(circle at 82% 80%, rgba(56,189,248,0.85) 0, rgba(56,189,248,0.85) 14px, transparent 14px),
    radial-gradient(circle at 30% 50%, rgba(125,211,252,0.4) 0, rgba(125,211,252,0.4) 25px, transparent 25px),
    radial-gradient(circle at 72% 30%, rgba(186,230,253,0.35) 0, rgba(186,230,253,0.35) 30px, transparent 30px),
    linear-gradient(180deg, #0c4a6e 0%, #075985 55%, #0369a1 100%) !important;
  color: #e0f2fe;
}
.template-fish .template-badge { background:rgba(125,211,252,0.3); color:#7dd3fc; }
.template-fish strong { color:#bae6fd; }
.template-fish small  { color:#7dd3fc; }

/* ── BIRTHDAY: Video Games ───────────────────────────────── */
.template-games {
  background:
    radial-gradient(circle at 18% 22%, rgba(139,92,246,0.55) 0, rgba(139,92,246,0.55) 14px, transparent 14px),
    radial-gradient(circle at 72% 18%, rgba(167,139,250,0.5) 0, rgba(167,139,250,0.5) 12px, transparent 12px),
    radial-gradient(circle at 42% 72%, rgba(109,40,217,0.6) 0, rgba(109,40,217,0.6) 16px, transparent 16px),
    radial-gradient(circle at 88% 68%, rgba(139,92,246,0.5) 0, rgba(139,92,246,0.5) 12px, transparent 12px),
    repeating-linear-gradient(90deg, rgba(139,92,246,0.15) 0, rgba(139,92,246,0.15) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(0deg,  rgba(139,92,246,0.15) 0, rgba(139,92,246,0.15) 1px, transparent 1px, transparent 14px),
    linear-gradient(135deg, #0f0f1a 0%, #1e1b4b 100%) !important;
  color: #e9d5ff;
}
.template-games .template-badge { background:rgba(139,92,246,0.3); color:#a78bfa; }
.template-games strong { color:#ddd6fe; }
.template-games small  { color:#a78bfa; }

/* ── BIRTHDAY: Kittens ───────────────────────────────────── */
.template-kittens {
  background:
    radial-gradient(circle at 12% 18%, #c084fc 0, #c084fc 16px, transparent 16px),
    radial-gradient(circle at 75% 15%, #e879f9 0, #e879f9 12px, transparent 12px),
    radial-gradient(circle at 48% 65%, #c084fc 0, #c084fc 18px, transparent 18px),
    radial-gradient(circle at 85% 70%, #d8b4fe 0, #d8b4fe 13px, transparent 13px),
    radial-gradient(circle at 28% 85%, #e879f9 0, #e879f9 10px, transparent 10px),
    linear-gradient(135deg, #e9d5ff 0%, #f3e8ff 50%, #fae8ff 100%) !important;
}
.template-kittens .template-badge { background:rgba(255,255,255,0.7); color:#7e22ce; }

/* ── BIRTHDAY: Puppies ───────────────────────────────────── */
.template-puppies {
  background:
    radial-gradient(circle at 15% 22%, #d97706 0, #d97706 16px, transparent 16px),
    radial-gradient(circle at 72% 18%, #b45309 0, #b45309 12px, transparent 12px),
    radial-gradient(circle at 44% 70%, #d97706 0, #d97706 18px, transparent 18px),
    radial-gradient(circle at 85% 65%, #92400e 0, #92400e 11px, transparent 11px),
    radial-gradient(circle at 30% 88%, #b45309 0, #b45309 9px, transparent 9px),
    linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fed7aa 100%) !important;
}
.template-puppies .template-badge { background:rgba(255,255,255,0.7); color:#92400e; }

/* ── WEDDING: Chapel ─────────────────────────────────────── */
.template-chapel {
  background:
    linear-gradient(rgba(212,175,55,0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.2) 1px, transparent 1px),
    radial-gradient(circle at 50% 5%, rgba(212,175,55,0.4) 0, rgba(212,175,55,0.4) 35px, transparent 35px),
    radial-gradient(circle at 20% 80%, rgba(212,175,55,0.25) 0, rgba(212,175,55,0.25) 20px, transparent 20px),
    radial-gradient(circle at 80% 85%, rgba(212,175,55,0.25) 0, rgba(212,175,55,0.25) 20px, transparent 20px),
    linear-gradient(170deg, #fef9c3 0%, #fef08a55 45%, #fef3c7 100%) !important;
  background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%, 100% 100%, 100% 100% !important;
}
.template-chapel .template-badge { background:rgba(255,255,255,0.7); color:#92400e; }

/* ── WEDDING: Wedding Bells ──────────────────────────────── */
.template-bells {
  background:
    radial-gradient(circle at 18% 18%, #d4af37 0, #d4af37 15px, transparent 15px),
    radial-gradient(circle at 78% 15%, #fbbf24 0, #fbbf24 12px, transparent 12px),
    radial-gradient(circle at 48% 62%, #d4af37 0, #d4af37 18px, transparent 18px),
    radial-gradient(circle at 85% 68%, #fbbf24 0, #fbbf24 10px, transparent 10px),
    radial-gradient(circle at 30% 85%, #d4af37 0, #d4af37 8px, transparent 8px),
    linear-gradient(135deg, #fef9c3 0%, #fde68a 50%, #fef3c7 100%) !important;
}
.template-bells .template-badge { background:rgba(255,255,255,0.7); color:#92400e; }

/* ── WEDDING: Floating Hearts ────────────────────────────── */
.template-hearts {
  background:
    radial-gradient(circle at 12% 80%, #fb7185 0, #fb7185 16px, transparent 16px),
    radial-gradient(circle at 48% 88%, #fda4af 0, #fda4af 12px, transparent 12px),
    radial-gradient(circle at 80% 82%, #f43f5e 0, #f43f5e 14px, transparent 14px),
    radial-gradient(circle at 30% 40%, rgba(251,113,133,0.6) 0, rgba(251,113,133,0.6) 22px, transparent 22px),
    radial-gradient(circle at 72% 30%, rgba(253,164,175,0.5) 0, rgba(253,164,175,0.5) 28px, transparent 28px),
    linear-gradient(150deg, #ffe4e6 0%, #fecdd3 40%, #fbcfe8 100%) !important;
}
.template-hearts .template-badge { background:rgba(255,255,255,0.7); color:#be123c; }

/* ── WEDDING: Champagne Celebration ──────────────────────── */
.template-champagne {
  background:
    radial-gradient(circle at 18% 82%, rgba(212,175,55,0.85) 0, rgba(212,175,55,0.85) 14px, transparent 14px),
    radial-gradient(circle at 52% 90%, rgba(251,191,36,0.75) 0, rgba(251,191,36,0.75) 10px, transparent 10px),
    radial-gradient(circle at 82% 85%, rgba(245,158,11,0.8) 0, rgba(245,158,11,0.8) 12px, transparent 12px),
    radial-gradient(circle at 35% 45%, rgba(212,175,55,0.35) 0, rgba(212,175,55,0.35) 25px, transparent 25px),
    radial-gradient(circle at 70% 25%, rgba(251,191,36,0.3) 0, rgba(251,191,36,0.3) 32px, transparent 32px),
    linear-gradient(160deg, #fef3c7 0%, #fde68a 50%, #fef9c3 100%) !important;
}
.template-champagne .template-badge { background:rgba(255,255,255,0.7); color:#92400e; }

/* ── WEDDING: Toasting Glasses ───────────────────────────── */
.template-toast {
  background:
    radial-gradient(circle at 15% 22%, rgba(212,175,55,0.6) 0, rgba(212,175,55,0.6) 14px, transparent 14px),
    radial-gradient(circle at 78% 18%, rgba(251,191,36,0.55) 0, rgba(251,191,36,0.55) 12px, transparent 12px),
    radial-gradient(circle at 45% 68%, rgba(212,175,55,0.55) 0, rgba(212,175,55,0.55) 16px, transparent 16px),
    radial-gradient(circle at 85% 72%, rgba(251,191,36,0.45) 0, rgba(251,191,36,0.45) 12px, transparent 12px),
    linear-gradient(135deg, #1a1208 0%, #2d1f0a 50%, #1a1208 100%) !important;
  color: #fef9c3;
}
.template-toast .template-badge { background:rgba(212,175,55,0.3); color:#fbbf24; }
.template-toast strong { color:#fef08a; }
.template-toast small  { color:#fbbf24; }

/* ── Theme swatches for new templates ────────────────────── */
.template-balloons  .theme-swatches span:nth-child(1){background:#f472b6}
.template-balloons  .theme-swatches span:nth-child(2){background:#fb923c}
.template-balloons  .theme-swatches span:nth-child(3){background:#60a5fa}
.template-cake      .theme-swatches span:nth-child(1){background:#f9a8d4}
.template-cake      .theme-swatches span:nth-child(2){background:#fbbf24}
.template-cake      .theme-swatches span:nth-child(3){background:#c084fc}
.template-sprinkles .theme-swatches span:nth-child(1){background:#f472b6}
.template-sprinkles .theme-swatches span:nth-child(2){background:#60a5fa}
.template-sprinkles .theme-swatches span:nth-child(3){background:#34d399}
.template-princess  .theme-swatches span:nth-child(1){background:#d8b4fe}
.template-princess  .theme-swatches span:nth-child(2){background:#fbbf24}
.template-princess  .theme-swatches span:nth-child(3){background:#f9a8d4}
.template-trucks    .theme-swatches span:nth-child(1){background:#fb923c}
.template-trucks    .theme-swatches span:nth-child(2){background:#44403c}
.template-trucks    .theme-swatches span:nth-child(3){background:#fef3c7}
.template-dinos     .theme-swatches span:nth-child(1){background:#4ade80}
.template-dinos     .theme-swatches span:nth-child(2){background:#166534}
.template-dinos     .theme-swatches span:nth-child(3){background:#bbf7d0}
.template-dolls     .theme-swatches span:nth-child(1){background:#f9a8d4}
.template-dolls     .theme-swatches span:nth-child(2){background:#f472b6}
.template-dolls     .theme-swatches span:nth-child(3){background:#d8b4fe}
.template-fish      .theme-swatches span:nth-child(1){background:#38bdf8}
.template-fish      .theme-swatches span:nth-child(2){background:#0369a1}
.template-fish      .theme-swatches span:nth-child(3){background:#7dd3fc}
.template-games     .theme-swatches span:nth-child(1){background:#8b5cf6}
.template-games     .theme-swatches span:nth-child(2){background:#0f0f1a}
.template-games     .theme-swatches span:nth-child(3){background:#c4b5fd}
.template-kittens   .theme-swatches span:nth-child(1){background:#c084fc}
.template-kittens   .theme-swatches span:nth-child(2){background:#e879f9}
.template-kittens   .theme-swatches span:nth-child(3){background:#e9d5ff}
.template-puppies   .theme-swatches span:nth-child(1){background:#d97706}
.template-puppies   .theme-swatches span:nth-child(2){background:#fde68a}
.template-puppies   .theme-swatches span:nth-child(3){background:#92400e}
.template-chapel    .theme-swatches span:nth-child(1){background:#d4af37}
.template-chapel    .theme-swatches span:nth-child(2){background:#fef9c3}
.template-chapel    .theme-swatches span:nth-child(3){background:#92400e}
.template-bells     .theme-swatches span:nth-child(1){background:#d4af37}
.template-bells     .theme-swatches span:nth-child(2){background:#fbbf24}
.template-bells     .theme-swatches span:nth-child(3){background:#fde68a}
.template-hearts    .theme-swatches span:nth-child(1){background:#f43f5e}
.template-hearts    .theme-swatches span:nth-child(2){background:#fb7185}
.template-hearts    .theme-swatches span:nth-child(3){background:#fecdd3}
.template-champagne .theme-swatches span:nth-child(1){background:#d4af37}
.template-champagne .theme-swatches span:nth-child(2){background:#fbbf24}
.template-champagne .theme-swatches span:nth-child(3){background:#fde68a}
.template-toast     .theme-swatches span:nth-child(1){background:#d4af37}
.template-toast     .theme-swatches span:nth-child(2){background:#1a1208}
.template-toast     .theme-swatches span:nth-child(3){background:#fef9c3}

/* ── Template picker layout ──────────────────────────────── */
.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.template-group-label {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
}
.template-group-label:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.template-preview {
  display: grid;
  gap: 0.45rem;
  min-height: 120px;
  border-radius: 1.15rem;
  padding: 0.85rem;
  border: 1.5px solid var(--line);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  overflow: hidden;
}
.template-preview strong { font-size: 0.82rem; line-height: 1.3; }
.template-preview small  { font-size: 0.72rem; line-height: 1.3; opacity: 0.85; }
.template-option:hover .template-preview {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(20,32,42,0.10);
}
.template-option.selected .template-preview,
.template-option input:checked + .template-preview {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233,78,138,0.15);
}
@media (max-width: 600px) {
  .template-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ═══════════════════════════════════════════════════════════
   PHOTO MASK SYSTEM v2 — compact picker, prominent preview
   ═══════════════════════════════════════════════════════════ */

.mask-defs-svg {
  position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none;
}

/* ── Mask section wrapper ─────────────────────────────────── */
.mask-section {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 0.5rem;
}

/* ── Overall layout: single column, everything stacks ──────── */
.mask-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}

/* ── Shape carousel: horizontal scrollable row ─────────────── */
.mask-shape-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.mask-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
  flex-shrink: 0;
}
.mask-option input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.mask-shape-icon {
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
.mask-shape-icon svg { width: 100%; height: 100%; }
.mask-option:hover .mask-shape-icon { border-color: var(--accent); }
.mask-option input:checked + .mask-shape-icon {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233,78,138,0.15);
  background: var(--accent-soft);
}
.mask-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
  max-width: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Preview box: centered square ──────────────────────────── */
.mask-preview-box {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  background: #e8edf2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  position: relative;
  margin: 0 auto;
}
.mask-preview-box img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: center center;
}
.mask-preview-placeholder {
  text-align: center; color: var(--muted); padding: 0.75rem; font-size: 0.78rem;
}
.mask-preview-placeholder div { font-size: 1.6rem; margin-bottom: 0.3rem; }

/* ── Compact controls row: XY pad + rotation + zoom ────────── */
.mask-controls {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

/* XY position pad */
.mask-xy-pad {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  background: var(--panel, #f8fafc);
  border: 1.5px solid var(--line);
  position: relative;
  cursor: crosshair;
  touch-action: none;
  flex-shrink: 0;
}
.mask-xy-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: none;
}
.mask-xy-crosshair {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.mask-xy-crosshair::before,
.mask-xy-crosshair::after {
  content: '';
  position: absolute;
  background: var(--line);
}
.mask-xy-crosshair::before {
  top: 50%; left: 8px; right: 8px; height: 1px;
}
.mask-xy-crosshair::after {
  left: 50%; top: 8px; bottom: 8px; width: 1px;
}
.mask-xy-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
}

/* Right side: rotation + zoom stacked vertically */
.mask-dials {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}
.mask-dial-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.mask-dial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mask-dial-header span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.mask-dial-header em {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  font-style: normal;
  min-width: 3em;
  text-align: right;
}
.mask-dial-group input[type="range"] {
  width: 100%;
  height: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--accent);
}
.mask-reset-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.mask-reset-btn:hover {
  background: var(--line);
  color: var(--text);
}

/* ── Desktop: widen, put controls beside preview ───────────── */
@media (min-width: 701px) {
  .mask-editor {
    max-width: 100%;
  }
  .mask-preview-controls {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
  }
  .mask-preview-box {
    max-width: 220px;
    margin: 0;
  }
  .mask-controls-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Masked photo on invitation view */
.invite-photo-frame {
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
}
.invite-masked-photo {
  width: 280px; height: 280px;
  position: relative; overflow: hidden;
}
.invite-masked-photo img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; transform-origin: center center;
}
@media (max-width: 500px) {
  .invite-masked-photo { width: 220px; height: 220px; }
}

/* ══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════ */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.admin-nav-link {
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}
.admin-nav-link:hover { background: var(--accent-soft); color: var(--accent-dark); }
.admin-nav-link.active { background: var(--accent); color: white; }

/* ══════════════════════════════════════════════════════════════
   VENUE DIRECTORY
   ══════════════════════════════════════════════════════════════ */
.venue-search-card { padding: 1rem; }
.venue-search-form { width: 100%; }
.venue-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}
.venue-search-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.venue-search-field span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.venue-search-field-wide { flex: 1; min-width: 180px; }

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.venue-card {
  text-decoration: none;
  color: var(--text);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: transform 0.14s, box-shadow 0.14s;
}
.venue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20,32,42,0.08);
}
.venue-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.venue-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #f1f5f9;
}
.venue-card-body h3 { margin: 0; font-size: 0.95rem; }

.venue-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 800px) {
  .venue-detail-grid { grid-template-columns: 1fr; }
  .venue-search-row { flex-direction: column; }
  .venue-search-field-wide { min-width: 100%; }
}

/* ── Venue picker in event forms ───────────────────────────── */
.venue-picker { margin-bottom: 0.5rem; }
.venue-picker-results {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.35rem;
  background: white;
}
.venue-picker-results:empty { display: none; }
.venue-picker-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}
.venue-picker-item:last-child { border-bottom: none; }
.venue-picker-item:hover { background: var(--accent-soft); }
.venue-picker-item strong { display: block; }
.venue-picker-item span { font-size: 0.78rem; color: var(--muted); }
.venue-selected-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--accent-soft);
  margin-top: 0.35rem;
}
.venue-selected-card strong { font-size: 0.88rem; }
.venue-selected-card span { font-size: 0.78rem; color: var(--muted); }
.venue-clear-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ── Mobile overflow containment ──────────────────────────── */
.narrow.card {
  overflow: hidden;
  max-width: 100%;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.form-grid .full-span,
.form-grid label {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.venue-picker {
  overflow: hidden;
  max-width: 100%;
}
.venue-picker .venue-search-row {
  flex-wrap: wrap;
}
.venue-selected-card {
  max-width: 100%;
  overflow: hidden;
  word-break: break-word;
}
.mask-editor {
  max-width: 100%;
  overflow: hidden;
}
.mask-shape-row {
  max-width: 100%;
}
.form-section-label {
  max-width: 100%;
  overflow: hidden;
  word-break: break-word;
}
.template-picker-grid {
  max-width: 100%;
  overflow: hidden;
}
.template-preview {
  overflow: hidden;
  word-break: break-word;
}
@media (max-width: 760px) {
  body, main, .container { overflow-x: hidden; }
  .narrow { width: calc(100% - 1rem); }
  .narrow.card { padding: 0.85rem; overflow: hidden; }
  .large-form { grid-template-columns: 1fr !important; }
  .form-grid { gap: 0.65rem; }
  .venue-picker .venue-search-row { flex-direction: column; }
  .venue-picker .venue-search-field { width: 100%; min-width: 0; }
  .template-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  .template-preview { min-height: 100px; padding: 0.7rem; }
  .mask-controls { flex-direction: column; }
  .mask-xy-pad { width: 100%; max-width: 140px; }
  .form-section-label { flex-wrap: wrap; }
  .brand-logo { height: 28px; }
  .nav-row { gap: 0.5rem; padding: 0 0.25rem; }
  .main-nav { gap: 0.5rem; }
}

/* ── Venue disclaimer modal ───────────────────────────────── */
.venue-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.venue-modal {
  background: white;
  border-radius: 1.25rem;
  padding: 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}

/* ── User type selector on signup ─────────────────────────── */
.user-type-option {
  cursor: pointer;
  flex: 1;
  min-width: 180px;
}
.user-type-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.user-type-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
}
.user-type-card strong { font-size: 0.92rem; }
.user-type-card span { font-size: 0.78rem; color: var(--muted); }
.user-type-option input:checked + .user-type-card {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(233,78,138,0.12);
}
.user-type-option:hover .user-type-card { border-color: var(--accent); }


/* ══════════════════════════════════════════════════════════════
   MOBILE OVERFLOW FIXES — authoritative final rules
   ══════════════════════════════════════════════════════════════ */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

/* Do not let hidden radios inherit global input width */
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.template-option,
.mask-option {
  position: relative;
  min-width: 0;
}

.template-option {
  overflow: hidden;
}

.template-option input[type="radio"],
.mask-option input[type="radio"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Carousel must scroll inside its own viewport, not the page */
.mask-shape-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mask-shape-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pinch-zoom;
}

.mask-shape-viewport::-webkit-scrollbar {
  display: none;
}

.mask-shape-row {
  display: inline-flex;
  width: max-content;
  min-width: 100%;
  max-width: none;
  gap: 0.4rem;
  padding-bottom: 4px;
  overflow: visible;
  scroll-snap-type: x proximity;
}

.mask-option {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.mask-editor,
.mask-preview-controls,
.mask-controls-wrap,
.mask-controls,
.mask-dials,
.mask-dial-group,
.form-grid,
.form-section,
.full-span,
.template-picker-grid,
.venue-picker,
.venue-search-row,
.venue-search-field,
.venue-selected-card,
.form-section-label,
.container,
.narrow,
.narrow.card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.mask-dial-group input[type="range"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* Final template grid rules; keep two columns on normal phones */
.template-picker-grid {
  overflow: visible;
}

@media (max-width: 760px) {
  body, main, .section, .container {
    overflow-x: clip;
  }

  .narrow {
    width: min(100%, calc(100% - 1rem));
  }

  .large-form {
    grid-template-columns: 1fr !important;
  }

  .template-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .mask-controls {
    flex-direction: column;
  }

  .venue-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .venue-search-field,
  .venue-search-field-wide,
  .venue-selected-card {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .template-picker-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ══════════════════════════════════════════════════════════════
   POLISH PATCHES — mobile controls, groups, homepage refresh
   ══════════════════════════════════════════════════════════════ */
.mask-preview-controls {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.mask-controls-wrap {
  width: min(100%, 360px);
  margin: 0 auto;
}

.mask-controls {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(118px, 126px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.mask-xy-pad {
  margin: 0 auto;
}

.mask-dials {
  width: 100%;
}

.mask-reset-btn {
  align-self: flex-start;
}

.preview-action-row form {
  margin: 0;
}

.groups-list-stack {
  margin-bottom: 1rem;
}

.group-inline-form {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.group-row-card strong a {
  color: var(--text);
  text-decoration: none;
}

.group-row-card strong a:hover {
  color: var(--accent);
}

.home-page {
  background:
    radial-gradient(circle at top left, rgba(251, 207, 232, 0.55), transparent 28%),
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.55), transparent 24%),
    linear-gradient(180deg, #fff8fb 0%, #ffffff 42%, #fff7ed 100%);
}

.home-hero {
  padding-top: 2.75rem;
  padding-bottom: 2rem;
}

.home-hero-grid {
  align-items: center;
  gap: 1.5rem;
}

.home-hero-copy h1 {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-cta-row {
  margin-bottom: 1rem;
}

.home-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(233,78,138,0.12);
  box-shadow: 0 10px 24px rgba(20,32,42,0.05);
  font-weight: 700;
}

.hero-showcase-card {
  border-radius: 2rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(233,78,138,0.14);
  box-shadow: 0 24px 60px rgba(233,78,138,0.16);
}

.hero-showcase-top,
.section-head.center {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.section-head.center {
  justify-content: center;
  flex-direction: column;
  text-align: center;
  margin-bottom: 1.25rem;
}

.hero-showcase-grid,
.home-screens-grid,
.feature-band-grid {
  display: grid;
  gap: 1rem;
}

.hero-showcase-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.app-shot,
.phone-shot {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
}

.app-shot {
  min-height: 260px;
  background: linear-gradient(180deg, #ffffff, #fff1f7);
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.app-shot-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.7rem 0.8rem;
}

.app-shot-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #f9a8d4;
}

.app-shot-body {
  padding: 0 0.95rem 1rem;
}

.app-shot-badge,
.app-shot-pill-row span,
.screenshot-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255,255,255,0.82);
  color: var(--accent-dark);
}

.app-shot-title,
.mini-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 0.55rem;
}

.app-shot-photo {
  width: 100%;
  aspect-ratio: 1;
  margin-top: 0.8rem;
  background: linear-gradient(135deg, #f9a8d4, #bfdbfe);
}

.app-shot-photo.heart {
  clip-path: path('M50 90 C14 64 0 46 0 28 C0 11 13 0 28 0 C39 0 47 8 50 17 C53 8 61 0 72 0 C87 0 100 11 100 28 C100 46 86 64 50 90 Z');
}

.app-shot-lines {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.app-shot-lines span,
.mini-block,
.guest-pill,
.mini-row span {
  display: block;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
}

.app-shot-lines span:nth-child(1) { height: 0.65rem; width: 70%; }
.app-shot-lines span:nth-child(2) { height: 0.65rem; width: 88%; }
.app-shot-lines span:nth-child(3) { height: 0.65rem; width: 60%; }

.app-shot-pill-row {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.app-shot-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(148,163,184,0.14);
  margin-bottom: 0.55rem;
}

.app-shot-list-row em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.home-step-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.home-step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent-dark);
  background: linear-gradient(135deg, #fbcfe8, #fef3c7);
  margin-bottom: 1rem;
}

.home-screens-section {
  padding-top: 0.5rem;
}

.screenshot-card {
  background: rgba(255,255,255,0.88);
}

.phone-shot {
  width: min(100%, 235px);
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  padding: 0.75rem;
  box-shadow: 0 20px 50px rgba(15,23,42,0.2);
}

.phone-notch {
  width: 38%;
  height: 0.8rem;
  margin: 0 auto 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

.phone-content {
  height: calc(100% - 1.5rem);
  border-radius: 1.35rem;
  padding: 0.9rem;
  background: linear-gradient(180deg, #fff7fb, #ffffff);
}

.mini-block {
  height: 0.8rem;
  margin-top: 0.85rem;
}

.mini-block.wide {
  height: 5.6rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #f9a8d4, #fef3c7);
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.mini-row span {
  height: 2.7rem;
  border-radius: 1rem;
}

.mini-button {
  display: grid;
  place-items: center;
  height: 2.9rem;
  margin-top: 0.9rem;
  border-radius: 1rem;
  font-weight: 800;
  color: white;
  background: var(--accent);
}

.mini-button.ghost {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.mini-pill-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mini-pill-row span {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #fff1f7;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.guest-pill {
  height: 3rem;
  margin-top: 0.7rem;
  border-radius: 1rem;
}

.guest-pill.short {
  width: 75%;
}

.invite-orb {
  width: 100%;
  aspect-ratio: 1;
  margin-top: 0.8rem;
  border-radius: 1.5rem;
  background: radial-gradient(circle at 35% 30%, #fff 0, #fff 10%, transparent 11%), linear-gradient(135deg, #f472b6, #c4b5fd 60%, #93c5fd);
}

.home-feature-band {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

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

.feature-band-card {
  padding: 1rem 1.15rem;
  border-radius: 1.3rem;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148,163,184,0.16);
  box-shadow: 0 12px 30px rgba(20,32,42,0.05);
}

.feature-band-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

@media (max-width: 800px) {
  .preview-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .preview-action-row > .button,
  .preview-action-row > form,
  .preview-action-row > form > .button {
    width: 100%;
  }

  .hero-showcase-grid,
  .home-screens-grid,
  .feature-band-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .mask-preview-controls {
    justify-items: stretch;
  }

  .mask-preview-box {
    margin: 0 auto;
  }

  .mask-controls-wrap {
    width: min(100%, 340px);
  }

  .home-hero {
    padding-top: 2rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.4rem, 14vw, 3.5rem);
  }

  .hero-showcase-card,
  .home-step-card,
  .screenshot-card {
    border-radius: 1.4rem;
  }
}

@media (max-width: 520px) {
  .preview-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mask-controls {
    grid-template-columns: minmax(108px, 118px) minmax(0, 1fr);
    gap: 0.75rem;
  }

  .mask-xy-pad {
    width: 104px;
    height: 104px;
  }

  .hero-showcase-card {
    padding: 1rem;
  }

  .home-chip-row {
    gap: 0.45rem;
  }

  .home-chip {
    font-size: 0.86rem;
  }
}

/* ── Build 24 polish + privacy/analytics ───────────────────── */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.group-name-only-form {
  grid-template-columns: minmax(0, 1fr);
}

.group-name-only-form .button,
.group-name-only-form .button-row {
  justify-self: start;
}

.event-assign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.assign-guest-panel {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fffafc;
}

.assign-group-panel {
  background: #fff8fb;
}

.event-assign-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.facebook-share-btn {
  background: linear-gradient(135deg, #ff79ad 0%, #e94e8a 100%);
  color: white;
  border: none;
}

.facebook-share-btn:hover {
  color: white;
  filter: brightness(0.98);
}

.privacy-card {
  display: grid;
  gap: 1rem;
}

.privacy-action-grid {
  align-items: stretch;
}

.privacy-choice-card,
.privacy-delete-card,
.privacy-status-box {
  display: grid;
  gap: 0.65rem;
}

.privacy-copy ul {
  margin: 0.75rem 0 1rem 1.1rem;
}

.analytics-card {
  display: grid;
  gap: 0.9rem;
}

.analytics-list {
  display: grid;
  gap: 0.65rem;
}

.analytics-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fffafc;
}

.analytics-row.stacked {
  grid-template-columns: minmax(0, 1fr) auto;
}

.analytics-row strong {
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.analytics-table th,
.analytics-table td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.analytics-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-footer {
  position: relative;
}

.footer-shell {
  align-items: flex-start;
  gap: 1rem 2rem;
}

.footer-brand-block {
  display: grid;
  gap: 0.8rem;
  max-width: 460px;
}

.footer-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.83rem;
  border: 1px solid rgba(233, 78, 138, 0.18);
  background: linear-gradient(135deg, rgba(255, 232, 241, 0.92), rgba(255, 245, 250, 0.95));
  color: #cf3d7d;
  box-shadow: 0 10px 24px rgba(233, 78, 138, 0.08);
}

.footer-social svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.footer-social:hover {
  color: #b72e6b;
  transform: translateY(-1px);
}

.footer-links {
  display: grid;
  gap: 0.65rem;
}

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
}

.consent-banner.is-hidden {
  display: none;
}

.consent-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(233, 78, 138, 0.2);
  background: rgba(255, 250, 252, 0.97);
  box-shadow: 0 20px 50px rgba(20, 32, 42, 0.16);
  backdrop-filter: blur(10px);
}

.consent-banner-inner p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.consent-link {
  align-self: center;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 860px) {
  .event-assign-grid,
  .privacy-action-grid {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .consent-banner-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .preview-action-row {
    display: grid;
    gap: 0.6rem;
    width: 100%;
  }

  .preview-action-row.two-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-action-row.three-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-action-row.three-actions > :first-child {
    grid-column: 1 / -1;
  }

  .preview-action-row > *,
  .preview-action-row > form,
  .preview-action-row > form > .button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .event-assign-form {
    grid-template-columns: 1fr;
  }

  .footer-social span {
    display: none;
  }

  .footer-social {
    padding: 0.65rem;
  }

  .analytics-table {
    min-width: 620px;
  }
}


/* ── Build 25 footer + analytics visuals ─────────────────── */
.footer-shell-centered {
  justify-content: center;
}

.footer-brand-block-centered {
  max-width: 760px;
  width: 100%;
  justify-items: center;
  text-align: center;
}

.footer-links-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.2rem;
  width: 100%;
  padding-top: 0.2rem;
}

.footer-links-inline a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  text-decoration: none;
  font-weight: 700;
}

.analytics-page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.analytics-subtitle {
  margin: 0.35rem 0 0;
  max-width: 58ch;
}

.analytics-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: #fff3f8;
  border: 1px solid rgba(233, 78, 138, 0.16);
  color: #b23d72;
  font-weight: 700;
}

.analytics-filter-card {
  margin-top: 1rem;
}

.analytics-filter-form {
  display: grid;
  gap: 1rem;
}

.analytics-range-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.analytics-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #b23d72;
  background: #fff7fa;
  border: 1px solid rgba(233, 78, 138, 0.16);
}

.analytics-pill.is-active,
.analytics-pill:hover {
  background: linear-gradient(135deg, rgba(233, 78, 138, 0.16), rgba(255, 244, 248, 0.98));
  color: #8f2a5a;
}

.analytics-filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.9rem;
  align-items: end;
}

.analytics-filter-fields label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.analytics-filter-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.analytics-stat-card {
  background: linear-gradient(180deg, #fffafd, #fff5f9);
}

.analytics-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.analytics-card-head h2,
.analytics-card-head p {
  margin: 0;
}

.analytics-card-tall {
  min-height: 100%;
}

.analytics-series-chart {
  height: 240px;
  display: flex;
  align-items: end;
  gap: 0.45rem;
  padding: 0.75rem 0.35rem 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fffafd, #fff7fa);
  border: 1px solid rgba(233, 78, 138, 0.12);
}

.analytics-series-bar-group {
  min-width: 1.65rem;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.12rem;
  align-items: end;
  position: relative;
}

.analytics-series-bar {
  width: 100%;
  border-radius: 999px 999px 0 0;
  min-height: 0.4rem;
}

.analytics-series-bar.pageviews,
.analytics-dot.pageviews {
  background: linear-gradient(180deg, #ea4e8a, #cf3d7d);
}

.analytics-series-bar.interactions,
.analytics-dot.interactions {
  background: linear-gradient(180deg, #ff9fc5, #ea6ea2);
}

.analytics-series-bar.visitors,
.analytics-dot.visitors {
  background: linear-gradient(180deg, #f7bfd7, #ef9cbc);
}

.analytics-series-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.2rem;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--muted);
}

.analytics-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  display: inline-block;
}

.analytics-ranked-list {
  gap: 0.85rem;
}

.analytics-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.analytics-rank-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.analytics-rank-copy strong {
  overflow-wrap: anywhere;
}

.analytics-rank-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #fde5ef;
  overflow: hidden;
}

.analytics-rank-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ea4e8a, #f39bc2);
}

.analytics-rank-track.soft span {
  background: linear-gradient(90deg, #f08db7, #f7bfd7);
}

.analytics-rank-track.alt span {
  background: linear-gradient(90deg, #cf3d7d, #ea6ea2);
}

.analytics-lower-grid {
  grid-template-columns: 1.15fr 1fr;
}

.analytics-consent-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
  color: var(--muted);
  font-weight: 700;
}

.analytics-row-detail {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 980px) {
  .analytics-filter-fields,
  .analytics-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .analytics-page-head {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .footer-brand-block-centered {
    gap: 0.95rem;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-links-inline {
    justify-content: center;
  }

  .analytics-series-chart {
    height: 220px;
  }

  .analytics-series-bar-group {
    min-width: 1.35rem;
  }
}

/* ── Build 26 admin tables + analytics filters ───────────── */
.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-page-subtitle {
  margin: 0.35rem 0 0;
  max-width: 62ch;
}

.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.admin-summary-grid {
  margin-bottom: 1rem;
}

.admin-toolbar-card,
.admin-table-card {
  margin-top: 1rem;
}

.admin-toolbar-form {
  display: grid;
  grid-template-columns: minmax(16rem, 2.1fr) repeat(5, minmax(0, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
}

.admin-toolbar-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.admin-toolbar-search {
  min-width: 0;
}

.admin-toolbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

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

.admin-data-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-primary-cell {
  display: grid;
  gap: 0.25rem;
}

.admin-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-action-cluster form {
  margin: 0;
}

.admin-action-cluster .button {
  min-height: 2.25rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.admin-pagination-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-pagination-current {
  font-weight: 700;
  color: var(--muted);
}

.admin-note-panel {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fff9fc;
}

.admin-note-panel p {
  margin: 0.25rem 0;
}

.analytics-filter-fields-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.analytics-filter-match-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

@media (max-width: 1180px) {
  .admin-toolbar-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-toolbar-search {
    grid-column: 1 / -1;
  }

  .analytics-filter-fields-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-toolbar-form,
  .analytics-filter-fields-wide {
    grid-template-columns: 1fr;
  }

  .admin-pagination {
    align-items: start;
  }

  .admin-page-actions {
    width: 100%;
  }

  .admin-action-cluster {
    min-width: 14rem;
  }
}


/* Invite request account choice */
.request-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.request-choice-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  border: 1px solid rgba(236, 72, 153, 0.22);
  border-radius: 20px;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(253,242,248,0.96));
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.08);
  cursor: pointer;
}

.request-choice-card input[type="radio"] {
  position: static !important;
  width: 1rem !important;
  height: 1rem !important;
  margin-top: 0.2rem !important;
  opacity: 1 !important;
  pointer-events: auto;
  clip: auto !important;
  clip-path: none !important;
}

.request-choice-card strong {
  display: block;
  margin-bottom: 0.2rem;
}

.request-choice-card span {
  display: block;
  color: #6b7280;
  font-size: 0.94rem;
}

.account-password-wrap.is-hidden {
  display: none;
}

@media (max-width: 680px) {
  .request-choice-grid {
    grid-template-columns: 1fr;
  }
}


.venue-information-link {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.venue-information-link:hover {
  text-decoration: underline;
}


/* ── Event followup + thank you pages ───────────────────── */
.followup-card,
.followup-public-card {
  padding: 1.1rem;
}

.followup-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.followup-guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.followup-guest-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(223, 77, 147, 0.12);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.88);
}

.followup-guest-main {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.followup-guest-statuses {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-end;
}

.followup-rsvp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.followup-rsvp-pill.status-accepted { background: rgba(34,197,94,0.12); color: #166534; }
.followup-rsvp-pill.status-maybe { background: rgba(245,158,11,0.14); color: #92400e; }
.followup-rsvp-pill.status-pending { background: rgba(71,85,105,0.12); color: #334155; }
.followup-rsvp-pill.status-declined { background: rgba(239,68,68,0.12); color: #991b1b; }

.followup-attendance-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.followup-attendance-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(223, 77, 147, 0.12);
  border-radius: 999px;
  padding: 0.48rem 0.75rem;
  background: rgba(255,255,255,0.92);
  font-size: 0.86rem;
}

.followup-attendance-group input[type="radio"] {
  width: auto;
  margin: 0;
}

.followup-gallery-stage {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(223, 77, 147, 0.12);
  box-shadow: 0 16px 40px rgba(223, 77, 147, 0.10);
  margin-bottom: 0.95rem;
  aspect-ratio: 16 / 9;
}

.followup-gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.followup-gallery-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.followup-thumb {
  min-width: 112px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 0.45rem;
  background: rgba(255,255,255,0.82);
}

.followup-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(223, 77, 147, 0.10);
}

.followup-thumb input[type="radio"] {
  width: auto;
  margin: 0;
}

.followup-thumb img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.followup-thumb span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.static-thumb {
  padding: 0;
  min-width: 120px;
  background: transparent;
  border: 2px solid transparent;
}

.static-thumb img {
  height: 90px;
}

.followup-checkbox-row {
  margin-bottom: 0.6rem;
}

.public-stage {
  max-height: 560px;
}

.public-strip {
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .followup-guest-row,
  .followup-card-head {
    flex-direction: column;
  }

  .followup-guest-statuses {
    align-items: flex-start;
  }

  .followup-attendance-group {
    justify-content: flex-start;
  }
}


/* build56: public thank-you gallery interaction + responsive fixes */
.followup-public-card {
  overflow: hidden;
}

.followup-public-card,
.followup-public-card * {
  box-sizing: border-box;
}

.followup-gallery-stage,
.followup-gallery-strip,
.followup-gallery-stage img,
.followup-thumb img {
  max-width: 100%;
}

.followup-gallery-stage.public-stage {
  position: relative;
}

.followup-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.48);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.followup-gallery-nav.prev { left: 0.8rem; }
.followup-gallery-nav.next { right: 0.8rem; }

.followup-thumb {
  cursor: pointer;
}

button.followup-thumb {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid transparent;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.followup-guest-upload-form input[type="file"] {
  max-width: 100%;
}

@media (max-width: 900px) {
  .followup-gallery-stage {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .followup-public-card {
    padding: 0.9rem;
  }

  .followup-gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }

  .followup-gallery-nav.prev { left: 0.55rem; }
  .followup-gallery-nav.next { right: 0.55rem; }
}
