:root {
  --ink: #17161a;
  --ink-2: #4a4850;
  --muted: #6f6c75;
  --paper: #ffffff;
  --page: #f4f2ef;
  --line: #dedad4;
  --head: #141316;
  --head-ink: #f5f1ea;
  --accent: #c8102e;
  --ok: #1a7f37;
  --warn: #9a6700;
  --open: #2e9f6b;
  --sel: #1f5fd1;
  --sold: #55585f;
  --red: #e5383b;
  --blue: #1c9ad6;
  --radius: 10px;
  --shadow: 0 12px 34px rgba(20, 19, 22, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--page); }
button, input, select { font: inherit; }
a { color: inherit; }
.small { font-size: 13px; color: var(--muted); }

.site-head { background: var(--head); color: var(--head-ink); padding: 14px 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.site-head h1 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.site-head .yr { color: #e8b04a; }
.site-head .sub { color: #bdb6ab; font-size: 14px; }
.fullmap-link { display: none; margin-left: auto; font-size: 13px; font-weight: 700; text-decoration: none; background: var(--accent); color: #fff; padding: 6px 10px; border-radius: 8px; }
.embed .fullmap-link { display: inline-block; }

.banner { background: #fff3cd; border-bottom: 1px solid #e3c766; color: #5c4500; padding: 6px 16px; font-size: 13px; font-weight: 600; }

/* ---------- status panel (apply / selection / hold) ---------- */
.panel { background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.panel .msg { flex: 1 1 320px; }
.panel .msg b { font-weight: 700; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.steps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.steps li::before { content: counter(step); counter-increment: step; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.steps { counter-reset: step; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: #e8effc; color: var(--sel); border: 1px solid #b9cdf3; border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; }

.btn { display: inline-block; text-align: center; text-decoration: none; padding: 10px 16px; border-radius: 9px; border: 0; cursor: pointer; background: var(--accent); color: #fff; font-weight: 700; }
.btn.alt { background: var(--sel); }
.btn.secondary { background: transparent; color: var(--ink-2); border: 1px solid var(--line); font-weight: 600; }
.btn.block { display: block; width: 100%; margin-top: 12px; }
.btn[disabled] { opacity: 0.55; cursor: wait; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 13px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 8px 16px; max-width: 1320px; margin: 0 auto; }
.views { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--paper); }
.views button { border: 0; background: transparent; padding: 7px 16px; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.views button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.sw.open { background: var(--open); } .sw.sel { background: var(--sel); } .sw.sold { background: var(--sold); }
.sw.red { background: var(--red); } .sw.blue { background: var(--blue); }
.sw.held { background: repeating-linear-gradient(45deg, #fff 0 3px, #9a9a9a 3px 5px); }

/* ---------- map + list ---------- */
.layout { padding: 0 16px 16px; max-width: 1320px; margin: 0 auto; }
.layout [hidden] { display: none; }
.map-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.map-wrap svg { display: block; width: 100%; height: auto; }

.booth { cursor: pointer; outline: none; }
.booth rect.cell { stroke: #141316; stroke-width: 1.4; fill: var(--open); transition: filter .12s; }
.booth text { font: 700 19px system-ui, sans-serif; fill: #fff; pointer-events: none; dominant-baseline: central; text-anchor: middle; }
.booth.s-held rect.cell { fill: url(#hatch); }
.booth.s-held text { fill: #2b2b2b; }
.booth.s-sold rect.cell { fill: var(--sold); }
.booth.s-sold text { fill: #d9d9d9; }
.booth.s-sponsor rect.cell { fill: #2a2a2e; }
.booth.s-sponsor text { fill: #f2c94c; }
.booth.r-red rect.cell { fill: var(--red); }
.booth.r-blue rect.cell { fill: var(--blue); }
.booth.s-nfs:not(.r-red):not(.r-blue) rect.cell { fill: #cfccc6; }
.booth.s-open:hover rect.cell, .booth.s-open:focus-visible rect.cell { filter: brightness(1.15); }
.booth.sel rect.cell { fill: var(--sel); stroke: #0b2e6e; stroke-width: 3; }
.booth.mine rect.cell { fill: var(--sel); }
.booth:focus-visible rect.cell { stroke-width: 3; }

.list-col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.list-head h2 { margin: 0; font-size: 16px; }
.blist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; columns: 4 230px; column-gap: 18px; }
.blist li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; break-inside: avoid; }
.blist li:hover { background: #f1efeb; }
.blist .n { font-weight: 800; text-align: right; color: var(--ink-2); }
.blist .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist .open .t { color: var(--ok); }
.blist .held .t { color: var(--warn); }
.blist .sold .t { font-weight: 600; }
.blist .nfs .t { color: var(--muted); }
.blist .sel { background: #e8effc; }

@media (max-width: 900px) {
  .booth text { font-size: 22px; }
}

/* ---------- modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 19, 22, .45); z-index: 20; }
.modal { position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 20px 18px; }
.modal[hidden], .scrim[hidden] { display: none; }
.modal h2 { margin: 0 28px 4px 0; font-size: 19px; }
.modal .close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); }
.modal label { display: block; font-size: 13px; color: var(--ink-2); margin: 10px 0 3px; }
.modal input[type=text], .modal input[type=email], .modal input[type=tel], .modal input[type=url] { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.modal .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink); margin-top: 12px; }
.modal .check input { margin-top: 3px; }
.err { color: var(--accent); font-size: 13.5px; margin-top: 8px; min-height: 1em; }
.okmsg { color: var(--ok); font-weight: 600; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eee; color: var(--ink-2); margin-left: 6px; vertical-align: middle; }
.pill.open { background: #e3f6e6; color: var(--ok); } .pill.held { background: #fff1d6; color: var(--warn); }
.pill.sold { background: #ececec; color: #444; } .pill.nfs { background: #fde3e4; color: #9b1c1f; }
.totals { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.totals td { padding: 3px 0; } .totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals tr.sum td { border-top: 1px solid var(--line); font-weight: 800; padding-top: 6px; }
.release { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 260px; overflow: auto; font-size: 13px; line-height: 1.5; background: #fbfaf8; }
.release p { margin: 0 0 8px; }
.sigrow { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 10px; }
.sigrow .date { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f4f2ef; font-weight: 600; }
.sig { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 20px !important; }
@media (max-width: 640px) {
  .modal { left: 0; right: 0; bottom: 0; top: auto; transform: none; width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .sigrow { grid-template-columns: 1fr; }
}

footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 6px 16px 24px; }
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-size: 14px; }
.toast[hidden] { display: none; }

/* admin page reuses .pill classes */
.pill.approved { background: #e3f6e6; color: var(--ok); } .pill.pending { background: #fff1d6; color: var(--warn); } .pill.denied { background: #fde3e4; color: #9b1c1f; }
.pill.sponsor { background: #2a2a2e; color: #f2c94c; }

/* what's included with each booth */
.incl { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.incl summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.incl p { margin: 6px 0 2px; }
.incl ul { margin: 4px 0 0; padding-left: 20px; columns: 2 220px; column-gap: 18px; }
.incl li { break-inside: avoid; }
.modal .incl { margin: 4px 0 8px; }
