:root {
  --navy: #0b1f3a;
  --navy-2: #12294a;
  --accent: #0d6efd;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1a2333;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
}
* { box-sizing: border-box; }
/* [hidden] must beat display:flex/grid, which would otherwise keep it visible. */
[hidden] { display: none !important; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }

.topbar { background: var(--navy); color: #fff; }
.topbar-inner { width: 100%; max-width: 1700px; margin: 0 auto; padding: 8px clamp(16px, 2.5vw, 56px); display: flex; align-items: center; gap: 8px 24px; min-height: 60px; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: #fff; line-height: 1; display: inline-flex; align-items: center; flex: none; }
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.nav a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav-public { border: 1px solid #334a6b; }
@media (max-width: 1024px) {
  .topbar-inner { gap: 8px 14px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 8px; font-size: 13px; }
  .brand { font-size: 20px; }
}
.nav-auth { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; white-space: nowrap; }
.nav-user { color: #e2e8f0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-link-light { color: #cbd5e1; font-size: 14px; font-weight: 600; }
.nav-link-light:hover { color: #fff; }

.masq-bar { background: var(--amber); color: #fff; }
.masq-inner { width: 100%; max-width: 1700px; margin: 0 auto; padding: 8px clamp(16px, 2.5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.masq-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }

.auth-wrap { max-width: 420px; margin: 30px auto; }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }

.clubbar { background: var(--navy-2); color: #e2e8f0; }
.clubbar-inner { width: 100%; max-width: 1700px; margin: 0 auto; padding: 10px clamp(16px, 2.5vw, 56px); display: flex; align-items: center; gap: 10px; font-size: 15px; }
.club-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
.clubbar .muted { color: #94a3b8; }

/* Fluid layout: fills the screen and scales, but stays centred and capped so
   it never stretches uncomfortably wide on a big monitor. */
.container { width: 100%; max-width: 1700px; margin: 0 auto; padding: 28px clamp(16px, 2.5vw, 56px) 60px; }
/* Pages that are mostly a single column of reading/entry sit narrower. */
.container.narrow { max-width: 1080px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > div:first-child { flex: 1 1 300px; min-width: 0; }
.page-head .btn { flex: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 18px; }
.container-full { margin: 0; padding: 0; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.4px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat { text-align: left; }
.stat .num { font-size: 30px; font-weight: 800; color: var(--navy); }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 12px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff;
  border: 1.5px solid transparent; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; min-height: 42px; line-height: 1.2; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 34px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
/* "+ Add …" buttons: dashed so they never read as an empty text field. */
.btn-add { background: transparent; color: var(--accent); border: 1.5px dashed #bcd0ee; font-weight: 700; margin-top: 12px; }
.btn-add:hover { background: #eef4ff; border-color: var(--accent); filter: none; }
/* Controls sitting in a field row line up with the inputs beside them. */
.form-row > div > .btn-sm { min-height: 42px; }
.btn-green { background: var(--green); }
.btn-red { background: var(--red); }

input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; min-height: 42px; }
/* Date/time inputs render their own picker chrome — keep them the same height
   as every other control instead of letting the widget set it. */
input[type="date"], input[type="time"] { line-height: 1.2; -webkit-appearance: none; appearance: none; }
input[type="color"] { min-height: 0; padding: 4px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; color: var(--muted); }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 130px; }
.inline-form { display: inline; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-open { background: #e0edff; color: var(--accent); }
.badge-full { background: #dcfce7; color: var(--green); }
.badge-notified { background: #fef3c7; color: var(--amber); }
.badge-present { background: #dcfce7; color: var(--green); }
.badge-absent { background: #fee2e2; color: var(--red); }
.badge-muted { background: #f1f5f9; color: var(--muted); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-ok { background: #dcfce7; color: #14532d; }
.alert-err { background: #fee2e2; color: #7f1d1d; }
.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 16px; }

.hero { background: linear-gradient(135deg, var(--navy), #16375f); color: #fff; border-radius: 16px; padding: 40px 32px; margin-bottom: 28px; }
.hero h1 { color: #fff; font-size: 32px; }
.hero p { color: #cbd5e1; max-width: 640px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 20px 50px; }
.progress { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; min-width: 90px; }
.progress > div { height: 100%; background: var(--accent); }
pre.email { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0 0; }

.icon-stencil { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* segmented radio control + checkbox rows (roster wizard) */
.seg { display: flex; gap: 8px; }
.seg-opt { display: flex; align-items: center; gap: 8px; flex: 1; margin: 0; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); background: #fff; }
.seg-opt:has(input:checked) { border-color: var(--accent); background: #eef4ff; color: var(--accent); }
.seg-opt input { width: auto; margin: 0; accent-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); font-weight: 600; margin-top: 16px; cursor: pointer; }
.check-row input { width: auto; margin: 0; accent-color: var(--accent); }

/* ---- onboarding stepper ---- */
.steps { display: flex; gap: 6px; margin: 0 0 24px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); background: #eef1f6; }
.step .n { width: 20px; height: 20px; border-radius: 50%; background: #d7dde7; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.step.current { background: var(--navy); color: #fff; }
.step.current .n { background: var(--accent); }
.step.done { background: #dcfce7; color: var(--green); }
.step.done .n { background: var(--green); }
.step-arrow { align-self: center; color: #cbd5e1; font-weight: 700; }

/* ---- helpful hints ---- */
.hint { display: flex; gap: 10px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #78350f; margin: 0 0 16px; }
.hint .bulb { flex: none; font-size: 16px; line-height: 1.3; }
.hint strong { color: #92400e; }
.hint a { font-weight: 700; }

/* ---- import mapping (drag the field chips onto columns) ---- */
.chip-tray { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-height: 46px; padding: 10px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 12px; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 13px;
  border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  cursor: grab; user-select: none; -webkit-user-select: none; border: 2px solid transparent; touch-action: none;
  white-space: nowrap; }
.chip:active { cursor: grabbing; }
.chip .req { color: #fbbf24; }
.chip.optional { background: #64748b; }
.chip.selected { border-color: var(--accent); box-shadow: 0 0 0 3px #bfdbfe; }
.chip.dragging { opacity: 0.4; }
.chip-tray .tray-empty { color: var(--muted); font-size: 13px; font-weight: 600; }
.map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.map-table { border: none; border-radius: 0; min-width: 100%; }
.map-table th.map-col { min-width: 158px; padding: 10px 8px; vertical-align: bottom; background: #f8fafc; cursor: pointer; }
.map-table .col-name { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
/* Fixed height so every column header lines up, placed or not. */
.drop-slot { height: 38px; border: 1.5px dashed #cbd5e1; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #a3b1c2; font-weight: 700; padding: 3px; }
.drop-slot.over { border-color: var(--accent); background: #eff6ff; color: var(--accent); }
.drop-slot .chip { cursor: grab; }
.map-table td.col-mapped, .map-table th.col-mapped { background: #eff6ff; }
.map-table td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.map-more { text-align: center; color: var(--muted); font-size: 13px; padding: 10px; }

/* ---- weekday picker ---- */
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 9px 0; width: 46px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); background: #fff; }
.daypick label:has(input:checked) { border-color: var(--accent); background: var(--accent); color: #fff; }
.daypick input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---- season cards ---- */
.season-card { display: flex; flex-direction: column; gap: 10px; }
.season-card h3 { margin: 0; font-size: 18px; letter-spacing: -0.2px; }
.season-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 600; }
.season-meta strong { color: var(--navy); font-size: 15px; }
.season-card .cta { margin-top: auto; }
.season-card.full { background: #f0fdf4; border-color: #86efac; }
.season-card.half { background: #fffbeb; border-color: #fcd34d; }
.season-card.open { background: #fef2f2; border-color: #fca5a5; }

/* ---- setup checklist ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.checklist li:last-child { border-bottom: none; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: #e2e8f0; color: #94a3b8; }
.checklist li.done .tick { background: var(--green); color: #fff; }
.checklist li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: #cbd5e1; }
.checklist li a { margin-left: auto; white-space: nowrap; }

.list-scroll { max-height: 320px; overflow-y: auto; }
.danger-zone summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---- season wizard: one card, three stages ---- */
/* Forms stay readable even when the page goes full width. */
.wizard-card { max-width: 820px; }
#wizard-view { max-width: 820px; }
.gameday-grid { --gd-min: 205px; }
.stage-tabs { display: flex; gap: 6px; margin: 14px 0 22px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.wizard-card .stage-tabs { margin-top: 0; padding-top: 0; border-top: none; }
.stage-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); background: #eef1f6; }
.stage-tab .n { width: 18px; height: 18px; border-radius: 50%; background: #d7dde7; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.stage-tab.current { background: var(--navy); color: #fff; }
.stage-tab.current .n { background: var(--accent); }
.stage-tab.done { background: #dcfce7; color: var(--green); cursor: pointer; }
.stage-tab.done .n { background: var(--green); }
.stage-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.stage-error { color: var(--red); font-size: 14px; font-weight: 600; margin-top: 12px; }

.daychips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.daychip { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; user-select: none; -webkit-user-select: none; }
.daychip:hover { border-color: var(--accent); }
.daychip.blocked { background: #fee2e2; border-color: #fca5a5; color: #991b1b; text-decoration: line-through; }
.daychip.locked { background: #f1f5f9; color: var(--muted); cursor: not-allowed; border-style: dashed; }
/* modal dialogs */
dialog.modal { border: none; border-radius: 16px; padding: 0; max-width: 620px; width: calc(100% - 32px);
  max-height: 86vh; overflow: visible; color: var(--text); background: var(--card);
  box-shadow: 0 24px 70px rgba(11, 31, 58, 0.28); }
dialog.modal::backdrop { background: rgba(11, 31, 58, 0.5); }
dialog.modal > form { padding: 26px; max-height: 86vh; overflow-y: auto; }
.modal-x { position: absolute; top: 14px; right: 14px; border: none; background: none; color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.modal-x:hover { background: #f1f5f9; color: var(--text); }

/* onboarding "how would you like to start?" — centred page of choice cards */
.start-page { max-width: 900px; margin: 0 auto; text-align: center; padding: 12px 0 40px; }
.start-page h1 { margin-bottom: 8px; }
.start-page .sub { margin-bottom: 28px; }
.start-page .steps-centre { display: flex; justify-content: center; }
.start-page .steps { justify-content: center; }
.start-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; text-align: left; }
.start-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 24px; cursor: pointer;
  font: inherit; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; }
.start-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(11, 31, 58, 0.08); transform: translateY(-2px); }
.start-card .sc-icon { display: inline-flex; width: 42px; height: 42px; border-radius: 12px; background: #eef4ff;
  align-items: center; justify-content: center; margin-bottom: 4px; }
.start-card .sc-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.start-card .sc-title { font-size: 16px; font-weight: 800; letter-spacing: -0.2px; }
.start-card .sc-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.start-card .sc-cta { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 800; color: var(--accent); }
.start-card .sc-tag { position: absolute; top: 16px; right: 16px; }

/* search box + sortable table headers */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.search-wrap { position: relative; flex: 1 1 320px; max-width: 480px; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-wrap input { padding-left: 36px; }
th.sortable { cursor: pointer; user-select: none; -webkit-user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--accent); background: #eef4ff; }
th.sortable::after { content: '↕'; margin-left: 6px; opacity: 0.35; font-size: 11px; }
th.sortable.asc::after { content: '↑'; opacity: 1; color: var(--accent); }
th.sortable.desc::after { content: '↓'; opacity: 1; color: var(--accent); }

/* People page: player name + roster picker on a fixed two-column grid so every
   row lines up, however long the names are. */
.player-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 12px; padding: 4px 0; }
.player-row + .player-row { border-top: 1px solid #eef2f7; }
.player-row .pl-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row .pl-form { display: block; }
.player-row select { width: 100%; padding: 6px 10px; font-size: 13px; min-height: 36px; }
@media (max-width: 700px) { .player-row { grid-template-columns: 1fr; gap: 4px; } }

/* themed file picker / drop zone */
.filedrop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  margin: 0; padding: 26px 20px; border: 2px dashed #cbd7e6; border-radius: 14px; background: #f8fafc;
  cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.filedrop:hover, .filedrop.over { border-color: var(--accent); background: #eff5ff; }
.filedrop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filedrop .fd-icon { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.filedrop .fd-main { font-size: 15px; font-weight: 700; color: var(--accent); word-break: break-all; }
.filedrop .fd-main .muted { font-weight: 600; }
.filedrop .fd-sub { font-size: 12.5px; color: var(--muted); }
.filedrop.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.filedrop.has-file .fd-icon { stroke: var(--green); }
.filedrop.has-file .fd-main { color: #14532d; }

/* tap-to-call phone number under a rostered family */
.tel { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none; }
.tel svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.tel:hover { text-decoration: underline; }
.tel-none { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* inline rename next to a page title */
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.title-pencil { border: none; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); line-height: 0; }
.title-pencil svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.title-pencil:hover { background: #eef2f7; color: var(--accent); }

/* full-screen calendar */
dialog.modal-full { max-width: none; width: calc(100vw - 32px); height: calc(100vh - 32px); max-height: none; }
.cal-wrap { display: flex; flex-direction: column; height: 100%; padding: 20px clamp(14px, 2vw, 26px); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The whole month fits the screen — rows share the height, no page scrolling. */
.cal-body { flex: 1; min-height: 0; overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--rows, 6), minmax(0, 1fr)); gap: 6px; height: 100%; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; color: var(--muted); padding: 2px 4px 6px; }
.cal-day { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; min-height: 0;
  display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-more { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 2px; }
@media (max-height: 620px) { .cal-body { overflow-y: auto; } .cal-grid { height: auto; } .cal-day { min-height: 74px; } }
.cal-day.dim { background: #fafbfc; opacity: 0.55; }
.cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px #dbeafe; }
.cal-day.blocked { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #eef2f7 6px, #eef2f7 12px); }
.cal-num { font-size: 12px; font-weight: 800; color: var(--muted); }
.cal-day.today .cal-num { color: var(--accent); }
.cal-blocked { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-chip { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 7px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700; border: 1px solid transparent; text-decoration: none; }
.cal-chip .cc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip .cc-count { flex: none; font-variant-numeric: tabular-nums; opacity: 0.85; }
.cal-chip.tl-green { background: #dcfce7; border-color: #86efac; color: #14532d; }
.cal-chip.tl-amber { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.cal-chip.tl-red { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.cal-chip.tl-none { background: #f1f5f9; border-color: var(--line); color: var(--muted); }
.cal-chip:hover { filter: brightness(0.96); }

/* per-shift "change this shift" controls line up */
.shift-edit .form-row { align-items: flex-end; }
.shift-edit .btn { min-width: 190px; text-align: center; }
.shift-edit .btn + .btn { margin-top: 8px; }

/* searchable people picker (add / replace a volunteer) */
#pm-search { margin-bottom: 12px; }
.people-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.people-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; background: #fff; }
.people-row:hover { border-color: var(--accent); background: #f8fbff; }
.people-row input { width: auto; margin: 0; accent-color: var(--accent); flex: none; }
.people-row:has(input:checked) { border-color: var(--accent); background: #eef4ff; box-shadow: 0 0 0 3px #dbeafe; }
.people-row .pr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.people-row .pr-name { font-weight: 700; font-size: 14px; color: var(--text); }
.people-row .pr-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-row .pr-on { display: none; margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.people-row.is-on { background: #f8fafc; border-style: dashed; cursor: not-allowed; opacity: 0.7; }
.people-row.is-on:hover { border-color: var(--line); background: #f8fafc; }
.people-row.is-on .pr-on { display: inline; }

/* auto-assign "who's in the draw?" chooser */
.pool-panel { padding-top: 6px; }
.pool-opt { margin-bottom: 8px; }
.pool-opt span { font-weight: 600; }
.pool-detail { margin: 0 0 12px 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.family-pick { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.family-pick .check-row { font-weight: 600; }

#roles .form-row { margin-bottom: 10px; }
#roles .form-row:last-child { margin-bottom: 0; }
#add-role { margin-top: 14px; }
.blocked-list { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.blocked-list > label { margin: 0 0 12px; }
.blocked-list .form-row { align-items: center; margin-bottom: 10px; }
.blocked-list .form-row:last-child { margin-bottom: 0; }

/* season page: game days as a grid of small cards */
.gameday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--gd-min, 180px), 1fr)); gap: 12px; margin-top: 8px; }
.gameday-card { position: relative; display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.gameday-card .round { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }
.gameday-card .gd-date { font-weight: 800; font-size: 15px; color: var(--navy); }
.gameday-card .gd-fill { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.gameday-card .progress { min-width: 0; flex: 1; height: 6px; }
.gameday-card .gd-event { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: -3px; }
.gameday-card .gd-open { font-size: 11px; font-weight: 700; color: var(--amber); margin-top: -2px; }
.gameday-card .gd-duties .d-short { font-weight: 600; color: var(--muted); }
.gameday-card .gd-duties { list-style: none; margin: 2px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; }
.gameday-card .gd-duties li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.gameday-card .gd-duties .d-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gameday-card .gd-duties .d-count { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.gameday-card .gd-duties .d-count.ok { color: var(--green); }
.gameday-card .gd-duties .d-count.part { color: var(--amber); }
.gameday-card .gd-duties .d-count.none { color: var(--red); }
.gameday-card .btn { margin-top: auto; text-align: center; }
.gameday-card .gd-block { position: absolute; top: 8px; right: 8px; }
.gameday-card .gd-block button { border: none; background: none; color: #cbd5e1; font-size: 14px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.gameday-card .gd-block button:hover { color: var(--red); background: #fee2e2; }
/* traffic lights: green = all accepted, amber = some, red = none yet */
.gameday-card.full { background: #f0fdf4; border-color: #86efac; }
.gameday-card.full .progress { background: #dcfce7; }
.gameday-card.full .progress > div { background: var(--green); }
.gameday-card.half { background: #fffbeb; border-color: #fcd34d; }
.gameday-card.half .progress { background: #fef3c7; }
.gameday-card.half .progress > div { background: var(--amber); }
.gameday-card.open { background: #fef2f2; border-color: #fca5a5; }
.gameday-card.open .progress { background: #fee2e2; }
.gameday-card.open .progress > div { background: var(--red); }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; margin: 2px 0 4px; }
.tl-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.tl-legend .dot-green { background: var(--green); }
.tl-legend .dot-amber { background: var(--amber); }
.tl-legend .dot-red { background: var(--red); }
.tl-legend .dot-grey { background: #cbd5e1; }
.gameday-card.blocked { background: #f8fafc; border-style: dashed; }
.gameday-card.blocked .gd-date { color: var(--muted); text-decoration: line-through; font-weight: 700; }
.gameday-card.blocked .reason { font-size: 12px; color: var(--muted); }

/* ---- mobile ---- */
@media (max-width: 760px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 10px 20px; gap: 8px 16px; }
  .nav { order: 3; width: 100%; gap: 2px; margin: 0 -8px; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .nav-auth { margin-left: auto; }
  .container { padding: 20px 14px 48px; }
  h1 { font-size: 22px; }
  .card { padding: 16px; }
  .grid { gap: 12px; }
  th, td { padding: 10px 10px; font-size: 13px; }
  .form-row > div { min-width: 100%; }
  .masq-inner, .clubbar-inner { padding-left: 14px; padding-right: 14px; }
  .auth-wrap { margin: 12px auto; }

  /* page headers and card actions stack cleanly */
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
  .page-head .btn { flex: 1 1 auto; }
  #card-actions { margin-top: 6px; }
  #card-actions .btn, #card-actions form, #card-actions form .btn { width: 100%; }
  #card-actions { flex-direction: column; align-items: stretch; }

  /* date cards go single column with a touch more room */
  .gameday-grid { grid-template-columns: 1fr 1fr; }

  /* modals use the full screen so forms aren't cramped */
  dialog.modal { width: calc(100vw - 20px); max-height: 92vh; }
  dialog.modal > form { padding: 20px; max-height: 92vh; }
  .people-list { max-height: 52vh; }

  /* season wizard bits */
  .stage-nav { flex-wrap: wrap; }
  .stage-nav .btn { flex: 1 1 auto; }
  .daychips { gap: 6px; }
  .daychip { padding: 7px 10px; font-size: 12px; }
  .wizard-card, #wizard-view { max-width: none; }

  /* search toolbar stacks */
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: none; }

  /* calendar: tighter cells, counts drop, gentle scroll allowed */
  dialog.modal-full { width: 100vw; height: 100vh; border-radius: 0; }
  .cal-wrap { padding: 12px; }
  .cal-body { overflow-y: auto; }
  .cal-grid { height: auto; }
  .cal-day { min-height: 64px; padding: 4px; border-radius: 8px; gap: 3px; }
  .cal-num { font-size: 11px; }
  .cal-chip { padding: 3px 5px; font-size: 10px; border-radius: 5px; }
  .cal-chip .cc-count { display: none; }
  .cal-head h2 { font-size: 16px; }
}
@media (max-width: 480px) {
  .gameday-grid { grid-template-columns: 1fr; }
}
