/* 30 Years Towards Fulfilment: Art Deco editorial in black, white and champagne gold.
   Light ("invitation") and dark ("night") themes share every rule through these tokens. */

:root,
[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-2: #f6f3ec;
  --text: #2b2b2b;
  --heading: #0b0b0b;
  --muted: #7a776f;
  --line: #e4ded2;
  --line-strong: #0b0b0b;
  --input-bg: #ffffff;
  --gold: #d6b286;
  --gold-text: #8f6d3a;
  --gold-tint: #f4ebdd;
  --btn-bg: #0b0b0b;
  --btn-fg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.72);
  --header-fg: #0b0b0b;
  --logo-filter: brightness(0);
  --mark-filter: none;
  --shadow: 0 1px 2px rgba(20, 16, 8, 0.04), 0 12px 32px rgba(20, 16, 8, 0.06);
  --card-glow: none;

  --floor: #fdfcf9;
  --pattern: rgba(11, 11, 11, 0.045);
  --room-line: #0b0b0b;
  --fixture-fill: #f2efe8;
  --fixture-line: rgba(11, 11, 11, 0.55);
  --stage-fill: #0b0b0b;
  --table-a: #ffffff;
  --table-b: #efe9de;
  --table-line: rgba(11, 11, 11, 0.75);
  --inlay: rgba(214, 178, 134, 0.6);
  --plate: #ffffff;
  --plate-line: rgba(11, 11, 11, 0.3);
  --chair: #ffffff;
  --chair-line: #0b0b0b;
  --chair-back: #0b0b0b;
  --taken: #b7b2a7;
  --taken-line: #726d5f;
  --spot: #d6b286;
  --spot-strength: 0.22;
  --cone-strength: 0.18;
  --wordmark: rgba(11, 11, 11, 0.85);
  --tip-bg: rgba(255, 255, 255, 0.92);
  --marble-a: #f6f3ec;
  --marble-b: #ebe5d9;
  --plank-a: #efe6d6;
  --plank-line: rgba(120, 90, 50, 0.16);
  --counter-a: #1a1816;
  --counter-b: #3a352f;
  --rose: #a0283d;
  --rose-deep: #6e1424;
  --leaf: #4f6b45;
  --runner: #8c2236;
  --you: #c0924f;
  --you-line: #3d2a0e;
  --you-ink: #ffffff;
  --guest: #a0283d;
  --guest-line: #4a0c18;
  --guest-ink: #ffffff;
  --scroll-thumb: rgba(143, 109, 58, 0.45);
  --scroll-thumb-hover: #8f6d3a;
  --scroll-thumb-a: rgba(214, 178, 134, 0.55);
  --scroll-thumb-b: rgba(143, 109, 58, 0.55);
  --scroll-thumb-hover-a: #e6caa0;
  --scroll-thumb-hover-b: #8f6d3a;
  --scroll-glow: rgba(143, 109, 58, 0.35);
  --scroll-track-line: rgba(143, 109, 58, 0.14);
  --field-bg: #ffffff;
  --field-line: #cfc6b4;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #060606;
  --surface: rgba(18, 17, 16, 0.9);
  --surface-solid: #121110;
  --surface-2: rgba(255, 255, 255, 0.035);
  --text: #d6d0c5;
  --heading: #f5f0e6;
  --muted: #8c867a;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(245, 240, 230, 0.7);
  --input-bg: rgba(255, 255, 255, 0.04);
  --gold: #d6b286;
  --gold-text: #e2c393;
  --gold-tint: rgba(214, 178, 134, 0.12);
  --btn-bg: #f5f0e6;
  --btn-fg: #0b0b0b;
  --header-bg: rgba(8, 8, 8, 0.55);
  --header-fg: #f5f0e6;
  --logo-filter: none;
  --mark-filter: invert(1);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px rgba(0, 0, 0, 0.55);
  --card-glow: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 0%), rgba(214, 178, 134, 0.07), transparent 40%);

  --floor: #0b0b0a;
  --pattern: rgba(214, 178, 134, 0.055);
  --room-line: rgba(214, 178, 134, 0.5);
  --fixture-fill: #141311;
  --fixture-line: rgba(214, 178, 134, 0.35);
  --stage-fill: #000000;
  --table-a: #2a2723;
  --table-b: #141311;
  --table-line: rgba(214, 178, 134, 0.5);
  --inlay: rgba(214, 178, 134, 0.35);
  --plate: #34302b;
  --plate-line: rgba(255, 255, 255, 0.14);
  --chair: #1a1917;
  --chair-line: rgba(245, 240, 230, 0.75);
  --chair-back: rgba(245, 240, 230, 0.55);
  --taken: #5a5650;
  --taken-line: #837d6f;
  --spot: #d6b286;
  --spot-strength: 0.16;
  --cone-strength: 0.14;
  --wordmark: rgba(245, 240, 230, 0.32);
  --tip-bg: rgba(16, 15, 14, 0.82);
  --marble-a: #121110;
  --marble-b: #1a1816;
  --plank-a: #17130f;
  --plank-line: rgba(214, 178, 134, 0.08);
  --counter-a: #0a0908;
  --counter-b: #2c2822;
  --rose: #b3304a;
  --rose-deep: #6a1222;
  --leaf: #3f5a37;
  --runner: #5e1422;
  --primary: #d6b286;
  --primary-ink: #0b0b0b;
  --you: #b3304a;
  --you-line: #b3304a;
  --you-ink: #ffffff;
  --guest: #b3304a;
  --guest-line: #b3304a;
  --guest-ink: #ffffff;
  --scroll-thumb: rgba(214, 178, 134, 0.3);
  --scroll-thumb-hover: rgba(214, 178, 134, 0.6);
  --scroll-thumb-a: rgba(230, 202, 160, 0.45);
  --scroll-thumb-b: rgba(214, 178, 134, 0.22);
  --scroll-thumb-hover-a: #e6caa0;
  --scroll-thumb-hover-b: #d6b286;
  --scroll-glow: rgba(214, 178, 134, 0.55);
  --scroll-track-line: rgba(214, 178, 134, 0.16);
  --field-bg: rgba(255, 255, 255, 0.05);
  --field-line: rgba(214, 178, 134, 0.28);
}

:root {
  --todo: #b4532f;
  --danger: #c0473a;
  --radius: 16px;
  --sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --serif: 'Libre Baskerville', 'Baskerville', Georgia, serif;
  --script: 'Mrs Saint Delafield', 'Brush Script MT', cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); transition: background 0.4s; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: transparent;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Scrollbars styled like a piece of Art Deco hardware: a thin inlaid channel line down the
   track, and a fluted/reeded gold rail for the thumb, echoing the fan and linework motifs used
   elsewhere on the site rather than just a generic rounded gradient blob. Firefox only gets the
   plain colour it's capable of (scrollbar-color doesn't support gradients or textures). */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-track:vertical {
  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--scroll-track-line) calc(50% - 1px), var(--scroll-track-line) calc(50% + 1px), transparent calc(50% + 1px));
}
::-webkit-scrollbar-track:horizontal {
  background: linear-gradient(0deg, transparent calc(50% - 1px), var(--scroll-track-line) calc(50% - 1px), var(--scroll-track-line) calc(50% + 1px), transparent calc(50% + 1px));
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scroll-thumb-a), var(--scroll-thumb-b));
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
::-webkit-scrollbar-thumb:vertical {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0px, rgba(255, 255, 255, 0.18) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, var(--scroll-thumb-a), var(--scroll-thumb-b));
  background-clip: padding-box, padding-box;
}
::-webkit-scrollbar-thumb:horizontal {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0px, rgba(255, 255, 255, 0.18) 1px, transparent 1px, transparent 4px),
    linear-gradient(90deg, var(--scroll-thumb-a), var(--scroll-thumb-b));
  background-clip: padding-box, padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.3) 0px, rgba(255, 255, 255, 0.3) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, var(--scroll-thumb-hover-a), var(--scroll-thumb-hover-b));
  background-clip: padding-box, padding-box;
  box-shadow: 0 0 8px var(--scroll-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
::-webkit-scrollbar-thumb:horizontal:hover {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0px, rgba(255, 255, 255, 0.3) 1px, transparent 1px, transparent 4px),
    linear-gradient(90deg, var(--scroll-thumb-hover-a), var(--scroll-thumb-hover-b));
  background-clip: padding-box, padding-box;
}
::-webkit-scrollbar-thumb:active { background: var(--scroll-thumb-hover-b); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

.starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* Sign-in transition: thorns close around the card, it recedes, a rose draws itself, then the page fades. */
body.leaving .login-art, body.leaving .login-wordmark, body.leaving .login-rose, body.leaving .floating-toggle { transition: opacity 0.8s ease 0.2s; opacity: 0; }
body.leaving .login-main { transition: transform 0.8s cubic-bezier(0.5, 0, 0.75, 0) 0.55s, opacity 0.6s ease 0.6s; transform: scale(0.9); opacity: 0; }
.thorn-wrap { position: fixed; z-index: 30; overflow: visible; pointer-events: none; color: var(--gold); transition: opacity 0.5s ease 0.75s; }
body.leaving .thorn-wrap { opacity: 0; }
.thorn-wrap .vine { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: rose-draw 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.thorn-wrap .thorn { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; animation: thorn-in 0.25s ease-out forwards; }
.thorn-wrap .bud { fill: #a0283d; stroke: #f0c8cf; stroke-width: 0.8; opacity: 0; transform-box: fill-box; transform-origin: center; animation: thorn-in 0.4s ease-out 0.7s forwards; }
@keyframes thorn-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.bloom { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.bloom::after { content: ''; position: absolute; inset: 0; background: var(--bg); opacity: 0; transition: opacity 0.45s ease; }
.bloom.fade::after { opacity: 1; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 0.9em;
  line-height: 1.35;
}
h1 { font-size: 1.15rem; }
h2 { font-size: 0.86rem; }
h3 { font-size: 0.8rem; }
h1 em, h2 em { font-style: italic; text-transform: none; letter-spacing: 0.02em; font-weight: 400; }

a { color: var(--heading); }
code { background: var(--gold-tint); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }
::selection { background: var(--gold); color: #0b0b0b; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.todo { color: var(--todo); }
.ok { color: var(--heading); }
.gold { color: var(--gold-text); }
.script { font-family: var(--script); color: var(--gold); font-weight: 400; line-height: 1; }
.mark { filter: var(--mark-filter); transition: filter 0.4s; }

.foil {
  background: linear-gradient(110deg, #a8844f 0%, #f3e3c3 22%, #c9a36d 40%, #fff7e6 52%, #b8935c 68%, #ead3ab 85%, #a8844f 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: foil 7s linear infinite;
}
@keyframes foil { to { background-position: -260% 0; } }

/* ---------- forms ---------- */

label {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--heading);
}

input:not([type='checkbox']):not([type='radio']):not([type='file']), textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 178, 134, 0.22); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; }

label.check { display: flex; align-items: center; gap: 0.6rem; }
label.check input { width: 17px; height: 17px; accent-color: var(--gold); }

.form-error { color: var(--danger); min-height: 1.2em; margin: 0 0 0.6rem; font-size: 0.88rem; }
.stack > * { margin-bottom: 0.9rem; }
.stack > :last-child { margin-bottom: 0; }

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn.primary:hover { background: var(--gold); border-color: var(--gold); color: #0b0b0b; box-shadow: 0 8px 28px rgba(214, 178, 134, 0.35); }
.btn.gold { background: linear-gradient(135deg, #e6caa0, #d6b286 45%, #b8935c); color: #0b0b0b; border-color: rgba(184, 147, 92, 0.6); }
.btn.gold:hover { box-shadow: 0 10px 34px rgba(214, 178, 134, 0.45); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--heading); }
.btn.ghost:hover { background: var(--gold-tint); border-color: var(--gold); }
.btn.ghost.light { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn.ghost.light:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--gold); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: rgba(192, 71, 58, 0.1); }
.btn.small { padding: 0.4rem 0.75rem; font-size: 0.62rem; letter-spacing: 0.14em; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
button.link:hover, .topbar-nav a:hover { color: var(--gold-text); }

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--heading);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
[data-theme='dark'] .theme-toggle .icon-sun { transform: rotate(90deg) scale(0.4); opacity: 0; }
[data-theme='light'] .theme-toggle .icon-moon { transform: rotate(-90deg) scale(0.4); opacity: 0; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- login ---------- */

.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  overflow-x: hidden;
}
@media (min-width: 901px) {
  .login-page { height: 100vh; height: 100dvh; overflow: hidden; }
}
.floating-toggle { position: fixed; top: 1.1rem; right: 1.1rem; z-index: 10; backdrop-filter: blur(10px); }

.login-art { position: relative; align-self: start; min-width: 0; }
.thirty-logo { display: block; }
.thirty-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.thirty-logo .on-dark,
[data-theme='dark'] .thirty-logo .on-light { display: none; }
[data-theme='dark'] .thirty-logo .on-dark { display: block; }
.login-thirty { width: min(92%, 84dvh); max-width: 820px; margin: 7vh 0 0 4vw; }

.login-main { position: relative; z-index: 2; display: grid; place-items: center; padding: 16px 4vw 16px 2vw; }

/* Invitation card */
.deck { width: min(400px, 90vw); perspective: 1400px; transform-origin: center; }
.deck-tilt { --mx: 50%; --my: 22%; position: relative; transform-style: preserve-3d; }

.face {
  border-radius: 22px;
  border: 1px solid rgba(214, 178, 134, 0.28);
  background: linear-gradient(160deg, var(--surface-solid), var(--bg));
  box-shadow: var(--shadow);
}

.flipper { position: relative; display: grid; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1); }
.flipper.flipped { transform: rotateY(180deg); }
.flipper.shake { animation: shake 0.45s; }
.flipper.flipped.shake { animation: shake-flipped 0.45s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes shake-flipped { 0%, 100% { transform: rotateY(180deg); } 25% { transform: rotateY(180deg) translateX(8px); } 75% { transform: rotateY(180deg) translateX(-8px); } }

.face {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.7rem 1.3rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  color: var(--heading);
}
[data-theme='dark'] .face { background: linear-gradient(160deg, #1b1a17 0%, #0d0c0b 60%, #0a0a09 100%); }
.face.back { transform: rotateY(180deg); }
/* Hide the face pointing away so 3D hit-testing can never land on it; swap at the half-way point of the flip. */
.face.front, .flipped .face.back { visibility: visible; pointer-events: auto; transition: visibility 0s 0.45s; }
.face.back, .flipped .face.front { visibility: hidden; pointer-events: none; transition: visibility 0s 0.45s; }
.face::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 240, 210, 0.2), transparent 42%),
    linear-gradient(115deg, transparent 35%, rgba(255, 235, 200, 0.06) 45%, rgba(214, 178, 134, 0.12) 50%, transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0.9;
}
[data-theme='light'] .face::after { mix-blend-mode: multiply; opacity: 0.35; }

.face-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
/* Roses & Thorns ornaments */
.rose-art { display: block; width: 100%; height: 100%; color: var(--gold); overflow: visible; }
.rose-art.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rose-draw 2.4s var(--ease) forwards; animation-delay: calc(0.5s + var(--d) * 0.11s); }
@keyframes rose-draw { to { stroke-dashoffset: 0; } }
.thorns { display: flex; align-items: center; color: var(--gold); }
.thorns svg { display: block; height: 16px; overflow: visible; }
.thorns-vine { flex: 1; min-width: 0; }
.thorns-vine.right { transform: scaleX(-1); }
.thorns-rose { flex: none; width: 32px; }
.face-rose { display: block; width: 18px; height: 30px; }
.face-rose .rose-art { stroke-width: 3; }
.face-thorns { width: 72%; height: 14px; margin: -0.3rem auto 1.1rem; opacity: 0.85; }
.card-thorns { height: 14px; margin: 0.6rem 0 0.9rem; opacity: 0.5; }
.login-rose { position: absolute; right: 2.5vw; bottom: 5vh; z-index: 1; width: clamp(130px, 15vw, 230px); aspect-ratio: 120 / 200; opacity: 0.55; transform: rotate(14deg); pointer-events: none; }
.sidebar-rose { display: block; justify-self: center; width: 64px; height: 106px; margin-top: -0.5rem; color: var(--gold); opacity: 0.2; pointer-events: none; transform: rotate(-8deg); }
.back-link { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.face-body { flex: 1; padding: 1.4rem 0 1.2rem; font-family: var(--serif); }
.face-kicker { margin: 0; text-align: center; font-size: 0.95rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.face-kicker em { text-transform: none; letter-spacing: 0.04em; font-size: 1.05rem; }
.face-theme {
  margin: 0.1rem 0 0.9rem;
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.face-theme.fx-sparkle-text { display: block; }
.face-tagline { text-align: center; font-style: italic; font-size: 0.85rem; letter-spacing: 0.03em; color: var(--text); margin: 0 auto 1.3rem; max-width: 28em; }
.date-block { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.2rem; color: var(--heading); }
.date-day { font-size: 3rem; line-height: 1; padding-right: 1rem; border-right: 2px solid var(--gold); }
.date-rest { font-weight: 700; text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.78rem; line-height: 1.6; }
.invite-details { margin: 0; display: grid; gap: 0.3rem; font-size: 0.8rem; }
.invite-details div { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.5rem; padding: 0.3rem 0; border-top: 1px dashed var(--line); }
.invite-details dt { font-family: var(--sans); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text); padding-top: 0.15rem; }
.invite-details dd { margin: 0; color: var(--heading); }
.face-foot { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.face h1 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.face-body > .muted { font-family: var(--sans); margin: 0 0 1.4rem; }

.login-wordmark {
  position: absolute;
  left: 2vw;
  bottom: 2vw;
  z-index: 0;
  width: 28vw;
  min-width: 220px;
  max-width: 420px;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}
/* The real logo is only drawn in white, so the decorative mark only works on the dark theme. */
[data-theme='light'] .login-wordmark { display: none; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 1.75rem;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.7; }
.brand img { height: 32px; display: block; filter: var(--logo-filter); }
.header-thirty { box-sizing: content-box; height: 34px; width: 48px; padding-left: 1.25rem; border-left: 1px solid var(--line); }
.topbar-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar-title strong { font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.74rem; color: var(--heading); }
.topbar-title span { font-weight: 300; font-size: 0.78rem; letter-spacing: 0.08em; color: var(--gold-text); }
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.25rem 0.3rem 0.25rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topbar-nav a { color: var(--heading); text-decoration: none; }
.topbar-nav .theme-toggle { width: 32px; height: 32px; }
.topbar-nav a[aria-current='page'] { color: var(--gold-text); }
.topbar-links { display: flex; align-items: center; gap: 1.2rem; }

.account { position: relative; }
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--gold-tint);
  color: var(--gold-text);
  font: 700 0.68rem/1 var(--serif);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.avatar:hover, .avatar[aria-expanded='true'] { background: var(--gold); color: #0b0b0b; }
.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: 250px;
  padding: 0.35rem;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  text-transform: none;
  letter-spacing: normal;
  animation: menu-in 0.2s var(--ease);
}
.account-menu[hidden] { display: none; }
.account-head { display: grid; padding: 0.6rem 0.7rem 0.7rem; margin-bottom: 0.25rem; border-bottom: 1px solid var(--line); }
.account-head strong { font-family: var(--serif); font-size: 0.88rem; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-head small { font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  background: none;
  color: var(--heading);
  font: 400 0.86rem/1.2 var(--sans);
  text-align: left;
  cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--gold-tint); outline: none; }
.menu-icon svg { display: block; width: 16px; height: 16px; fill: none; stroke: var(--gold-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

.banner { background: var(--gold-tint); color: var(--heading); border-bottom: 1px solid var(--gold); padding: 0.7rem 1.5rem; text-align: center; font-family: var(--serif); font-style: italic; font-size: 0.9rem; }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 1.75rem 6rem;
  max-width: 1640px;
  margin: 0 auto;
  align-items: start;
}
.sidebar, .main { display: grid; grid-auto-rows: max-content; gap: 1.5rem; min-width: 0; }

.card {
  position: relative;
  background: var(--card-glow), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  min-width: 0;
}
/* The seat page sits on a plain background, so its sections are open and divided by rules instead of boxed. */
.app-page .card:not(.table-card) { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.app-page .sidebar, .app-page .main { gap: 2rem; }
.app-page .sidebar > .card + .card, .app-page .main > .card + .card { border-top: 1px solid var(--line); padding-top: 1.75rem; }
@media (min-width: 1101px) {
  .app-page .layout { gap: 2.25rem; }
  .app-page .sidebar { padding-right: 2rem !important; border-right: 1px solid var(--line); }
}

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.card-head h2 { margin: 0; }

.step { font-family: var(--serif); font-weight: 400; color: var(--gold-text); letter-spacing: 0.05em; padding-right: 0.6rem; margin-right: 0.5rem; border-right: 1px solid var(--gold); }

.pill { display: inline-block; padding: 0.25rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--heading); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.pill.full { border-color: var(--taken-line); color: var(--muted); }
.pill.small { font-size: 0.56rem; padding: 0.05rem 0.5rem; margin-left: 0.4rem; vertical-align: middle; border-color: var(--gold); color: var(--gold-text); }

.meter { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 0.4rem 0 1.2rem; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #b8935c, #f3e3c3, #d6b286); border-radius: inherit; transition: width 0.8s var(--ease); }

/* ---------- welcome & booking status ---------- */

.welcome { overflow: clip; }
.welcome > :not(.welcome-script) { position: relative; }
.welcome-script { position: absolute; right: -0.1em; top: -0.15em; font-size: 6.5rem; transform: rotate(-14deg); opacity: 0.9; pointer-events: none; }
.kicker { margin: 0 0 0.3rem; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-text); }
.welcome h2 { font-size: 1.05rem; margin-bottom: 0.3rem; max-width: 75%; }
.welcome-event { max-width: 62%; font-family: var(--serif); font-style: italic; font-size: 0.82rem; margin: 0 0 0.9rem; color: var(--muted); }
.welcome .card-thorns { margin: 0 0 0.4rem; }
.welcome .muted { margin: 1rem 0 0; font-size: 0.78rem; }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; }
.status-list li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1rem; row-gap: 0.15rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.status-list strong { flex-basis: 100%; color: var(--heading); font-weight: 500; font-size: 0.9rem; }
.status-list span { font-size: 0.78rem; }
.status-list .ok { color: var(--text); }
.status-list .todo { color: var(--muted); font-style: italic; }
.status-list .ok::before, .status-list .todo::before { margin-right: 0.4em; font-style: normal; }
.status-list .ok::before { content: '✦'; color: var(--gold); }
.status-list .todo::before { content: '○'; opacity: 0.7; }

/* ---------- meal form ---------- */

.person { margin: 0 0 1.5rem; padding: 0; min-width: 0; border: 0; }
.person + .person { padding-top: 1.4rem; border-top: 1px solid var(--line); }
/* Floated so the legend sits inside the fieldset rather than straddling its top border. */
.person legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin-bottom: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-text);
}
.person legend + * { clear: both; }
.person legend::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--you); }
.person[data-kind='guest'] legend::before { background: var(--guest); }
.person label, .field-label { color: var(--muted); font-size: 0.62rem; }
.field-label { display: block; margin: 0.2rem 0 0.45rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.person input:not([type='radio']), .person textarea { background: var(--surface-2); border-color: var(--line); font-size: 0.9rem; padding: 0.6rem 0.8rem; }
.person input:not([type='radio']):hover, .person textarea:hover { border-color: var(--line-strong); }

.meal-options { display: grid; margin-bottom: 1.1rem; border: 1px solid var(--line); }
.meal-option {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.25s;
}
.meal-option + .meal-option { border-top: 1px solid var(--line); }
.meal-option:hover { background: var(--surface-2); }
.meal-option input {
  appearance: none;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0.15rem 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--field-bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.meal-option input::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform 0.2s var(--ease); }
.meal-option input:checked { border-color: var(--gold); }
.meal-option input:checked::after { transform: scale(1); }
.meal-option input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.meal-option strong { display: block; font-weight: 400; color: var(--heading); font-size: 0.88rem; line-height: 1.35; }
.meal-option small { color: var(--muted); font-size: 0.74rem; font-weight: 400; }
.meal-option:has(input:checked) { background: var(--gold-tint); box-shadow: inset 2px 0 0 var(--gold); }
.meal-option:has(input:checked) strong { font-weight: 500; }
.details-form :disabled { cursor: not-allowed; }
.details-form input:focus, .details-form textarea:focus { box-shadow: none; border-color: var(--gold); }
.details-form .person, .details-form legend, .details-form input:not([type='radio']):not([type='checkbox']), .details-form textarea, .details-form .meal-option, .details-form .btn { border-radius: 0; }

/* ---------- seat picker ---------- */

.hint { margin: 0.2rem 0 1rem; font-family: var(--serif); font-style: italic; font-size: 0.86rem; color: var(--muted); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.4rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--chair-line); flex: none; }
.dot.open { background: var(--chair); }
.dot.primary { background: var(--primary); border-color: var(--primary); }
.dot.you { background: var(--you); border-color: var(--you-line); }
.dot.vip { background: var(--gold-tint); border-color: var(--gold); }

.plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.plan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-left: auto; }

.segmented { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.seg-label { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-right: 0.3rem; }
.seg {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.5rem;
  align-items: center;
  text-align: left;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font: inherit;
  font-weight: 500;
  color: var(--heading);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.seg:disabled { cursor: default; opacity: 0.6; }
.seg small { grid-column: 2; font-weight: 400; color: var(--muted); font-size: 0.72rem; }
.seg .dot { grid-row: span 2; }
.seg.active { border-color: var(--gold); background: var(--gold-tint); box-shadow: 0 0 0 1px rgba(214, 178, 134, 0.3), 0 6px 20px rgba(214, 178, 134, 0.12); }

.switch { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 0.64rem; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); border: 1px solid var(--line); transition: background 0.25s; flex: none; }
.switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--heading); transition: transform 0.3s var(--ease); }
.switch input:checked + .switch-ui { background: var(--gold); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); background: #0b0b0b; }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(214, 178, 134, 0.35); }

.finder { position: relative; display: flex; align-items: center; }
.finder svg { position: absolute; left: 0.8rem; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.finder #finder { margin: 0; width: 230px; padding: 0.55rem 0.8rem 0.55rem 2.2rem; border-radius: 999px; font-size: 0.85rem; }
.finder-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 25;
  width: 300px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--tip-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.finder-results li { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6rem; align-items: center; padding: 0.5rem 0.6rem; border-radius: 10px; cursor: pointer; font-size: 0.88rem; color: var(--heading); }
.finder-results li small { grid-column: 2; color: var(--muted); font-size: 0.72rem; }
.finder-results li .fp-tip-chip { grid-row: span 2; }
.finder-results li:hover, .finder-results li:focus { background: var(--gold-tint); outline: none; }
.finder-results li.empty { display: block; color: var(--muted); cursor: default; font-style: italic; }

/* ---------- floor plan ---------- */

.floorplan-wrap { position: relative; overflow: hidden; background: var(--floor); }
.floorplan { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.floorplan.can-pan { touch-action: none; cursor: grab; }
.floorplan.panning { cursor: grabbing; }

.fp-close-full { display: none; }
.floorplan-wrap.fp-full {
  position: fixed;
  inset: 0;
  z-index: 38;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  padding: calc(3.4rem + env(safe-area-inset-top)) 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  animation: fp-full-in 0.35s var(--ease);
}
.fp-full .floorplan { width: 100%; height: 100%; touch-action: none; }
.fp-full .fp-close-full {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  top: calc(0.7rem + env(safe-area-inset-top));
  left: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--tip-bg);
  color: var(--heading);
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.fp-close-full span { font-size: 1.1rem; }
.fp-full .fp-controls { bottom: calc(1rem + env(safe-area-inset-bottom)); right: 1rem; }
body.fp-full-open { overflow: hidden; }
body.fp-full-open .card:has(.fp-full) { backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; transform: none; }
body.fp-full-open .save-bar { z-index: 45; }
@keyframes fp-full-in { from { opacity: 0; transform: scale(0.97); } }

.fp-controls { position: absolute; right: 0.7rem; bottom: 0.7rem; display: grid; gap: 0.35rem; z-index: 2; }
.fp-ctrl {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--tip-bg);
  color: var(--heading);
  font: 500 1.05rem/1 var(--sans);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, transform 0.15s;
}
.fp-ctrl:hover { border-color: var(--gold); }
.fp-ctrl:active { transform: scale(0.92); }
.fp-hint { position: absolute; left: 0.8rem; bottom: 0.7rem; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); pointer-events: none; }

.fp-floor { fill: var(--floor); }
.fp-deco-lines path { stroke: var(--pattern); stroke-width: 0.6; }
.fp-stop-table-a { stop-color: var(--table-a); }
.fp-stop-table-b { stop-color: var(--table-b); }
.fp-stop-spot { stop-color: var(--spot); }
.fp-spot-cone { opacity: var(--cone-strength); }
.fp-cursor-spot {
  position: absolute;
  top: -130px;
  left: -130px;
  z-index: 1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 178, 134, 0.16), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  will-change: transform;
}
.fp-cursor-spot.on { opacity: 1; }
[data-theme='light'] .fp-cursor-spot { background: radial-gradient(circle, rgba(214, 178, 134, 0.22), transparent 65%); }
.fp-table-shadow { fill: #000; opacity: 0.28; }
[data-theme='light'] .fp-table-shadow { opacity: 0.08; }
.fp-room { fill: none; stroke: var(--room-line); stroke-width: 1.2; }
.fp-corner { fill: none; stroke: var(--gold); stroke-width: 1; opacity: 0.8; }
.fp-fixture { fill: var(--fixture-fill); stroke: var(--fixture-line); stroke-width: 0.8; }
.fp-fixture.stage { fill: var(--stage-fill); stroke: var(--gold); }
.fp-fixture.stage-secondary { fill: var(--stage-fill); stroke: var(--gold); opacity: 0.85; }
.fp-stage-inner { fill: none; stroke: var(--gold); stroke-width: 0.5; opacity: 0.55; }
.fp-fixture.service { fill: var(--fixture-fill); }
.fp-fixture-label { font-family: var(--sans); font-size: 9.5px; letter-spacing: 3px; fill: var(--heading); text-anchor: middle; dominant-baseline: central; font-weight: 500; }
.fp-fixture-label.stage { font-family: var(--serif); fill: var(--gold); font-size: 14px; letter-spacing: 9px; font-weight: 700; }
.fp-fixture-label.stage-secondary { font-family: var(--serif); fill: var(--gold); font-size: 8px; letter-spacing: 3px; font-weight: 700; }
.fp-fixture-label.small { font-size: 7px; letter-spacing: 1.6px; fill: var(--muted); }
/* venue scenery */
.fp-wall { fill: none; stroke: var(--room-line); stroke-width: 1.4; stroke-linecap: square; }
.fp-room-label { font-family: var(--serif); font-size: 8px; font-weight: 700; letter-spacing: 3px; fill: var(--gold); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #0b0b0b; stroke-width: 2.4px; stroke-linejoin: round; }
.fp-room-label.bar { font-size: 8.5px; letter-spacing: 5px; }
.fp-micro { font-family: var(--sans); font-size: 4.2px; font-weight: 600; letter-spacing: 0.8px; fill: var(--heading); paint-order: stroke; stroke: var(--floor); stroke-width: 1.2px; }
[data-theme='light'] .fp-room-label { fill: #0b0b0b; stroke: #ffffff; stroke-width: 2.6px; }
[data-theme='light'] .fp-fixture-label.small { fill: var(--heading); }
.fp-spot { cursor: default; }
.fp-hit { fill: transparent; }
.fp-marble-a { fill: var(--marble-a); }
.fp-marble-b { fill: var(--marble-b); }
.fp-foyer-floor { fill: var(--marble-a); }
.fp-runner { fill: var(--runner); }
.fp-runner-edge { stroke: var(--gold); stroke-width: 0.6; fill: none; }
.fp-petal-loose { fill: var(--rose); opacity: 0.9; }
.fp-door-swing { fill: none; stroke: var(--gold); stroke-width: 0.7; stroke-dasharray: 1.5 1.2; }
.fp-desk { fill: url(#fp-counter); stroke: var(--gold); stroke-width: 0.6; }
.fp-book { fill: #f5f0e6; stroke: var(--gold); stroke-width: 0.3; }
.fp-book-spine { stroke: var(--gold); stroke-width: 0.4; }
.fp-pedestal { fill: var(--counter-b); stroke: var(--gold); stroke-width: 0.7; }
.fp-pedestal-ring { fill: none; stroke: var(--gold); stroke-width: 0.3; opacity: 0.6; }
.fp-rose .fp-leaf { fill: var(--leaf); }
.fp-petal { fill: var(--rose); stroke: var(--rose-deep); stroke-width: 0.25; }
.fp-petal.inner { fill: var(--rose-deep); }
.fp-petal-curl { fill: none; stroke: var(--rose); stroke-width: 0.35; }
.fp-pot { fill: var(--counter-b); stroke: var(--gold); stroke-width: 0.5; }
.fp-topiary { fill: var(--leaf); }
.fp-topiary-hi { fill: #fff; opacity: 0.18; }

.fp-bar-floor { fill: var(--plank-a); }
.fp-plank-a { fill: var(--plank-a); }
.fp-plank-line { stroke: var(--plank-line); stroke-width: 0.5; fill: none; }
.fp-stop-counter-a { stop-color: var(--counter-a); }
.fp-stop-counter-b { stop-color: var(--counter-b); }
.fp-counter { fill: url(#fp-counter); stroke: var(--gold); stroke-width: 0.7; }
.fp-counter-edge { fill: none; stroke: var(--gold); stroke-width: 0.35; opacity: 0.6; }
.fp-backbar { fill: var(--counter-a); stroke: var(--gold); stroke-width: 0.5; }
.fp-bottle { stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.3; }
.fp-bottle.amber { fill: #b9772b; }
.fp-bottle.green { fill: #3d6b3f; }
.fp-bottle.clear { fill: #cfe3e6; }
.fp-bottle.gold { fill: #d6b286; }
.fp-bottle.rose { fill: #c25a6e; }
.fp-glint { fill: #fff; opacity: 0.5; }
.fp-glass { fill: rgba(255, 255, 255, 0.22); stroke: #f5f0e6; stroke-width: 0.35; }
.fp-bucket { fill: #c8c6c0; stroke: var(--gold); stroke-width: 0.6; }
.fp-bottle-neck { stroke: #2f4a30; stroke-width: 1.1; stroke-linecap: round; }
.fp-tap { fill: var(--gold); }
.fp-stool { fill: var(--counter-a); stroke: var(--gold); stroke-width: 0.5; }
.fp-stool-seat { fill: var(--counter-b); }
.fp-pendant { opacity: 0.85; pointer-events: none; }
[data-theme='light'] .fp-pendant { opacity: 0.45; }

.fp-lectern { fill: var(--counter-b); stroke: var(--gold); stroke-width: 0.5; }
.fp-mic { stroke: var(--gold); stroke-width: 0.6; }
.fp-mic-head { fill: #e8e3d9; }
.fp-speaker { fill: #0b0b0b; stroke: var(--gold); stroke-width: 0.5; }
.fp-speaker-cone { fill: #2a2723; stroke: rgba(214, 178, 134, 0.6); stroke-width: 0.4; }
.fp-service-table { fill: var(--fixture-fill); stroke: var(--fixture-line); stroke-width: 0.8; }
.fp-service-cloth { fill: none; stroke: var(--gold); stroke-width: 0.4; opacity: 0.6; }
.fp-av-desk { fill: var(--counter-a); stroke: var(--gold); stroke-width: 0.5; }
.fp-fader-track { stroke: rgba(214, 178, 134, 0.35); stroke-width: 0.4; }
.fp-fader { fill: var(--gold); }
.fp-av-screen { fill: #1d2a33; stroke: rgba(120, 190, 220, 0.6); stroke-width: 0.4; }

.fp-table { cursor: pointer; outline: none; transition: opacity 0.4s; }
.fp-lift { transform-box: fill-box; transform-origin: center; transition: transform 0.35s var(--ease); }
.fp-table:hover .fp-lift, .fp-table:focus-visible .fp-lift { transform: scale(1.09); }
.fp-table.selected .fp-lift { transform: scale(1.12); }
.fp-table.dim { opacity: 0.28; }
.fp-table.dim:hover { opacity: 0.6; }
.fp-selected-glow { opacity: 0.5; pointer-events: none; }

.fp-table-top { fill: url(#fp-table-grad); stroke: var(--table-line); stroke-width: 0.8; transition: stroke 0.25s; }
.fp-table-inlay { fill: none; stroke: var(--inlay); stroke-width: 0.45; stroke-dasharray: 1.5 1.2; }
.fp-table:hover .fp-table-top, .fp-table:focus-visible .fp-table-top { stroke: var(--gold); stroke-width: 1.2; }
.fp-table.selected .fp-table-top { stroke: var(--gold); stroke-width: 1.6; }
.fp-table.mine .fp-table-top { stroke: var(--gold); stroke-width: 1.4; }
.fp-candle { fill: #fff3d6; }
.fp-candle-glow { opacity: 0.9; }
[data-theme='light'] .fp-candle-glow { opacity: 0.55; }
.fp-table-label { font-family: var(--serif); font-size: 10px; font-weight: 700; fill: var(--heading); text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: var(--table-b); stroke-width: 2.5px; }
/* A table's own name (e.g. "VIP A") is longer than a bare number, so it needs a smaller size to fit the table's width. */
.fp-table-label.text { font-size: 5px; letter-spacing: 0.3px; stroke-width: 1.6px; }
.fp-table.selected .fp-table-label { fill: var(--gold); }
.fp-reserved-label { font-family: var(--sans); font-size: 4.6px; font-weight: 600; letter-spacing: 1.2px; fill: var(--gold-text); text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: var(--table-b); stroke-width: 1.6px; }
.fp-table.reserved .fp-table-top { stroke: var(--gold); }
.fp-seat.reserved { cursor: not-allowed; }
.fp-seat.reserved .fp-chair { fill: var(--gold-tint); stroke: var(--gold); }
.fp-seat.reserved .fp-chair-back { fill: var(--gold); }

.fp-seat { cursor: pointer; }
.fp-chair { fill: var(--chair); stroke: var(--chair-line); stroke-width: 0.7; transition: fill 0.2s, stroke 0.2s; }
.fp-chair-back { fill: var(--chair-back); }
.fp-seat.open:hover .fp-chair { fill: var(--gold); stroke: #b8935c; }
.fp-seat.taken { cursor: default; }
.fp-seat.taken .fp-chair { fill: var(--taken); stroke: var(--taken-line); }
.fp-seat.taken .fp-chair-back { fill: var(--taken); }
.fp-seat.primary .fp-chair { fill: var(--primary); stroke: var(--primary); }
.fp-seat.primary .fp-chair-back { fill: var(--primary); }
.fp-seat.you .fp-chair { fill: var(--you); stroke: var(--you); }
.fp-seat.you .fp-chair-back { fill: var(--you); }
.fp-seat.guest .fp-chair { fill: var(--guest); stroke: var(--guest); }
.fp-seat.guest .fp-chair-back { fill: var(--guest); }
.fp-seat.you .fp-chair, .fp-seat.guest .fp-chair, .fp-seat.primary .fp-chair { stroke-width: 1.1; }
.fp-seat.primary .fp-initials { fill: var(--primary-ink); }
/* Open seats your plus one can't take because they aren't beside or opposite you. */
.fp-seat.blocked { cursor: not-allowed; }
.fp-seat.blocked .fp-chair { fill: transparent; stroke-dasharray: 1.2 1; opacity: 0.45; }
.fp-seat.blocked .fp-chair-back { opacity: 0.35; }
/* Seats someone else just changed: a single glow, not a loop. */
.fp-seat.fp-flash .fp-chair { animation: seat-flash 2.2s ease-out; }
@keyframes seat-flash { 0%, 30% { fill: #c23b55; stroke: #f5c4cf; } }
.fp-initials { font-family: var(--sans); font-size: 2.9px; font-weight: 600; fill: var(--heading); text-anchor: middle; dominant-baseline: central; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.fp-seat.you .fp-initials { fill: var(--you-ink); }
.fp-seat.guest .fp-initials { fill: var(--guest-ink); }
.fp.zoomed .fp-initials { opacity: 1; }

.fp-pulse { fill: none; stroke: var(--gold); stroke-width: 1.4; animation: find-pulse 1.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.fp-pulse-core { fill: var(--gold); opacity: 0.85; filter: drop-shadow(0 0 4px var(--gold)); }

.fp.intro .fp-lift { animation: table-in 0.8s var(--ease) both; animation-delay: calc(var(--i) * 28ms + 150ms); }
.fp.intro .fp-spot-cone { animation: cone-in 1.6s ease both; }

@keyframes table-in { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } }
@keyframes cone-in { from { opacity: 0; } }
@keyframes flicker { 0%, 100% { opacity: 0.9; transform: scale(1); } 40% { opacity: 0.65; transform: scale(0.88); } 70% { opacity: 1; transform: scale(1.06); } }
@keyframes find-pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(4.5); opacity: 0; } }

.fp-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  min-width: 190px;
  max-width: 260px;
  padding: 0.75rem 0.85rem;
  background: var(--tip-bg);
  color: var(--heading);
  border: 1px solid rgba(214, 178, 134, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
  opacity: 0;
  scale: 0.96;
  transition: opacity 0.18s, scale 0.18s;
}
.fp-tooltip.show { opacity: 1; scale: 1; }
.fp-tip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; }
.fp-tip-head strong { font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.fp-tip-head span { font-size: 0.7rem; color: var(--gold-text); white-space: nowrap; }
.fp-tip-bar { height: 2px; margin: 0.5rem 0 0.6rem; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.fp-tip-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill); background: linear-gradient(90deg, #b8935c, #f3e3c3); }
.fp-tooltip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.fp-tooltip li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.fp-tooltip li.you, .fp-tooltip li.guest { color: var(--gold-text); }
.fp-tooltip p { margin: 0.35rem 0 0; font-size: 0.8rem; font-family: var(--serif); font-style: italic; color: var(--muted); }
.fp-tip-seat.taken, .fp-tip-seat.you, .fp-tip-seat.guest { font-style: normal; font-family: var(--sans); color: var(--heading); }
.fp-tip-chip {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-tint);
  border: 1px solid rgba(214, 178, 134, 0.5);
  color: var(--gold-text);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex: none;
}

/* ---------- table detail ---------- */

.table-detail-grid { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.table-drawing { width: 100%; height: auto; display: block; }
.td-shadow { fill: rgba(0, 0, 0, 0.18); filter: blur(6px); }
.td-table { fill: var(--table-a); stroke: var(--table-line); stroke-width: 1.2; }
[data-theme='dark'] .td-table { fill: #24221e; }
.td-inlay { fill: none; stroke: var(--inlay); stroke-width: 1; stroke-dasharray: 4 3; }
.td-candle { fill: #fff3d6; }
.td-candle-glow { fill: var(--gold); opacity: 0.25; animation: flicker 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.td-table-label { font-family: var(--serif); font-size: 26px; fill: var(--heading); text-anchor: middle; dominant-baseline: central; }
.td-hit { fill: transparent; }
.td-chair { fill: var(--chair); stroke: var(--chair-line); stroke-width: 1.3; transition: fill 0.2s, stroke 0.2s; }
.td-chair-back { fill: var(--chair-back); }
.td-seat { animation: td-in 0.5s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.td-seat.taken .td-chair { fill: var(--taken); stroke: var(--taken-line); }
.td-seat.taken .td-chair-back { fill: var(--taken); }
.td-seat.primary .td-chair { fill: var(--primary); stroke: var(--primary); }
.td-seat.primary .td-chair-back { fill: var(--primary); }
.td-seat.you .td-chair { fill: var(--you); stroke: var(--you-line); }
.td-seat.you .td-chair-back { fill: var(--you); }
.td-seat.guest .td-chair { fill: var(--guest); stroke: var(--guest-line); }
.td-seat.guest .td-chair-back { fill: var(--guest); }
.td-seat.blocked .td-chair { fill: transparent; stroke-dasharray: 4 3; opacity: 0.45; }
.td-seat.blocked .td-seat-name { opacity: 0.6; }
.td-seat.blocked.clickable { cursor: not-allowed; }
.td-seat.reserved .td-chair { fill: var(--gold-tint); stroke: var(--gold); }
.td-seat.reserved .td-seat-name { fill: var(--gold-text); font-style: italic; }
.td-seat.clickable { cursor: pointer; outline: none; }
.td-seat.clickable.open:hover .td-chair, .td-seat.clickable:focus-visible .td-chair { fill: var(--gold); stroke: #b8935c; }
.td-seat-no { font-family: var(--sans); font-size: 11px; font-weight: 600; fill: var(--heading); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.td-seat.you .td-seat-no { fill: var(--you-ink); }
.td-seat.guest .td-seat-no { fill: var(--guest-ink); }
.td-seat-name { font-family: var(--sans); font-size: 12px; fill: var(--text); dominant-baseline: central; }
.td-seat.open .td-seat-name { fill: var(--muted); font-family: var(--serif); font-style: italic; font-size: 11px; }
.td-seat.you .td-seat-name, .td-seat.guest .td-seat-name { fill: var(--gold-text); font-weight: 600; }
@keyframes td-in { from { opacity: 0; transform: translateY(6px); } }

.occupants { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.occupants li { display: flex; align-items: center; gap: 0.7rem; padding: 0.42rem 0.65rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 0.9rem; color: var(--heading); }
.occupants li.clickable { cursor: pointer; }
.occupants li.clickable:hover, .occupants li.clickable:focus-visible { border-color: var(--gold); outline: none; }
select.select { display: block; width: 100%; padding: 0.3rem; font: inherit; font-size: 0.88rem; color: var(--heading); background: var(--input-bg); border: 1px solid var(--line); border-radius: 10px; }
select.select option { padding: 0.4rem 0.5rem; border-radius: 6px; }
select.select option:checked { background: var(--gold-tint); color: var(--heading); }
.occupants li.open, .occupants li.blocked, .occupants li.reserved { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 0.82rem; background: transparent; border-style: dashed; }
.occupants li.you, .occupants li.guest { background: var(--gold-tint); border-color: rgba(214, 178, 134, 0.5); font-weight: 500; box-shadow: inset 3px 0 0 var(--you); }
.occupants li.guest { box-shadow: inset 3px 0 0 var(--guest); }
.occupants li.you .seat-no { background: var(--you); border-color: var(--you-line); color: var(--you-ink); }
.occupants li.guest .seat-no { background: var(--guest); border-color: var(--guest-line); color: var(--guest-ink); }
.seat-no { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; background: var(--chair); border: 1px solid var(--chair-line); color: var(--heading); font-family: var(--sans); font-weight: 600; font-size: 0.7rem; font-style: normal; flex: none; }

.sheet-handle { display: none; }
.sheet-close { display: grid; place-items: center; position: absolute; top: 0.7rem; right: 0.8rem; z-index: 1; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--heading); font-size: 1.2rem; cursor: pointer; }
.sheet-close:hover, .sheet-close:focus-visible { border-color: var(--gold); outline: none; }
/* Sits above the full-screen floor plan (z-index 38) so table details open over it too. */
.sheet-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }

/* Table details slide in from the right as a full-height drawer. */
.table-card {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: min(520px, 92vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-width: 0 0 0 1px;
  border-radius: 0;
  padding: 1.6rem 1.6rem 7rem;
  background: var(--surface-solid);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
  transform: translateX(105%);
  transition: transform 0.45s var(--ease);
  animation: none !important;
}
.table-card.open { transform: translateX(0); }
.table-card .card-head { padding-right: 2.6rem; }
.table-card .table-detail-grid { grid-template-columns: 1fr; }
.table-card .table-drawing { max-width: 400px; margin: 0 auto; }

/* ---------- save bar ---------- */

.save-bar {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 0.75rem 0.7rem 1.4rem;
  background: rgba(10, 10, 10, 0.88);
  color: #f5f0e6;
  border: 1px solid rgba(214, 178, 134, 0.4);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  z-index: 45;
  max-width: calc(100% - 2rem);
  font-size: 0.86rem;
  animation: bar-in 0.5s var(--ease);
}
.save-bar-actions { display: flex; gap: 0.5rem; flex: none; }
@keyframes bar-in { from { opacity: 0; transform: translate(-50%, 20px); } }

/* ---------- toasts & dialogs ---------- */

#toasts { position: fixed; top: 1rem; right: 1rem; display: grid; gap: 0.5rem; z-index: 70; max-width: min(380px, calc(100% - 2rem)); }
.toast {
  padding: 0.85rem 1.1rem;
  background: rgba(12, 12, 12, 0.9);
  color: #f5f0e6;
  border: 1px solid rgba(214, 178, 134, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  font-size: 0.88rem;
  animation: toast-in 0.45s var(--ease);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.error { border-left-color: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(-6px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } }

.dialog { border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 18px; padding: 1.8rem; width: min(480px, calc(100% - 2rem)); background: var(--surface-solid); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); color: var(--text); }
.dialog[open] { animation: dialog-in 0.4s var(--ease); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.2rem; }
.dialog-link { display: block; font-size: 0.78rem; color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; margin: 0.3rem 0 0.9rem; }
.credentials { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem; white-space: pre-wrap; word-break: break-all; font-size: 0.85rem; max-height: 300px; overflow: auto; color: var(--heading); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

/* ---------- admin ---------- */

.admin { padding: 1.5rem 1.75rem 3rem; max-width: 1640px; margin: 0 auto; display: grid; gap: 1.5rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.admin-head h1 { margin: 0; }
.admin-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Setup is one-time work; collapsing it out of the way keeps the daily-use Guests/Floor plan
   sections from getting buried under forms you only touch once at the start of the event. */
.admin-setup { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.admin-setup summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--heading);
  list-style: none;
}
.admin-setup summary::-webkit-details-marker { display: none; }
.admin-setup summary::before { content: '▸'; color: var(--gold); font-size: 0.7em; transition: transform 0.2s ease; }
.admin-setup[open] summary::before { transform: rotate(90deg); }
.admin-setup[open] summary { margin-bottom: 1.2rem; }
.admin-setup .admin-grid { margin: 0; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 1rem; }
.filter-chip {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.filter-chip:hover { border-color: var(--gold); }
.filter-chip.active { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-text); }
.filter-chip .count { opacity: 0.65; margin-left: 0.35rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.stat { position: relative; overflow: hidden; background: var(--card-glow), var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; display: grid; }
.stat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--heading); opacity: 0.7; }
.stat:nth-child(n + 4)::before { background: linear-gradient(90deg, #b8935c, #f3e3c3, #d6b286); opacity: 1; }
.stat-value { font-family: var(--serif); font-size: 1.9rem; color: var(--heading); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.64rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--heading); margin-top: 0.2rem; }
.stat small { color: var(--muted); font-size: 0.74rem; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; align-items: stretch; }
.import-errors { margin: 0; padding-left: 1.2rem; color: var(--danger); font-size: 0.85rem; }
.import-errors:empty { display: none; }

.search { max-width: 320px; margin: 0 !important; }
.table-scroll { overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.users th { text-align: left; color: var(--muted); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.users td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); }
.users tr { transition: background 0.2s; }
.users tr:hover td { background: var(--surface-2); }
.users strong { color: var(--heading); font-weight: 500; }
.users .actions { white-space: nowrap; text-align: right; }
.users .actions .btn + .btn { margin-left: 0.3rem; }
.guest-cell { display: grid; }
.guest-cell small { color: var(--muted); }
.dietary { color: var(--gold-text); }
input[type='file'] { color: var(--muted); font: inherit; font-size: 0.85rem; }

.email-preview { display: grid; gap: 0.9rem; }
.email-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; }
.email-toolbar .filter-chips { margin: 0; }
.email-preview > .muted { margin: 0; }
.email-subject { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.email-subject span { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.email-subject strong { font-weight: 500; color: var(--heading); }
.email-frame { display: flex; justify-content: center; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #050505; }
.email-frame iframe { display: block; width: 100%; max-width: 720px; height: 820px; border: 0; border-radius: 8px; background: #0a0a09; transition: max-width 0.3s var(--ease); }
.email-frame.mobile iframe { max-width: 375px; height: 760px; }
.email-text { width: 100%; max-width: 720px; margin: 0; padding: 1.2rem 1.4rem; white-space: pre-wrap; font: 0.85rem/1.6 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; color: var(--text); background: var(--surface-2); border-radius: 8px; }
.email-actions { display: flex; justify-content: flex-end; }

.admin-plan { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.admin-table-detail .table-detail-grid { grid-template-columns: 1fr; }

/* ---------- effects ---------- */

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.fx-star { position: absolute; display: block; pointer-events: none; transform: translate(-50%, -50%); }
.fx-star svg { display: block; width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 0 3px rgba(214, 178, 134, 0.9)); }
.fx-star.twinkle { animation: fx-twinkle 1100ms ease-in-out forwards; }
.fx-star.burst { animation: fx-burst 900ms cubic-bezier(0.15, 0.7, 0.3, 1) forwards; }
.fx-sparkle-text { display: inline-block; }
.fx-sparkle-text:not(.welcome-script) { position: relative; }

@keyframes fx-twinkle {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  45% { transform: translate(-50%, -50%) scale(1) rotate(90deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(180deg); opacity: 0; }
}
@keyframes fx-burst {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; }
}

.btn.primary, .btn.gold { overflow: hidden; isolation: isolate; }
.btn.primary::after, .btn.gold::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn.primary:hover::after, .btn.gold:hover::after { animation: fx-shimmer 0.9s ease; }
.btn.gold::after { animation: fx-shimmer-idle 4s ease-in-out infinite; }
@keyframes fx-shimmer { to { left: 130%; } }
@keyframes fx-shimmer-idle { 0% { left: -60%; } 30%, 100% { left: 130%; } }

@property --beam-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.save-bar::before, .face.front::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--beam-angle), transparent 0 70%, rgba(214, 178, 134, 0.9) 85%, #fff4dc 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: fx-beam 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.face.front::before { inset: 0; }
@keyframes fx-beam { to { --beam-angle: 360deg; } }

.welcome-script { animation: fx-write 2.4s cubic-bezier(0.6, 0.1, 0.3, 1) 0.5s both; }
@keyframes fx-write { from { clip-path: inset(-30% 100% -30% -30%); } to { clip-path: inset(-30% -30% -30% -30%); } }

.login-thirty { animation: fx-settle 1.6s var(--ease) both; }
.deck { animation: deck-in 1.2s var(--ease) 0.25s both; }
.login-wordmark { animation: fx-rise-far 1.8s var(--ease) 0.2s both; }
.sidebar > .card, .main > .card { animation: fx-rise 0.7s var(--ease) both; }
.sidebar > .card:nth-child(2), .main > .card:nth-child(2) { animation-delay: 0.12s; }
.stats .stat { animation: fx-rise 0.6s var(--ease) both; }
.stats .stat:nth-child(2) { animation-delay: 0.05s; }
.stats .stat:nth-child(3) { animation-delay: 0.1s; }
.stats .stat:nth-child(n + 4) { animation-delay: 0.15s; }

@keyframes fx-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fx-rise-far { from { opacity: 0; transform: translateY(40%); } }
@keyframes fx-settle { from { opacity: 0; transform: scale(1.06) translateY(-2%); } }
@keyframes deck-in { from { opacity: 0; transform: translateY(40px) rotateX(18deg) rotateZ(4deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */

@media (min-width: 1101px) {
  .app-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .app-page .layout { flex: 1; min-height: 0; width: 100%; padding-bottom: 0; align-items: stretch; }
  .app-page .sidebar, .app-page .main { overflow-y: auto; align-content: start; padding: 2px 6px 6rem 2px; scrollbar-width: thin; }
}

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .admin-plan { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; align-items: start; }
  .login-art { overflow: visible; }
  .login-thirty { width: min(64vw, 340px); margin: 1.2rem auto 0 1.2rem; }
  .login-main { padding: 0.6rem 1rem 1rem; }
  .login-rose { right: auto; left: 72vw; top: 2vw; bottom: auto; width: 16vw; opacity: 0.6; z-index: 0; }
  .face { padding: 1.2rem 1.3rem 1rem; }
  .face-body { padding: 1rem 0 0.9rem; }
  .face-tagline { margin-bottom: 0.9rem; }
  .date-block { margin-bottom: 0.8rem; }
  .date-day { font-size: 2.5rem; }
}

@media (max-width: 700px) {
  body { font-size: 14.5px; }
  /* Phone header: logo and account on one row, the page links as a full-width tab bar beneath. */
  .topbar { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'brand . account' 'links links links'; align-items: center; gap: 0.6rem 0.8rem; padding: 0.6rem 0.9rem 0.55rem; }
  .brand { grid-area: brand; }
  .brand img { height: 26px; }
  .header-thirty, .topbar-title { display: none; }
  .topbar-nav { display: contents; }
  .account { grid-area: account; }
  .topbar-links { grid-area: links; display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); padding: 3px; }
  .topbar-links a { flex: 1; padding: 0.5rem 0.4rem; border-radius: 999px; text-align: center; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
  .topbar-links a[aria-current='page'] { background: var(--gold-tint); box-shadow: inset 0 0 0 1px var(--gold); }
  .layout, .admin { padding: 0.9rem 0.7rem 7rem; gap: 1rem; }
  .sidebar, .main { gap: 1rem; }
  .card { padding: 1.1rem; border-radius: 14px; }
  .plan-tools { margin-left: 0; width: 100%; }
  .finder, .finder #finder { width: 100%; }
  .plan-toolbar .seg { justify-content: start; }
  .finder-results { width: 100%; }
  .fp-hint { display: none; }
  .table-detail-grid { grid-template-columns: 1fr; }

  /* Table details slide up as a bottom sheet. */
  .table-card {
    top: auto;
    left: 0;
    width: auto;
    max-height: 82vh;
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
    padding: 0.6rem 1.1rem calc(6.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35);
    transform: translateY(105%);
  }
  .table-card.open { transform: translateY(0); }
  .table-card.dragging { transition: none; }
  .table-card .card-head { padding-right: 0; }
  .sheet-handle { display: block; width: 44px; height: 5px; margin: 0.2rem auto 0.9rem; border-radius: 3px; background: var(--line-strong); opacity: 0.35; touch-action: none; cursor: grab; padding: 10px 0; background-clip: content-box; box-sizing: content-box; }
  .table-card .table-drawing { max-width: 360px; }

  .save-bar { flex-direction: column; gap: 0.6rem; padding: 0.85rem 1rem; text-align: center; width: calc(100% - 1.4rem); bottom: calc(0.7rem + env(safe-area-inset-bottom)); }
  .save-bar-actions { width: 100%; }
  .save-bar-actions .btn { flex: 1; }
  .legend { gap: 0.7rem; }
  .plan-toolbar .segmented { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .plan-toolbar .seg-label { grid-column: 1 / -1; }
  .plan-toolbar .seg { padding: 0.5rem 0.7rem; }
  .plan-card .floorplan-wrap { margin: 0 -0.8rem; }
  .fp-controls { position: static; display: flex; justify-content: center; gap: 0.5rem; padding: 0.55rem; border-top: 1px solid var(--line); }
  .fp-ctrl { width: 40px; height: 36px; }
  .floorplan-wrap.fp-full { grid-template-rows: minmax(0, 1fr) auto; padding-bottom: env(safe-area-inset-bottom); }
  .fp-full .fp-controls { border-top: 0; padding-bottom: 0.8rem; }
}
