/* Millwald Theatre brand (Brand & Messaging Guide, Letterpress Communications):
   Blue #218BCA, Light Blue #8DC3E4, White #FEFEFE, Gold #FAA519, Plum #731E5A, Pink #C54592.
   Headline: Larken Black (Fraunces is the free web stand-in). Subhead: Arial Bold. Body: Arial Regular.
   Layout: blue band header with a light-blue under-stripe (as on the guide cover), one working column,
   shifts drawn as ticket stubs. */
:root {
  --blue: #218BCA;            /* brand Blue: header band, logo ground */
  --light-blue: #8DC3E4;      /* brand Light Blue: under-stripe, accents */
  --gold: #FAA519;            /* brand Gold: your shifts, clock button, active tab */
  --plum: #731E5A;            /* brand Plum: subheads, time clock card */
  --pink: #B23A80;            /* brand Pink, deepened slightly so text on white stays readable */

  --paper: #F6F6F9;
  --surface: #FEFEFE;         /* brand White */
  --ink: #1F1A24;
  --muted: #625B6B;
  --line: #E0DCE5;
  --action: #1A74AB;          /* brand Blue, deepened for white button text contrast */
  --on-action: #FFFFFF;
  --link: #1A74AB;
  --gold-soft: #FEF1D6;
  --on-gold: #3D0F30;
  --pink-soft: #F8E2EF;
  --ok: #23724F;
  --ok-soft: #DCF0E5;
  --header: var(--blue);
  --on-header: #FFFFFF;
  --clock: var(--plum);
  --clock-on: #145F8E;

  --font-display: "Larken", "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131016; --surface: #1C1821; --ink: #F2EEF4; --muted: #ACA2B4; --line: #342D3C;
    --action: #8DC3E4; --on-action: #0C2333; --link: #8DC3E4;
    --gold-soft: #3A2B0F; --on-gold: #2A0A20; --plum: #D893C4; --pink: #EB7DBD; --pink-soft: #3B1730;
    --ok: #63C796; --ok-soft: #173326;
    --header: #1B6FA3; --clock: #4E1440; --clock-on: #12507A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131016; --surface: #1C1821; --ink: #F2EEF4; --muted: #ACA2B4; --line: #342D3C;
  --action: #8DC3E4; --on-action: #0C2333; --link: #8DC3E4;
  --gold-soft: #3A2B0F; --on-gold: #2A0A20; --plum: #D893C4; --pink: #EB7DBD; --pink-soft: #3B1730;
  --ok: #63C796; --ok-soft: #173326;
  --header: #1B6FA3; --clock: #4E1440; --clock-on: #12507A; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
/* Headline: Larken Black */
h1 { font: 900 2.2rem/1.05 var(--font-display); letter-spacing: -.005em; }
/* Subhead: Arial Bold, set in caps like the guide's section tabs */
h2 { font: 700 1rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--plum); }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--link); }
.num, time, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.label {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- logo ---------- */
/* The logo file is used as a mask so it can be drawn white on blue (an approved version). */
.logo {
  display: block; aspect-ratio: 2000 / 359; height: auto; background: var(--on-header);
  -webkit-mask: url(/logo-mask.png) center / contain no-repeat; mask: url(/logo-mask.png) center / contain no-repeat;
}

/* ---------- header ---------- */
.topbar {
  background: var(--header); color: var(--on-header);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 0;
  border-bottom: 6px solid var(--light-blue);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner { max-width: 1080px; margin: 0 auto; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Padding keeps the guide's clear space around the logo. */
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; padding: 4px 0; color: inherit; }
.topbar .logo { width: 150px; }
.brand-sub { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; padding-left: 14px; border-left: 1px solid rgb(255 255 255 / .45); }
.who { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.who .name { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-top: 12px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 10px 12px; text-decoration: none; font-weight: 700; font-size: .9rem;
  color: rgb(255 255 255 / .82);
  border-bottom: 4px solid transparent;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.nav .sep { flex: none; width: 1px; background: rgb(255 255 255 / .35); margin: 10px 6px; }
.nav .badge { margin-left: 6px; }

/* ---------- page ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 64px; display: grid; gap: 28px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 60ch; }
.page-head a.small { color: var(--muted); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.stack { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.tagline { text-align: center; font: italic 900 1.05rem/1.3 var(--font-display); color: var(--plum); }

/* ---------- buttons & forms ---------- */
button, .btn {
  font: 700 .9rem/1 var(--font-body); padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
}
button:hover, .btn:hover { border-color: var(--muted); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
button.primary { background: var(--action); color: var(--on-action); border-color: var(--action); }
button.gold { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
button.danger { color: var(--pink); }
button.danger.solid { background: var(--pink); color: #fff; border-color: var(--pink); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { border-color: var(--line); }
button.small { min-height: 32px; padding: 6px 12px; font-size: .82rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
.topbar button { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); min-height: 32px; padding: 6px 14px; }
.topbar button:hover { border-color: #fff; }

form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 700; }
.field small { color: var(--muted); font-size: .8rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.check input { width: auto; }
.fields-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.form-error { color: var(--pink); background: var(--pink-soft); padding: 10px 12px; border-radius: 8px; font-size: .9rem; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--paper); border: 1px solid var(--line); white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--gold-soft); color: var(--ink); border-color: transparent; }
.pill.urgent { background: var(--pink-soft); color: var(--pink); border-color: transparent; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: var(--on-gold); font-size: .72rem; font-weight: 700;
}

/* ---------- ticket stub (a show / shift) ---------- */
.ticket {
  --notch: 10px;
  display: grid; grid-template-columns: 92px 1fr; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); position: relative; min-width: 0;
}
a.ticket:hover { border-color: var(--muted); }
.ticket.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ticket .stub {
  display: grid; place-content: center; text-align: center; gap: 2px; padding: 14px 6px;
  border-right: 2px dashed var(--line); position: relative;
}
.ticket .stub::before, .ticket .stub::after {
  content: ""; position: absolute; right: calc(-1 * var(--notch) - 1px); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  background: var(--paper); border-radius: 50%; border: 1px solid var(--line);
}
.ticket .stub::before { top: calc(-1 * var(--notch) - 1px); clip-path: inset(50% 0 0 0); }
.ticket .stub::after { bottom: calc(-1 * var(--notch) - 1px); clip-path: inset(0 0 50% 0); }
.stub .mon { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--plum); }
.stub .day { font: 900 2.3rem/1 var(--font-display); font-variant-numeric: lining-nums; }
.stub .dow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ticket .body { padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
.ticket .title { font: 900 1.3rem/1.15 var(--font-display); }
.times { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--muted); }
.times b { color: var(--ink); font-weight: 700; }

.roles { display: grid; gap: 6px; }
.role {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--paper);
}
.role.is-mine { background: var(--gold-soft); }
.role .name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.seats { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 120px; }
.seat { width: 9px; height: 9px; border-radius: 2px 2px 4px 4px; background: var(--line); }
.seat.taken { background: var(--gold); }
.role .count { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); min-width: 3.5ch; text-align: right; }

/* ---------- clock ---------- */
.clock {
  background: var(--clock); color: #fff; border-radius: var(--radius); padding: 22px;
  display: grid; gap: 16px; position: relative; overflow: hidden;
}
.clock.on { background: var(--clock-on); }
.clock .status { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.clock .lamp { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .35); }
.clock.on .lamp { background: #63C796; box-shadow: 0 0 12px #63C796; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.clock .elapsed { font: 900 3.4rem/1 var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.clock select, .clock input { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .3); }
.clock input::placeholder { color: rgb(255 255 255 / .65); }
.clock select option { color: #111; }
.clock button.big { min-height: 52px; font-size: 1rem; width: 100%; }

/* ---------- stats ---------- */
.stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 16px 18px; display: grid; gap: 4px; }
.stat .value { font: 900 2.1rem/1 var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.stat .value small { font: 700 .85rem var(--font-body); color: var(--muted); margin-left: 4px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--paper); }
tr.inactive td { color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--blue); }

/* ---------- notices ---------- */
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 8px; min-width: 0; }
.notice.urgent { border-left: 4px solid var(--pink); }
.notice.unread { box-shadow: 0 0 0 1px var(--gold) inset; border-color: var(--gold); }
.notice .body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice .meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(100%, 440px); display: grid; gap: 22px; }
/* Mirrors the guide cover: blue band, rounded right end, light-blue under-stripe, gold pill. */
.auth-card .marquee {
  background: var(--header); border-radius: 14px 64px 64px 14px; padding: 28px 40px 28px 26px;
  box-shadow: 0 8px 0 var(--light-blue);
}
.auth-card .marquee .logo { width: 100%; }
.auth-card .pill-gold {
  justify-self: start; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 8px 22px;
  font: 900 1.05rem/1.2 var(--font-display); margin-top: 4px;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: transparent; min-height: 36px; }
.tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

/* ---------- modal & toast ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); max-height: calc(100vh - 48px);
}
dialog::backdrop { background: rgb(20 10 24 / .55); }
#modal-body { padding: 22px; display: grid; gap: 16px; }
#modal-body > h2:first-child, #modal-body > form > h2:first-child { font: 900 1.5rem/1.15 var(--font-display); text-transform: none; letter-spacing: 0; color: var(--ink); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.role-editor { display: grid; gap: 8px; }
.role-editor .r { display: grid; grid-template-columns: 1fr 76px auto; gap: 8px; align-items: center; }

#toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgb(0 0 0 / .25);
}
#toast.error { background: var(--pink); color: #fff; }

@media (max-width: 520px) {
  h1 { font-size: 1.85rem; }
  .brand-sub { display: none; }
  .topbar .logo { width: 128px; }
  .ticket { grid-template-columns: 64px 1fr; }
  .ticket .body { padding: 14px 12px; }
  .stub .day { font-size: 1.9rem; }
  .role .seats { display: none; }
  .role { gap: 8px; }
  .clock .elapsed { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .clock.on .lamp { animation: none; }
}

/* ---------- show photos ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.show-media { display: grid; gap: 10px; min-width: 0; }
.show-media .cover { padding: 0; border: 0; border-radius: 10px; overflow: hidden; display: block; min-height: 0; background: var(--paper); }
.show-media .cover img { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 280px; object-fit: cover; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbs button { padding: 0; width: 64px; height: 48px; min-height: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 65ch; }
.vol-notes { font-size: .85rem; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.vol-notes b { color: var(--ink); }

.photo-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.photo-grid:empty { display: none; }
.photo-tile { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper); border: 1px solid var(--line); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile .tag { position: absolute; top: 6px; left: 6px; }
.tile-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: 4px; justify-content: flex-end; padding: 6px; background: linear-gradient(transparent, rgb(0 0 0 / .55)); }
.tile-actions button.small { min-height: 26px; padding: 3px 8px; font-size: .74rem; white-space: nowrap; }
.dropzone {
  display: grid; gap: 2px; justify-items: center; text-align: center; padding: 18px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.dropzone:hover, .dropzone.over { border-color: var(--action); }
.dropzone:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }

dialog.wide { width: min(980px, calc(100vw - 32px)); }
.lightbox-img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: var(--paper); }

/* ---------- people ---------- */
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center;
  background: var(--light-blue); color: #0C2333; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 1.8rem; font-family: var(--font-display); font-weight: 900; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--light-blue); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-head { display: flex; align-items: flex-start; gap: 18px; min-width: 0; flex-wrap: wrap; }
.portrait { display: grid; gap: 6px; justify-items: center; }
.btn.small-link { min-height: 28px; padding: 4px 10px; font-size: .78rem; cursor: pointer; }
label.btn { cursor: pointer; }

/* ---------- rewards (styled after the packet's Milestone Rewards table) ---------- */
.reward-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  display: grid; gap: 8px; min-width: 0; border-top: 4px solid var(--gold);
}
.reward-title { font: 900 1.35rem/1.15 var(--font-display); }
.reward-bar { height: 10px; border-radius: 5px; background: var(--paper); overflow: hidden; border: 1px solid var(--line); }
.reward-bar > i { display: block; height: 100%; background: var(--gold); border-radius: 5px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rung {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0;
}
.rung-hours {
  display: grid; place-content: center; text-align: center; padding: 10px 6px;
  font: 900 1.7rem/1 var(--font-display); background: var(--paper); color: var(--muted);
}
.rung-hours small { font: 700 .65rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.rung.earned .rung-hours { background: #731E5A; color: #fff; }
.rung-body { display: grid; gap: 2px; padding: 12px 16px; min-width: 0; align-content: center; }
.rung-body b { text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.rung-status { padding: 10px 14px; justify-content: flex-end; }
.callout {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; text-decoration: none;
  background: var(--gold-soft); color: var(--ink); border: 1px solid var(--gold); border-radius: var(--radius); padding: 14px 18px;
}
.reward-edit { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
@media (max-width: 640px) {
  .rung { grid-template-columns: 64px 1fr; }
  .rung-status { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--line); }
  .reward-edit { grid-template-columns: 70px 1fr; }
  .reward-edit input:nth-child(3) { grid-column: 1 / -1; }
}

.contact-card { display: grid; gap: 2px; padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.contact-card a { font-weight: 700; width: fit-content; }

/* ---------- Know Before You Volunteer ---------- */
.kbyv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 14px; min-width: 0; border-top: 4px solid var(--plum); }
.kbyv-toggle .kbyv { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; }
.kbyv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.kbyv-wear { background: var(--gold-soft); border-radius: 10px; padding: 10px 14px; display: grid; gap: 2px; }
.kb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.kb-steps li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.kb-steps li:first-child { border-top: 0; }
.kb-time { white-space: nowrap; font: 900 1.05rem/1.3 var(--font-display); color: var(--plum); font-variant-numeric: tabular-nums lining-nums; }
.kb-steps p { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.kbyv-toggle summary { cursor: pointer; font-weight: 700; color: var(--link); padding: 4px 0; }
.link-like { color: var(--link); font-weight: 700; }
.detail { align-items: start; }

/* ---------- lobby check-in (kiosk) ---------- */
body.kiosk-mode { font-size: 17px; }
.kiosk { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.kiosk-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--header); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 18px) 24px 18px;
  border-bottom: 6px solid var(--light-blue);
}
.kiosk-head .logo { width: 180px; }
.kiosk-title { font: 700 1rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; padding-left: 18px; border-left: 1px solid rgb(255 255 255 / .45); }
.kiosk-clock { margin-left: auto; font: 900 1.8rem var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.kiosk-admin { background: transparent; color: rgb(255 255 255 / .75); border-color: rgb(255 255 255 / .35); min-height: 32px; padding: 4px 12px; font-size: .8rem; }
.kiosk-body { padding: 24px; display: grid; gap: 28px; align-content: start; max-width: 1280px; width: 100%; margin: 0 auto; }
.kiosk-show { display: grid; gap: 14px; }
.kiosk-show-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
.kiosk-show-head h1 { font-size: 2.4rem; }
.kiosk-show-head .times { font-size: 1rem; }
.kiosk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.kiosk-grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); max-height: 55vh; overflow-y: auto; }
.kiosk-tile {
  display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 12px; min-height: 0;
  border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.05rem;
}
.kiosk-tile:hover { border-color: var(--action); }
.kiosk-tile.on { border-color: var(--ok); background: var(--ok-soft); }
.kiosk-tile.done { opacity: .7; }
.kiosk-avatar { width: 96px; height: 96px; font-size: 1.8rem; font-family: var(--font-display); font-weight: 900; }
.kiosk-avatar.xl { width: 150px; height: 150px; font-size: 2.6rem; }
.kiosk-role { font-size: .85rem; color: var(--muted); }
.kiosk-status { font-size: .8rem; font-weight: 700; color: var(--link); }
.kiosk-tile.on .kiosk-status { color: var(--ok); }
.kiosk-actions { display: flex; justify-content: center; padding-bottom: 24px; }
button.big { min-height: 60px; font-size: 1.15rem; padding: 14px 30px; }
.kiosk-empty { text-align: center; display: grid; gap: 10px; padding: 48px 16px; }
.kiosk-confirm, .kiosk-done { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 18px 8px; }
.kiosk-confirm h1, .kiosk-done h1 { font-size: 2.4rem; }
.kiosk-done p { font-size: 1.15rem; max-width: 36ch; }
.kiosk-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
#kiosk-search { font-size: 1.2rem; padding: 14px 16px; }
@media (max-width: 640px) {
  .kiosk-head .logo { width: 130px; }
  .kiosk-title { display: none; }
  .kiosk-body { padding: 16px; }
  .kiosk-show-head h1 { font-size: 1.8rem; }
}

.import-summary { display: grid; gap: 8px; padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.import-summary ul { margin: 0; padding-left: 20px; }
.import-summary details summary { cursor: pointer; font-weight: 700; }

/* Fallback for browsers without <dialog> support */
dialog.fallback[open] { position: fixed; inset: 0; margin: auto; z-index: 100; height: fit-content; overflow-y: auto; box-shadow: 0 0 0 100vmax rgb(20 10 24 / .55); }
dialog.fallback:not([open]) { display: none; }
body.modal-open { overflow: hidden; }

.signup-note { color: var(--plum); font-style: italic; }
