/* Trauma, Power and Dialogue: the look of the conference poster.
   Turquoise-to-cream gradient, black ink, thin black rules, Fraunces titles, Inter text. */
:root {
  --ink: #000;
  --ink-2: #2a2e2c;
  --muted: #4b5552;
  --rule: rgba(0, 0, 0, .85);
  --hair: rgba(0, 0, 0, .18);
  --paper: rgba(255, 255, 255, .5);
  --paper-2: rgba(255, 255, 255, .78);
  --ok: #0d7a4f;
  --ok-bg: #d8f1e4;
  --warn: #8a5a00;
  --warn-bg: #fbecc6;
  --bad: #b3261e;
  --bad-bg: #fbdcd8;
  --grad: linear-gradient(90deg, #73cddc 0%, #a5d4d4 25%, #bdd9cf 50%, #d1ddcb 75%, #e4e1c7 100%);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 400 16px/1.5 var(--sans);
  background: #b9d8d0 var(--grad) fixed; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: grid; gap: 14px; min-width: 0; }
.stack.tight { gap: 8px; }
.selectable { user-select: text; }
.boot { display: grid; place-items: center; min-height: 100dvh; }
.boot-msg { color: var(--muted); }

/* ── page frame ── */
.page { width: 100%; max-width: 600px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.page.wide { max-width: 1180px; padding-bottom: 40px; }
.page.bare { padding-bottom: 32px; }
.top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.top .mark { width: 30px; height: 40px; flex: none; }
.wordmark { font: 800 1.12rem/1.05 var(--serif); letter-spacing: -.01em; }
.wordmark i { font-style: normal; font-weight: 400; }
.top .meta { font-size: .78rem; color: var(--muted); }
.title { font: 800 clamp(1.7rem, 6vw, 2.3rem)/1.08 var(--serif); letter-spacing: -.015em; }
.title i { font-style: normal; font-weight: 400; }
.h2 { font: 800 1.3rem/1.15 var(--serif); }
.kicker { font: 500 .8rem/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 4px 0; }

/* ── buttons & inputs ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn.ok { border-color: var(--ok); background: var(--ok); }
.btn[disabled], .btn.busy { opacity: .45; pointer-events: none; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--paper-2); font-size: 16px;
}
.input::placeholder { color: #6a7470; }
label { font-weight: 600; font-size: .9rem; }
.field { display: grid; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--ink); background: var(--paper-2); white-space: nowrap;
}
.chip.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.chip.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.chip.bad { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.chip.ghost { background: transparent; border-color: var(--hair); color: var(--muted); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 9px 14px; font-weight: 600; font-size: .9rem; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg.full { display: grid; width: 100%; }
.err { color: var(--bad); font-weight: 600; }
.note { padding: 12px 14px; border-left: 3px solid var(--ink); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; }
.note.warn { border-color: var(--warn); background: var(--warn-bg); }
.note.bad { border-color: var(--bad); background: var(--bad-bg); }
.note.ok { border-color: var(--ok); background: var(--ok-bg); }

/* ── ticket ── */
.ticket { display: grid; gap: 16px; padding: 22px 20px; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 18px; }
.ticket .who { font: 800 1.7rem/1.1 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.qr { justify-self: center; width: min(68vw, 260px); aspect-ratio: 1; padding: 12px; background: #fff; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: 100%; }
.code { justify-self: center; font: 600 1rem/1 var(--sans); letter-spacing: .22em; }
.days { display: grid; gap: 10px; }
.day-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.day-line b { white-space: nowrap; }
.links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.link-card {
  display: grid; gap: 2px; padding: 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper);
  text-decoration: none; min-width: 0;
}
.link-card b { font-size: .95rem; }
.link-card span { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }

/* ── schedule ── */
.daytabs { position: sticky; top: 0; z-index: 5; padding: 10px 0; margin: -10px 0 0; background: transparent; backdrop-filter: blur(10px); }
.slots { display: grid; border-top: 1px solid var(--rule); }
.slot { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.slot .time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .92rem; line-height: 1.35; }
.slot .time span { display: block; font-weight: 400; color: var(--muted); }
.slot .what { display: grid; gap: 4px; }
.slot .label { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.slot .name { font-weight: 700; line-height: 1.3; }
.slot .people { font-size: .88rem; color: var(--ink-2); }
.slot.break .name { font-weight: 400; color: var(--muted); }
.slot .mine { justify-self: start; margin-top: 4px; }
.venue { display: grid; gap: 2px; padding: 12px 0 2px; }

/* ── workshops ── */
.ws-list { display: grid; gap: 12px; }
.ws { display: grid; gap: 10px; padding: 16px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); }
.ws.mine { background: var(--paper-2); box-shadow: inset 4px 0 0 var(--ok); }
.ws.waiting { box-shadow: inset 4px 0 0 var(--warn); }
.ws h3 { font: 800 1.08rem/1.25 var(--serif); }
.ws .by { font-size: .88rem; color: var(--ink-2); }
.ws details summary { cursor: pointer; font-size: .88rem; font-weight: 600; list-style: none; }
.ws details summary::-webkit-details-marker { display: none; }
.ws details summary::after { content: ' +'; }
.ws details[open] summary::after { content: ' –'; }
.ws details p { margin-top: 8px; font-size: .92rem; color: var(--ink-2); }
.meter { height: 6px; border-radius: 3px; background: var(--hair); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.meter.full i { background: var(--warn); }

/* ── shuttle ── */
.leg { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.leg:last-child { border-bottom: 0; }
.leg .route { font-size: .86rem; color: var(--muted); }
.card { padding: 16px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); display: grid; gap: 12px; min-width: 0; }

/* ── bottom nav (attendee) ── */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(236, 240, 228, .92);
  backdrop-filter: blur(14px); border-top: 1px solid var(--rule);
}
.nav a {
  display: grid; place-items: center; align-content: center; gap: 3px; text-decoration: none; font-size: .74rem; font-weight: 600; color: var(--muted);
  -webkit-touch-callout: none; user-select: none;
}
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] svg { stroke-width: 2.2; }
@media (min-width: 760px) {
  .nav { inset: auto 50% 18px auto; transform: translateX(50%); width: 440px; height: 62px; padding: 0; border: 1px solid var(--rule); border-radius: 18px; }
}

/* ── staff: login, kiosk, admin ── */
.login { max-width: 420px; margin: 8vh auto 0; }
.kiosk-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .kiosk-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.cam { position: relative; overflow: hidden; border-radius: 14px; background: #0d0f0e; aspect-ratio: 4 / 3; border: 1.5px solid var(--ink); }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 16px; pointer-events: none; }
.pop {
  position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; gap: 10px; padding: 20px; text-align: center;
  background: var(--ok-bg); color: var(--ink); animation: pop-in .18s ease-out;
}
.pop.bad { background: var(--bad-bg); }
.pop.warn { background: var(--warn-bg); }
.pop .big { font: 800 1.6rem/1.1 var(--serif); overflow-wrap: anywhere; }
.pop .mark-ok { font-size: 2.6rem; line-height: 1; color: var(--ok); }
.pop .mark-bad { font-size: 2.4rem; line-height: 1; color: var(--bad); }
.pop .facts { display: grid; gap: 4px; justify-items: center; }
.pop .row { justify-content: center; }
.side-pop { position: static; border-radius: 14px; border: 1.5px solid var(--ink); }
@keyframes pop-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.count { font: 800 1.5rem/1 var(--serif); }
.results { display: grid; gap: 8px; }
.person-btn {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; padding: 12px 14px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper-2); -webkit-touch-callout: none; user-select: none;
}
.person-btn b { overflow-wrap: anywhere; }
.person-btn .sub { grid-column: 1; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.person-btn .chips { grid-row: 1 / span 2; grid-column: 2; display: grid; gap: 4px; justify-items: end; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.tabs button { border: 1.5px solid transparent; background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 600; }
.tabs button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.tabs .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .72rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 14px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); display: grid; gap: 2px; }
.stat b { font: 800 1.8rem/1 var(--serif); }
.stat span { font-size: .82rem; color: var(--ink-2); }
.stat.alert { background: var(--bad-bg); border-color: var(--bad); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: .84rem; font-weight: 600; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper-2); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); position: sticky; top: 0; background: #eef1e8; }
tr.open-row td { background: rgba(255, 255, 255, .6); }
tr[data-act] { cursor: pointer; }
tr[data-act]:hover td { background: rgba(255, 255, 255, .55); }
.detail { display: grid; gap: 10px; padding: 6px 2px 10px; }
.detail .kv { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 12px; font-size: .88rem; }
.ws-admin { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 9rem auto; gap: 8px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
@media (max-width: 700px) { .ws-admin { grid-template-columns: minmax(0, 1fr) 5rem; } .ws-admin .room, .ws-admin .save { grid-column: span 1; } }
.names { font-size: .84rem; color: var(--ink-2); }
.two { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.demo-bar { position: sticky; top: 0; z-index: 30; padding: 6px 16px; background: #000; color: #fff; font-size: .8rem; text-align: center; }
.demo-bar a { color: #fff; }
.foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: .78rem; color: var(--muted); text-align: center; }
.foot a { color: var(--muted); }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 50; transform: translateX(-50%);
  max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); animation: pop-in .18s ease-out; text-align: center;
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .nav, .demo-bar, #toast { display: none; } body { background: #fff; } }
.top .btn, .chip, td:nth-child(2) { white-space: nowrap; }
@media (max-width: 520px) { .top .wordmark { font-size: 1rem; } .top .btn.small { padding: 6px 10px; } }
/* the check-in result covers the whole screen, so it is seen even when the list was scrolled */
.pop { position: fixed; inset: 0; z-index: 40; padding: 24px 20px calc(24px + var(--safe-b)); justify-items: center; }
.pop > * { max-width: 520px; }
.pop .big { font-size: clamp(1.7rem, 7vw, 2.6rem); }
.pop .btn { min-height: 52px; padding: 12px 24px; font-size: 1rem; }
.btn { white-space: nowrap; }

/* long text inside chips and buttons wraps, and nothing can make the page wider than the screen */
.slot .mine, .ws-line .chip { white-space: normal; text-align: left; }
.pop .person-btn .chip, .pop .row .chip { white-space: nowrap; }
html, body { overflow-x: clip; }
.pop { overflow-y: auto; align-content: start; padding-top: max(24px, 6vh); }
.pop .results { max-width: 520px; }
.demo-bar { position: relative; }
.slot .mine, .pop p, .person-btn b { text-wrap: balance; }
