/* Theme: ivory paper, maroon ink, antique gold — matched to the wedding invitation. */
:root {
  --paper: #faf7f2;
  --card: #fffdf9;
  --ink: #2d2623;
  --maroon: #540f20;
  --maroon-2: #6e1a2e;
  --gold: #b08d57;
  --gold-soft: #dccaa5;
  --gold-faint: #f1e8d8;
  --muted: #7a6850;
  --line: #ebe1cf;
  --ok: #3d7a4f;
  --bad: #a3242f;
  --accent: #540f20;       /* current function's colour */
  --accent-ink: #ffffff;
  --radius: 26px;
  --shadow: 0 1px 2px rgba(84, 15, 32, 0.04), 0 18px 40px -22px rgba(84, 15, 32, 0.28);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --caps: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, #fff 0%, rgba(255, 255, 255, 0) 70%),
    var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.shell { max-width: 560px; margin: 0 auto; padding: 18px 16px 120px; }
.wide { max-width: 1060px; padding-bottom: 60px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  padding: 22px 20px;
  margin-top: 16px;
}
.card h2, .h2 {
  font: 600 1.45rem/1.2 var(--serif);
  color: var(--maroon);
  margin: 0 0 4px;
}
.card .sub { color: var(--muted); margin: 0 0 16px; font-size: 0.92rem; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.center { text-align: center; }

/* ---------- invitation-style pieces ---------- */
.eyebrow {
  font: 600 0.68rem/1.4 var(--caps);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.blessing {
  font: 600 0.92rem/1.4 var(--sans);
  color: var(--maroon);
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.blessing::before, .blessing::after { content: ''; display: inline-block; width: 22px; height: 1px; background: var(--gold); vertical-align: middle; margin: 0 10px; opacity: 0.7; }
.divider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--gold); font-size: 0.8rem; margin: 12px auto;
}
.divider::before, .divider::after { content: ''; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold-soft)); }
.divider::after { transform: scaleX(-1); }

.invite {
  position: relative;
  text-align: center;
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  padding: 30px 22px 26px;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--gold-soft);
}
/* inner frame line + gold corner flourishes */
.invite::before {
  content: '';
  position: absolute; inset: 9px;
  border: 1px solid var(--gold-faint);
  border-radius: calc(var(--radius) - 2px);
  pointer-events: none;
}
.invite::after {
  content: '';
  position: absolute; inset: 14px;
  pointer-events: none;
  --c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23c4a774' stroke-width='1'%3E%3Cpath d='M2 38V12C2 6.5 6.5 2 12 2h26'/%3E%3Cpath d='M7 30V14c0-4 3-7 7-7h16'/%3E%3Cpath d='M12 12c3 0 5 2 5 5-3 0-5-2-5-5z' fill='%23e8d9bb'/%3E%3C/svg%3E");
  background:
    var(--c) top left / 34px 34px no-repeat,
    var(--c) top right / 34px 34px no-repeat,
    var(--c) bottom left / 34px 34px no-repeat,
    var(--c) bottom right / 34px 34px no-repeat;
}
.invite > * { position: relative; z-index: 1; }
.invite .names {
  font: 500 clamp(2.1rem, 9vw, 2.9rem)/1.05 var(--serif);
  color: var(--maroon);
  letter-spacing: 0.02em;
  margin: 12px 0 6px;
  overflow-wrap: anywhere;
}
.invite .names .amp { display: block; font-style: italic; color: var(--gold); font-size: 0.6em; line-height: 1.2; }
.invite .tagline { font: italic 400 1.05rem/1.4 var(--serif); color: var(--muted); margin: 6px 0 0; }
.invite .hashtag { font: 600 0.72rem/1 var(--caps); letter-spacing: 0.2em; color: var(--maroon); margin: 14px 0 0; }
.invite .dates { font: 500 0.7rem/1.5 var(--caps); letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase; margin: 10px 0 0; }

/* ---------- function picker (pills) ---------- */
.fn-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; margin: 18px -2px 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.fn-tabs::-webkit-scrollbar { display: none; }
.fn-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 99px; border: 0;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--gold-soft);
  font: 600 0.86rem/1 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.fn-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255,255,255,0.6); }
.fn-pill[aria-selected='true'] { background: var(--c); color: var(--ci); box-shadow: 0 6px 16px -8px var(--c); }

/* ---------- function heading ---------- */
.fn-head { text-align: center; margin: 22px 0 4px; }
.fn-head .chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px;
  box-shadow: inset 0 0 0 1px var(--gold-soft); background: var(--card);
  font: 600 0.62rem/1 var(--caps); letter-spacing: 0.26em; text-transform: uppercase; color: var(--maroon);
}
.fn-head .when { font: 600 0.72rem/1.4 var(--caps); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin: 12px 0 2px; }
.fn-head h2 { font: 500 clamp(2.2rem, 9vw, 2.8rem)/1.05 var(--serif); color: var(--maroon); margin: 0; overflow-wrap: anywhere; }
.fn-head .theme { font: 500 0.78rem/1.4 var(--caps); letter-spacing: 0.14em; text-transform: uppercase; color: var(--maroon); margin: 4px 0 0; }

/* ---------- form bits ---------- */
.field { display: block; }
.field > span { display: block; font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; color: var(--ink); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  font-size: 16px; /* stops iOS zooming in on focus */
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(84, 15, 32, 0.08); }
textarea.input { resize: vertical; min-height: 96px; font: 1.1rem/1.4 var(--serif); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: 999px; border: 0;
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: transform 0.08s, filter 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--maroon); color: #fff; box-shadow: 0 10px 24px -12px rgba(84, 15, 32, 0.7); }
.btn-primary::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.btn-primary.no-dot::before { display: none; }
.btn-primary:hover { background: var(--maroon-2); }
.btn-ghost { background: var(--card); color: var(--maroon); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.btn-ghost:hover { background: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.68rem; gap: 6px; letter-spacing: 0.12em; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.notice { border-radius: 14px; padding: 12px 14px; font-size: 0.92rem; background: #fbf3e4; color: #7a5520; }
.notice.bad { background: #fbeceb; color: var(--bad); }
.notice.good { background: #edf5ef; color: var(--ok); }

/* ---------- upload queue ---------- */
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.progress-head strong { font: 600 1.25rem/1.3 var(--serif); color: var(--maroon); }
.bar { height: 6px; border-radius: 99px; background: var(--gold-faint); overflow: hidden; margin: 10px 0 16px; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--maroon)); border-radius: inherit; transition: width 0.3s ease; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--gold-faint); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.tile .ph svg { width: 28px; height: 28px; }
.tile .state { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(45, 20, 22, 0.4); color: #fff; transition: background 0.3s; }
.tile.done .state { background: transparent; place-items: end; padding: 6px; }
.tile.error .state { background: rgba(110, 20, 30, 0.65); cursor: pointer; }
.ring { width: 44px; height: 44px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: rgba(255, 255, 255, 0.3); }
.ring .val { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 0.25s; transform: rotate(-90deg); transform-origin: 50% 50%; }
.check { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.check svg { width: 15px; height: 15px; }
.tile .badge { position: absolute; left: 6px; bottom: 6px; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 2px 6px; border-radius: 6px; }
.retry-label { font-size: 0.75rem; font-weight: 600; text-align: center; padding: 4px; }

.thanks { text-align: center; padding: 4px 0 8px; }
.thanks .big { font: 500 1.8rem/1.2 var(--serif); color: var(--maroon); margin: 4px 0; }

.foot { text-align: center; color: var(--muted); font: italic 0.95rem/1.5 var(--serif); margin-top: 28px; }

/* ---------- album ---------- */
.album-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 4px 10px; }
.album-bar .count { font: 600 0.62rem/1.5 var(--caps); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.album {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  border-radius: 18px; overflow: hidden;
}
@media (min-width: 520px) { .album { gap: 6px; } }
.album .it {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; margin: 0;
  background: var(--gold-faint); cursor: pointer; overflow: hidden;
}
.album .it img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s, opacity 0.4s; opacity: 0; }
.album .it img.ok { opacity: 1; }
.album .it:hover img { transform: scale(1.03); }
.album .it .play {
  position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center;
}
.album .it .play svg { width: 12px; height: 12px; }
.album .it .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); }
.album .it .ph svg { width: 26px; height: 26px; }
.album .it.note {
  display: flex; flex-direction: column; justify-content: center; padding: 10px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--gold-soft); text-align: center;
}
.album .it.note q {
  font: italic 500 0.9rem/1.22 var(--serif); color: var(--maroon);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.album .it.note small { font-size: 0.66rem; color: var(--muted); margin-top: 6px; letter-spacing: 0.06em; }
.album-empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.album-empty .big { font: italic 500 1.5rem/1.3 var(--serif); color: var(--maroon); margin: 0 0 6px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: #160a0c;
  display: grid; grid-template-rows: auto 1fr auto;
  color: #fff;
  touch-action: pan-y;
}
.lightbox .lb-top, .lightbox .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
.lightbox .lb-bottom { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.lightbox .lb-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.lightbox .lb-stage img, .lightbox .lb-stage video, .lightbox .lb-stage iframe { max-width: 100%; max-height: 100%; border: 0; border-radius: 6px; }
.lightbox .lb-stage iframe { width: min(100%, 900px); aspect-ratio: 9 / 16; max-height: 100%; height: auto; background: #000; }
@media (orientation: landscape) { .lightbox .lb-stage iframe { aspect-ratio: 16 / 9; } }
.lightbox .lb-stage .lb-note { max-width: 520px; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; text-align: center; font: italic 500 clamp(1.5rem, 6vw, 2.2rem)/1.3 var(--serif); padding: 20px; }
.lightbox .cap { font: 500 1.05rem/1.3 var(--serif); }
.lightbox .cap small { display: block; font: 600 0.6rem/1.4 var(--caps); letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.6; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; flex: none; text-decoration: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.icon-btn svg { width: 20px; height: 20px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
@media (hover: none) { .lb-nav { display: none; } }

/* ---------- bottom navigation (like the invitation's) ---------- */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex; gap: 4px; padding: 6px;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 99px;
  box-shadow: 0 12px 30px -12px rgba(84, 15, 32, 0.35), inset 0 0 0 1px var(--gold-soft);
}
.bottom-nav button {
  display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 99px;
  background: transparent; color: var(--muted); cursor: pointer;
  font: 600 0.66rem/1 var(--caps); letter-spacing: 0.2em; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav button svg { width: 18px; height: 18px; }
.bottom-nav button[aria-selected='true'] { background: var(--maroon); color: #fff; }

/* ---------- host dashboard ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; font: 500 1.6rem/1 var(--serif); color: var(--maroon); }
.brand .mark { font: 600 0.62rem/1 var(--caps); letter-spacing: 0.26em; color: var(--muted); text-transform: uppercase; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--maroon); }
.grid-form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grid-form.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid-form .span { grid-column: 1 / -1; } }
details.more > summary { cursor: pointer; color: var(--maroon); font-weight: 600; font-size: 0.88rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+ '; }
details.more[open] > summary::before { content: '− '; }

.celebration { margin-top: 26px; }
.celebration > .invite { text-align: left; padding: 24px; }
.celebration > .invite::after { display: none; }
.celebration .names { font-size: 2.1rem; margin: 4px 0 2px; }
.celebration .names .amp { display: inline; font-size: 0.8em; margin: 0 0.2em; }
.cel-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 760px) { .cel-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 12px; padding: 6px 6px 6px 12px; margin: 6px 0 10px; box-shadow: inset 0 0 0 1px var(--line); }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; }
.fn-list { display: grid; gap: 12px; margin-top: 16px; }
.fn-card {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px;
  background: var(--card); border-radius: 20px; padding: 16px;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  border-left: 6px solid var(--c);
}
.fn-card .qr { width: 112px; height: 112px; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); padding: 4px; }
.fn-card .qr svg { width: 100%; height: 100%; display: block; }
.fn-card h4 { margin: 0; font: 500 1.5rem/1.1 var(--serif); color: var(--maroon); overflow-wrap: anywhere; }
.fn-card .meta { color: var(--muted); font-size: 0.84rem; margin: 3px 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .fn-card { grid-template-columns: 1fr; } .fn-card .qr { width: 150px; height: 150px; } }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.on { background: #edf5ef; color: var(--ok); }
.pill.off { background: #f3eee6; color: var(--muted); }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px);
  background: var(--maroon); color: #fff; padding: 10px 18px; border-radius: 99px;
  font-size: 0.88rem; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 80;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--gold-faint); border-top-color: var(--maroon);
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- function chooser (single QR entry) ---------- */
.choices { display: grid; gap: 12px; }
.choice {
  position: relative; display: grid; gap: 4px; text-align: left; width: 100%;
  padding: 18px 52px 18px 20px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--gold-soft), inset 6px 0 0 var(--c);
  transition: transform 0.1s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.choice:active { transform: scale(0.985); }
.choice:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--gold), inset 6px 0 0 var(--c); }
.choice .eyebrow { color: var(--muted); letter-spacing: 0.24em; }
.choice .name { font: 500 1.9rem/1.1 var(--serif); color: var(--maroon); }
.choice .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }
.choice .now {
  font: 600 0.6rem/1 var(--caps); letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--maroon); color: #fff; padding: 5px 9px; border-radius: 99px;
}
.choice .arrow {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: var(--ci, #fff); font-size: 1rem;
}
.adding-to { margin: -4px 0 14px; font-size: 0.86rem; color: var(--muted); text-align: center; }
.adding-to strong { color: var(--maroon); font: 600 1.05rem/1 var(--serif); }
.linkish { border: 0; background: none; padding: 0; color: var(--maroon); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- dashboard: the one QR ---------- */
.main-qr-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 560px) { .main-qr-wrap { grid-template-columns: minmax(0, 1fr); } }
.main-qr { width: 170px; height: 170px; background: #fff; padding: 8px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--gold-soft); }
.main-qr svg { width: 100%; height: 100%; display: block; }
.fn-card.noqr { grid-template-columns: minmax(0, 1fr); }

/* Lift the bottom bar above Netlify's "Powered by Netlify" badge (bottom-right, ~64px tall). */
body.has-host-badge .bottom-nav { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 70px); }
body.has-host-badge .shell { padding-bottom: 190px; }
body.has-host-badge .toast { bottom: 160px; }

/* ---------- hardening found in QA ---------- */
/* Very long names without spaces must wrap instead of pushing the page sideways. */
h1, h2, h3, h4, p, span, strong, small, q, code, label, summary, .btn, .choice, .fn-pill { overflow-wrap: anywhere; }
.choices, .choice, .fn-head, .invite, .card { min-width: 0; max-width: 100%; }
.choice > span { min-width: 0; }
.fn-pill { max-width: 82vw; }
.fn-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Keyboard users can see where they are. */
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
.lightbox :focus-visible { outline-color: #fff; }
.sr-only:focus-visible + label { outline: 3px solid var(--maroon); outline-offset: 3px; }
.input:focus-visible { outline: none; }
