/* The one portal's design language (Jira JPI-124; the Blazers One Portal
   canvas): the same words on every site - a pill for an area, a kicker for
   a group, a card with a head, a list with a dot a line, a count, a side
   list - over the tokens the four apps already share (style.css: --primary,
   --gold, --bg, --card, --border, --muted). This file is the one copy in
   the one repository; each app serves it as /portal.css and links it from
   its header, so a change here is a change everywhere. */

/* The menu (portal/menu.js): the Admin area opens to its eight groups in
   two columns, each headed; a wide menu near the right edge opens leftwards
   and never wider than the window. */
header.topbar .nav-menu-items.portal-admin { min-width: 560px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
header.topbar .portal-group { display: flex; flex-direction: column; gap: 8px; }
/* An item with no heading - To do atop Admin, My payments under Money's three (JPI-271) - takes the whole row of Admin's two columns. */
header.topbar .nav-menu-items.portal-admin .portal-group.is-plain { grid-column: 1 / -1; }
header.topbar .nav-menu-items.portal-grouped:not(.portal-admin) { gap: 10px; }
header.topbar .portal-group-name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
header.topbar .portal-area-admin .nav-menu-items, header.topbar .portal-area-help .nav-menu-items, header.topbar .portal-area-helpdesk .nav-menu-items { left: auto; right: 0; }
@media (max-width: 760px) { header.topbar .nav-menu-items.portal-admin { grid-template-columns: 1fr; min-width: 0; } }
@media (max-width: 640px) { header.topbar .nav-menu-items.portal-admin { display: flex; } }

/* A menu never runs off the bottom of the window (Jira JPI-292): Admin's
   eight groups are taller than a laptop's, and its last items were cut off
   while the wheel scrolled the page behind. Every open menu in the bar - and,
   on a phone, the hamburger's panel - is capped at the room below where it
   starts and scrolls inside itself, the wheel staying in it at either end.
   /menu-room.js measures that room as it opens (--menu-room); the fallback
   holds until it does. An item reached with Tab is scrolled into view by the
   browser, clear of the edge (scroll-padding). */
@media (min-width: 641px) {
  header.topbar .nav-menu-items {
    max-height: calc(100vh - 7rem); max-height: var(--menu-room, calc(100dvh - 7rem));
    overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 8px;
  }
}
@media (max-width: 640px) {
  header.topbar nav {
    max-height: calc(100vh - 4rem); max-height: var(--menu-room, calc(100dvh - 4rem));
    overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 8px;
  }
}

/* One bar, drawn one way (JPI-165). Each site's own stylesheet draws a
   menu's heading a little differently - a glyph or a drawn triangle for
   the arrow, an underline or nothing for the lit one, 16 or 18 pixels
   between items - which nobody saw while each bar was its own. With the
   one menu the same items sit side by side on all four, and at 1024
   pixels one site's bar held a row where another's wrapped. Club
   Volunteers' is the one kept. Scoped to the portal's own areas, so with
   the switch off nothing here applies. */
header.topbar details.portal-area > summary { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
header.topbar nav:has(> .portal-area) > details.nav-menu > summary::after,
header.topbar nav:has(> .portal-area) > details.nav-menu[open] > summary::after { content: '\25be'; font-size: 0.8em; width: auto; height: auto; margin: 0; border: 0; transform: none; }
header.topbar details.portal-area > summary.active,
header.topbar nav:has(> .portal-area) > a.active { opacity: 1; font-weight: inherit; text-decoration: underline; }
/* And it wraps one way: where there is no room beside the name the links
   go onto a row of their own, and wrap among themselves below that. Two of
   the four wrapped them beside the name instead. */
@media (min-width: 641px) {
  header.topbar:has(nav > .portal-area) { flex-wrap: wrap; gap: 8px 20px; }
  header.topbar nav:has(> .portal-area) { margin-left: auto; max-width: 100%; min-width: auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
}

/* My week, named on the page (Club's views/me.ejs): with the one menu the
   bar's link to it reads Home, so the page is headed My week and whose it
   is sits on one line with the season under the heading. */
.week-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: -4px 0 18px; }
.week-who-name { font-weight: 600; font-size: 1.05rem; }
.week-who .season-picker { margin: 0; }

/* The words. */
.kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.portal-pill { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); background: #fdeeed; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.portal-pill.is-gold { color: #7a5a12; background: #fff6e6; }
.portal-pill.is-muted { color: var(--muted); background: #eef1f6; }
.portal-count { font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px; padding: 2px 9px; }
.portal-n { font-weight: 700; color: var(--muted); }
.portal-dot, .admin-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #f7941d); flex: none; position: relative; top: -1px; display: inline-block; }
.portal-dot.is-one, .admin-dot-one { background: var(--primary); }

/* A card with a head: the title, a count, the area at the right. */
.card-head, .portal-card h2, .admin-hub-card-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.card-head h2, .admin-hub-card-head h2 { margin: 0; font-size: 1.05rem; }
.portal-card h2 { font-size: 1.05rem; }
.portal-card h2 a, .admin-hub-list a, .card-head h2 a { text-decoration: none; color: var(--primary); }
.portal-card h2 a:hover, .admin-hub-list a:hover { text-decoration: underline; }
.card-head .portal-pill, .portal-card h2 .portal-pill { margin-left: auto; }

/* A list with a dot a line. */
.portal-list, .admin-hub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
.portal-list li, .admin-hub-list li { display: flex; gap: 8px; align-items: baseline; }
.portal-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #f7941d); flex: none; position: relative; top: -2px; }
.admin-hub-list a { font-weight: 600; }

/* A grid of cards: Home, and the Admin section. */
.portal-home { margin-bottom: 24px; }
.portal-home .portal-card { margin: 0; min-width: 0; }
.admin-hub { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-hub-side, .portal-side { position: sticky; top: calc(var(--top-h, 0px) + 16px); background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 0; }
.admin-hub-kicker { padding: 0 18px 10px; }
.admin-hub-side nav, .portal-side nav { display: flex; flex-direction: column; }
.admin-hub-side nav a, .portal-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 18px; text-decoration: none; color: inherit; border-left: 3px solid transparent; font-weight: 600; font-size: 0.95rem; }
.admin-hub-side nav a.active, .admin-hub-side nav a:hover, .portal-side nav a.active, .portal-side nav a:hover { color: var(--primary); border-left-color: var(--primary); background: #fdeeed; }
.admin-hub-n { color: #a0a8b4; font-weight: 400; font-size: 0.8rem; }
.admin-hub-head h1 { margin: 0 0 4px; }
.admin-hub-head .subtitle { margin: 0 0 18px; }
.admin-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-hub-card { margin: 0; min-width: 0; }
.admin-hub-legend { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); }
.admin-hub-legend span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .admin-hub-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .admin-hub { grid-template-columns: 1fr; } .admin-hub-side, .portal-side { position: static; } .admin-hub-side nav, .portal-side nav { flex-direction: row; flex-wrap: wrap; } }

/* A strip that says who this is for, as the canvas's "what this person can open". */
.portal-strip { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--gold, #f7941d); border-radius: 10px; padding: 12px 18px; margin: 16px 0; }
.portal-strip .kicker { margin-bottom: 4px; }

/* People and access: one person's grid. */
.logins-grid td, .logins-grid th { vertical-align: top; }
.logins-tick { display: inline-block; margin: 0 14px 6px 0; white-space: nowrap; }

/* One rounded picker, on all four sites (the president, 11 October 2026:
   "find them all and fix them"). Club's season picker (JPI-181) as the
   design language: the word and the choice in one rounded control, still the
   native select so a phone gets its own wheel. `label.season-pill` so it wins
   over a site's own `.season-picker label`; `.pick-row` lays a form of them
   out on one line, wrapping. */
.pick-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 10px 0 18px; }
.filters-scope label.season-pill { margin: 0; }
label.season-pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 0; padding: 0 4px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 0.9rem; font-weight: 400; cursor: pointer; }
label.season-pill:hover { border-color: #c7cdd6; }
label.season-pill:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(156, 28, 23, 0.15); }
.season-pill-label { color: var(--muted); white-space: nowrap; }
label.season-pill select { appearance: none; -webkit-appearance: none; width: auto; min-width: 0; max-width: 100%; margin: 0; padding: 7px 30px 7px 2px; border: 0; border-radius: 999px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/team/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 0.9rem; font-weight: 600; color: var(--text); cursor: pointer; text-overflow: ellipsis; box-shadow: none; }
label.season-pill select:focus { outline: none; box-shadow: none; }
@media (max-width: 640px) {
  .pick-row label.season-pill { flex: 1 1 100%; }
  .pick-row label.season-pill select { flex: 1; }
}

/* One Admin's one banner (Jira JPI-123): the club's banner, drawn on all
   four sites while the One Admin switch is on - the rules Club Volunteers
   and Team Sheets had in their own stylesheets, here so Venue Hire and Help
   Desk draw it the same. */
.site-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff8e6;
  border: 1px solid #f0dfa8;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 24px;
}
.site-banner[hidden] { display: none; }
.site-banner-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.site-banner-headline { font-size: 1.05rem; }
.site-banner-line { font-size: 0.95rem; }
.site-banner-link { font-weight: 600; }
/* A quiet button, but drawn as a bare x: scoped to the banner so it
   outweighs button.quiet's underline and inherited font. */
.site-banner .site-banner-close {
  display: none;
  background: none;
  border: 0;
  padding: 0 4px;
  margin: -4px -6px 0 0;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}
.site-banner.has-script .site-banner-close { display: block; }
.site-banner .site-banner-close:hover { color: var(--text); opacity: 1; }
.site-banner-preview { margin-top: 4px; }

/* The hat that is on (Jira JPI-212, profiles): a bar under the top bar on
   all four sites, worded as a hat rather than as looking at somebody - so
   drawn apart from Log in as's gold bar. */
.hat-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 24px; font-size: 0.9rem; font-weight: 600; background: #fff6e6; color: #7a5a12; border-bottom: 2px solid var(--gold, #f7941d); }
.hat-banner form { margin: 0; }
.hat-banner button.quiet { color: inherit; }

/* One look for an open menu on every site (Jira JPI-229; the president, 11
   October 2026: "why is menu sometimes white and sometimes red?" - Club's own
   stylesheet drew it red, the other three white, and on white the group
   headings, white themselves, vanished). White, as three of the four drew
   it, over the shared tokens so dark mode follows; the page you are on
   shaded. On a phone the menu opens in place in the bar, as before. */
@media (min-width: 641px) {
  header.topbar .nav-menu-items {
    background: var(--card, #fff); color: var(--text, #1f2937);
    border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); padding: 6px; gap: 0;
  }
  header.topbar .nav-menu-items.portal-admin { padding: 10px; gap: 10px 18px; }
  header.topbar .portal-group { gap: 0; }
  header.topbar .nav-menu-items a, header.topbar .nav-menu-items button.quiet {
    color: var(--text, #1f2937); opacity: 1; padding: 8px 10px; border-radius: 6px; font-size: 0.92rem; text-decoration: none;
  }
  header.topbar .nav-menu-items a:hover, header.topbar .nav-menu-items button.quiet:hover { background: rgba(127, 127, 127, 0.12); text-decoration: none; }
  header.topbar .nav-menu-items a.active { color: var(--primary, #9c1c17); background: rgba(156, 28, 23, 0.08); text-decoration: none; }
  header.topbar .portal-group-name { color: var(--muted, #6b7280); opacity: 1; padding: 8px 10px 4px; }
  header.topbar .nav-menu-items form { border-top-color: var(--border, #e5e7eb); }
  header.topbar .nav-menu-items .nav-menu-email { color: var(--muted, #6b7280); }
}
@media (min-width: 641px) {
  header.topbar .nav-account .nav-menu-items form { border-top-color: var(--border, #e5e7eb); }
}

/* Club's age pill and Staff's role badges, drawn on Help Desk's Volunteer
   interest cases too (JPI-310): one copy here, the values Club's app.css
   had. The pill is Club's views/_age-badge.ejs. A role badge's colour is
   Club's badgeClass for its PlayHQ state - verified, awaiting, cancelled -
   scoped to .role-tag so no other badge on another site changes. */
.age-pill { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1.5; color: var(--muted, #6b7280); border: 1px solid var(--border, #e5e7eb); vertical-align: middle; white-space: nowrap; text-transform: none; }
/* The age range: a minor's in the warning badge's amber, an adult's in the
   split badge's muted blue (JPI-288); dark.css pairs both. */
.age-pill.age-minor { background: #fff8e6; color: #92620a; border-color: #f3dfa8; }
.age-pill.age-adult { background: #e3ebfb; color: #3f6fd6; border-color: #c9d7f5; }
td > .age-pill:first-child, dd > .age-pill:first-child { margin-left: 0; }
.role-tag .badge-good { background: #eaf7ee; color: #1e7a3c; }
.role-tag .badge-bad { background: #fdecea; color: var(--danger, #b3261e); }
.role-tag .badge-warn { background: #fff8e6; color: #92620a; }

/* A list page's count cards fold away (JPI-352 on a phone; JPI-593 at every
   width, the president: the big boxes took the first screen). Each site's
   _count-cards.ejs draws the cards inside details.count-fold, folded, with a
   one-line summary - the first card and any lit one; remember-open.js keeps
   the reader's open or folded on this device. */
.count-fold { margin-bottom: 12px; }
.count-fold > summary.count-fold-line {
  display: list-item; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px; background: var(--card, #fff); color: var(--muted, #6b7280); font-size: 0.9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.count-fold[open] > summary.count-fold-line { margin-bottom: 10px; }

/* Phone app look (JPI-430; Club's switch phoneLook, off): on a phone the
   member pages look like an app - a compact top bar that stays put, cards
   that run the width of the screen, bigger things to tap, and a tab bar
   along the bottom (Club's views/_phone-tabs.ejs). Only with body.phone-look
   and only at phone widths; tokens only, so dark.css pairs every colour. */
.phone-tabs { display: none; }
@media (max-width: 640px) {
  body.phone-look { padding-bottom: calc(64px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  body.phone-look .page-top { position: sticky; top: 0; }
  body.phone-look header.topbar { padding: 6px 12px; gap: 6px 12px; }
  body.phone-look header.topbar .brand-logo { max-height: 30px; width: auto; }
  body.phone-look header.topbar .brand-version { display: none; }
  body.phone-look main { padding: 14px 14px 24px; }
  body.phone-look main h1 { font-size: 1.5rem; margin-top: 4px; }
  body.phone-look main .card { margin-left: -14px; margin-right: -14px; border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 10px; padding: 16px 14px; }
  body.phone-look main .card .card { margin-left: 0; margin-right: 0; border-radius: 10px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  body.phone-look main a.btn, body.phone-look main button, body.phone-look main .button, body.phone-look main input[type="submit"] { min-height: 44px; }
  body.phone-look .phone-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--card); border-top: 1px solid var(--border); padding: 4px 4px env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(16, 24, 40, 0.08); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.phone-look .phone-tabs { -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); }
  }
  body.phone-look .phone-tab { flex: 1 1 0; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; border-radius: 10px; }
  body.phone-look .phone-tab svg { width: 24px; height: 24px; }
  body.phone-look .phone-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body.phone-look .phone-tab[aria-current="page"] { color: var(--primary); }
}
@media print { .phone-tabs { display: none !important; } body.phone-look { padding-bottom: 0; } }

/* The line at the foot of every page (shared/lib/site-foot.js; the
   president, 18 October 2026: "keep it unobtrusive"): one small muted line,
   centred under the page, left off a printout. */
.site-foot { max-width: 1200px; margin: 32px auto 0; padding: 14px 16px 20px; text-align: center; font-size: 0.75rem; line-height: 1.4; color: var(--muted); opacity: 0.85; }
@media print { .site-foot { display: none; } }

/* A page's "⋯" menu (portal/more-actions.js; JPI-532, the president, 21
   October 2026: "so we don't lose so much space on the page"): a page's
   row of secondary actions folded behind one round ⋯ at the right of what
   it acts on. Its entries are .action-menu-item links, buttons and
   one-button forms, drawn as a list whatever their kind, with an optional
   .more-actions-group heading a few. Open with no script it drops from the
   toggle's right edge; the script places it fixed, so a card never clips it. */
.more-actions { position: relative; display: inline-block; flex: none; vertical-align: middle; }
.more-actions > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); color: var(--primary); font-size: 1.4rem; font-weight: 700; line-height: 1; user-select: none; -webkit-user-select: none; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions > summary::marker { content: ''; }
.more-actions > summary:hover, .more-actions[open] > summary { border-color: var(--primary); background: var(--bg); }
.more-actions > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.more-actions-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 220px; max-width: calc(100vw - 16px); max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16); padding: 6px; text-align: left; }
.more-actions-list form { display: block; margin: 0; }
.more-actions-list .action-menu-item { display: block; box-sizing: border-box; width: 100%; margin: 0; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 0.92rem; font-weight: 400; line-height: 1.3; color: var(--text); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; min-height: 0; }
.more-actions-list .action-menu-item:hover, .more-actions-list .action-menu-item:focus-visible { background: var(--bg); color: var(--primary); opacity: 1; }
.more-actions-list .action-menu-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.more-actions-list .action-menu-item.danger { color: #b3261e; }
.more-actions-list .action-menu-item[hidden] { display: none; }
.more-actions-group { display: block; padding: 8px 12px 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.more-actions-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.more-actions-group .more-actions-group-name { text-transform: none; letter-spacing: 0; font-weight: 400; }
/* Find a person by name (JPI-667; public/person-pick.js): the names that
   match drop from the box, as wide as it, like the ⋯ menu's list. */
.person-pick { position: relative; display: block; }
.person-pick-list { position: absolute; left: 0; right: 0; z-index: 40; margin: 0; padding: 6px; list-style: none; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16); text-align: left; }
.person-pick-list[hidden] { display: none; }
.person-pick-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.person-pick-list li:hover, .person-pick-list li[aria-selected="true"] { background: var(--bg); color: var(--primary); }
.person-pick-name { font-size: 0.95rem; }
.person-pick-address { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A heading and its ⋯ on one line, the ⋯ at the right. */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row > h1, .title-row > h2 { min-width: 0; }
@media (max-width: 640px) {
  .more-actions > summary { width: 44px; height: 44px; }
  .more-actions-list .action-menu-item { padding: 12px; white-space: normal; }
}
@media print { .more-actions { display: none !important; } }

/* The red dot on Club (JPI-699): something new waits in To do - on every
   site's bar, since it is one site (JPI-702). */
.club-dot { display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: #d4202c; vertical-align: 2px; }

/* Teams that can fill in (JPI-1015 on; portal/fill-in-card.ejs) and Teams >
   Fill-in players (JPI-1031), on Team Sheets and Club: one line a team, its
   grade at the right; a tap opens its coaches and team managers, each with
   Call, Text and Email. */
.fill-in-team { border-top: 1px solid var(--border); }
.fill-in-team > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.fill-in-team > summary::-webkit-details-marker { display: none; }
.fill-in-team > summary::after { content: '\203A'; color: var(--muted); transition: transform 0.15s; }
.fill-in-team[open] > summary::after { transform: rotate(90deg); }
.fill-in-name { font-weight: 600; }
/* The team, then its game that day under it (JPI-1026). */
.fill-in-head { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fill-in-when { overflow-wrap: anywhere; }
.badge.fill-in-clash { background: #fdecea; color: #b3261e; }
.badge.fill-in-close { background: #fff8e6; color: #92620a; }
.fill-in-ours { margin: 0 0 4px; }
/* Ask for help (JPI-1027): a tick on each team's own line (JPI-1044), All
   above them, and Email or Copy for WhatsApp above the list. */
.fill-in-row { display: flex; align-items: flex-start; border-top: 1px solid var(--border); }
.fill-in-row > .fill-in-team { flex: 1; min-width: 0; border-top: 0; }
.fill-in-tickbox { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; min-height: 44px; margin-left: -6px; cursor: pointer; }
.fill-in-tickbox input, .fill-in-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.fill-in-pick { display: flex; align-items: center; min-height: 40px; cursor: pointer; }
.fill-in-ask-buttons { margin: 8px 0 4px; }
#fill-in-said:empty { display: none; }
.fill-in-people { padding: 0 0 12px 12px; }
.fill-in-person { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.fill-in-person + .fill-in-person { margin-top: 12px; }
.fill-in-ways { margin-top: 4px; flex-wrap: wrap; }
/* The by-law rules the list can't check, under an opened team (JPI-1019). */
.fill-in-unchecked { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--gold); background: var(--bg); border-radius: 4px; }
.fill-in-unchecked ul { margin: 4px 0 0; padding-left: 18px; }
.fill-in-rule { white-space: nowrap; }
/* Teams > Fill-in players (JPI-1031): filters, then the day's teams beside
   the one opened; on a phone the opened team is the page, with All teams
   back to the list. */
.fill-ins-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.fill-ins-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 0.8rem; color: var(--muted); flex: 1 1 110px; max-width: 240px; }
.fill-ins-field select { margin: 0; min-height: 44px; width: 100%; color: var(--text); }
.fill-ins-genders { display: inline-flex; gap: 6px; }
.fill-ins-gender { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.fill-ins-gender.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.fill-ins-search { flex: 1 1 220px; margin: 0; }
.fill-ins-form .fill-ins-search input, .fill-ins-form .fill-ins-gender { margin: 0; min-height: 44px; }
.fill-ins-search input { width: 100%; }
.fill-ins-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.fill-ins-columns > .card { margin-top: 0; }
.fill-ins-count { margin: 0 0 4px; }
.fill-ins-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; border-radius: 6px; }
.fill-ins-row:hover, .fill-ins-row:focus-visible { background: var(--bg); }
.fill-ins-row.on { background: var(--bg); box-shadow: inset 3px 0 0 var(--primary); }
.fill-ins-team { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fill-ins-n { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.2; }
.fill-ins-open .card { margin-top: 0; }
.fill-ins-open .card + .card { margin-top: 12px; }
.fill-ins-backlink { display: none; margin: 0 0 8px; }
@media (max-width: 800px) {
  .fill-ins-columns { grid-template-columns: minmax(0, 1fr); }
  .fill-ins-page.has-open .fill-ins-list, .fill-ins-page.has-open .fill-ins-filters, .fill-ins-page.has-open > .back-line, .fill-ins-empty { display: none; }
  .fill-ins-page.has-open .fill-ins-backlink { display: block; }
}

/* A grade as one letter in a round badge (JPI-572; shared/lib/grade-badge.js):
   blue for boys, red for girls, dashed while grading. The game card's, and
   a team's own on Teams that can fill in. */
.grade-badge { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #e4e7ec; background: #ffffff; color: var(--primary); font-size: 0.75rem; font-weight: 700; line-height: 1; vertical-align: 1px; text-decoration: none; }
.grade-badge.grade-boys { color: #1f5bc7; background: #eef3fc; border-color: #b9cdf0; }
.grade-badge.grade-girls { color: #cc2638; background: #fdeef0; border-color: #f1bcc3; }
.grade-badge.is-grading { border-style: dashed; border-color: currentColor; }

/* Club chats (JPI-769). The chat bubble in the top bar, beside BlazerBot's
   face: round, the logo's height, with a red count of what is unread. Here
   so all four sites draw it the same (JPI-1138). */
header.topbar .chat-bubble {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; margin-left: 8px; border-radius: 999px; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.4); color: #fff;
}
header.topbar .chat-bubble:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }
header.topbar .chat-bubble[aria-current] { border-color: var(--gold, #f7941d); box-shadow: 0 0 0 1px var(--gold, #f7941d); }
header.topbar .chat-bubble svg { width: 22px; height: 22px; }
/* Chats not open to them (JPI-821): the bubble faded, with an X. */
header.topbar .chat-bubble-off { opacity: 0.65; cursor: default; }
header.topbar .chat-bubble-off:hover { background: rgba(255, 255, 255, 0.12); }
header.topbar .chat-bubble-x {
  position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--muted, #6b7280); color: #fff; font-size: 14px; line-height: 17px; text-align: center; font-weight: 700;
}
header.topbar .chat-bubble-count {
  position: absolute; top: -6px; right: -8px; min-width: 1.5em; padding: 0 5px; border-radius: 9px;
  background: var(--danger, #dc2626); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.55; text-align: center;
  border: 2px solid var(--primary, #9b1c1c);
}
@media (max-width: 640px) {
  header.topbar .chat-bubble { width: 44px; height: 44px; margin-left: auto; }
  header.topbar .ask-bot ~ .chat-bubble { margin-left: 0; }
  /* BlazerBot's face, the bubble and the menu button side by side, 8px apart. */
  header.topbar .ask-bot:has(~ .chat-bubble) { margin-right: 8px; }
}
/* With the face, the chat bubble and the menu button beside it, the site's
   name had no room on a phone and ran under the face (JPI-952): a smaller
   logo, tighter gaps, and the name on two lines where it must. Here for all
   four sites, which all draw the bubble now (JPI-1138). */
@media (max-width: 640px) {
  header.topbar { column-gap: 10px; }
  header.topbar .brand { flex: 1 1 auto; gap: 8px; }
  header.topbar .brand-logo { height: 32px; }
  header.topbar .brand-text { min-width: 0; white-space: normal; }
  header.topbar .brand-name { font-size: 1rem; line-height: 1.1; }
}
@media (max-width: 379px) {
  header.topbar .brand-name { font-size: 0.9rem; }
  header.topbar .brand-logo { height: 28px; }
}
/* The narrowest phones keep the logo alone. */
@media (max-width: 349px) {
  header.topbar .brand-text { display: none; }
}
