/* ASG Christmas Party escape-room sign-up. "Flyer match" look: evergreen header, flyer red
   ribbon, gold rules, cream page. Lobster Two for titles and banners only, Nunito for the rest.
   Mobile first; light first, with a deep-pine dark theme. Fonts are self-hosted (strict CSP). */

@font-face {
  font-family: "Nunito"; src: url("/fonts/nunito-var.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito"; src: url("/fonts/nunito-var-italic.woff2") format("woff2");
  font-weight: 200 1000; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Lobster Two"; src: url("/fonts/lobster-two-700-italic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  /* flyer palette */
  --pine: #123d2c;
  --pine-2: #1b5a40;
  --pine-hi: #24734f;
  --red: #b3141b;
  --red-2: #8f0f15;
  --gold: #e8b43a;          /* rules and small accents only, never text on light */
  --gold-ink: #f3dca4;      /* gold text on the green header */
  --cream: #fbf7ef;

  --bg: var(--cream);
  --card: #FFFFFF;
  --subtle: #F6F1E6;
  --ink: #17231d;
  --muted: #5d6b63;
  --line: #E5DDCC;
  --line-strong: #C9BEA6;
  --control: #8A8F83;       /* input borders: 3:1 on white */
  --field: #FFFEFB;

  --accent: var(--red);     /* red text accents (AA on white and cream) */
  --green-ink: #1b5a40;     /* green text and links */
  --link: #1b5a40;
  --seat-on: var(--pine-2);
  --seat-open: #A99F88;

  --brand: var(--pine-2);   /* names kept for organizer.css */
  --brand-strong: var(--pine-2);
  --brand-soft: #EAF3EC;
  --sun: var(--gold);
  --holly: var(--red);

  --danger: #B3141B;
  --danger-soft: #FDF0EE;
  --warn-edge: #D89A18;
  --warn-soft: #FFF7E3;
  --warn-ink: #7A5200;
  --ok: #1B6E46;
  --ok-soft: #EDF6EF;

  --focus: #1b5a40;
  --halo: rgba(232, 180, 58, .55);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(18, 61, 44, .06), 0 4px 14px rgba(18, 61, 44, .07);
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Lobster Two", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1A14;
    --card: #12261D;
    --subtle: #183026;
    --ink: #EEF3EE;
    --muted: #A9BCB0;
    --line: #24402F;
    --line-strong: #3C5E4A;
    --control: #5F8270;
    --field: #0F2119;

    --accent: #FF8F86;
    --green-ink: #7CCB9E;
    --link: #9AD8B4;
    --seat-on: #3E9A6C;
    --seat-open: #5F8270;

    --brand-soft: #173A2A;
    --danger: #FF8F86;
    --danger-soft: #2D1A1A;
    --warn-edge: #D9A43A;
    --warn-soft: #2A2614;
    --warn-ink: #F0C44F;
    --ok: #7CCB9E;
    --ok-soft: #14301F;

    --focus: #F0C44F;
    --halo: rgba(240, 196, 79, .35);
    --shadow: 0 1px 0 rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 700; }

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

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

/* Festive top band: flyer red and pine, stitched with gold. */
.garland {
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--red) 0 22px, var(--gold) 22px 26px, var(--pine-2) 26px 48px, var(--gold) 48px 52px);
}

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, #1f6a4b 0%, var(--pine) 60%);
  border-bottom: 3px solid var(--gold);
}
@media (prefers-color-scheme: dark) {
  .hero { background: radial-gradient(120% 90% at 85% 0%, #1a5a40 0%, #0d2d20 62%); }
}
.hero :focus-visible { outline-color: var(--gold); }
.hero .snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.hero .flake { position: absolute; color: #cfe4ee; opacity: .16; pointer-events: none; z-index: -1; }
.hero .flake.a { width: 150px; height: 150px; right: -26px; top: 18px; }
.hero .flake.b { width: 48px; height: 48px; right: 138px; bottom: 18px; opacity: .14; }
@media (max-width: 560px) {
  .hero .flake.a { width: 92px; height: 92px; right: -18px; top: 8px; }
  .hero .flake.b { display: none; }
}

.hero-body { position: relative; padding-top: 18px; padding-bottom: 22px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.logo { display: block; height: 28px; width: auto; }

.eyebrow {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 2px; color: var(--gold-ink); font-weight: 800; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase;
}
.holly { width: 20px; height: 20px; flex: none; }
.holly .leaf { fill: #5DB07E; }
.holly .berry { fill: #E5323A; }

h1 {
  font-family: var(--script); font-style: italic; font-weight: 700;
  font-size: clamp(34px, 9vw, 50px); line-height: 1.04; margin: 0; letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}

.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }

/* Ribbon banner, notched like the flyer's, with gold edges. */
.ribbon {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font-family: var(--script); font-style: italic; font-weight: 700; font-size: 19px; line-height: 1.2;
  color: #fff; background: var(--red); padding: 8px 28px;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
  box-shadow: inset 0 2px 0 var(--gold), inset 0 -2px 0 var(--gold);
}
.ribbon .icon { width: 17px; height: 17px; }

.countdown {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--gold-ink);
  border: 1px solid rgba(243, 220, 164, .45); background: rgba(0, 0, 0, .14);
  font-variant-numeric: tabular-nums;
}
.countdown .icon { width: 16px; height: 16px; }
.countdown b { color: #fff; font-weight: 800; }

.hero .where { margin: 14px 0 0; color: #DCE8E0; font-size: 15px; }
.hero .where strong { color: #fff; font-weight: 800; }
.facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 8px 0 0; padding: 0;
  font-size: 14px; color: #DCE8E0; font-weight: 600;
}
.facts li { display: inline-flex; align-items: center; }
.facts li + li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 10px;
}
/* Phones: compact header; every wrapped fact gets its own dot. */
@media (max-width: 560px) {
  .hero-body { padding-top: 14px; padding-bottom: 18px; }
  .hero-top { margin-bottom: 10px; }
  .logo { height: 24px; }
  .ribbon { font-size: 17px; padding: 7px 24px; }
  .hero .where { font-size: 14px; margin-top: 12px; }
  .facts { gap: 2px 14px; font-size: 13.5px; }
  .facts li::before, .facts li + li::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 7px 0 0;
  }
}

/* ---------- main ---------- */

main.wrap { padding-top: 20px; padding-bottom: 32px; }

.howto {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); font-size: 15px;
}
.howto p { margin: 0; }
.howto p + p { margin-top: 6px; color: var(--muted); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-size: 15px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--warn-edge);
}
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); }
.notice.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.notice .icon { margin-top: 3px; }
.notice p { margin: 0; }

/* Section title with gold rules and a holly sprig, like the flyer's divider. */
.section-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--script); font-style: italic; font-weight: 700; font-size: 28px; line-height: 1.15;
  color: var(--accent); margin: 26px 0 12px; letter-spacing: 0; text-transform: none;
}
.section-label::before, .section-label::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-label::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- find a coworker ---------- */

.finder { margin: 0 0 16px; }
.finder > .label { display: block; margin: 0 0 6px 4px; }
.finder-box { position: relative; }
.finder-box > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.finder-box input[type="search"] { padding-left: 42px; padding-right: 50px; border-radius: 999px; }
.finder-box input[type="search"]::-webkit-search-cancel-button { display: none; }
.finder-clear {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.finder-clear:hover { color: var(--ink); background: var(--subtle); }
.finder-out { margin: 8px 4px 0; font-size: 14.5px; }
.finder-out:empty { display: none; }
.finder-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.finder-out .hit {
  appearance: none; border: 0; background: transparent; padding: 6px 4px; min-height: 36px; margin: 0;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; display: inline-flex; gap: 8px; align-items: center;
  border-radius: 8px;
}
.finder-out .hit:hover { background: var(--subtle); }
.finder-out .hit .icon { color: var(--green-ink); }
.finder-out .hit strong { font-weight: 800; }
.finder-out .none { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .finder-out .hit { min-height: 44px; } }

/* ---------- game cards ---------- */

.sessions { display: grid; gap: 14px; }
@media (min-width: 760px) { .sessions { grid-template-columns: 1fr 1fr; } }

.session {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  position: relative; min-width: 0;
}
.session.mine { border: 2px solid var(--pine-2); padding: 15px; }
@media (prefers-color-scheme: dark) { .session.mine { border-color: #3E9A6C; } }
.session.found { box-shadow: 0 0 0 3px var(--halo), var(--shadow); }
/* Full, started or closed: the whole card steps back. */
.session.is-full:not(.mine), .session.is-started:not(.mine), .session.is-closed:not(.mine) {
  background: var(--subtle); box-shadow: none;
}
.session.is-full:not(.mine) .s-time, .session.is-started:not(.mine) .s-time, .session.is-closed:not(.mine) .s-time,
.session.is-full:not(.mine) h3, .session.is-started:not(.mine) h3, .session.is-closed:not(.mine) h3 { color: var(--muted); }
.session.is-full:not(.mine) .diff, .session.is-started:not(.mine) .diff, .session.is-closed:not(.mine) .diff { filter: grayscale(1); opacity: .8; }

.s-head { display: flex; gap: 14px; align-items: flex-start; }
.s-time {
  flex: none; min-width: 62px; padding: 2px 14px 2px 0; border-right: 2px solid var(--gold);
  color: var(--ink); line-height: 1;
}
.s-time .t { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.s-time .ap { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; margin-top: 4px; color: var(--muted); }
.s-title { flex: 1; min-width: 0; }
.s-title .name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 2px; }
.s-title h3 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.s-title .arrive { margin: 0; color: var(--muted); font-size: 14px; display: flex; gap: 5px; align-items: center; }

.tag {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 9px; line-height: 1.5; border: 1px solid transparent; white-space: nowrap;
}
.diff.hard { color: #9B1218; background: #FCECEA; border-color: #F1C5C2; }
.diff.medium { color: #7A5200; background: #FFF4D6; border-color: #EFD58F; }
.diff.easier { color: #1B5A40; background: #E9F4EC; border-color: #BFDDC9; }
.state-tag { color: var(--muted); background: var(--card); border-color: var(--line-strong); }
@media (prefers-color-scheme: dark) {
  .diff.hard { color: #FFB3AC; background: #3A1A1A; border-color: #5C2A28; }
  .diff.medium { color: #F3D27A; background: #2E2814; border-color: #4D4220; }
  .diff.easier { color: #9AD8B4; background: #173A2A; border-color: #275A41; }
}

.blurb { margin: 0; font-size: 14.5px; color: var(--muted); }
.blurb a { white-space: nowrap; font-size: 14px; }
.blurb a .icon { width: 14px; height: 14px; margin-left: 2px; }

.s-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }

/* Seat markers: rounded squares, green when taken, dashed when open. Text says the same. */
.seat-status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.meter { display: inline-flex; gap: 5px; }
.meter span {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px dashed var(--seat-open); background: transparent;
}
.meter span.on { border: 0; background: var(--seat-on); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .18); }
.seat-status.low .seat-text { color: var(--accent); }
.seat-status.full .meter span.on, .seat-status.ended .meter span.on { background: var(--line-strong); box-shadow: none; }
@media (max-width: 380px) { .meter span { width: 15px; height: 15px; } .meter { gap: 4px; } }
.mine-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: var(--green-ink); }

/* Who's playing: one cluster per booked group, open seats after them. */
.players { display: grid; gap: 6px; }
.players-label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.groups { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.groups li { min-width: 0; max-width: 100%; }
.grp {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 2px;
  padding: 5px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  background: var(--brand-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--pine-2) 22%, transparent);
}
.grp .sep { color: var(--seat-open); padding: 0 4px; font-weight: 800; }
.grp .nm { overflow-wrap: anywhere; border-radius: 4px; }
.grp .nm.hit { background: #FCE7A6; color: #17231d; box-shadow: 0 0 0 2px #FCE7A6; }
.open-slot {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--muted); border: 1.5px dashed var(--seat-open);
}
.session.is-full .grp, .session.is-started .grp, .session.is-closed .grp { background: var(--card); border-color: var(--line); }
.no-one { margin: 0; color: var(--muted); font-size: 14px; }

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

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 15px/1.2 var(--sans); padding: 10px 20px; min-height: 44px; border-radius: 999px;
  border: 2px solid var(--red); background: var(--card); color: var(--red); cursor: pointer;
  text-decoration: none; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) { .btn { border-color: #FF8F86; color: #FF8F86; } }
.btn:hover { background: var(--danger-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border: 0; padding: 12px 22px; color: #fff;
  background: linear-gradient(#24734f, var(--pine-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 6px rgba(18, 61, 44, .35);
}
.btn.primary:hover { background: linear-gradient(#2a8159, #1f6649); }
@media (prefers-color-scheme: dark) {
  .btn.primary { background: linear-gradient(#2c8159, #1f6a4b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 8px rgba(0, 0, 0, .35); }
  .btn.primary:hover { background: linear-gradient(#33905f, #237553); }
}
/* Quiet text buttons */
.btn.ghost, .btn.back {
  border-color: transparent; background: transparent; color: var(--green-ink); padding-left: 12px; padding-right: 12px;
}
.btn.ghost:hover, .btn.back:hover { background: var(--brand-soft); }
.btn.danger { border-color: transparent; background: transparent; color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.danger.solid:hover { background: var(--red-2); border-color: var(--red-2); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.small.primary { padding: 8px 16px; }
.btn.block { width: 100%; }
.btn.btn:disabled:not(.busy), .btn.btn[aria-disabled="true"] {
  background: var(--subtle); border-color: var(--line); color: var(--muted); box-shadow: none;
  cursor: not-allowed; transform: none;
}
.btn.ghost:disabled:not(.busy) { background: transparent; border-color: transparent; }
.btn.busy { position: relative; color: transparent !important; cursor: progress; transform: none; }
.btn.busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid; border-color: #fff transparent #fff transparent;
  animation: spin .7s linear infinite;
}
.btn:not(.primary):not(.solid).busy::after { border-color: var(--ink) transparent var(--ink) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:focus-visible { outline-offset: 3px; }
/* Touch targets: every button is at least 44 px tall on phones. */
@media (max-width: 640px) {
  .btn.small { min-height: 44px; }
}

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

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label, .label { font-weight: 800; font-size: 14px; }
.field .hint { color: var(--muted); font-size: 13.5px; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  font: 500 16px/1.3 var(--sans); color: var(--ink); background: var(--field);
  border: 1.5px solid var(--control); border-radius: 11px;
  padding: 10px 13px; width: 100%; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--control)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px var(--halo); }
input[aria-invalid="true"] {
  border-color: var(--danger); background: var(--danger-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 28%, transparent); }
.err { color: var(--danger); font-size: 13.5px; font-weight: 700; margin: 0; }
.err:not(:empty)::before {
  content: "!"; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; margin-right: 6px; vertical-align: -2px;
  background: var(--danger); color: var(--card); font-size: 11px; font-weight: 900;
}

/* Custom select: chevron drawn from a data: image (allowed by img-src). */
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b5a40' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
@media (prefers-color-scheme: dark) {
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ad8b4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}
select:disabled { opacity: .6; cursor: not-allowed; }

/* Toggle switch: still a real checkbox (keyboard, screen readers, form state). */
.check { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 700; cursor: pointer; padding: 8px 0; min-height: 44px; }
.check input[type="checkbox"], input[type="checkbox"].switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  position: relative; width: 46px; height: 28px; border-radius: 999px;
  background: var(--subtle); border: 2px solid var(--control);
  transition: background-color .18s, border-color .18s;
}
.check input[type="checkbox"]::before, input[type="checkbox"].switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--control); box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .18s, background-color .18s;
}
.check input[type="checkbox"]:checked, input[type="checkbox"].switch:checked { background: var(--pine-2); border-color: var(--pine-2); }
.check input[type="checkbox"]:checked::before, input[type="checkbox"].switch:checked::before { transform: translateX(18px); background: #fff; }
@media (prefers-color-scheme: dark) {
  .check input[type="checkbox"]:checked, input[type="checkbox"].switch:checked { background: #2c8159; border-color: #2c8159; }
}
.check input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Custom radio, for any radio group. */
input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--control); background: var(--field);
  display: inline-grid; place-content: center;
}
input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pine-2); transform: scale(0); transition: transform .15s; }
input[type="radio"]:checked { border-color: var(--pine-2); }
input[type="radio"]:checked::before { transform: scale(1); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- dialogs ---------- */

dialog {
  border: 0; padding: 0; color: var(--ink); background: var(--card);
  width: min(560px, 100vw); max-width: 100vw; max-height: 100dvh; overflow: hidden;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(10, 30, 20, .35);
}
dialog::backdrop { background: rgba(8, 24, 17, .6); }
@media (max-width: 600px) {
  dialog { width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 94dvh; }
}
.dlg { display: flex; flex-direction: column; max-height: inherit; position: relative; }
.dlg-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 10px 14px 18px; color: #fff;
  background: radial-gradient(140% 160% at 90% 0%, #1f6a4b 0%, var(--pine) 65%);
  border-bottom: 4px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--red) 0 22px, var(--gold) 22px 26px, var(--pine-2) 26px 48px, var(--gold) 48px 52px) 4;
}
.dlg-head h2 {
  margin: 0; font-family: var(--script); font-style: italic; font-weight: 700;
  font-size: 25px; line-height: 1.15; flex: 1;
}
.dlg-head .sub { margin: 3px 0 0; color: var(--gold-ink); font-size: 14px; font-weight: 700; }
.dlg-head :focus-visible { outline-color: var(--gold); }
.dlg-close {
  flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; background: transparent; color: #fff; border-radius: 999px;
}
.dlg-close:hover { background: rgba(255, 255, 255, .14); }
.dlg-body { padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.dlg-foot {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
}
.dlg-foot .btn { flex: 1; }
.dlg-foot .btn.back { flex: 0 0 auto; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

.steps { display: flex; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.steps li { flex: 1; height: 5px; border-radius: 4px; background: var(--line); }
.steps li.on { background: var(--seat-on); }

.summary {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--subtle); border: 1px solid var(--line); margin-bottom: 14px;
}
.summary h3 { margin: 0; font-size: 17px; font-weight: 800; }
.summary p { margin: 1px 0 0; font-size: 14px; color: var(--muted); }

.player-row { display: grid; grid-template-columns: minmax(0, 1fr) 74px 44px; gap: 8px; align-items: start; margin-bottom: 10px; }
.player-row .field { margin: 0; min-width: 0; }
.player-row .rm { width: 44px; min-height: 44px; padding: 0; margin-top: 27px; }
.player-row:not(.first) label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.player-row:not(.first) .rm { margin-top: 1px; }
.rm, .icon-btn { border-color: transparent; background: transparent; color: var(--muted); }
.rm:hover, .icon-btn:hover { color: var(--ink); background: var(--subtle); }
.icon-btn.danger { color: var(--danger); }
.seat-note { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }

/* Roster names in dialogs */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.chips li {
  padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  background: var(--brand-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--pine-2) 22%, transparent);
}
.kv { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); }
.kv strong { color: var(--ink); font-weight: 800; }

.warn {
  border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; font-size: 14.5px;
  background: var(--warn-soft); border: 1px solid var(--line); border-left: 4px solid var(--warn-edge);
}
.warn.error { background: var(--danger-soft); border-left-color: var(--danger); }
.warn p { margin: 0 0 8px; }
.warn p:last-child { margin-bottom: 0; }
.warn .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.warn .check { margin-top: 4px; }

.done-hero { text-align: center; padding: 6px 0 4px; }
.done-hero .tick {
  width: 58px; height: 58px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(#24734f, var(--pine-2)); color: #fff; margin-bottom: 10px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.done-hero .tick .icon { width: 30px; height: 30px; }
.done-hero h3 { font-family: var(--script); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1.15; color: var(--accent); margin: 0 0 6px; }
.done-hero p { margin: 0; color: var(--muted); }
.linkbox {
  display: flex; gap: 8px; align-items: center; margin-top: 8px; padding: 6px 6px 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--subtle);
}
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; background: var(--card); }
.panel h4 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.panel p { margin: 0; font-size: 14px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* manage list */
.plist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.plist li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; min-height: 56px; }
.plist li + li { border-top: 1px solid var(--line); }
.plist .name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.plist .edit { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; flex: 1; min-width: 0; }
.icon-btn { width: 44px; min-height: 44px; padding: 0; }

/* your reservation */
.mine-card {
  background: var(--card); border: 2px solid var(--pine-2); border-radius: var(--radius); padding: 14px 16px 16px;
  margin-bottom: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
@media (prefers-color-scheme: dark) { .mine-card { border-color: #3E9A6C; } }
.mine-card h2 {
  margin: 0 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.mine-card h2 .holly { width: 18px; height: 18px; }
.mine-card .holly .leaf { fill: var(--pine-2); }
.mine-card .holly .berry { fill: var(--red); }
.mine-card .what { margin: 0; font-size: 19px; font-weight: 800; }
.mine-card .sub { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.mine-card.cancelled { border-color: var(--line-strong); }
.mine-card.cancelled h2 { color: var(--muted); }

.loading { color: var(--muted); padding: 24px 4px; }
.skeleton { height: 230px; border-radius: var(--radius); background: color-mix(in srgb, var(--line) 55%, var(--card)); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.foot { color: var(--muted); font-size: 13.5px; padding-bottom: 32px; text-align: center; }
.foot p { margin: 0; }
.foot::before {
  content: ""; display: block; width: 120px; height: 2px; margin: 0 auto 14px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--pine); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 50; max-width: calc(100vw - 32px);
  border: 1px solid rgba(232, 180, 58, .6);
}

/* passcode gate */
.gate { max-width: 420px; margin: 28px auto; }
.gate .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--red); }
.gate h2 { margin: 0 0 6px; font-family: var(--script); font-style: italic; font-weight: 700; font-size: 27px; line-height: 1.15; color: var(--accent); }
.gate p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

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

.dlg-title { flex: 1; min-width: 0; }
.add-rows { margin-top: 12px; }
