:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #2f2a25;
  --muted: #8a8178;
  --sage: #7d8f73;
  --gold: #b8955a;
  --line: #e8e1d6;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabs-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; color: var(--gold); margin: 0 0 .5rem; }
.names { font-size: clamp(2.6rem, 11vw, 4.5rem); line-height: 1.05; }
.amp { color: var(--gold); font-style: italic; }
.date { font-family: var(--serif); font-size: 1.25rem; margin: .5rem 0 0; }
.venue { color: var(--muted); margin: .25rem 0 0; }
.muted { color: var(--muted); text-align: center; }
.lead { color: var(--muted); margin: .25rem 0 1.25rem; }

/* Gate */
.gate { min-height: 100svh; display: grid; place-items: center; padding: 1.5rem; text-align: center;
  background: radial-gradient(ellipse at top, #fff 0%, var(--bg) 70%); }
.gate-card { width: 100%; max-width: 380px; }
.gate form { margin-top: 2.5rem; display: grid; gap: .75rem; text-align: left; }
.gate label { font-size: .85rem; color: var(--muted); }
.error { color: #a5483a; margin: 0; font-size: .9rem; }

input[type=text], input[type=search], input:not([type]) {
  width: 100%; font: inherit; padding: .85rem 1rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); color: var(--ink); outline: none;
}
input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(125,143,115,.15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; padding: .85rem 1.25rem; border-radius: 12px; border: 0;
  background: var(--sage); color: #fff; cursor: pointer; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-big { width: 100%; padding: 1.1rem; font-size: 1.1rem; }
.btn-ghost { background: transparent; color: var(--sage); border: 1px solid var(--sage); display: flex; margin: 1.5rem auto 0; }

/* App */
.hero { text-align: center; padding: 3rem 1.5rem 2rem; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at top, #fff 0%, var(--bg) 75%); }
main { max-width: 720px; margin: 0 auto; padding: 1.75rem 1.25rem calc(var(--tabs-h) + 2rem + env(safe-area-inset-bottom)); }
.panel h2 { font-size: 2rem; text-align: center; }
.panel .lead { text-align: center; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { flex: 1; height: var(--tabs-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted); font-size: .75rem; gap: 2px; }
.tabs a span { font-size: 1.35rem; filter: grayscale(1); opacity: .7; }
.tabs a.active { color: var(--sage); font-weight: 600; }
.tabs a.active span { filter: none; opacity: 1; }

/* Seats */
.seat-results { margin-top: 1rem; display: grid; gap: .75rem; }
.seat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; text-align: center; }
.seat .who { font-weight: 600; }
.seat .table-no { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); line-height: 1.1; margin: .25rem 0; }
.seat .mates { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* Menu */
.menu-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 2rem 1.5rem;
  text-align: center; box-shadow: 0 10px 30px -15px rgba(0,0,0,.15); outline: 1px solid var(--line); outline-offset: -10px; }
.ornament { color: var(--gold); margin: .25rem 0; }
.course { padding: 1rem 0; }
.course + .course { border-top: 1px solid var(--line); }
.course h3 { font-size: 1.4rem; color: var(--sage); margin-bottom: .35rem; }
.course p { margin: .15rem 0; }
.course .veg { color: var(--muted); font-size: .9rem; font-style: italic; }

/* Upload */
.upload { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.upload-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.upload-list li { font-size: .85rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .75rem; }
.upload-list .bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: .35rem; overflow: hidden; }
.upload-list .bar i { display: block; height: 100%; width: 0; background: var(--sage); transition: width .2s; }
.upload-list .done { color: var(--sage); }
.upload-list .fail { color: #a5483a; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { all: unset; cursor: pointer; aspect-ratio: 1; background: var(--line); position: relative; overflow: hidden; border-radius: 4px; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .vid::after { content: "▶"; position: absolute; right: 6px; bottom: 4px; color: #fff; text-shadow: 0 0 4px #000; font-size: .9rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,18,16,.95); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lb-body { max-width: 100vw; max-height: 85svh; display: flex; }
.lb-body img, .lb-body video { max-width: 100vw; max-height: 85svh; object-fit: contain; }
.lb-close { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 12px; background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; }
.lb-download { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 16px); color: #fff; font-size: .9rem; }
.wall-link { margin-top: 1.25rem; font-size: .9rem; }
.wall-link a { color: var(--sage); }
