/* ==================================================================
   Wedding app — mobile-first styles
   ================================================================== */

:root {
  --accent: #6f826a;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff);
  --accent-mid: color-mix(in srgb, var(--accent) 35%, #fff);
  --bg: #fbf8f3;
  --bg-2: #f4efe7;
  --card: #fff;
  --ink: #2e2a26;
  --ink-2: #5b534c;
  --muted: #8a8077;
  --line: #ebe4d9;
  --danger: #b3413a;
  --ok: #4e7d4f;
  --warn: #9a6a1f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(46, 42, 38, 0.04), 0 8px 24px rgba(46, 42, 38, 0.06);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --kb: 0px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body.app-ready {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
}
body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--accent);
}
img {
  max-width: 100%;
}
h1,
h2,
h3 {
  margin: 0 0 0.4em;
  line-height: 1.2;
}
p {
  margin: 0 0 0.8em;
}
p:last-child {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.center {
  text-align: center;
}
.danger-text {
  color: var(--danger) !important;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}
[hidden] {
  display: none !important;
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: -4px;
}

.script {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

/* ---------- Boot splash ---------- */

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.boot-names {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
}
.boot-rings {
  width: 64px;
  height: 40px;
  position: relative;
}
.boot-rings::before,
.boot-rings::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  animation: ring 1.6s ease-in-out infinite;
}
.boot-rings::before {
  left: 0;
}
.boot-rings::after {
  right: 0;
  animation-delay: 0.2s;
}
@keyframes ring {
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- Layout ---------- */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}
.container.narrow {
  max-width: 460px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + var(--safe-t)) 16px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}
.online-pill i,
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0453a;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(224, 69, 58, 0.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(224, 69, 58, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 69, 58, 0);
  }
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 12px;
}
.tabbar a .ic {
  width: 23px;
  height: 23px;
}
.tabbar a.active {
  color: var(--accent);
}
.tabbar a.active .ic {
  stroke-width: 2.4;
}

/* ---------- Cards, buttons, forms ---------- */

.card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.small-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stack > * + * {
  margin-top: 10px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--bg-2);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.08s,
    opacity 0.15s,
    background 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
}
.btn.outline {
  background: transparent;
  border-color: var(--accent-mid);
  color: var(--accent);
}
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.btn.small {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.85rem;
}
.btn.big {
  min-height: 52px;
  font-size: 1.05rem;
}
.btn.block {
  display: flex;
  width: 100%;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.btn-row.center {
  justify-content: center;
}
.icon-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.icon-btn:disabled {
  opacity: 0.3;
}
.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link.subtle {
  color: var(--muted);
  font-size: 0.85rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
}
.field.narrow {
  flex: 0 0 90px;
}
.field-row {
  display: flex;
  gap: 10px;
}
input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  width: 100%;
  font: 16px/1.4 var(--sans);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8077' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}
textarea {
  resize: vertical;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
  margin: 0;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.92rem;
  cursor: pointer;
}
.code-input {
  text-align: center;
  font-size: 1.8rem !important;
  letter-spacing: 0.4em;
  font-weight: 700;
}

.note {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  font-size: 0.9rem;
  margin: 10px 0;
}
.note > .ic:first-child {
  margin-right: 6px;
}
.note .link {
  padding: 0 0 0 6px;
}
.note.ok {
  background: color-mix(in srgb, var(--ok) 12%, #fff);
  color: var(--ok);
  font-weight: 600;
}
.note.warn {
  background: #fbf1e1;
  color: var(--warn);
}
.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 0.82rem;
  background: #fbf1e1;
  color: var(--warn);
  padding: 8px 16px;
  text-align: center;
}

.steps {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding: 8px 0 8px 40px;
  border-bottom: 1px dashed var(--line);
}
.steps li:last-child {
  border-bottom: 0;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 7px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}
.steps .ic {
  color: #0a84ff;
}
.steps .dots {
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.12);
  color: #0a84ff;
  letter-spacing: 1px;
  white-space: nowrap;
}

.skeleton {
  background: linear-gradient(90deg, var(--card) 0%, var(--bg-2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Hero & countdown ---------- */

.hero {
  position: relative;
  min-height: 44vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px 40px;
  background:
    radial-gradient(circle at 20% 15%, var(--accent-soft) 0, transparent 45%),
    radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--accent) 16%, #fff) 0, transparent 50%),
    var(--bg);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 24px;
  pointer-events: none;
}
.hero.has-cover {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.25), rgba(20, 16, 12, 0.55)),
    var(--cover) center / cover no-repeat;
  min-height: 56vh;
}
.hero.has-cover::after {
  border-color: rgba(255, 255, 255, 0.45);
}
.hero.compact {
  min-height: 34vh;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.hero-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.has-cover .hero-kicker {
  color: rgba(255, 255, 255, 0.9);
}
.hero-names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 4.2rem);
  line-height: 1.05;
  margin: 10px 0 6px;
}
.hero-names .amp {
  font-style: italic;
  color: var(--accent);
  padding: 0 0.1em;
}
.has-cover .hero-names .amp {
  color: #fff;
}
.hero-date {
  font-size: 1.22rem;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  opacity: 0.85;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.cd-box {
  min-width: 62px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.has-cover .cd-box {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}
.cd-box b {
  display: block;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 600;
}
.cd-box span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
}
.countdown.small {
  justify-content: flex-start;
  margin-top: 12px;
}
.countdown.small .cd-box {
  min-width: 54px;
  padding: 8px 4px 6px;
  background: var(--accent-soft);
  text-align: center;
}
.countdown.small .cd-box b {
  font-size: 1.4rem;
}
.cd-done {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}

/* ---------- Home ---------- */

.welcome {
  text-align: center;
  padding: 24px 20px;
}
.welcome p {
  color: var(--ink-2);
}
.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.info-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.info-body {
  width: 100%;
  min-width: 0;
}
.info-body h3 {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  text-wrap: balance;
}
.info-body h3::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  margin: 10px auto 0;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.info-sub {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.info-body p {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.info-body .btn {
  margin-top: 10px;
}
.teaser {
  display: flex;
  align-items: center;
  gap: 14px;
}
.teaser > div:nth-child(2) {
  flex: 1;
}
.teaser-ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.live-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--accent);
  color: #fff;
}
.live-cta > div {
  flex: 1;
}
.live-cta .live-dot {
  background: #fff;
}
.live-soon {
  margin-bottom: 14px;
  padding: 11px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
.live-soon .ic {
  width: 17px;
  height: 17px;
  margin-right: 7px;
  vertical-align: -3px;
}
.live-soon b {
  font-weight: 600;
}
.announce-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border: 1.5px solid var(--accent-mid);
}
.announce-card > .ic {
  color: var(--accent);
}
.foot {
  text-align: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--muted);
  margin: 26px 0 10px;
}

#home-push {
  text-align: center;
}
#home-push .small-title {
  justify-content: center;
}
#home-push .steps {
  text-align: left;
}

/* ---------- Auth ---------- */

.auth .hero {
  min-height: 40vh;
}
.auth-card {
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.choose-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Seating ---------- */

.mystery {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(160deg, var(--accent-soft), #fff 60%);
}
.mystery-emoji {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}
.mystery .countdown {
  margin: 16px 0;
}
.mystery .cd-box {
  background: #fff;
}
@keyframes float {
  50% {
    transform: translateY(-8px) rotate(-4deg);
  }
}
.table-card {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(160deg, var(--accent-soft), #fff 70%);
  animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}
.table-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.table-name {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 600;
  color: var(--accent);
  margin: 6px 0;
}
.table-desc {
  color: var(--ink-2);
}
.seat-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--accent-mid);
}
.mates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mates li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floorplan {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  user-select: none;
  -webkit-user-select: none;
  --fp-line: var(--accent);
}
.floorplan img {
  display: block;
  width: 100%;
}
.floorplan.blank {
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--accent) 3%, #fff);
}
/* The hall: a fine double line, like an architect's drawing. */
.fp-room {
  position: absolute;
  inset: 3%;
  border: 1.5px solid var(--fp-line);
  border-radius: 3px;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 3%, #fff),
    0 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent);
}
.floorplan.editable {
  cursor: crosshair;
  outline: 2px dashed var(--accent-mid);
  outline-offset: 2px;
}
.fp-table {
  position: absolute;
  width: 7.4%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: var(--fp-line);
}
.fp-table.rect {
  width: 15%;
}
.fp-table svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.fp-top {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 1.4;
}
.fp-chair {
  fill: color-mix(in srgb, var(--accent) 18%, #fff);
  stroke: currentColor;
  stroke-width: 0.9;
}
.fp-table text {
  font: 600 11px var(--sans);
  fill: currentColor;
}
.fp-table span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
  max-width: 190%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-table.numbered span {
  display: none;
}
.fp-table.rect span {
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--fp-line);
}
.names-script .fp-table.rect span {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 400;
  margin-top: 0;
}
.fp-table.me {
  z-index: 3;
  color: var(--accent);
}
.fp-table.me .fp-top {
  fill: var(--accent);
}
.fp-table.me .fp-chair {
  fill: var(--accent);
}
.fp-table.me text {
  fill: #fff;
}
.fp-table.me::before {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: here 1.8s ease-out infinite;
}
.fp-table.me span {
  display: block;
  max-width: none;
  overflow: visible;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}
.fp-table.me.label-up span {
  top: auto;
  bottom: 100%;
  margin: 0 0 6px;
}
@keyframes here {
  from {
    transform: scale(0.85);
    opacity: 0.9;
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}
/* Entrance: a gap in the wall with its label, on whichever side it sits. */
.fp-entrance {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  color: var(--fp-line);
}
.fp-entrance i {
  display: block;
  width: 30px;
  height: 9px;
  background: color-mix(in srgb, var(--accent) 3%, #fff);
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.fp-entrance.left i,
.fp-entrance.right i {
  width: 9px;
  height: 30px;
  border: 0;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.fp-entrance span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fp-entrance.bottom span {
  bottom: 100%;
  margin-bottom: 3px;
}
.fp-entrance.top span {
  top: 100%;
  margin-top: 3px;
}
.fp-entrance.left span,
.fp-entrance.right span {
  top: 50%;
  transform: translateY(-50%);
}
.fp-entrance.left span {
  left: 100%;
  margin-left: 4px;
}
.fp-entrance.right span {
  left: auto;
  right: 100%;
  margin-right: 4px;
}
/* The way from the entrance to the guest's table. */
.fp-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.fp-route path {
  fill: none;
  stroke-linejoin: round;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  animation: walk 1.1s linear infinite;
}
@keyframes walk {
  to {
    stroke-dashoffset: -10;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fp-route path,
  .fp-table.me::before {
    animation: none;
  }
}
.fp-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Avatars ---------- */

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}
.avatar.sm {
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
}
.avatar.big {
  width: 72px;
  height: 72px;
  font-size: 1.4rem;
  margin: 0 auto 10px;
}
.profile-card {
  text-align: center;
}

/* ---------- Board ---------- */

.view-bacheca {
  padding-bottom: 76px;
}
.feed-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 0;
}
.feed-more {
  text-align: center;
  margin-bottom: 10px;
}
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 88%;
  animation: msgIn 0.25s ease-out;
}
@keyframes msgIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}
.msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.msg.mine .msg-body {
  align-items: flex-end;
}
.msg-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
  padding-left: 4px;
}
.badge {
  font-size: 0.62rem;
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: 1px;
}
.bubble {
  background: var(--card);
  padding: 9px 13px;
  border-radius: 18px 18px 18px 6px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.msg.mine .bubble {
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
}
.msg.mine .bubble a {
  color: #fff;
}
.msg.has-photo {
  max-width: 92%;
}
.msg-photo {
  appearance: none;
  border: 0;
  padding: 0;
  background: var(--bg-2);
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  display: block;
  position: relative;
  max-width: 100%;
}
.msg-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
}
.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0 4px;
}
.like,
.msg-del {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
}
.like .ic,
.msg-del .ic {
  width: 16px;
  height: 16px;
}
.like.on {
  color: #e0453a;
}
.like.on .ic {
  fill: currentColor;
  animation: beat 0.35s;
}
@keyframes beat {
  50% {
    transform: scale(1.35);
  }
}
.msg.announce {
  align-self: center;
  max-width: 100%;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  background: var(--card);
  border: 1.5px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 14px 16px;
  gap: 4px;
  text-align: center;
}
.announce-head {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}
.announce-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.msg.announce .msg-meta {
  justify-content: center;
}
.heart-burst {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #fff;
}
.heart-burst .ic {
  width: 90px;
  height: 90px;
  fill: #fff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: burst 0.9s ease-out forwards;
}
@keyframes burst {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  30% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.empty {
  text-align: center;
  padding: 50px 24px;
  color: var(--ink-2);
}
.empty-emoji {
  font-size: 3rem;
}
.empty h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
}

.composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--kb));
  z-index: 35;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
body.typing .tabbar {
  display: none;
}
body.typing .composer {
  bottom: var(--kb);
  padding-bottom: calc(8px + var(--safe-b));
}
.composer textarea {
  flex: 1;
  resize: none;
  border-radius: 22px;
  padding: 10px 16px;
  min-height: 44px;
  max-height: 130px;
  line-height: 1.35;
}
.composer-cam,
.composer-send {
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}
.composer-cam {
  background: var(--accent-soft);
  color: var(--accent);
}
.composer-send {
  background: var(--accent);
  color: #fff;
}
.composer-send:disabled {
  opacity: 0.5;
}
.new-pill {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 74px);
  z-index: 36;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: 600 0.82rem var(--sans);
  padding: 8px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow);
}
.new-pill .ic {
  width: 16px;
  height: 16px;
}

/* ---------- Gallery ---------- */

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}
.gallery-head .script {
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 16px;
  }
}
.tile {
  appearance: none;
  border: 0;
  padding: 0;
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-2);
  overflow: hidden;
  cursor: zoom-in;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tile-likes {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.tile-likes .ic {
  width: 14px;
  height: 14px;
  fill: #fff;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0d0b0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + var(--safe-t)) 12px 8px 16px;
  font-size: 0.9rem;
}
.lb-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  touch-action: pan-y pinch-zoom;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lb-prev {
  left: 10px;
}
.lb-next {
  right: 10px;
}
@media (pointer: coarse) {
  .lb-nav {
    display: none;
  }
}
.lb-bottom {
  padding: 10px 16px calc(14px + var(--safe-b));
}
.lb-caption {
  margin-bottom: 8px;
}
.lb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-actions .like {
  color: #fff;
  font-size: 0.95rem;
}
.lb-actions .like .ic {
  width: 22px;
  height: 22px;
}
.lb-actions .like.on {
  color: #ff5a4f;
}

/* ---------- Sheets & toasts ---------- */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 20, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 26px 20px calc(20px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
}
.sheet-wrap.open .sheet-backdrop {
  opacity: 1;
}
.sheet-wrap.open .sheet {
  transform: none;
}
@media (min-width: 640px) {
  .sheet-wrap {
    align-items: center;
  }
  .sheet {
    border-radius: 24px;
    transform: translateY(30px);
    opacity: 0;
    transition:
      transform 0.25s,
      opacity 0.25s;
  }
  .sheet-wrap.open .sheet {
    opacity: 1;
  }
}
.sheet-x {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--muted);
}
.sheet-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  padding-right: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-title.center {
  justify-content: center;
  padding: 0 36px;
  text-align: center;
}
.sheet-text {
  color: var(--ink-2);
}
.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.sheet-actions .btn {
  flex: 1;
}
.celebrate {
  text-align: center;
  font-size: 3.2rem;
  animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.announce-sheet-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.onboard-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
}
.preview-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.preview-strip img {
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}
.progress {
  position: relative;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}
.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent-mid);
  transition: width 0.2s;
}
.progress-label {
  position: relative;
  display: block;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 28px;
}

#toasts {
  position: fixed;
  top: calc(12px + var(--safe-t));
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.25s,
    opacity 0.25s;
  max-width: 480px;
  text-align: center;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.toast.error {
  background: var(--danger);
}

/* ---------- Admin ---------- */

.admin-head {
  text-align: center;
  margin: 8px 0 16px;
}
.admin-head .script {
  margin: 0;
}
.page-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 4px 0 14px;
}
.section-label {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 12px 0 0;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.segmented {
  display: flex;
  background: var(--bg-2);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin: 8px 0 10px;
}
.segmented button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 11px 8px;
  border-radius: 999px;
  font: 600 0.92rem var(--sans);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.segmented button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.segmented .live-dot {
  animation: none;
  background: var(--muted);
}
.segmented button.on .live-dot {
  background: #e0453a;
  animation: pulse 1.8s infinite;
}
.toggles {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 6px;
}
details.more {
  margin: 6px 0;
}
details.more summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  padding: 6px 0;
}
.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent);
}
.stat span {
  font-size: 0.72rem;
  color: var(--muted);
}
.progress-list {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}
.checklist {
  display: flex;
  flex-direction: column;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.check-row:last-child {
  border-bottom: 0;
}
.check-row > span:nth-child(2) {
  flex: 1;
}
.check-row > .ic {
  color: var(--muted);
}
.check-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
}
.check-row.done .check-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.check-row.done .check-dot .ic {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.check-row.done > span:nth-child(2) {
  color: var(--muted);
  text-decoration: line-through;
}
.menu {
  padding: 6px 0;
}
.menu a,
.menu button {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 0.98rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.menu > :last-child {
  border-bottom: 0;
}
.menu span {
  flex: 1;
}
.menu .ic:first-child {
  color: var(--accent);
}
.menu .ic:last-child {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.tabs a {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}
.tabs a.on {
  background: var(--accent);
  color: #fff;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.toolbar select {
  flex: 0 0 44%;
}
.guest-list {
  margin-top: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.guest-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--line);
}
.guest-row:last-child {
  border-bottom: 0;
}
.g-main {
  flex: 1;
  min-width: 0;
}
.g-name {
  font-weight: 600;
}
.g-sub {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.g-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.g-table {
  width: 130px !important;
  padding: 8px 28px 8px 10px !important;
  font-size: 0.85rem !important;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
}
.tag .ic {
  width: 11px;
  height: 11px;
}
.tag.ok {
  background: color-mix(in srgb, var(--ok) 12%, #fff);
  color: var(--ok);
}
.tag.err {
  background: #fbe9e7;
  color: var(--danger);
}
.table-list {
  margin-top: 4px;
}
.table-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 14px 10px 14px 16px;
}
.t-main {
  flex: 1;
  min-width: 0;
}
.t-name {
  font-weight: 700;
}
.t-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 90px;
}
.t-actions .icon-btn {
  width: 36px;
  height: 36px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
.chip {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: 600 0.82rem var(--sans);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip .ic {
  width: 13px;
  height: 13px;
  color: var(--ok);
}
.chip.on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.chip.on .ic {
  color: #fff;
}
.preview-table {
  overflow-x: auto;
  margin: 8px 0 12px;
}
.preview-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
}
.preview-table th,
.preview-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.swatch {
  appearance: none;
  border: 2px solid transparent;
  background: var(--bg);
  border-radius: 14px;
  padding: 6px 10px 6px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: 500 0.8rem var(--sans);
  color: var(--ink);
}
.swatch i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
}
.swatch.on {
  border-color: var(--c);
}
.cover-preview img {
  border-radius: 12px;
  max-height: 160px;
  object-fit: cover;
  width: 100%;
}
.icon-preview img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.section-editor {
  margin-top: 12px;
}
.se-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.se-icon-btn {
  appearance: none;
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 1.4rem;
  color: var(--accent);
  cursor: pointer;
}
.se-icon-btn svg {
  width: 38px;
  height: 38px;
}
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.icon-choice {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--accent);
  font: 500 0.7rem var(--sans);
  cursor: pointer;
}
.icon-choice span {
  color: var(--ink-2);
}
.icon-choice svg {
  width: 40px;
  height: 40px;
}
.icon-choice.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Tables in the Regia */
.seat-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.seat-summary .stat b {
  font-size: 1.6rem;
}
.seat-summary .stat span {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .seat-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
.seat-summary .stat.warn b {
  color: var(--warn);
}
details.fold summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
details.fold summary::-webkit-details-marker {
  display: none;
}
details.fold[open] summary {
  margin-bottom: 12px;
}
.t-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2px 0 6px;
}
.t-count.over {
  color: var(--danger);
}
.t-guests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.name-chip {
  font-size: 0.75rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
}
.assign-list {
  max-height: 46vh;
  overflow-y: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.assign-row:last-child {
  border-bottom: 0;
}
.assign-row span {
  flex: 1;
}
.assign-row em {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--warn);
}
.chip.entrance {
  border-style: dashed;
}
.se-title {
  flex: 1;
  font-weight: 600 !important;
}
.se-tools {
  display: flex;
}
.se-tools .icon-btn {
  width: 34px;
  height: 34px;
}
.section-editor .field + .field,
.section-editor .field-row {
  margin-top: 10px;
}
.save-bar {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  z-index: 5;
  padding-top: 8px;
}
.guide {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
}
.link-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-wrap: anywhere;
}

.print-card {
  max-width: 320px;
  margin: 10px auto;
  padding: 26px 22px;
  border: 1px solid var(--accent-mid);
  border-radius: 20px;
  text-align: center;
  background: #fff;
}
.pc-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.pc-names {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 4px 0 12px;
}
.print-card .qr {
  width: 180px;
  height: 180px;
}
.pc-text {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-top: 10px;
}
.pc-url {
  font-weight: 700;
  margin-top: 6px;
  font-size: 0.85rem;
}

@media print {
  body.printing * {
    visibility: hidden;
  }
  body.printing .print-card,
  body.printing .print-card * {
    visibility: visible;
  }
  body.printing .print-card {
    position: fixed;
    top: 20mm;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: none;
  }
}

/* ---------- Couple's style options ---------- */

/* Names in a script face (setting "Stile dei nomi: corsivo"). */
.names-script .hero-names,
.names-script .brand-names,
.names-script .pc-names,
.names-script .screen-title {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}
.names-script .hero-names {
  font-size: clamp(3.6rem, 16vw, 5.8rem);
  line-height: 1;
}
.names-script .hero-names .amp {
  font-style: normal;
}
.names-script .brand {
  font-size: 2rem;
  line-height: 1;
}
.names-script .pc-names {
  font-size: 2.8rem;
}
.names-script .screen-title {
  font-size: 3.2rem;
}
.names-script .welcome .script,
.names-script .info-body h3,
.names-script .mystery .script,
.names-script .table-name,
.names-script .gallery-head .script,
.names-script .announce-title,
.names-script .empty h3 {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--accent);
}
.names-script .welcome .script,
.names-script .mystery .script,
.names-script .gallery-head .script {
  font-size: 3.1rem;
}
.names-script .info-body h3 {
  font-size: 2.7rem;
}
.names-script .table-name {
  font-size: clamp(3.4rem, 15vw, 4.6rem);
}
.names-script .announce-title,
.names-script .empty h3 {
  font-size: 2.3rem;
}

/* Fine-line icon above a card title, between two hairlines. */
.info-icon.line {
  position: relative;
  width: 54px;
  height: 54px;
  background: none;
  color: var(--accent);
}
.info-icon.line svg {
  width: 100%;
  height: 100%;
}
.info-icon.line::before,
.info-icon.line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 34px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}
.info-icon.line::before {
  right: calc(100% + 10px);
}
.info-icon.line::after {
  left: calc(100% + 10px);
}

/* Light cover pictures (drawings, watercolours): keep them bright, dark text on top. */
.hero.has-cover.tone-light {
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.1) 75%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, var(--bg)),
    var(--cover) center / cover no-repeat;
}
.hero.has-cover.tone-light::after {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.hero.has-cover.tone-light .hero-kicker,
.hero.has-cover.tone-light .hero-names .amp {
  color: var(--accent);
}
.hero.has-cover.tone-light .hero-names {
  color: var(--accent);
}
.hero.has-cover.tone-light .cd-box {
  background: rgba(255, 255, 255, 0.78);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Info card with a picture on top. */
.info-card.has-img {
  padding-top: 0;
  overflow: hidden;
}
.info-img {
  display: block;
  width: calc(100% + 36px);
  max-width: none;
  margin: 0 -18px 4px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.font-sample.serif {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0 6px;
}
.font-sample.script {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-size: 1.7rem;
  line-height: 1;
  padding: 0 6px;
}
.se-img {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.se-img img {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- Projector screen ---------- */

body.screen-mode {
  padding: 0;
  background: #0d0b0a;
}
body.screen-mode .topbar,
body.screen-mode .tabbar {
  display: none;
}
.screen {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 26vw);
  color: #fff;
  background: #0d0b0a;
}
.screen-stage {
  position: relative;
  overflow: hidden;
}
.screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.screen-img.on {
  opacity: 1;
}
.screen-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 32px 24px;
  font-size: 1.4rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
.screen-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 3rem;
}
.screen-side {
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  background: #1a1614;
  gap: 16px;
  min-height: 0;
}
.screen-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
}
.screen-msgs {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}
.smsg {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 1.05rem;
  animation: msgIn 0.4s;
}
.smsg b {
  color: var(--accent-mid);
  font-size: 0.85rem;
}
.smsg p {
  margin: 2px 0 0;
}
.smsg.announce {
  border: 1px solid var(--accent);
}
.screen-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 10px;
  font-size: 0.95rem;
}
.screen-qr img {
  width: 96px;
  height: 96px;
}
.screen-tools {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0.25;
  transition: opacity 0.2s;
}
.screen-tools:hover {
  opacity: 1;
}
.screen-tools .icon-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
@media (max-width: 700px) {
  .screen {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .screen-msgs {
    display: none;
  }
}

/* ---------- Desktop niceties ---------- */

@media (min-width: 900px) {
  .hero {
    min-height: 48vh;
  }
  .tabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 14px;
    width: min(520px, 90vw);
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 6px;
  }
  .composer {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(640px, 92vw);
    bottom: calc(var(--tabbar-h) + 28px);
    border-radius: 26px;
    border: 1px solid var(--line);
  }
  body.typing .tabbar {
    display: flex;
  }
  body.typing .composer {
    bottom: calc(var(--tabbar-h) + 28px);
  }
}

/* ---------- The couple's quiz & trophies ---------- */

.trophy {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.trophy .shine {
  transform-box: view-box;
  animation: trophy-shine 3.4s ease-in-out infinite;
}
.trophy.shiny .shine {
  animation-duration: 2.4s;
}
@keyframes trophy-shine {
  0% {
    transform: translateX(0) skewX(-20deg);
  }
  55%,
  100% {
    transform: translateX(96px) skewX(-20deg);
  }
}
.trophy .tw {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 2.2s ease-in-out infinite;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Small trophy on the profile picture (top bar and profile). */
.avatar-btn,
.avatar.big {
  position: relative;
}
.trophy-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(46, 42, 38, 0.25);
}
.avatar.big .trophy-badge {
  width: 30px;
  height: 30px;
  padding: 4px;
  right: -4px;
  bottom: -2px;
}
.trophy-badge.shiny {
  box-shadow: 0 0 0 1.5px #f1c343, 0 0 10px rgba(241, 195, 67, 0.7);
  animation: badge-glow 2.6s ease-in-out infinite;
}
@keyframes badge-glow {
  50% {
    box-shadow: 0 0 0 1.5px #f1c343, 0 0 16px rgba(241, 195, 67, 0.95);
  }
}
.trophy-mini {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  vertical-align: -2px;
}
.trophy-mini.shiny {
  filter: drop-shadow(0 0 3px rgba(241, 195, 67, 0.8));
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

/* Trophy beside the profile picture in the top bar. */
#top-trophy:empty {
  display: none;
}
.top-trophy {
  display: block;
  width: 38px;
  height: 38px;
  margin-right: -2px;
}
.top-trophy.shiny {
  filter: drop-shadow(0 0 6px rgba(241, 195, 67, 0.75));
  animation: trophy-bob 3s ease-in-out infinite;
}
@keyframes trophy-bob {
  50% {
    transform: translateY(-2px) rotate(-4deg);
  }
}

/* The game on the home page. */
.quiz-home {
  text-align: center;
  background: linear-gradient(180deg, #fffaf0, #fff 45%);
  border: 1px solid rgba(227, 179, 65, 0.35);
}
.quiz-home.done.classic {
  background: var(--card);
  border-color: var(--line);
}
.qh-trophy {
  width: 72px;
  height: 72px;
  margin: 6px auto 4px;
}
.quiz-home .qc-title {
  margin-bottom: 4px;
}
.quiz-home p {
  margin: 0 0 12px;
}
.qh-won {
  color: #a86f0c;
  font-weight: 700;
}

/* "The first three win a prize", in big letters. */
.quiz-prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: -4px -4px 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1c9, #fde3a7 55%, #f6d27f);
  color: #6b4a06;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(201, 141, 23, 0.35);
}
.quiz-prize b {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}
.quiz-prize small {
  font-size: 0.85rem;
  font-weight: 600;
}
.qp-gift {
  font-size: 2rem;
  line-height: 1;
  animation: gift-wiggle 2.8s ease-in-out infinite;
}
@keyframes gift-wiggle {
  0%,
  70%,
  100% {
    transform: none;
  }
  76% {
    transform: rotate(-12deg) scale(1.08);
  }
  84% {
    transform: rotate(10deg) scale(1.08);
  }
  92% {
    transform: rotate(-6deg);
  }
}
.quiz-prize.gone {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}
.quiz-prize.gone b {
  font-size: 1.1rem;
}
.quiz-prize.won {
  margin: 10px 0 12px;
}
.quiz-prize.won b {
  font-size: 1.3rem;
}

/* Albo d'oro: the podium first. */
.podium li {
  gap: 8px;
}
.podium .medal {
  width: 26px;
  flex: none;
  text-align: center;
  font-size: 1.3rem;
}
.pd-name {
  flex: 1;
}
.pd-prize {
  flex: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a86f0c;
  background: #fff3d1;
  border-radius: 999px;
  padding: 3px 9px;
}

/* Card in the profile. */
.quiz-card,
.quiz-intro,
.quiz-result {
  text-align: center;
}
.qc-trophy {
  width: 76px;
  height: 76px;
  margin: 4px auto 8px;
}
.qc-trophy.big {
  width: 118px;
  height: 118px;
}
.qc-emojis {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 2rem;
  margin-bottom: 6px;
}
.qc-emojis span {
  animation: float 3s ease-in-out infinite;
}
.qc-emojis span:nth-child(2) {
  animation-delay: 0.4s;
}
.qc-emojis span:nth-child(3) {
  animation-delay: 0.8s;
}
.qc-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.quiz-result.shiny .qc-label,
.quiz-card.done .qc-trophy + .qc-label {
  color: #b07a12;
}
.qc-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
  margin: 4px 0 8px;
}
.names-script .qc-title {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1.05;
}
.quiz-card .btn,
.quiz-result .btn {
  margin-top: 6px;
}

/* The game. */
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.quiz-top .back {
  margin: 0;
}
.quiz-count {
  font-size: 0.85rem;
  color: var(--ink-2);
}
.quiz-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
  margin-bottom: 14px;
}
.quiz-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #e3b341);
  transition: width 0.5s ease;
}
.quiz-q {
  text-align: center;
  animation: fadeIn 0.35s ease;
}
.quiz-emoji {
  width: 92px;
  height: 92px;
  margin: 4px auto 12px;
  display: grid;
  place-items: center;
  font-size: 3.1rem;
  line-height: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.quiz-q h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 16px;
}
.quiz-options {
  display: grid;
  gap: 10px;
  text-align: left;
}
.quiz-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 500 1rem/1.3 var(--sans);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}
.quiz-opt:active:not(:disabled) {
  transform: scale(0.98);
}
.quiz-opt:disabled {
  cursor: default;
  color: var(--ink);
}
.quiz-opt:disabled:not(.right):not(.wrong) {
  opacity: 0.55;
}
.qo-letter {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.qo-text {
  flex: 1;
}
.qo-mark {
  flex: none;
  font-size: 1.15rem;
}
.quiz-opt.picked {
  border-color: var(--accent);
}
.quiz-opt.right {
  border-color: #3f9a62;
  background: #effaf2;
  animation: bump 0.45s ease;
}
@keyframes bump {
  50% {
    transform: scale(1.03);
  }
}
.quiz-opt.right .qo-letter {
  background: #3f9a62;
  color: #fff;
}
.quiz-opt.right .qo-mark::after {
  content: '✓';
  color: #3f9a62;
  font-weight: 700;
}
.quiz-opt.wrong {
  border-color: #d0564b;
  background: #fdf1f0;
  animation: shake 0.45s ease;
}
.quiz-opt.wrong .qo-letter {
  background: #d0564b;
  color: #fff;
}
.quiz-opt.wrong .qo-mark::after {
  content: '✗';
  color: #d0564b;
  font-weight: 700;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
.quiz-feedback:empty {
  display: none;
}
.quiz-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  animation: fadeIn 0.3s ease;
}
.quiz-feedback.ok {
  background: #effaf2;
}
.quiz-feedback.ko {
  background: #fdf5ec;
}
.quiz-feedback p {
  margin: 4px 0 0;
  color: var(--ink-2);
}
.quiz-next {
  margin-top: 4px;
}

.quiz-rules {
  list-style: none;
  margin: 12px 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.quiz-rules li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 0.92rem;
}

.quiz-result.just-won .qc-trophy {
  animation: trophy-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
@keyframes trophy-in {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.quiz-result.shiny {
  background: radial-gradient(circle at 50% 22%, #fff5d6 0, #fff 55%);
}
.qr-score {
  font-size: 1.05rem;
  margin: 0 0 4px;
}
@media (prefers-reduced-motion: reduce) {
  .trophy .shine,
  .trophy .tw,
  .trophy-badge.shiny,
  .top-trophy.shiny,
  .qp-gift,
  .qc-emojis span,
  .quiz-opt.wrong,
  .quiz-opt.right,
  .quiz-emoji,
  .quiz-result.just-won .qc-trophy {
    animation: none;
  }
}

/* Quiz editor in the Regia. */
.q-emoji {
  width: 52px;
  height: 44px;
  flex: none;
  text-align: center;
  font-size: 1.5rem;
  padding: 0;
}
.q-num {
  flex: 1;
  font-weight: 600;
  color: var(--ink-2);
}
.q-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.q-opt input[type='radio'] {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: #3f9a62;
}
.q-opt input:not([type]) {
  flex: 1;
}

/* ---------- Special celebrations (public/js/effects.js) ---------- */

.fx {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  overflow: hidden;
}
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.fx-arcade,
.fx-battle {
  font-family: 'Press Start 2P', ui-monospace, 'Courier New', monospace;
  font-style: normal;
}

/* Fire dragon */
.fx-dragon .fx-canvas {
  z-index: 2;
}
.fx-dragon-body {
  position: absolute;
  z-index: 1;
  left: -3vw;
  bottom: calc(var(--tabbar-h) + 70px);
  width: min(66vw, 46vh, 460px);
  animation: dragon-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.fx-dragon-body.leaving {
  animation: dragon-out 0.6s ease-in both;
}
.fx-dragon-svg {
  display: block;
  width: 100%;
  overflow: visible;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}
@keyframes dragon-in {
  from {
    transform: translate(-110%, 20%) rotate(-8deg);
  }
}
@keyframes dragon-out {
  to {
    transform: translate(-120%, 10%) rotate(-6deg);
  }
}
.fx-wing {
  transform-box: view-box;
  animation: wing-flap 0.42s ease-in-out infinite alternate;
}
.fx-wing.back {
  transform-origin: 110px 110px;
}
.fx-wing.front {
  transform-origin: 132px 106px;
  animation-delay: 0.08s;
}
@keyframes wing-flap {
  from {
    transform: rotate(-7deg);
  }
  to {
    transform: rotate(6deg);
  }
}
.fx-tailfire {
  transform-box: view-box;
  transform-origin: 40px 120px;
  animation: tail-fire 0.18s ease-in-out infinite alternate;
}
@keyframes tail-fire {
  to {
    transform: scale(1.08, 1.16) rotate(-4deg);
  }
}
.fx-jaw {
  transform-box: view-box;
  transform-origin: 172px 82px;
  transition: transform 0.18s ease-out;
}
.fx-dragon.firing .fx-jaw {
  transform: rotate(24deg);
}
.fx-dragon.firing .fx-dragon-body {
  animation: dragon-recoil 0.12s linear infinite alternate;
}
@keyframes dragon-recoil {
  to {
    transform: translateX(-4px);
  }
}
.fx-heat {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(255, 150, 40, 0.45), rgba(255, 70, 20, 0.12) 60%, transparent 80%);
  opacity: 0;
  transition: opacity 0.3s;
}
.fx-dragon.firing .fx-heat {
  opacity: 1;
}
.fx-battle {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 14px);
  width: min(92vw, 460px);
  transform: translateX(-50%);
  padding: 16px 16px 18px;
  background: #fff;
  color: #222;
  border: 4px solid #333;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 3px #fff,
    inset 0 0 0 6px #6a8fc0,
    0 8px 20px rgba(0, 0, 0, 0.3);
  font-size: clamp(10px, 3.2vw, 14px);
  line-height: 1.7;
  animation: fadeIn 0.2s ease 0.45s both;
}
.fx-battle i {
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-style: normal;
  font-size: 10px;
  color: #d03030;
  animation: blink 0.6s steps(1) infinite;
}
.fx-dragon.leaving .fx-battle {
  opacity: 0;
  transition: opacity 0.3s;
}
#view.fx-shake {
  animation: fx-shake 0.09s linear infinite alternate;
}
@keyframes fx-shake {
  from {
    transform: translate(-3px, 1px);
  }
  to {
    transform: translate(3px, -2px);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* 8-bit dancer on a neon stage */
.fx-dance {
  background: linear-gradient(#12002b, #3a0a5e 58%, #1a0233 58%);
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-dance.on {
  opacity: 1;
}
.fx-dance .fx-canvas {
  z-index: 3;
}
.fx-sun {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 56vmin;
  height: 28vmin;
  transform: translate(-50%, -100%);
  border-radius: 28vmin 28vmin 0 0;
  background:
    repeating-linear-gradient(to bottom, transparent 0 55%, #3a0a5e 55% 60%, transparent 60% 68%, #3a0a5e 68% 72%, transparent 72% 80%, #3a0a5e 80% 85%),
    linear-gradient(#ffe45c, #ff7a3d 55%, #ff2e88);
  box-shadow: 0 0 60px rgba(255, 46, 136, 0.55);
}
.fx-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  top: 58%;
  bottom: -20%;
  background-image:
    linear-gradient(#ff2e88 2px, transparent 2px),
    linear-gradient(90deg, #ff2e88 2px, transparent 2px);
  background-size: 48px 48px;
  transform: perspective(260px) rotateX(58deg);
  transform-origin: top;
  animation: floor-run 0.4s linear infinite;
  opacity: 0.85;
}
@keyframes floor-run {
  to {
    background-position: 0 48px;
  }
}
.fx-scan {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: repeating-linear-gradient(rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
.fx-arcade {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffe45c;
  text-shadow:
    3px 3px 0 #ff2e88,
    6px 6px 0 rgba(0, 0, 0, 0.45);
  line-height: 1.6;
}
.fx-arcade.top {
  top: 14%;
  font-size: clamp(18px, 6.4vw, 34px);
  animation: blink 0.5s steps(1) infinite;
}
.fx-arcade.bottom {
  bottom: calc(var(--tabbar-h) + 26px);
  font-size: clamp(12px, 3.8vw, 18px);
  color: #7df9ff;
  text-shadow: 3px 3px 0 #2a2aff;
}

/* At the sea */
.fx-beach {
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-beach.on {
  opacity: 1;
}
.fx-bubble {
  position: absolute;
  z-index: 2;
  left: 50%;
  max-width: 88vw;
  transform: translateX(-50%) scale(0.4);
  opacity: 0;
  padding: 14px 16px;
  background: #fff;
  color: #1a1a1a;
  border: 4px solid #1a1a1a;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: clamp(11px, 3.6vw, 16px);
  line-height: 1.6;
  white-space: nowrap;
  transition:
    transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4),
    opacity 0.15s;
}
.fx-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -16px;
  border: 8px solid transparent;
  border-top: 8px solid #1a1a1a;
  transform: translateX(-50%);
}
.fx-bubble.on {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Stock exchange */
.fx-market {
  background: radial-gradient(circle at 50% 30%, #0b2a55, #04162e 70%);
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-market.on {
  opacity: 1;
}
.fx-market-head {
  position: absolute;
  z-index: 2;
  top: 7%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
}
.fx-market-head small {
  display: block;
  font-size: clamp(10px, 3vw, 14px);
  letter-spacing: 0.12em;
  color: #7df9ff;
}
.fx-bell {
  font-size: clamp(56px, 18vw, 96px);
  line-height: 1.2;
  transform-origin: 50% 8%;
  animation: bell-swing 0.5s ease-in-out infinite alternate;
}
@keyframes bell-swing {
  from {
    transform: rotate(-18deg);
  }
  to {
    transform: rotate(18deg);
  }
}
.fx-dong {
  display: inline-block;
  font-size: clamp(34px, 11vw, 64px);
  color: #ffd23f;
  text-shadow:
    4px 4px 0 #ff2e88,
    0 0 24px rgba(255, 210, 63, 0.6);
  transform: scale(0.8);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.6);
}
.fx-market.dong .fx-dong {
  transform: scale(1.18);
}
.fx-quote {
  margin-top: 14px;
  font-size: clamp(14px, 4.6vw, 22px);
}
.fx-quote i {
  font-style: normal;
  color: #1fd17a;
}
.fx-ticker {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + 12px);
  overflow: hidden;
  padding: 10px 0;
  background: #000;
  border-top: 2px solid #1fd17a;
  border-bottom: 2px solid #1fd17a;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: 12px;
  color: #1fd17a;
  white-space: nowrap;
}
.fx-ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 6s linear infinite;
}
@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

/* High voltage */
.fx-storm {
  background: rgba(6, 10, 30, 0.88);
  opacity: 0;
  transition: opacity 0.2s;
}
.fx-storm.on {
  opacity: 1;
}
.fx-flash {
  position: absolute;
  inset: 0;
  background: #e8f4ff;
  opacity: 0;
}
.fx-flash.go {
  animation: flash 0.35s ease-out;
}
@keyframes flash {
  from {
    opacity: 0.85;
  }
}
.fx-volt {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 56%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  color: #fff;
  text-align: center;
}
.fx-volt b {
  font-weight: 400;
  font-size: clamp(14px, 4.8vw, 24px);
  color: #ffe45c;
  text-shadow: 0 0 14px #7ec8ff;
}
.fx-volt small {
  font-size: clamp(11px, 3.4vw, 15px);
  color: #7df9ff;
  opacity: 0;
}
.fx-battery {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 4px solid #fff;
}
.fx-battery::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  width: 8px;
  height: 16px;
  background: #fff;
  transform: translateY(-50%);
}
.fx-battery i {
  width: 18px;
  height: 30px;
  background: #1fd17a;
  opacity: 0.12;
}
.fx-battery i.lit {
  animation: cell-on 0.15s steps(1) both;
}
@keyframes cell-on {
  to {
    opacity: 1;
  }
}
.fx-storm.charged .fx-volt small {
  animation: cell-on 0.1s steps(1) both;
}

/* Cheers */
.fx-cheers {
  background: radial-gradient(circle at 50% 42%, rgba(255, 214, 226, 0.95), rgba(255, 240, 230, 0.9) 60%, rgba(255, 250, 244, 0.85));
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-cheers.on {
  opacity: 1;
}
.fx-cincin {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 64%;
  text-align: center;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: clamp(26px, 9vw, 48px);
  color: #ff5a8a;
  text-shadow: 4px 4px 0 #7a1b3a;
  opacity: 0;
  transform: scale(0.3);
  transition:
    transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.6),
    opacity 0.1s;
}
.fx-cheers.clink .fx-cincin {
  opacity: 1;
  transform: scale(1);
}

/* Quiz leaderboard */
.qh-place {
  font-weight: 700;
  color: var(--accent);
}
.qh-won span {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}
.podium li.me {
  margin: 0 -8px;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.pd-score {
  flex: none;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-2);
  text-align: right;
  line-height: 1.2;
}
.pd-score small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Butcher, tractor, trip */
.fx-butcher,
.fx-tractor,
.fx-trip {
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-butcher.on,
.fx-tractor.on,
.fx-trip.on {
  opacity: 1;
}
.fx-chop {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 14%;
  text-align: center;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: clamp(28px, 10vw, 52px);
  color: #ffd23f;
  text-shadow:
    4px 4px 0 #b8322f,
    8px 8px 0 rgba(0, 0, 0, 0.25);
  opacity: 0;
}
.fx-chop.go {
  animation: chop-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}
@keyframes chop-pop {
  0% {
    opacity: 1;
    transform: scale(0.4) rotate(-8deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) rotate(3deg);
  }
  100% {
    opacity: 0;
    transform: scale(1) rotate(0);
  }
}
.fx-mission {
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  text-align: center;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: clamp(22px, 8vw, 44px);
  line-height: 1.4;
  color: #ffcf33;
  -webkit-text-stroke: 2px #6b2a00;
  text-shadow:
    4px 4px 0 #c0392b,
    0 0 18px rgba(255, 207, 51, 0.5);
  animation: mission 3.6s steps(1) both;
}
@keyframes mission {
  0%,
  12% {
    opacity: 0;
  }
  13%,
  80% {
    opacity: 1;
  }
  81%,
  100% {
    opacity: 0;
  }
}

/* Smooth celebrations: gold for Niccolò, sweet pink for Beatrice */
.fx-smooth {
  opacity: 0;
  transition: opacity 0.3s;
}
.fx-smooth.on {
  opacity: 1;
}
.fx-gold {
  background: radial-gradient(circle at 50% 45%, rgba(58, 40, 7, 0.9), rgba(10, 7, 1, 0.97));
}
.fx-pink {
  background: linear-gradient(165deg, rgba(255, 232, 242, 0.97), rgba(255, 210, 230, 0.97) 55%, rgba(238, 222, 255, 0.97));
}
.fx-dusk {
  background: linear-gradient(170deg, rgba(255, 246, 230, 0.97), rgba(255, 226, 238, 0.97));
}
.fx-caption {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  top: 17%;
  text-align: center;
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-size: clamp(52px, 16vw, 92px);
  line-height: 0.95;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.3s,
    transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.fx-caption.show {
  opacity: 1;
  transform: none;
}
.fx-caption.gold {
  color: #f5d77a;
  text-shadow:
    0 2px 0 #7a560c,
    0 0 26px rgba(255, 215, 120, 0.55);
}
.fx-caption.pink {
  color: #ff4f9a;
  text-shadow:
    0 3px 0 #ffffff,
    0 0 22px rgba(255, 120, 170, 0.45);
}
.fx-caption.duo {
  background: linear-gradient(90deg, #c9981f, #ff5c9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  top: 12%;
}

/* WhatsApp page in the Regia: a preview of the table message */
.wa-preview {
  max-width: 340px;
  margin: 12px auto 4px;
  padding: 10px 12px 0;
  border-radius: 12px;
  background: #e7ffdb;
  color: #111b21;
  text-align: left;
  font-size: 0.92rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.wa-preview p {
  margin: 0 0 6px;
}
.wa-preview .wa-foot {
  font-size: 0.8rem;
  color: #667781;
}
.wa-preview .wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #027eb5;
  font-weight: 600;
}
.wa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
a.wa-button {
  text-decoration: none;
}
ul.tips {
  margin: 12px 0 0;
  padding-left: 18px;
  text-align: left;
}
ul.tips li {
  margin: 4px 0;
}

/* Conferma di presenza (RSVP) */
.rsvp-card {
  text-align: center;
}
.rsvp-card .info-icon {
  margin: 0 auto 6px;
}
.rsvp-card .form {
  text-align: left;
  margin-top: 14px;
}
.rsvp-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.rsvp-choice .choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.rsvp-choice .choice span {
  font-size: 1.9rem;
  line-height: 1;
}
.rsvp-choice .choice.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rsvp-thanks {
  font-size: 3rem;
  margin: 10px 0 4px;
}
.rsvp-line {
  font-size: 1.15rem;
  font-weight: 600;
}
.rsvp-card .btn + .btn {
  margin-top: 8px;
}
.rsvp-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px;
  color: var(--accent);
  font-weight: 600;
}
.iban-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 10px auto 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.iban-box code {
  font-size: 1rem;
  letter-spacing: 0.5px;
  word-break: break-word;
}
.rsvp-summary p {
  margin: 4px 0 8px;
}
ul.diet-list {
  margin: 0;
  padding-left: 18px;
  text-align: left;
}
ul.diet-list li {
  margin: 4px 0;
}
details.se-iban summary {
  cursor: pointer;
  color: var(--accent);
  margin: 8px 0;
}

.rsvp-sign,
.closing-sign {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
}
.names-script .rsvp-sign,
.names-script .closing-sign {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-size: 2.2rem;
  line-height: 1.1;
}
.std-card {
  text-align: center;
}
.std-card .info-icon {
  margin: 0 auto 6px;
}
.std-install {
  margin-top: 12px;
  text-align: left;
}

/* The guests' app is all in an elegant italic; the Regia stays upright, to work comfortably. */
body:not([data-view='admin']) {
  --sans: 'Lora', Georgia, 'Times New Roman', serif;
  font-style: italic;
}
body:not([data-view='admin']) :is(button, input, select, textarea, .btn, .link) {
  font-style: italic;
}

/* Attendance strip: the words in the middle */
.rsvp-teaser > div:nth-child(2) {
  text-align: center;
}
.std-title {
  margin: 16px 0 4px;
  font-size: 1.1rem;
  color: var(--accent);
}
.steps-title {
  margin: 14px 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}
/* The couple's closing words at the bottom of the home page */
.closing {
  margin: 30px 16px 40px;
  text-align: center;
  color: var(--ink-2);
}
.closing p {
  margin: 0 0 12px;
}
.closing .closing-sign {
  margin-top: 4px;
}

/* Attendance, until the guest answers: big and first on the home page */
.rsvp-hero {
  display: block;
  padding: 26px 20px 22px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.rsvp-hero .info-icon {
  margin: 0 auto 8px;
}
.rsvp-hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--accent);
}
.names-script .rsvp-hero-title {
  font-family: 'Italianno', var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 3.4rem;
}
.rsvp-hero-by {
  margin: 10px 0 18px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ---------- Profile: picture, a few words, the pass ---------- */

.avatar.has-photo {
  background: var(--accent-soft);
}
.avatar > img,
.avatar-btn > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-photo {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.profile-photo .avatar.big {
  width: 96px;
  height: 96px;
  margin: 0;
  font-size: 1.9rem;
}
.photo-cam {
  position: absolute;
  left: -4px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(46, 42, 38, 0.25);
}
.photo-cam .ic {
  width: 15px;
  height: 15px;
}
.profile-nudge {
  color: var(--accent);
  margin: 2px 0 8px;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.about-form .card-title {
  text-align: center;
}

.mates .avatar.mate-photo {
  width: 42px;
  height: 42px;
  font-size: 0.8rem;
}
.mate-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.mate-text small {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
.mate-text small b {
  color: var(--accent);
  font-weight: 600;
}
.mates li:has(.mate-text small) {
  align-items: flex-start;
}

.pass-card {
  text-align: center;
}
.pass-frame {
  aspect-ratio: 3 / 4;
  max-width: 340px;
  margin: 4px auto 14px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(46, 42, 38, 0.16);
  background: linear-gradient(90deg, var(--card) 0%, var(--bg-2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
.pass-frame:has(img:not([hidden])) {
  animation: none;
}
.pass-frame img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Regia: libro degli auguri, playlist ---------- */

.g-photo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}
.g-photo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.song-list {
  margin: 0 0 14px;
  padding-left: 1.6em;
  display: grid;
  gap: 10px;
}
.song-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}
.song-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.song-links {
  display: flex;
  gap: 12px;
}
.wish-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.wish-from {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.wish-section {
  margin: 26px 0 0;
  font-size: 1.1rem;
}
.story-card p + p {
  margin-top: 6px;
}
.story-who {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 6px;
}
.wish-card p {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  line-height: 1.55;
}
.print-only {
  display: none;
}
@media print {
  .topbar,
  .tabbar,
  #demo-bar,
  #toasts,
  .back,
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  body,
  .view {
    background: #fff !important;
  }
  .wish-book .page-title,
  .wish-book-names {
    text-align: center;
  }
  .wish-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ---------- «Minimal luxury» cover: powder blue, moving light, fine-line arch ---------- */

.hero.luxe {
  --luxe-line: color-mix(in srgb, var(--accent) 42%, #a9bccf);
  --luxe-arch-w: min(calc(100% - 36px), 600px);
  min-height: 64vh;
  /* The text starts below the top of the arch, where the curve is wide enough. */
  padding: 84px 24px 34px;
  align-items: flex-end;
  color: var(--ink);
  isolation: isolate;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .32 0 0 0 0 .54 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f2f6fa 0%, #e2eaf2 48%, #d7e2ec 78%, var(--bg) 100%);
}
.hero.luxe::after {
  display: none;
}
/* Light drifting slowly, like a window's light on silk. */
.luxe-light {
  position: absolute;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 26% at 30% 34%, rgba(255, 255, 255, 0.95), transparent 70%),
    radial-gradient(30% 22% at 70% 58%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(42% 30% at 64% 26%, rgba(150, 173, 198, 0.34), transparent 72%),
    radial-gradient(46% 32% at 24% 70%, rgba(150, 173, 198, 0.3), transparent 72%);
  animation: luxe-drift 17s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes luxe-drift {
  0% {
    transform: translate3d(-7%, -4%, 0) rotate(-3deg) scale(1);
  }
  50% {
    transform: translate3d(6%, 3%, 0) rotate(4deg) scale(1.08);
  }
  100% {
    transform: translate3d(-3%, 7%, 0) rotate(-5deg) scale(1.03);
  }
}
/* A double fine line in the shape of an arch (a round top is half the width), drawn upwards. */
.luxe-arch {
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 50%;
  width: var(--luxe-arch-w);
  transform: translateX(-50%);
  border: 1px solid var(--luxe-line);
  border-bottom: 0;
  border-radius: 1000px 1000px 0 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  animation: luxe-arch-in 2.6s cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
.luxe-arch::before {
  content: '';
  position: absolute;
  inset: 8px 8px 0;
  border: 1px solid color-mix(in srgb, var(--luxe-line) 55%, transparent);
  border-bottom: 0;
  border-radius: inherit;
}
@keyframes luxe-arch-in {
  from {
    clip-path: inset(100% 0 0 0);
    opacity: 0.3;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}
/* Four-pointed twinkles. */
.luxe-sparkles i {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: linear-gradient(135deg, #fff 15%, #9fb3cf 90%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 4px rgba(61, 81, 138, 0.5));
  opacity: 0;
  animation: luxe-twinkle var(--t) ease-in-out var(--d) infinite;
}
@keyframes luxe-twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  45%,
  55% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
}
.hero.luxe .hero-inner {
  width: 100%;
  max-width: 520px;
  animation: luxe-rise 1.6s 0.5s cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
@keyframes luxe-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.hero.luxe .hero-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  margin-bottom: 4px;
}
/* The names on three lines, as on a printed invitation, with a slow sheen. */
.hero.luxe .hero-names {
  font-size: clamp(3.1rem, 15.5vw, 4.8rem);
  line-height: 0.92;
  margin: 10px 0 2px;
  color: var(--accent);
}
.hero.luxe .hero-names .amp {
  display: block;
  font-size: 0.62em;
  line-height: 1.1;
  padding: 0;
  color: color-mix(in srgb, var(--accent) 70%, #9fb4c9);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero.luxe .hero-names {
    background: linear-gradient(100deg, var(--accent) 42%, #9db1d2 50%, var(--accent) 58%) 100% 0 / 260% 100% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: luxe-sheen 8s ease-in-out 2.4s infinite;
  }
  .hero.luxe .hero-names .amp {
    color: transparent;
  }
}
@keyframes luxe-sheen {
  0%,
  70% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}
.luxe-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 150px;
  margin: 14px auto 10px;
}
.luxe-rule::before,
.luxe-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--luxe-line));
}
.luxe-rule::after {
  background: linear-gradient(270deg, transparent, var(--luxe-line));
}
.luxe-rule i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--luxe-line);
  transform: rotate(45deg);
}
.hero.luxe .hero-date {
  color: var(--ink-2);
  opacity: 1;
}
/* The countdown in fine type, divided by hairlines. */
.hero.luxe .countdown {
  gap: 0;
  margin-top: 22px;
}
.hero.luxe .cd-box {
  min-width: 68px;
  padding: 2px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hero.luxe .cd-box + .cd-box {
  border-left: 1px solid color-mix(in srgb, var(--luxe-line) 70%, transparent);
}
.hero.luxe .cd-box b {
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--accent);
}
.hero.luxe .cd-box span {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--ink-2);
}
.hero.luxe.compact {
  min-height: 46vh;
}
@media (min-width: 700px) {
  .hero.luxe {
    min-height: 70vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .luxe-light,
  .luxe-arch,
  .luxe-sparkles i,
  .hero.luxe .hero-inner,
  .hero.luxe .hero-names {
    animation: none;
  }
  .luxe-sparkles i {
    opacity: 0.8;
  }
}

/* The stinky cheese */
.fx-cheese {
  opacity: 0;
  transition: opacity 0.25s;
}
.fx-cheese.on {
  opacity: 1;
}
.fx-cheese-text {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 20%;
  padding: 0 12px;
  text-align: center;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-style: normal;
  font-size: clamp(15px, 5.4vw, 34px);
  line-height: 1.4;
  color: #c9f06b;
  -webkit-text-stroke: 2px #2f5a12;
  text-shadow:
    4px 4px 0 #3f7a1a,
    0 0 18px rgba(170, 230, 80, 0.55);
  animation: cheese-text 3.7s ease-in-out both;
}
@keyframes cheese-text {
  0%,
  28% {
    opacity: 0;
    transform: scale(0.5) rotate(-6deg);
  }
  36% {
    opacity: 1;
    transform: scale(1.12) rotate(3deg);
  }
  42%,
  48%,
  54%,
  60%,
  66%,
  72% {
    opacity: 1;
    transform: scale(1) rotate(-2deg);
  }
  45%,
  51%,
  57%,
  63%,
  69% {
    transform: scale(1) rotate(2deg);
  }
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- Conferma di presenza per nucleo ---------- */

.rsvp-for {
  margin: 4px 0 0;
  color: var(--ink-2);
}
.rsvp-person {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.rsvp-person.many {
  margin-top: 14px;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--card));
}
.rsvp-person.many.done {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.rp-name {
  padding: 0 6px;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
}
.rp-name small {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.rsvp-person .rsvp-choice {
  margin-top: 8px;
}
.rsvp-person.many .rsvp-choice .choice {
  padding: 12px 6px;
}
.rsvp-person.many .rsvp-choice .choice span {
  font-size: 1.5rem;
}
.rp-yes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  text-align: left;
}
.raw-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.raw-choice .raw {
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.raw-choice .raw.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.rsvp-end {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.rsvp-summary {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rsvp-summary li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--card));
}
.rsvp-summary small {
  color: var(--muted);
}

/* Regia: nuclei, people to link */
.nucleus-head {
  margin: 14px 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.tag.warn {
  background: color-mix(in srgb, var(--warn) 16%, #fff);
  color: var(--warn);
}
.merge-box {
  margin: 8px 0 12px;
}
.merge-box select {
  flex: 1;
}

/* The couple looking at the app as a guest */
.preview-bar {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: #2e2a26;
  color: #fbf8f3;
  font: 500 0.82rem/1.3 var(--sans);
  font-style: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.preview-bar .ic {
  width: 16px;
  height: 16px;
  flex: none;
}
.preview-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-bar button {
  flex: none;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #fbf8f3;
  color: #2e2a26;
  font: 600 0.8rem var(--sans);
  cursor: pointer;
}
