/* Shared look for the guest and admin apps, taken from the invitation:
   near-black warm brown, cream text, brushed-gold serif headings. */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #0f0905;
  --bg-2: #1a100a;
  --panel: rgba(38, 24, 14, 0.82);
  --line: rgba(214, 170, 106, 0.28);
  --cream: #f3e6cf;
  --muted: #b9a488;
  --gold: #d9ab6a;
  --gold-hi: #f6dfb0;
  --gold-lo: #b07f3f;
  --serif: "Cormorant Garamond", Baskerville, "Hoefler Text", "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--cream); font-family: var(--sans); }
body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }

.gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kicker { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.rule { width: 3.2rem; height: 1px; background: var(--gold); opacity: 0.7; border: 0; margin: 1.1rem 0; }

/* ---------- Guest app: the vertical reel ---------- */
.reel {
  height: 100vh; height: 100dvh;
  overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; overscroll-behavior: contain;
}
.reel::-webkit-scrollbar { display: none; }

.slide {
  position: relative; height: 100vh; height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 3.2rem) 1.6rem calc(env(safe-area-inset-bottom) + 3.4rem);
  background: radial-gradient(120% 80% at 80% 100%, #3a2110 0%, var(--bg-2) 45%, var(--bg) 100%);
  overflow: hidden;
}
.slide-inner { max-width: 34rem; width: 100%; margin: 0 auto; max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.slide-inner::-webkit-scrollbar { display: none; }

.slide h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 8.5vw, 3rem); line-height: 1.05; margin: 0.5rem 0 0; }
.slide .steps { font-family: var(--serif); font-style: italic; color: var(--gold-hi); font-size: 1.15rem; margin-top: 0.9rem; }
.slide p { font-size: 1.05rem; line-height: 1.5; margin: 0 0 0.9rem; }
.slide ul { margin: 0 0 0.9rem; padding: 0; list-style: none; }
.slide li { position: relative; padding-left: 1.25rem; margin: 0.55rem 0; line-height: 1.42; }
.slide li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.42rem; height: 0.42rem; border: 1px solid var(--gold); transform: rotate(45deg); }
.meta { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.04em; margin-top: 0.5rem; }
.sub { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold-hi); margin-top: 0.35rem; }

.fact, .question, .tip {
  border: 1px solid var(--line); border-radius: 0.6rem; background: var(--panel);
  padding: 0.85rem 1rem; font-size: 0.95rem; line-height: 1.42; margin: 0.8rem 0 0;
}
.fact b, .question b, .tip b { display: block; font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; font-weight: 600; }
.question { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

.dram-nr { font-family: var(--serif); font-size: 4.4rem; line-height: 0.9; opacity: 0.9; }
.dishes li { font-family: var(--serif); font-size: 1.14rem; }

/* Title slide: the invitation rebuilt in type, with its glass and barrel as artwork */
.slide.title { justify-content: space-between; text-align: center; padding: calc(env(safe-area-inset-top) + 3.9rem) 1.3rem calc(env(safe-area-inset-bottom) + 3.4rem); background: #0d0704; }
.slide.title::before {
  content: ""; position: absolute; right: -8%; bottom: 14%; width: 92%; aspect-ratio: 664 / 650; z-index: 0;
  background: url("/img/hero.jpg") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(75% 70% at 62% 58%, #000 38%, transparent 100%);
  mask-image: radial-gradient(75% 70% at 62% 58%, #000 38%, transparent 100%);
  opacity: 0.92;
}
.slide.title::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, #0d0704 16%, rgba(13,7,4,0.55) 44%, rgba(13,7,4,0) 62%, rgba(13,7,4,0.7) 100%); }
.slide.title > * { position: relative; z-index: 1; }
.title .tagline { font-family: var(--serif); font-size: 0.74rem; letter-spacing: 0.52em; text-transform: uppercase; color: var(--gold-hi); margin-right: -0.52em; }
.title .orn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin: 0.6rem auto 0; color: var(--gold); }
.title .orn::before, .title .orn::after { content: ""; height: 1px; width: 4.2rem; background: linear-gradient(90deg, transparent, var(--gold)); }
.title .orn::after { transform: scaleX(-1); }
.title .orn svg { width: 0.9rem; height: 0.9rem; }
.title h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 10vw, 4rem); line-height: 1; margin: 0.7rem 0 0.45rem; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.title .event { font-family: var(--serif); font-size: clamp(1rem, 5.2vw, 1.8rem); letter-spacing: 0.44em; text-transform: uppercase; color: var(--gold-hi); margin-right: -0.44em; }
.title .soul { font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 0.7rem; }
.title .journey { font-family: var(--serif); font-weight: 500; font-size: clamp(2.7rem, 14vw, 4.4rem); line-height: 0.98; margin: 0; color: var(--cream); }
.title .lines { font-family: var(--serif); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.9; margin-top: 0.8rem; }
.title .rule { margin: 0.8rem auto 0; }
.title .features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; text-align: left; width: 46%; }
.title .features li { display: flex; align-items: center; gap: 0.7rem; padding: 0; margin: 0; font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.25; }
.title .features li::before { display: none; }
.title .features .ico { flex: none; width: 2.5rem; height: 2.5rem; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold-hi); background: rgba(13,7,4,0.45); }
.title .features svg { width: 1.3rem; height: 1.3rem; }
.title .when { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0.8rem; align-items: center; border: 1px solid var(--line); outline: 1px solid rgba(214,170,106,0.14); outline-offset: 3px; background: rgba(10,6,3,0.82); padding: 0.75rem 0.9rem; font-family: var(--serif); text-align: left; }
.title .when i { background: var(--line); height: 100%; }
.title .when b { display: block; font-weight: 500; font-size: 1.12rem; color: var(--cream); }
.title .when small { display: block; font-family: var(--serif); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 0.15rem; }

/* Locked teaser at the end of the reel */
.slide.locked { text-align: center; align-items: center; color: var(--muted); }
.slide.locked .lock { font-size: 2.4rem; }
.slide.locked h2 { color: var(--cream); font-size: 1.9rem; }

/* Stars and voting */
.stars { display: flex; gap: 0.3rem; margin-top: 1rem; }
.stars button { background: none; border: 0; padding: 0.15rem; font-size: 2.3rem; line-height: 1; color: rgba(214,170,106,0.28); cursor: pointer; }
.stars button.on { color: var(--gold-hi); text-shadow: 0 0 14px rgba(246,223,176,0.45); }
.saved { min-height: 1.2rem; font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

.choices { display: grid; gap: 0.55rem; margin-top: 1rem; }
.choices button {
  text-align: left; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--panel);
  padding: 0.8rem 1rem; font-family: var(--serif); font-size: 1.2rem; cursor: pointer;
}
.choices button small { display: block; font-family: var(--sans); font-size: 0.74rem; color: var(--muted); }
.choices button.on { border-color: var(--gold-hi); background: rgba(217,171,106,0.2); }

.bars { display: grid; gap: 0.8rem; margin-top: 1rem; }
.bar-row .name { display: flex; justify-content: space-between; gap: 0.6rem; font-family: var(--serif); font-size: 1.1rem; }
.bar-row .name span:last-child { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.bar { height: 0.5rem; border-radius: 1rem; background: rgba(214,170,106,0.16); overflow: hidden; margin-top: 0.3rem; }
.bar i { display: block; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.5s; }
.bar-row.win .name { color: var(--gold-hi); }

/* Overlays on the reel */
.dots { position: fixed; right: 0.55rem; top: 50%; transform: translateY(-50%); display: grid; gap: 0.34rem; z-index: 5; }
.dots i { width: 0.3rem; height: 0.3rem; border-radius: 50%; background: rgba(243,230,207,0.25); }
.dots i.open { background: rgba(217,171,106,0.7); }
.dots i.here { background: var(--gold-hi); transform: scale(1.7); }

.swipe-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 0.9rem); text-align: center; font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); z-index: 1; }
.swipe-hint::after { content: ""; display: block; width: 0.55rem; height: 0.55rem; margin: 0.3rem auto 0; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); animation: nudge 1.6s infinite; }
@keyframes nudge { 50% { transform: translateY(0.3rem) rotate(45deg); opacity: 0.4; } }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.2rem); transform: translate(-50%, 6rem);
  background: var(--gold-hi); color: #2a1808; border: 0; border-radius: 2rem; padding: 0.7rem 1.3rem;
  font-weight: 600; font-size: 0.92rem; box-shadow: 0 8px 30px rgba(0,0,0,0.55); z-index: 10; transition: transform 0.35s; cursor: pointer;
}
.toast.show { transform: translate(-50%, 0); }

.offline { position: fixed; top: calc(env(safe-area-inset-top) + 0.5rem); left: 50%; transform: translateX(-50%); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted); background: rgba(12,7,4,0.8); border: 1px solid var(--line); border-radius: 2rem; padding: 0.3rem 0.8rem; z-index: 10; }
.offline[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .swipe-hint::after { animation: none; } .toast, .bar i { transition: none; } }

/* Avatars, the profile chip and the join sheet */
.avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; overflow: hidden; background: #2a1a0e; border: 1px solid var(--gold); font-size: 1.15rem; line-height: 1; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 4.2rem; height: 4.2rem; font-size: 2.3rem; }
.avatar.small { width: 1.5rem; height: 1.5rem; font-size: 0.85rem; }
.fans { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.35rem; min-height: 0; }

.chip { position: fixed; left: 0.7rem; top: calc(env(safe-area-inset-top) + 0.6rem); z-index: 6; display: flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0.75rem 0.2rem 0.2rem; border-radius: 2rem; border: 1px solid var(--line); background: rgba(12,7,4,0.72); font-size: 0.82rem; max-width: 60vw; cursor: pointer; }
.chip[hidden] { display: none; }
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(6,3,1,0.72); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: 100%; max-width: 30rem; max-height: 92dvh; overflow-y: auto; background: #1a100a; border: 1px solid var(--line); border-bottom: 0; border-radius: 1.2rem 1.2rem 0 0; padding: 1.4rem 1.3rem calc(env(safe-area-inset-bottom) + 1.3rem); }
.sheet h2 { font-family: var(--serif); font-weight: 500; font-size: 2.1rem; margin: 0.3rem 0 1rem; }
.sheet .me { display: flex; align-items: center; gap: 0.9rem; }
.sheet input[type="text"] { flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; padding: 0.8rem 0.9rem; border-radius: 0.7rem; border: 1px solid var(--line); background: #120a06; color: var(--cream); }
.sheet .label { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin: 1.2rem 0 0.5rem; }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.3rem; }
.emojis button { aspect-ratio: 1; border: 1px solid transparent; border-radius: 0.6rem; background: rgba(214,170,106,0.08); font-size: 1.45rem; padding: 0; cursor: pointer; }
.emojis button.on { border-color: var(--gold-hi); background: rgba(217,171,106,0.25); }
.btn-line, .btn-gold { display: block; width: 100%; text-align: center; border-radius: 0.7rem; padding: 0.85rem 1rem; font-weight: 600; cursor: pointer; margin-top: 0.8rem; }
.btn-line { border: 1px solid var(--line); color: var(--cream); }
.btn-gold { border: 0; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #2a1808; font-size: 1.05rem; }
.btn-gold:disabled { opacity: 0.5; }
.sheet-error { color: #f0a394; margin: 0.8rem 0 0; font-size: 0.9rem; }
.sheet-error[hidden] { display: none; }

/* Short phones (iPhone SE and similar): tighten the title slide so nothing is cut off. */
@media (max-height: 720px) {
  .slide.title { padding-top: calc(env(safe-area-inset-top) + 3.3rem); padding-bottom: calc(env(safe-area-inset-bottom) + 2.9rem); }
  .title .journey { font-size: clamp(2.2rem, 11vw, 3rem); }
  .title .lines { line-height: 1.6; margin-top: 0.5rem; }
  .title .features { gap: 0.45rem; }
  .title .features .ico { width: 2rem; height: 2rem; }
  .title .soul { margin-top: 0.4rem; }
  .slide { padding-top: calc(env(safe-area-inset-top) + 3rem); padding-bottom: calc(env(safe-area-inset-bottom) + 2.2rem); }
  .dram-nr { font-size: 3rem; }
  .swipe-hint { font-size: 0; bottom: calc(env(safe-area-inset-bottom) + 0.7rem); } /* arrow only */
}
