/* Bibs for venues. The app's look: near-black surfaces, electric pitch green,
   titles in Exo 2 Black Italic (OFL: fonts/Exo2-OFL.txt). */
@font-face {
  font-family: 'Exo2';
  src: url('/fonts/Exo2-BlackItalic.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0b0f0d;
  --surface: #141a16;
  --raised: #1b2420;
  --raised-2: #222d28;
  --border: #25302a;
  --border-strong: #32403a;
  --text: #f2f5f3;
  --muted: #8fa097;
  --faint: #5f6e66;
  --primary: #22c55e;
  --primary-press: #16a34a;
  --primary-text: #6ee7a0;
  --primary-soft: #123b24;
  --on-primary: #05170c;
  --danger: #f87171;
  --danger-soft: #3a1a1a;
  --warning: #fbbf24;
  --warning-soft: #3a2f10;
  --info: #60a5fa;
  --info-soft: #132a45;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --side: 248px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .mark { width: 28px; height: 36px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.92); } }

/* The bib: the brand's mark, a green tabard. */
.mark {
  display: inline-block;
  width: 16px;
  height: 20px;
  background: var(--primary);
  border-radius: 3px 3px 6px 6px;
  clip-path: polygon(0 0, 30% 0, 50% 22%, 70% 0, 100% 0, 100% 100%, 0 100%);
  flex-shrink: 0;
}
.wordmark {
  font-family: 'Exo2', var(--font);
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--side);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand .wordmark { font-size: 22px; color: var(--primary); line-height: 1; }
.brand .for { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.2px; }
.venue-pick { padding: 0 4px; }
.venue-pick select { width: 100%; }
.venue-pick .role { margin-top: 6px; padding: 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; min-height: 0; padding: 0 2px; }
.nav .group {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 10px 4px;
}
.nav .group:first-child { padding-top: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.nav a:hover { background: var(--raised); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-text); }
.nav a .ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav a .count {
  margin-left: auto;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
}
.side-foot { border-top: 1px solid var(--border); padding: 10px 8px 0; display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar { display: none; }

.main { flex: 1; min-width: 0; padding: 28px 36px 80px; }
.main.wide { max-width: none; }
.page { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 {
  font-family: 'Exo2', var(--font);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.05;
  color: var(--primary);
  letter-spacing: 0.3px;
}
.page-head .sub { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.card .card-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.section-title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 28px 0 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 > .card + .card, .grid3 > .card + .card { margin-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--raised); color: var(--text); font-size: 14px; }
.notice.warn { background: var(--warning-soft); color: #fde68a; }
.notice.bad { background: var(--danger-soft); color: #fecaca; }
.notice.good { background: var(--primary-soft); color: var(--primary-text); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .l { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.stat .n { font-size: 28px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .n.green { color: var(--primary-text); }
.stat .d { color: var(--muted); font-size: 13px; }
.meter { height: 6px; background: var(--raised-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--raised);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  min-height: 38px;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.btn:hover { background: var(--raised-2); border-color: var(--faint); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-press); border-color: var(--primary-press); }
.btn.danger { color: var(--danger); border-color: #5b2b2b; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.small { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.btn.icon { padding: 0; width: 38px; }
.btn.icon.small { width: 30px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Toggle pills: Here, Paid. */
.pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px 5px 9px;
  cursor: pointer;
  min-height: 32px;
}
.pill-toggle .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
.pill-toggle[aria-pressed='true'] { background: var(--primary-soft); border-color: #1f6b3f; color: var(--primary-text); }
.pill-toggle[aria-pressed='true'] .dot { background: var(--primary); border-color: var(--primary); }
.pill-toggle[aria-pressed='true'] .dot::after { content: ''; width: 6px; height: 3px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.pill-toggle:disabled { opacity: 0.5; cursor: default; }

/* Segmented choices. */
.seg { display: inline-flex; background: var(--raised); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--primary-soft); color: var(--primary-text); }
.seg button:hover { color: var(--text); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--raised-2); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--primary-soft); color: var(--primary-text); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.blue { background: var(--info-soft); color: var(--info); }

/* ---------------------------------------------------------------- forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
label.field > span.hint { font-weight: 500; color: var(--faint); }
input[type='text'], input[type='email'], input[type='password'], input[type='search'], input[type='tel'],
input[type='url'], input[type='number'], input[type='date'], input[type='time'], select, textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  min-height: 40px;
  width: 100%;
  outline: none;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type='date'], input[type='time'] { color-scheme: dark; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.counter { text-align: right; font-size: 12px; color: var(--faint); }
.counter.over { color: var(--danger); }
.money { position: relative; }
.money::before { content: '£'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money input { padding-left: 26px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; white-space: nowrap; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- people */
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .handle { color: var(--muted); font-size: 12px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #04120a;
  background: var(--primary);
  overflow: hidden;
  object-fit: cover;
}
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar .emoji { font-size: 18px; }

/* ---------------------------------------------------------------- tonight */
.game-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.game-card + .game-card { margin-top: 16px; }
.game-card.off { opacity: 0.6; }
.game-head { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.game-head .time { font-family: 'Exo2', var(--font); font-style: italic; font-weight: 900; font-size: 30px; color: var(--primary); line-height: 1; min-width: 92px; }
.game-head .what b { display: block; font-size: 16px; }
.game-head .tallies { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.player-row:last-child { border-bottom: 0; }
.player-row .toggles { margin-left: auto; display: flex; gap: 8px; }
.player-row.bench { background: rgba(255, 255, 255, 0.015); }
.day-nav { display: flex; align-items: center; gap: 8px; }
.day-nav .label { font-weight: 800; min-width: 170px; text-align: center; }

/* ---------------------------------------------------------------- timetable */
.tt-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); max-height: calc(100vh - 230px); }
.tt { display: grid; position: relative; min-width: 980px; }
.tt-corner, .tt-dayhead { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); }
.tt-corner { left: 0; z-index: 4; }
.tt-dayhead { padding: 8px 6px 6px; text-align: center; border-left: 1px solid var(--border); }
.tt-dayhead b { display: block; font-size: 13px; }
.tt-dayhead .date { color: var(--muted); font-size: 12px; }
.tt-dayhead.today b { color: var(--primary-text); }
.tt-dayhead .lanes { display: flex; margin-top: 4px; gap: 2px; }
.tt-dayhead .lanes span { flex: 1; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-hours { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--border); }
.tt-hours div { font-size: 11px; color: var(--faint); text-align: right; padding: 0 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.tt-day { position: relative; border-left: 1px solid var(--border); cursor: crosshair; }
.tt-day.today { background: rgba(34, 197, 94, 0.035); }
.tt-shut { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 6px, transparent 6px 12px); pointer-events: none; }
.tt-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 1; pointer-events: none; }
.tt-item {
  position: absolute;
  border-radius: 7px;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  z-index: 1;
}
.tt-item b { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
.tt-item:hover { filter: brightness(1.15); z-index: 2; }
.tt-item.game { background: #134d2b; border-color: #1f7a45; color: #d1fae5; }
.tt-item.game.full { background: #16a34a; color: #04120a; }
.tt-item.game.cancelled { background: var(--raised-2); color: var(--faint); text-decoration: line-through; border-color: var(--border-strong); }
.tt-item.booking { background: var(--info-soft); border-color: #2b5a91; color: #bfdbfe; }
.tt-item.booking.pending { background: transparent; border: 1px dashed #4f86c6; color: #93c5fd; }
.tt-item.free { background: transparent; border: 1px dashed #a16207; color: var(--warning); }
.tt-item.closed { background: repeating-linear-gradient(135deg, #3a1a1a 0 8px, #2a1414 8px 16px); color: #fecaca; border-color: #5b2b2b; cursor: pointer; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- dashboard */
.heat { display: grid; gap: 3px; font-size: 11px; }
.heat .h { color: var(--faint); text-align: center; }
.heat .d { color: var(--muted); font-weight: 700; padding-right: 6px; display: flex; align-items: center; }
.heat .c { height: 26px; border-radius: 5px; background: var(--raised); display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); font-weight: 700; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; opacity: 0.9; }
.bars .bar:hover { opacity: 1; }
.bars-x { display: flex; gap: 4px; margin-top: 6px; font-size: 10px; color: var(--faint); }
.bars-x span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 140px 1fr 56px; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; }
.hbar .track { height: 10px; background: var(--raised-2); border-radius: 999px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------------------------------------------------------------- inbox */
.inbox { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 190px); min-height: 460px; }
.threads { border-right: 1px solid var(--border); overflow-y: auto; }
.thread { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.thread:hover { background: var(--raised); }
.thread.active { background: var(--primary-soft); }
.thread .body { min-width: 0; flex: 1; }
.thread .top { display: flex; justify-content: space-between; gap: 8px; }
.thread .top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .unread { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.convo { display: flex; flex-direction: column; min-height: 0; }
.convo-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 9px 13px; border-radius: 16px; background: var(--raised-2); white-space: pre-wrap; word-wrap: break-word; align-self: flex-start; font-size: 14px; }
.msg.mine { align-self: flex-end; background: #135c31; }
.msg .t { font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg.mine .t { color: #a7f3c4; }
.composer { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; }

/* ---------------------------------------------------------------- dialogs, toasts */
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 0;
  width: min(520px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
dialog .dlg-head { padding: 18px 20px 0; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
dialog .dlg-head h2 { font-size: 18px; }
dialog .dlg-body { padding: 14px 20px; }
dialog .dlg-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; pointer-events: none; }
.toast { background: var(--raised-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 18px; font-weight: 600; box-shadow: var(--shadow); animation: rise 0.18s ease-out; max-width: calc(100vw - 32px); }
.toast.good { border-color: #1f7a45; }
.toast.bad { border-color: #7f2d2d; color: #fecaca; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- sign in, check-in */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.solo-card { width: min(420px, 100%); }
.solo-card .brand { justify-content: center; margin-bottom: 18px; }
.solo-card .brand .wordmark { font-size: 34px; }
.solo-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.solo-card .lead { text-align: center; color: var(--muted); margin-bottom: 18px; }
.big-tick { width: 92px; height: 92px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; margin: 4px auto 16px; animation: pop 0.3s ease-out; }
.big-tick svg { width: 46px; height: 46px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }

/* ---------------------------------------------------------------- QR poster */
.qr-box { background: #fff; border-radius: 16px; padding: 18px; display: inline-block; }
.qr-box svg { display: block; width: 240px; height: 240px; }
.poster { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .shell, .toasts, dialog { display: none !important; }
  .poster { display: flex !important; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; text-align: center; gap: 18px; padding: 40px; }
  .poster h1 { font-family: 'Exo2', var(--font); font-style: italic; text-transform: uppercase; font-size: 54px; }
  .poster .qr-box svg { width: 420px; height: 420px; }
  .poster p { font-size: 22px; max-width: 560px; }
}

/* ---------------------------------------------------------------- photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--raised); border: 1px solid var(--border); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .x { position: absolute; top: 6px; right: 6px; }
.photo.add { display: grid; place-items: center; border-style: dashed; color: var(--muted); cursor: pointer; font-weight: 700; }
.logo-slot { width: 96px; height: 96px; border-radius: 20px; overflow: hidden; background: var(--raised); border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.logo-slot img { width: 100%; height: 100%; object-fit: cover; }
.hours-row { display: grid; grid-template-columns: 130px 110px 1fr 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.hours-row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 900px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .threads { border-right: 0; border-bottom: 1px solid var(--border); max-height: 260px; }
  .msgs { min-height: 320px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    z-index: 30;
    transform: translateX(-102%);
    transition: transform 0.2s ease-out;
    box-shadow: var(--shadow);
    padding-top: max(18px, env(safe-area-inset-top));
  }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 20; }
  .topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  }
  .topbar .wordmark { color: var(--primary); font-size: 20px; }
  .topbar .venue { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .main { padding: 18px 16px 80px; }
  .page-head h1 { font-size: 24px; }
  .form-grid .span2 { grid-column: auto; }
  .game-head .tallies { margin-left: 0; }
  .player-row { flex-wrap: wrap; }
  .player-row .toggles { margin-left: 46px; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hbar { grid-template-columns: 100px 1fr 48px; }
  .msg { max-width: 88%; }
  input, select, textarea { font-size: 16px; }
}
