/* EMS — design system.
   Everything is derived from two picked colours (--brand, --accent) plus a
   light/dark mode, so the colour picker restyles the whole app and the guest
   pages with no other change. color-mix() needs Chrome 111 / Safari 16.2 / FF 113. */

:root {
  --brand: #2b3cde;
  --accent: #d7dee9;
  --on-brand: #ffffff;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --r: 14px;
  --r-lg: 22px;
  --good: #2f9e6a; --warn: #d39a2c; --bad: #d9534f;
}
[data-mode="dark"] {
  color-scheme: dark;
  --bg: color-mix(in oklab, var(--brand) 20%, #060915);
  --bg-2: color-mix(in oklab, var(--brand) 28%, #0a0f22);
  --card: color-mix(in oklab, var(--brand) 16%, #0f1428);
  --card-2: color-mix(in oklab, var(--brand) 24%, #141a33);
  --line: color-mix(in oklab, var(--brand) 34%, #283050);
  --line-2: color-mix(in oklab, var(--brand) 50%, #3a4570);
  --ink: #f3f5fb; --ink-2: #d0d6e8; --ink-3: #9ea7c4; --ink-4: #78819e;
  --brand-ink: color-mix(in oklab, var(--brand) 45%, #ffffff);
  --accent-ink: color-mix(in oklab, var(--accent) 80%, #ffffff);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .75);
  --good-soft: rgba(47, 158, 106, .16); --warn-soft: rgba(211, 154, 44, .16); --bad-soft: rgba(217, 83, 79, .16);
}
[data-mode="light"] {
  color-scheme: light;
  --bg: color-mix(in oklab, var(--brand) 5%, #f5f6fa);
  --bg-2: color-mix(in oklab, var(--brand) 9%, #eceef5);
  --card: #ffffff;
  --card-2: color-mix(in oklab, var(--brand) 4%, #f7f8fc);
  --line: color-mix(in oklab, var(--brand) 13%, #e1e4ee);
  --line-2: color-mix(in oklab, var(--brand) 26%, #cdd2e2);
  --ink: #141a2e; --ink-2: #39415c; --ink-3: #5f6885; --ink-4: #8a92ac;
  --brand-ink: color-mix(in oklab, var(--brand) 82%, #000000);
  --accent-ink: color-mix(in oklab, var(--accent) 45%, #3a2f12);
  --shadow: 0 18px 44px -26px rgba(20, 26, 46, .38);
  --good-soft: #e3f4ec; --warn-soft: #fbf1dc; --bad-soft: #fbe5e4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 60%, #ffffff); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--brand) 40%, transparent); }

.kicker { font: 600 11px/1 var(--font-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--brand-ink); margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 10px 26px -14px var(--brand); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 30px -12px var(--brand); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 45%, var(--line)); background: transparent; }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 3px 9px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--ink-3); line-height: 1; font-size: 16px; }
.icon-btn:hover { background: var(--card-2); color: var(--ink); }

/* ---- forms ---- */
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 0 0 5px; letter-spacing: .02em; }
.input, input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=email], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 25%, transparent); }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input[type=color] { width: 46px; height: 38px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.hint { font-size: 12.5px; color: var(--ink-4); margin-top: 5px; }

/* ---- cards / panels ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 19px; }
.card-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.empty { text-align: center; padding: 34px 16px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty .big { font-size: 32px; margin-bottom: 6px; }

/* ---- chips, badges, pills ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.brand { background: color-mix(in oklab, var(--brand) 18%, transparent); color: var(--brand-ink); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.tile .k { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); }
.tile .v { font: 600 28px/1.15 var(--font-display); margin-top: 6px; }
.tile .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.meter { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-top: 8px; border: 1px solid var(--line); }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter.over > span { background: var(--bad); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-4); font-weight: 700; padding: 10px 14px; background: var(--card-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: color-mix(in oklab, var(--brand) 5%, transparent); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- toasts & modals ---- */
.toasts { position: fixed; z-index: 400; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toast-in .25s ease-out; pointer-events: auto; max-width: 92vw; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.modal-back { position: fixed; inset: 0; z-index: 300; background: rgba(5, 8, 20, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6); animation: pop .2s cubic-bezier(.2, 1.2, .3, 1); }
.modal.wide { width: min(860px, 100%); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-head h3 { font: 600 20px/1.2 var(--font-display); }
.modal-body { padding: 10px 20px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; flex-wrap: wrap; }

/* ---- app shell ---- */
.app-body { min-height: 100vh; }
.app-loading { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-bar { position: sticky; top: 0; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 7px 14px; background: repeating-linear-gradient(-45deg, #f0b429, #f0b429 14px, #e9a915 14px, #e9a915 28px); color: #2a1d00; font-size: 13px; font-weight: 600; text-align: center; }
.demo-bar .btn { background: #2a1d00; color: #fff3cf; border-color: #2a1d00; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-2); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.has-demo .side { top: 34px; height: calc(100vh - 34px); }
.brandmark { display: inline-flex; align-items: center; gap: 9px; font: 800 18px/1 var(--font-sans); letter-spacing: .08em; color: var(--ink); text-decoration: none; }
.logo-dot { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 210deg, var(--brand), var(--accent), var(--brand)); box-shadow: 0 6px 18px -6px var(--brand); }
.ev-switch { color: inherit; text-decoration: none; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; }
.ev-switch:hover { border-color: var(--brand); }
.ev-switch .thumb { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--card-2); flex: 0 0 38px; }
.ev-switch .t1 { font-weight: 700; font-size: 13.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-switch .t2 { font-size: 12px; color: var(--ink-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav a:hover { background: var(--card-2); color: var(--ink); }
.nav a.on { background: color-mix(in oklab, var(--brand) 20%, transparent); color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }
.nav .ico { width: 20px; text-align: center; font-size: 16px; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.side-foot button, .side-foot a { justify-content: flex-start; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 38px) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(26px, 3.2vw, 34px); }
.page-head .sub { color: var(--ink-3); margin-top: 6px; font-size: 14px; }

.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 200; left: 0; top: 0; bottom: 0; width: 280px; height: 100vh; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .has-demo .side { top: 0; height: 100vh; }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 190; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 110; align-items: center; gap: 10px; padding: 10px 14px; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .has-demo .topbar { top: 34px; }
  .topbar .ttl { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding-top: 18px; }
  .hide-mobile { display: none !important; }
}

/* ---- overview hero ---- */
.ov-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 230px; display: flex; align-items: flex-end; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card-2); }
.ov-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ov-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 6, 16, .88), rgba(4, 6, 16, .25) 60%, rgba(4, 6, 16, .1)); }
.ov-hero .in { position: relative; z-index: 1; padding: 22px 24px; color: #fff; width: 100%; }
.ov-hero h1 { font-size: clamp(26px, 4vw, 40px); color: #fff; }
.ov-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: rgba(255, 255, 255, .86); font-size: 14px; }
.ov-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: 1fr; } }

/* ---- countdown ---- */
.countdown { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-cell { min-width: 70px; text-align: center; padding: 10px 8px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.cd-cell b { display: block; font: 600 30px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.cd-cell span { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-4); }
.cd-cell b.tick { animation: tick .45s ease-out; }
@keyframes tick { from { transform: translateY(-5px); opacity: .4; } }
.cd-live { font: 600 20px/1.2 var(--font-display); color: var(--brand-ink); }

/* ---- donut ---- */
.donut { position: relative; width: 150px; height: 150px; flex: 0 0 150px; }
.donut svg { transform: rotate(-90deg); }
.donut .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .mid b { font: 600 28px/1 var(--font-display); display: block; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.legend div { display: flex; align-items: center; gap: 8px; }

/* ---- guests ---- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 280px; }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .35); }
.inv-list { display: flex; flex-direction: column; gap: 10px; }
.inv { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.inv-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px 16px; cursor: pointer; align-items: center; }
.inv-top .nm { font-weight: 650; }
.inv-top .meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.inv-body { border-top: 1px solid var(--line); padding: 14px 16px 16px; }
.names { display: flex; flex-direction: column; gap: 6px; }
.name-row { display: flex; gap: 8px; align-items: center; }
.qr-box { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.qr-box svg, .qr-box img { width: 200px; height: 200px; display: block; }

/* ---- check-in ---- */
.ci-list { display: flex; flex-direction: column; gap: 8px; }
.ci { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.ci .who { flex: 1; min-width: 0; }
.ci .who b { display: block; font-weight: 600; }
.ci .who span { font-size: 12.5px; color: var(--ink-3); }
.ci.in { border-color: color-mix(in oklab, var(--good) 45%, var(--line)); background: color-mix(in oklab, var(--good) 7%, var(--card)); }
.btn-arrive { background: var(--good); border-color: var(--good); color: #fff; }

/* ---- notes (markdown-lite render) ---- */
.md h1, .md h2, .md h3 { font-family: var(--font-display); margin: 1em 0 .4em; }
.md h1 { font-size: 22px; } .md h2 { font-size: 18px; } .md h3 { font-size: 16px; }
.md > :first-child { margin-top: 0; }
.md p { margin: .5em 0; }
.md ul, .md ol { margin: .4em 0; padding-left: 1.3em; }
.md li { margin: .2em 0; }
.md code { background: var(--card-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.md blockquote { margin: .6em 0; padding: .3em .9em; border-left: 3px solid var(--brand); color: var(--ink-2); background: var(--card-2); border-radius: 0 8px 8px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.note-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .note-layout { grid-template-columns: 1fr; } }
.note-item { display: block; width: 100%; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; margin-bottom: 8px; }
.note-item.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 30%, transparent); }
.note-item b { display: block; font-size: 14px; }
.note-item span { font-size: 12px; color: var(--ink-4); }
.md-tabs { display: flex; gap: 6px; margin-bottom: 8px; }

/* ---- run sheet / itinerary editable rows ---- */
.erow { display: grid; grid-template-columns: 96px 1.4fr 1fr 1.6fr auto; gap: 8px; align-items: start; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.erow.it { grid-template-columns: 150px 90px 1.3fr 1.5fr auto; }
.erow + .erow { margin-top: 8px; }
.erow textarea { min-height: 40px; }
.erow .tools { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 900px) { .erow, .erow.it { grid-template-columns: 1fr 1fr; } .erow .tools { flex-direction: row; grid-column: 1 / -1; justify-content: flex-end; } }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 0 0 18px; }
.tl::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 22%, transparent); }
.tl .tm { font-size: 12.5px; font-weight: 700; color: var(--brand-ink); letter-spacing: .03em; }
.tl .tt { font-weight: 650; }
.tl .tw { font-size: 13px; color: var(--ink-3); }
.tl .tn { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }
.day-head { font: 600 17px/1.2 var(--font-display); margin: 18px 0 10px; }

/* ---- suppliers ---- */
.sup { display: flex; flex-direction: column; gap: 8px; }
.sup .cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-ink); font-weight: 700; }
.sup h3 { font-size: 17px; }
.contact-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-pills a { text-decoration: none; }

/* ---- floor plan ---- */
.plan-shell { display: grid; grid-template-columns: 220px 1fr 260px; gap: 12px; align-items: start; }
.plan-shell.view { grid-template-columns: 1fr; }
.plan-shell.assign { grid-template-columns: 1fr 300px; }
@media (max-width: 1150px) { .plan-shell, .plan-shell.assign { grid-template-columns: 1fr; } }
.plan-stage { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; max-height: 78vh; }
.plan-stage.editing { touch-action: none; }   /* dragging items; view mode keeps native scroll */
@keyframes seat-pulse { 50% { opacity: .2; } }
.mine-pulse { animation: seat-pulse 1.6s ease-in-out infinite; }
.plan-stage svg { display: block; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.plan-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.palette { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; max-height: 78vh; overflow-y: auto; }
.palette .sec { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); margin: 10px 4px 6px; }
.palette .sec:first-child { margin-top: 0; }
.pal { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; cursor: grab; font-size: 13px; touch-action: none; user-select: none; }
.pal:hover { background: var(--card-2); }
.pal .sw { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); flex: 0 0 22px; }
.pal .sw.circ { border-radius: 50%; }
.pal .dim { margin-left: auto; font-size: 11px; color: var(--ink-4); }
.ghost { position: fixed; z-index: 500; pointer-events: none; transform: translate(-50%, -50%); opacity: .85; border: 2px solid #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.inspector { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.plan-sel { fill: none; stroke: #ffd24a; stroke-width: 2.5; stroke-dasharray: 7 5; pointer-events: none; }
.seat-hit { cursor: pointer; }
.seat-hit:hover { filter: brightness(1.15); }
.seat-pick { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.seat-pick button { text-align: left; border: 1px solid var(--line); background: var(--card-2); border-radius: 9px; padding: 7px 10px; cursor: pointer; font-size: 13.5px; }
.seat-pick button:hover { border-color: var(--brand); }
.unseated { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.party { border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; background: var(--card-2); }
.party b { font-size: 13px; }
.party .ppl { font-size: 12.5px; color: var(--ink-3); }
.plan-callout { position: absolute; z-index: 5; pointer-events: none; background: #0f1530; color: #fff; padding: 7px 11px; border-radius: 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }

/* ---- theme picker ---- */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.preset { border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; background: var(--card); text-align: left; font-size: 13px; font-weight: 600; }
.preset.on { border-color: var(--brand); }
.preset .sw2 { height: 34px; border-radius: 9px; margin-bottom: 7px; }
.theme-preview { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }

/* ---- sharing ---- */
.pass { display: flex; flex-direction: column; gap: 10px; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mod { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-2); cursor: pointer; font-size: 13.5px; }
.mod input { margin-top: 2px; accent-color: var(--brand); width: 16px; height: 16px; flex: 0 0 16px; }
.mod small { display: block; color: var(--ink-4); font-size: 11.5px; line-height: 1.35; }
.link-box { display: flex; gap: 8px; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 13px; overflow: hidden; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(80% 60% at 50% -10%, color-mix(in oklab, var(--brand) 45%, transparent), transparent 60%), var(--bg); }
.login .card { width: min(420px, 100%); padding: 30px; }
.login h1 { font-size: 30px; margin: 10px 0 6px; }
.err { color: var(--bad); font-size: 13.5px; margin-top: 8px; min-height: 18px; }

/* ---- raffle ---- */
.rf-stage { position: relative; }
.rf-stage:fullscreen { background: var(--bg); padding: 4vh 6vw; overflow: auto; }
.rf-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 600; }
.rf-machine { position: relative; border-radius: 28px; padding: 16px 46px; background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 55%, #1a2350), color-mix(in oklab, var(--brand) 35%, #0b1030)); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.rf-viewport { --rf-h: 84px; position: relative; height: calc(var(--rf-h) * 5); overflow: hidden; border-radius: 18px; background: linear-gradient(180deg, #060a22, #0b1238 50%, #060a22);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%); }
.rf-stage:fullscreen .rf-viewport { --rf-h: min(13vh, 120px); }
.rf-stage:fullscreen .rf-item { font-size: clamp(28px, 5vh, 56px); }
@media (max-width: 640px) { .rf-viewport { --rf-h: 62px; } .rf-machine { padding: 12px 32px; } }
.rf-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform, filter; }
.rf-item { height: var(--rf-h); display: flex; align-items: center; justify-content: center; padding: 0 12px; font-family: var(--font-display); font-size: clamp(20px, 3.4vw, 34px); color: #9aa6d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .28; will-change: transform, opacity; }
.rf-item.win { color: #fff !important; text-shadow: 0 0 18px var(--accent), 0 0 46px var(--brand); animation: rf-win 1.3s ease-in-out infinite; }
@keyframes rf-win { 50% { text-shadow: 0 0 26px #ffd75e, 0 0 60px rgba(255, 215, 94, .55); } }
.rf-band { position: absolute; left: 8px; right: 8px; top: 50%; height: var(--rf-h); transform: translateY(-50%); border-radius: 14px; border: 2px solid rgba(255, 255, 255, .5); pointer-events: none; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--brand) 35%, transparent), transparent); }
.rf-pointer { position: absolute; top: 50%; margin-top: -14px; width: 0; height: 0; z-index: 3; border-top: 14px solid transparent; border-bottom: 14px solid transparent; filter: drop-shadow(0 0 8px rgba(255, 210, 74, .8)); }
.rf-pointer.l { left: 12px; border-left: 20px solid #ffd24a; }
.rf-pointer.r { right: 12px; border-right: 20px solid #ffd24a; }
.rf-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; }
.rf-spin.ready { animation: rf-ready 2.4s ease-in-out infinite; }
@keyframes rf-ready { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand) 60%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
.rf-reveal { text-align: center; margin-top: 22px; animation: rf-pop .75s cubic-bezier(.2, 1.4, .3, 1) both; }
.rf-reveal .rn { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--accent-ink); }
.rf-reveal .nm { font: 600 clamp(34px, 6vw, 64px)/1.1 var(--font-display); text-shadow: 0 0 30px color-mix(in oklab, var(--brand) 60%, transparent); margin-top: 6px; }
@keyframes rf-pop { from { opacity: 0; transform: scale(.55) translateY(24px); } }
.rf-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
@media (max-width: 640px) { .rf-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rf-slot { border-radius: 16px; border: 1px dashed var(--line-2); padding: 14px 10px; min-height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--card); }
.rf-slot .n { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-4); }
.rf-slot.filled { border-style: solid; border-color: var(--brand); background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 25%, var(--card)), var(--card)); }
.rf-slot .w { font: 600 16px/1.2 var(--font-display); margin-top: 6px; }
.rf-slot .p { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.rf-slot.new { animation: rf-flip .85s cubic-bezier(.2, 1.2, .3, 1) both, rf-glow 2.4s ease-out .85s; }
@keyframes rf-flip { from { opacity: 0; transform: perspective(600px) rotateY(90deg) scale(.9); } }
@keyframes rf-glow { from { box-shadow: 0 0 0 0 rgba(255, 210, 74, .85); } to { box-shadow: 0 0 0 18px transparent; } }
@media (prefers-reduced-motion: reduce) { .rf-spin.ready, .rf-item.win, .rf-reveal, .rf-slot.new { animation: none; } }

/* ---- guest page ---- */
.guest { max-width: 680px; margin: 0 auto; padding: 22px 16px 70px; }
.g-hero { position: relative; border-radius: 28px; overflow: hidden; min-height: 420px; display: flex; align-items: flex-end; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--card-2); }
.g-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 6s ease; }
.g-hero:hover img { transform: scale(1.08); }
.g-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 6, 16, .92), rgba(4, 6, 16, .35) 55%, rgba(4, 6, 16, .15)); }
.g-hero .in { position: relative; z-index: 1; padding: 30px 26px; color: #fff; text-align: center; width: 100%; }
.g-hero .kicker { color: color-mix(in oklab, var(--accent) 70%, #fff); }
.g-hero h1 { font-size: clamp(30px, 6vw, 46px); color: #fff; margin: 10px 0 6px; animation: rise .8s ease both .15s; }
.g-hero p { color: rgba(255, 255, 255, .85); margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.alert-banner { margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--bad-soft); color: var(--bad); font-weight: 700; text-align: center; border: 1px solid color-mix(in oklab, var(--bad) 40%, transparent); }
.details dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0; }
.details dt { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); font-weight: 700; padding-top: 2px; }
.details dd { margin: 0; white-space: pre-line; }
.staff-panel { border: 2px solid var(--warn); border-radius: var(--r-lg); padding: 16px; background: color-mix(in oklab, var(--warn) 8%, var(--card)); margin-bottom: 16px; }

.g-name { padding: 9px 12px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); }
.g-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.g-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { top: 105vh; transform: translateX(40px) rotate(540deg); } }

/* ---- landing ---- */
.land { --land-max: 1120px; background: radial-gradient(90% 55% at 70% -10%, color-mix(in oklab, var(--brand) 40%, transparent), transparent 60%), var(--bg); }
.land-top { max-width: var(--land-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 20px 20px; }
.land-top nav { display: flex; gap: 18px; align-items: center; }
.land-top nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.land main { max-width: var(--land-max); margin: 0 auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 40px 0 70px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); margin: 14px 0 16px; line-height: 1.05; }
.hero h1 em { color: var(--brand-ink); font-style: italic; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.hero-cta form { margin: 0; }
.fine { font-size: 13px; color: var(--ink-4); }
.hero-art { position: relative; height: 440px; }
.hero-art img { position: absolute; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-art .art-0 { width: 74%; height: 62%; right: 0; top: 0; }
.hero-art .art-1 { width: 54%; height: 44%; left: 0; bottom: 6%; animation: float 7s ease-in-out infinite; }
.hero-art .art-2 { width: 40%; height: 34%; right: 6%; bottom: 0; animation: float 9s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 10px; } .hero-art { height: 300px; } }
.features h2, .how h2, .faq h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 22px; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); border-color: var(--brand); }
.f-ico { font-size: 28px; }
.feature h3 { font-size: 17px; margin: 10px 0 6px; }
.feature p { color: var(--ink-3); margin: 0; font-size: 14.5px; }
.how { padding: 70px 0 30px; }
.steps { max-width: 720px; margin: 0 auto 26px; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: var(--ink-2); }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 40px 0; }
.strip img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
@media (max-width: 700px) { .strip { grid-template-columns: repeat(3, 1fr); } }
.faq { max-width: 760px; margin: 0 auto; padding: 20px 0 60px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 650; cursor: pointer; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }
.land-foot { text-align: center; color: var(--ink-4); font-size: 13px; padding: 30px 20px 40px; border-top: 1px solid var(--line); }
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; }

@media print {
  .side, .topbar, .demo-bar, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
