/* ============================================================
   Shmeg's wedding — shared wedding aesthetic
   Ivory + blush + gold, refined serif display type.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500&display=swap");

:root {
  --ivory:   #faf6f0;
  --cream:   #f3ece1;
  --ink:     #3a342e;
  --muted:   #8a8076;
  --blush:   #c98b86;
  --blush-d: #a96b67;
  --sage:    #8a9a86;
  --gold:    #b2924f;
  --line:    #e8ddcb;
  --card:    #fffdfa;
  --shadow:  0 8px 30px rgba(80, 60, 40, 0.10);
  --serif:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:    "Jost", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* faint botanical wash */
body {
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(201, 139, 134, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 120%, rgba(138, 154, 134, 0.08), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--blush-d); }

/* ---------- header ---------- */

.site-header {
  text-align: center;
  padding: 30px 20px 18px;
  position: relative;
}
.monogram {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}
.site-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.site-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
  margin: 8px 0 0;
}
.rule {
  width: 64px;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: 16px auto 0;
  position: relative;
}
.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}
.rule::before { left: -10px; }
.rule::after  { right: -10px; }

/* ---------- generic buttons / inputs ---------- */

button {
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease;
}
button:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blush);
  color: #fff;
  padding: 12px 26px;
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(201, 139, 134, 0.35);
}
.btn-primary:hover { background: var(--blush-d); }
.btn-primary:disabled { opacity: .55; cursor: default; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 12px 20px;
  font-size: 14px;
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); }

input[type="text"],
input[type="password"] {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(201, 139, 134, 0.15);
}

.err { color: var(--blush-d); font-size: 14px; min-height: 18px; margin: 4px 0 0; }
.hidden { display: none !important; }

/* ============================================================
   AUTH PAGE
   ============================================================ */

body.auth { display: flex; align-items: center; justify-content: center; min-height: 100svh; padding: 24px; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 38px 32px 32px;
  text-align: center;
}
.auth-card .site-header { padding: 0 0 6px; }
.auth-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 14px 0 22px;
  line-height: 1.5;
}
.field { text-align: left; margin: 0 0 14px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.auth-actions { margin-top: 22px; }
.btn-block { width: 100%; }
.btn-primary.btn-block { padding: 15px 26px; font-size: 16px; }

/* divider between the primary (create) action and the secondary (sign in) */
.auth-divider {
  display: flex; align-items: center;
  color: var(--muted); font-size: 13px; letter-spacing: .02em;
  margin: 24px 0 14px;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { padding: 0 14px; }

/* ============================================================
   GALLERY
   ============================================================ */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: rgba(250, 246, 240, 0.8);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  border-bottom: 1px solid var(--line);
  padding: calc(11px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-left)) 11px max(16px, env(safe-area-inset-right));
}
.topbar .who { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .who b { color: var(--ink); font-weight: 500; }
.topbar .links { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.linkbtn {
  background: none; color: var(--muted); padding: 10px 12px; font-size: 13px;
  letter-spacing: .04em; border-radius: 8px;
}
.linkbtn:hover { color: var(--blush-d); }

.gallery-wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom));
}

/* banner shown when an admin is viewing another guest's photos */
.view-banner {
  max-width: 1100px; margin: 0 auto 6px; padding: 12px 18px;
  text-align: center; font-size: 14px; color: var(--muted);
}
.view-banner b { color: var(--ink); font-weight: 500; }
.view-banner a { color: var(--blush-d); text-decoration: none; white-space: nowrap; }
.view-banner a:hover { text-decoration: underline; }

.empty {
  text-align: center; color: var(--muted); font-family: var(--serif);
  font-style: italic; font-size: 22px; padding: 70px 20px;
}

/* masonry-ish responsive grid */
.grid {
  columns: 4 240px;
  column-gap: 14px;
}
.card {
  break-inside: avoid;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.card img {
  display: block; width: 100%; height: auto; cursor: zoom-in;
  background: var(--cream);
}
.card .meta { padding: 11px 14px 13px; }
.card .caption { font-family: var(--serif); font-size: 18px; line-height: 1.25; color: var(--ink); }
.card .by { font-size: 12px; color: var(--muted); margin-top: 5px; letter-spacing: .03em; }
.card .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.heart {
  background: none; padding: 4px 6px; font-size: 19px; line-height: 1;
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
}
.heart .n { font-family: var(--sans); font-size: 14px; }
.heart.liked { animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.4)} 100%{transform:scale(1)} }
.del {
  background: none; color: var(--muted); font-size: 12px; padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 8px;
}
.del:hover { color: var(--blush-d); border-color: var(--blush); }

/* primary action: big, centered "Add a photo" hero button */
.upload-hero { text-align: center; padding: 6px 16px 26px; }
.btn-add {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--blush); color: #fff;
  padding: 20px 46px; font-size: 21px; letter-spacing: .03em;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(201, 139, 134, 0.45);
}
/* hover lift only on real pointers — avoids the raised state sticking after a tap */
@media (hover: hover) { .btn-add:hover { background: var(--blush-d); transform: translateY(-2px); } }
.btn-add:active { background: var(--blush-d); }
.btn-add .plus { font-size: 26px; line-height: 1; font-weight: 400; }
.upload-hint {
  font-family: var(--serif); font-style: italic;
  color: var(--muted); font-size: 17px; margin: 16px 0 0;
}
@media (max-width: 560px) {
  .btn-add { width: 100%; max-width: 360px; justify-content: center; padding: 19px 30px; font-size: 20px; }
}

/* upload modal */
.modal-back {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(58, 52, 46, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal {
  width: 100%; max-width: 460px;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 26px; text-align: center;
}
.modal h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 16px; }
.modal .preview {
  width: 100%; max-height: 46vh; object-fit: contain;
  border-radius: 12px; background: var(--cream); margin-bottom: 16px;
}
/* batch thumbnails (multi-upload) */
.thumb-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 16px; max-height: 46vh; overflow-y: auto;
}
.thumb-grid.single { grid-template-columns: 1fr; }
.thumb-grid.single .thumb { padding-bottom: 0; }
.thumb-grid.single .thumb img { position: static; max-height: 46vh; object-fit: contain; }
.thumb {
  position: relative; padding-bottom: 100%; /* square */
  border-radius: 10px; overflow: hidden; background: var(--cream);
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-x {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; padding: 0; line-height: 22px;
  font-size: 17px; color: #fff; background: rgba(40,35,30,.6);
  border-radius: 50%; backdrop-filter: blur(4px);
}
.thumb-x:hover { background: rgba(169,107,103,.9); }
@media (max-width: 560px) {
  .thumb-grid { grid-template-columns: repeat(3, 1fr); }
}
.modal-actions { display: flex; gap: 12px; margin-top: 18px; }
.modal-actions button { flex: 1; }
.uploading { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(40, 35, 30, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}
.lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 96vw; max-height: 100%;
}
.lb-stage img {
  max-width: 96vw; max-height: 78vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-meta { width: 100%; max-width: 680px; text-align: center; }
.lb-cap-view { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-caption {
  font-family: var(--serif); color: #fff; font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.3; text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.lb-caption.muted { opacity: .5; font-style: italic; }
.lb-editbtn {
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28);
  padding: 8px 16px; font-size: 13px; border-radius: 999px; backdrop-filter: blur(6px);
}
.lb-editbtn:hover { background: rgba(255,255,255,.26); }
.lb-cap-edit { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.lb-cap-edit input {
  flex: 1 1 260px; max-width: 420px; font-size: 16px; padding: 11px 14px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.95); color: var(--ink);
}
.lb-savebtn {
  background: var(--blush); color: #fff; padding: 10px 20px; font-size: 14px; border-radius: 999px;
}
.lb-savebtn:hover { background: var(--blush-d); }
/* nav + close controls */
.lb-nav, .lb-close {
  position: absolute; z-index: 2;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); line-height: 1;
}
.lb-nav {
  top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 50%; font-size: 32px; padding-bottom: 4px;
}
.lb-prev { left: max(12px, env(safe-area-inset-left)); }
.lb-next { right: max(12px, env(safe-area-inset-right)); }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.28); }
.lb-close {
  top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px;
}
@media (max-width: 560px) {
  .lb-nav { width: 46px; height: 46px; font-size: 28px; }
  .lb-stage img { max-height: 70vh; }
}

@media (max-width: 560px) {
  .grid { columns: 2 150px; column-gap: 10px; }
  .card { margin-bottom: 10px; }
  .card .caption { font-size: 16px; }
  /* roomier tap targets on phones */
  .heart { padding: 8px 8px; font-size: 22px; }
  .del { padding: 8px 10px; font-size: 13px; }
  .site-header { padding: 22px 16px 12px; }
  .upload-hero { padding: 4px 16px 20px; }
  .upload-hint { font-size: 16px; }
  /* pin the upload modal near the top so the caption stays visible above the keyboard */
  .modal-back { align-items: flex-start; padding: 16px; padding-top: max(20px, env(safe-area-inset-top)); }
  .modal { padding: 20px 18px; }
  .modal .preview { max-height: 40vh; }
  .modal h3 { font-size: 23px; }
}

/* ============================================================
   FEED (all photos, infinite scroll, prominent likes)
   ============================================================ */

.feed-controls {
  position: sticky; top: 0; z-index: 15;
  display: flex; justify-content: center;
  padding: 12px 16px;
  background: rgba(250, 246, 240, 0.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.seg {
  display: inline-flex; background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px;
}
.seg-btn {
  background: none; color: var(--muted);
  padding: 9px 20px; font-size: 14px; border-radius: 999px; letter-spacing: .02em;
}
.seg-btn.active { background: var(--blush); color: #fff; box-shadow: 0 3px 10px rgba(201,139,134,.4); }

/* "new photos" pill — floats under the sticky sort controls */
.new-pill {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  top: calc(70px + env(safe-area-inset-top));
  background: var(--blush); color: #fff;
  padding: 10px 22px; font-size: 14px; letter-spacing: .03em;
  border-radius: 999px; box-shadow: 0 8px 24px rgba(201,139,134,.5);
  animation: pillDrop .3s ease;
}
.new-pill:hover { background: var(--blush-d); }
@keyframes pillDrop { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.feed { max-width: 540px; margin: 0 auto; padding: 16px 14px 0; }
.feed-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.feed-img { display: block; width: 100%; height: auto; background: var(--cream); cursor: zoom-in; }
.lb-by { font-family: var(--serif); font-style: italic; color: rgba(255,255,255,.82); font-size: clamp(14px,1.8vw,20px); margin-top: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.lb-feed-text { margin-top: 12px; }
.feed-body { padding: 14px 16px 16px; }

/* prominent like button */
.like-big {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ivory); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 11px 22px; font-size: 16px; font-weight: 400;
}
.like-big .like-heart { font-size: 22px; line-height: 1; color: var(--muted); transition: color .15s ease; }
.like-big .like-num { font-weight: 600; min-width: 12px; }
.like-big:hover { border-color: var(--blush); }
.like-big.liked {
  background: #fbeeec; border-color: var(--blush); color: var(--blush-d);
}
.like-big.liked .like-heart { color: #e0524b; }
.like-big.pop { animation: pop .35s ease; }

.feed-text { margin-top: 12px; }
.feed-cap { font-family: var(--serif); font-size: 20px; line-height: 1.3; color: var(--ink); }
.feed-by { font-size: 13px; color: var(--muted); margin-top: 5px; letter-spacing: .03em; }

/* back-to-top button (bottom-right, fades in after scrolling) */
.to-top {
  position: fixed; z-index: 40;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--blush); color: #fff; font-size: 24px; line-height: 1;
  box-shadow: 0 8px 22px rgba(201,139,134,.5);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--blush-d); }

.feed-sentinel { height: 1px; }
.feed-end {
  text-align: center; color: var(--muted); font-family: var(--serif);
  font-style: italic; font-size: 18px; padding: 24px 16px 60px;
}

/* ============================================================
   ACCOUNTS (admin-only /users page)
   ============================================================ */

.users-wrap { max-width: 640px; margin: 0 auto; padding: 4px 16px calc(40px + env(safe-area-inset-bottom)); }
.users-title {
  font-family: var(--serif); font-weight: 500; font-size: 26px;
  text-align: center; margin: 4px 0 20px; color: var(--ink);
}
.users-title .count { color: var(--muted); font-weight: 400; }
.user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.user-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow);
  color: inherit; cursor: pointer;
  transition: border-color .15s ease, transform .12s ease;
}
.user-row:hover { border-color: var(--blush); transform: translateY(-1px); }
.user-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.reset-btn {
  flex-shrink: 0; background: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; letter-spacing: .02em;
}
.reset-btn:hover { color: var(--blush-d); border-color: var(--blush); }
@media (max-width: 560px) {
  .user-row { flex-wrap: wrap; }
  .user-meta { order: 3; }
  .reset-btn { order: 2; margin-left: auto; padding: 7px 12px; }
}
.user-name {
  font-size: 17px; color: var(--ink); font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 999px;
  padding: 2px 8px; flex-shrink: 0;
}
.badge.you { color: var(--blush-d); border-color: var(--blush); }
.user-meta { text-align: right; flex-shrink: 0; }
.user-photos { display: block; font-size: 16px; color: var(--ink); font-weight: 500; }
.user-joined { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   SLIDESHOW (public, fullscreen, for the venue screen)
   ============================================================ */

body.slideshow {
  background: #1a1512;
  overflow: hidden;
  height: 100svh;
}
.show {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.show-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  /* long, gentle crossfade — kept in sync with FADE_MS in slideshow.js */
  transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.show-slide.on { opacity: 1; }
/* blurred fill behind the photo so any aspect ratio looks intentional */
.show-slide .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(44px) brightness(0.42) saturate(1.1);
  transform: scale(1.18);
}
.show-slide img {
  position: relative;
  max-width: 92vw; max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  /* slow, continuous ken-burns drift across the whole time on screen */
  animation: drift 11s ease-in-out both;
}
@keyframes drift {
  from { transform: scale(1.0); }
  to   { transform: scale(1.05); }
}

/* persistent corner chrome: names (top-left) + date (top-right) */
.show-chrome {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  transition: opacity 1s ease;
}
.show-chrome.hide { opacity: 0; }
.show-names {
  position: absolute; left: max(34px, env(safe-area-inset-left));
  top: calc(26px + env(safe-area-inset-top));
  font-family: var(--serif); font-weight: 500; color: #fff;
  font-size: clamp(22px, 2.6vw, 38px); letter-spacing: .01em;
  text-shadow: 0 2px 16px rgba(0,0,0,.7);
}
.show-when {
  position: absolute; right: max(34px, env(safe-area-inset-right));
  top: calc(30px + env(safe-area-inset-top));
  font-family: var(--serif); font-style: italic; color: #fff; opacity: .9;
  font-size: clamp(15px, 1.9vw, 26px);
  text-shadow: 0 2px 16px rgba(0,0,0,.7);
}

/* per-slide caption: top-center, smaller, on a subtle pill */
.slide-cap {
  position: absolute; z-index: 2;
  top: calc(74px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%);
  max-width: min(74vw, 900px); text-align: center;
  font-family: var(--serif); font-weight: 500; line-height: 1.25;
  font-size: clamp(17px, 2vw, 28px); color: #fff;
  padding: 9px 24px; border-radius: 999px;
  background: rgba(26, 21, 18, 0.42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 22px rgba(0,0,0,.3);
}

/* per-slide uploader: bottom-left, small pill */
.slide-by {
  position: absolute; z-index: 2;
  left: max(34px, env(safe-area-inset-left));
  bottom: calc(28px + env(safe-area-inset-bottom));
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(13px, 1.3vw, 18px); color: #fff;
  padding: 7px 17px; border-radius: 999px;
  background: rgba(26, 21, 18, 0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 3px 16px rgba(0,0,0,.32);
}

/* title / empty cards */
.show-title {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 30px;
  transition: opacity 1s ease;
}
.show-title .mono {
  font-family: var(--serif); letter-spacing: .42em; text-transform: uppercase;
  font-size: 14px; color: var(--gold); margin-bottom: 16px;
}
.show-title h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(46px, 9vw, 110px); margin: 0; line-height: 1;
}
.show-title p { font-family: var(--serif); font-style: italic; opacity: .8; margin-top: 18px; font-size: clamp(16px, 2.2vw, 26px); }
.show-title .hint { font-family: var(--sans); font-weight: 300; opacity: .6; font-size: 15px; margin-top: 40px; }
.show-title .hint b { color: var(--gold); font-weight: 400; }

/* QR code, bottom-right, sitting just above the fullscreen button */
.qr {
  position: fixed; z-index: 6;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: clamp(110px, 11vw, 168px); height: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  transition: opacity 1s ease;
}
.qr.hide { opacity: 0; }   /* hidden while the title card (with its own big QR) is up */

/* big centered QR on the title card */
.title-qr {
  width: clamp(170px, 20vw, 260px); height: auto;
  background: #fff; border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  margin-top: 30px;
}
.title-qr-cap {
  font-family: var(--serif); font-style: italic;
  color: #fff; opacity: .8; font-size: clamp(14px, 1.6vw, 20px);
  margin-top: 12px;
}

/* tap-to-fullscreen affordance */
.fs-btn {
  position: fixed; z-index: 6;
  bottom: calc(16px + env(safe-area-inset-bottom));
  right: calc(16px + env(safe-area-inset-right));
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: 11px 18px; font-size: 14px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.fs-btn:hover { background: rgba(255,255,255,.22); }
