:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #18212f;
  background: #f4f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; }
.page { width: min(100% - 2rem, 56rem); margin: 0 auto; padding: 1.25rem 0 3rem; }
.page-header { margin: 0 0 1.25rem; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); margin-bottom: .4rem; }
h2 { font-size: 1.25rem; margin-bottom: .9rem; }
h3 { font-size: 1.1rem; margin-bottom: 0; }
.eyebrow { color: #405575; font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.muted { color: #536174; line-height: 1.5; }
.card { background: #fff; border: 1px solid #d9e0e8; border-radius: .9rem; box-shadow: 0 2px 8px #14243a0a; padding: 1rem; margin: 0 0 1rem; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .9rem 0; }
.status-grid > div { min-width: 0; display: grid; gap: .3rem; }
.status-grid > div > span:first-child { color: #536174; font-size: .82rem; }
.status { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; background: #e7ebf0; color: #263548; padding: .3rem .65rem; font-size: .82rem; font-weight: 700; line-height: 1.25; }
.status-offered, .status-pending { background: #fff1c7; color: #563800; }
.status-accepted, .status-paid, .status-booked_paid, .status-secured { background: #d9f2e3; color: #16452a; }
.status-declined, .status-cancelled, .status-canceled, .status-refunded { background: #fce4e4; color: #6b2020; }
.status-expired, .status-closed, .status-unpaid, .status-booked_unpaid { background: #ffe9d6; color: #65330a; }
.status-uncertain, .status-unknown { background: #e7e9fb; color: #303568; }
.status-queued, .status-waiting, .status-reserved { background: #dceeff; color: #143b60; }
.status-not_due, .status-not_queued, .status-full, .status-unavailable { background: #eef0f3; color: #354253; }
/* JOH-557: phone alert badges and Open / Dealt with */
.status-alert_sent, .status-attention_done { background: #d9f2e3; color: #16452a; }
.status-alert_unsure { background: #e7e9fb; color: #303568; }
.status-alert_failed { background: #fce4e4; color: #6b2020; }
.status-alert_not_sent, .status-attention_open { background: #fff1c7; color: #563800; }
.capacity-label { color: #263548; font-size: .85rem; font-weight: 750; text-align: right; }
.details-grid { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.8fr); gap: .45rem .8rem; margin: .8rem 0; }
.details-grid dt { color: #536174; font-size: .9rem; }
.details-grid dd { margin: 0; overflow-wrap: anywhere; }
.countdown-line { font-size: 1.1rem; font-weight: 750; margin: .9rem 0 .25rem; }
.countdown { font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .8rem; }
.action-form, .booking-form, .login-form { margin: 0; }
.button { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #245b9d; border-radius: .55rem; padding: .65rem .9rem; color: #164779; background: #fff; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: #eff6ff; }
.button-primary { background: #174f88; border-color: #174f88; color: #fff; }
.button-primary:hover { background: #123e6d; }
.button-secondary { border-color: #7b8ca1; color: #253950; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #df8f00; outline-offset: 2px; }
form label { display: grid; gap: .35rem; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 2.75rem; border: 1px solid #8795a6; border-radius: .45rem; padding: .55rem .65rem; background: #fff; color: #18212f; font: inherit; }
textarea { min-height: 5rem; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: .8rem 0; }
.form-grid .wide { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: .55rem; min-height: 2.75rem; }
.check-field input { width: 1.25rem; min-height: 1.25rem; height: 1.25rem; }
.history { padding: 0; margin: .5rem 0 0; list-style: none; }
.history-item { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(7rem, .9fr) minmax(0, 2fr); gap: .65rem; border-top: 1px solid #e5e9ef; padding: .65rem 0; }
.history-item time, .customer-row h4 { color: #536174; }
.customer-row { border-top: 1px solid #e5e9ef; padding: .7rem 0; }
.customer-row summary { cursor: pointer; list-style-position: outside; }
.customer-name { font-weight: 750; }
.customer-row .status-grid { margin: .65rem 0 0; }
.match-list > h2 { margin: .4rem 0 .8rem; }
.match-card h3 { margin: 0; }
.evidence-details { margin-top: .85rem; border-top: 1px solid #e5e9ef; padding-top: .75rem; }
.evidence-details summary { cursor: pointer; font-weight: 700; }
.booking-form { margin-top: .75rem; }
.logout-form { margin: 0; }
.login-card { max-width: 28rem; }
.login-form { display: grid; gap: .85rem; }
.message { border-radius: .55rem; padding: .75rem .9rem; }
.message-error { border: 1px solid #b42318; background: #fff0ef; color: #721b14; }
.message-notice { border: 1px solid #217346; background: #eaf7ef; color: #16452a; }
/* Organiser records are server paginated; width does not affect private player pages. */
main.page[data-page="organiser"] { width: calc(100% - 3rem); max-width: 120rem; }
main.page[data-page="organiser"] .page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
main.page[data-page="organiser"] .page-header h1 { font-size: 1.8rem; }
main.page[data-page="organiser"] .page-header p { margin-bottom: .3rem; }
.organiser-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.organiser-header-actions .button { white-space: nowrap; }
.organiser-tabs { display: flex; gap: .35rem; border-bottom: 1px solid #c9d3dc; margin-bottom: 1.3rem; overflow-x: auto; }
.organiser-tabs a { padding: .7rem 1rem; min-height: 2.75rem; border-bottom: 3px solid transparent; text-decoration: none; color: #253950; font-weight: 700; }
.organiser-tabs a[aria-current="page"] { border-color: #174f88; color: #174f88; background: #eaf1f8; }
.crm-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.crm-metrics .card { display: grid; gap: .5rem; margin: 0; padding: .9rem; }
.crm-metrics span { font-size: .88rem; color: #536174; }
.crm-metrics strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.crm-filters { display: grid; grid-template-columns: repeat(4,minmax(8rem,1fr)); gap: .7rem; align-items: end; }
.crm-filters label { font-size: .85rem; }
.crm-filters input,.crm-filters select { min-height: 2.5rem; }
.crm-help { margin: .9rem 0; font-size: .85rem; }
.crm-table-wrap { width: 100%; overflow-x: auto; margin: .8rem 0; }
.crm-table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.crm-table th { text-align: left; background: #eff3f7; color: #405575; font-size: .8rem; }
.crm-table th,.crm-table td { padding: .6rem .75rem; border-bottom: 1px solid #e1e7ed; vertical-align: top; }
.crm-table td { overflow-wrap: anywhere; }
.crm-table a { font-weight: 650; color: #174f88; }
.crm-table small { display: block; color: #536174; margin-top: .2rem; }
.crm-pagination { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.crm-pagination p { margin: 0 auto 0 0; font-size: .85rem; }
.crm-detail { max-width: 75rem; }
.crm-detail summary,.crm-game-detail > summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }
.crm-detail h3 { margin: 1.2rem 0 .5rem; }
.crm-detail .details-grid { grid-template-columns: minmax(10rem,.7fr) minmax(0,2fr); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* JOH-553 S2: the organiser Venues tab */
.crm-venues-counts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .4rem; }
.crm-venues-row td { border-bottom: 0; }
.crm-venues-retired td { color: #536174; }
.crm-venues-edit td { padding-top: 0; }
.crm-venues-edit summary,.crm-venues-add summary { cursor: pointer; font-weight: 700; color: #174f88; padding: .2rem 0; }
.crm-venues-form { display: grid; grid-template-columns: repeat(3,minmax(8rem,1fr)); gap: .7rem; align-items: end; margin: .6rem 0 .3rem; }
.crm-venues-form label { font-size: .85rem; }
.crm-venues-warning { display: block; color: #6b2020; font-weight: 650; }
.crm-venues-licence small { font-size: .75rem; }
/* JOH-553 S5a: the distance check switch */
.crm-travel-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; border-left: .35rem solid #b8c2cf; }
.crm-travel-switch.crm-travel-on { border-left-color: #2f8f5b; }
.crm-travel-state { flex: 1 1 18rem; margin: 0; font-weight: 650; }
.crm-travel-switch .crm-venues-warning { flex: 1 1 100%; margin: 0; order: 3; }
.crm-travel-form { margin: 0; }
/* JOH-558: the mates list switch (a copy of the distance check card) */
.crm-mates-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; border-left: .35rem solid #b8c2cf; }
.crm-mates-switch.crm-mates-on { border-left-color: #2f8f5b; }
.crm-mates-switch h3 { flex: 1 1 100%; margin: 0; }
.crm-mates-state { flex: 1 1 18rem; margin: 0; font-weight: 650; }
.crm-mates-form { margin: 0; }
/* JOH-557: Needs attention on the overview */
.attention { border-left: .35rem solid #2f8f5b; }
.attention.attention-has-open { border-left-color: #d9a21b; }
.attention-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.attention-head h3 { margin: 0; }
.attention-test-form, .attention-confirm-form { margin: 0; }
.attention-empty { margin: .7rem 0 0; font-weight: 650; color: #16452a; }
.attention-list { list-style: none; display: grid; gap: .7rem; margin: .8rem 0 0; padding: 0; }
.attention-card { display: grid; gap: .45rem; border: 1px solid #d9e0e8; border-radius: .7rem; padding: .8rem; background: #fffdf6; }
.attention-card p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.attention-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .8rem; }
.attention-dealt-form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin: 0; }
.attention-dealt-form textarea { flex: 1 1 16rem; min-height: 2.75rem; font: inherit; border: 1px solid #b8c2cf; border-radius: .55rem; padding: .5rem .6rem; resize: vertical; }
.attention-done { margin-top: .8rem; }
.attention-done summary { cursor: pointer; font-weight: 700; color: #174f88; padding: .2rem 0; }
.attention-done ul { list-style: none; display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; }
.attention-done li { display: grid; gap: .15rem; }
.attention-done li p { margin: 0; color: #354253; overflow-wrap: anywhere; }
.attention-paid-no-place code { font-size: .8rem; overflow-wrap: anywhere; }
.attention-old-refunds .status + .status { margin-left: .3rem; }
@media (max-width: 40rem) {
  .crm-venues-form { grid-template-columns: 1fr; }
}
@media (max-width: 65rem) {
  .crm-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .crm-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 40rem) {
  main.page[data-page="organiser"] { width: calc(100% - 1rem); }
  main.page[data-page="organiser"] .page-header { align-items: start; flex-wrap: wrap; }
  .crm-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .organiser-tabs a { padding: .65rem .75rem; }
  .crm-table { min-width: 44rem; }
  .crm-table.crm-table-compact { min-width: 0; }
  .crm-table-compact th,.crm-table-compact td { padding: .55rem .45rem; }
  .crm-detail .details-grid { grid-template-columns: 1fr; gap: .25rem; }
  .crm-detail .details-grid dd { margin-bottom: .6rem; }
}
@media (max-width: 40rem) {
  .page { width: min(100% - 1rem, 56rem); padding-top: .75rem; }
  .card { border-radius: .7rem; padding: .85rem; }
  .status-grid { grid-template-columns: 1fr; gap: .65rem; }
  .details-grid { grid-template-columns: 1fr; gap: .15rem; }
  .details-grid dd { margin-bottom: .45rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .history-item { grid-template-columns: 1fr; gap: .2rem; }
  .card-heading { align-items: flex-start; }
  .logout-form .button { white-space: nowrap; }
}

/* Private player pages use Ag3nt's established forest-green and lime palette. */
main.page[data-page="customer"] {
  --player-ink: #17231e;
  --player-muted: #58675f;
  --player-green: #102e27;
  --player-lime: #c9f58b;
  width: min(100% - 2rem, 50rem);
  padding-top: clamp(1rem, 4vw, 1.75rem);
  color: var(--player-ink);
}
main.page[data-page="customer"] .page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: .2rem 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.1rem, 4vw, 1.6rem);
  border: 1px solid #27483d;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #102e27, #1d4438);
  box-shadow: 0 12px 28px #102e271c;
}
main.page[data-page="customer"] .page-header .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--player-lime);
  font-size: .82rem;
  letter-spacing: .12em;
}
main.page[data-page="customer"] .environment-label {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  color: #d2e3d8;
  font-size: .82rem;
  line-height: 1.4;
}
main.page[data-page="customer"] .page-header h1 {
  grid-column: 1;
  grid-row: 3;
  margin: .35rem 0 0;
  color: #fff;
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  letter-spacing: -.035em;
}
main.page[data-page="customer"] .logout-form {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}
main.page[data-page="customer"] .logout-form .button {
  border-color: #749181;
  background: #ffffff0d;
  color: #fff;
}
main.page[data-page="customer"] .logout-form .button:hover {
  background: #ffffff1c;
}
main.page[data-page="customer"] > .card {
  margin-bottom: .85rem;
  padding: clamp(1rem, 3.5vw, 1.35rem);
  border-color: #dce5de;
  border-radius: 1rem;
  box-shadow: 0 5px 18px #102e270a;
}
main.page[data-page="customer"] .card h2 {
  color: var(--player-green);
  letter-spacing: -.015em;
}
main.page[data-page="customer"] .eyebrow {
  color: #3f6957;
}
main.page[data-page="customer"] .muted,
main.page[data-page="customer"] .history-item time,
main.page[data-page="customer"] .customer-row h4 {
  color: var(--player-muted);
}
main.page[data-page="customer"] .offer-card {
  border-top: 4px solid #9edc58;
}
main.page[data-page="customer"] .offer-card .card-heading {
  align-items: center;
}
main.page[data-page="customer"] .offer-card .card-heading h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}
main.page[data-page="customer"] .countdown-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin: 1rem 0 .25rem;
  color: var(--player-green);
}
main.page[data-page="customer"] .countdown {
  border-radius: .55rem;
  padding: .18rem .5rem;
  background: #e9f6d9;
  color: #203e22;
}
main.page[data-page="customer"] .details-grid {
  grid-template-columns: minmax(6rem, .65fr) minmax(0, 1.35fr);
  gap: .7rem 1rem;
  margin: 1.1rem 0;
}
main.page[data-page="customer"] .details-grid dt {
  color: var(--player-muted);
}
main.page[data-page="customer"] .details-grid dd {
  color: var(--player-ink);
  font-weight: 600;
}
main.page[data-page="customer"] .status-grid {
  border-top: 1px solid #e5ece6;
  padding-top: .9rem;
}
main.page[data-page="customer"] .button-primary {
  border-color: var(--player-green);
  background: var(--player-green);
  color: #fff;
}
main.page[data-page="customer"] .button-primary:hover {
  background: #1d4438;
}
main.page[data-page="customer"] .button-secondary {
  border-color: #81988a;
  color: var(--player-green);
}
main.page[data-page="customer"] .access-card {
  border-top: 4px solid var(--player-lime);
}
main.page[data-page="customer"] .access-card h1 {
  max-width: 22ch;
  color: var(--player-green);
  font-size: clamp(1.55rem, 6vw, 2rem);
  letter-spacing: -.025em;
}
main.page[data-page="customer"] .access-card > p:last-child {
  margin-bottom: 0;
}
main.page[data-page="customer"] .history-item {
  border-color: #e5ece6;
}
main.page[data-page="customer"] .customer-tabs {
  display: flex;
  gap: .45rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid #dce5de;
}
main.page[data-page="customer"] .customer-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-radius: .6rem .6rem 0 0;
  padding: .55rem .9rem;
  color: var(--player-green);
  font-weight: 750;
  text-decoration: none;
}
main.page[data-page="customer"] .customer-tabs a[aria-current="page"] {
  border-color: #dce5de;
  border-bottom-color: #f4f6f8;
  background: #fff;
}
main.page[data-page="customer"] .choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin: .4rem 0 .8rem;
}
main.page[data-page="customer"] .choice-list .choice {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.5rem;
}
main.page[data-page="customer"] .choice-list input {
  width: 1.2rem;
  min-height: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}
main.page[data-page="customer"] form fieldset {
  min-width: 0;
  margin: .85rem 0;
  border: 1px solid #dce5de;
  border-radius: .7rem;
  padding: .65rem .8rem;
}
main.page[data-page="customer"] form fieldset legend {
  padding: 0 .3rem;
  color: var(--player-green);
  font-weight: 750;
}
main.page[data-page="customer"] .weekly-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: .9rem 0;
}
main.page[data-page="customer"] .weekly-day {
  min-width: 0;
  border: 1px solid #dce5de;
  border-radius: .7rem;
  padding: .7rem;
}
main.page[data-page="customer"] .day-toggle,
main.page[data-page="customer"] .all-day-toggle {
  display: flex;
  align-items: center;
  gap: .45rem;
}
main.page[data-page="customer"] .day-toggle input,
main.page[data-page="customer"] .all-day-toggle input {
  width: 1.15rem;
  min-height: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}
main.page[data-page="customer"] .all-day-toggle {
  margin: .55rem 0;
  font-size: .92rem;
}
main.page[data-page="customer"] .time-windows {
  display: grid;
  gap: .55rem;
}
main.page[data-page="customer"] .time-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: .45rem;
}
main.page[data-page="customer"] .time-window label {
  font-size: .83rem;
  font-weight: 550;
}
main.page[data-page="customer"] .time-window select {
  min-width: 0;
  min-height: 2.4rem;
  padding: .4rem;
}
main.page[data-page="customer"] .time-window .button {
  min-height: 2.4rem;
  padding: .4rem .65rem;
}
main.page[data-page="customer"] .add-time-slot {
  margin-top: .5rem;
}
.match-completion {
  margin-top: 1rem;
  border-top: 1px solid #dce5dd;
  padding-top: .7rem;
}
.match-completion h4 { margin: .2rem 0 .65rem; }
/* Organiser game card: who was invited and where each player stands. */
/* JOH-555: a player's photo on the organiser customer record */
.crm-photo { display: block; width: 96px; height: 96px; margin: .5rem 0; border-radius: 50%; object-fit: cover; }
.match-roster { margin: 1rem 0; border-top: 1px solid #e5e9ef; padding-top: .75rem; }
.match-roster h4 { margin: .2rem 0 .65rem; }
.roster-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); align-items: start; gap: .7rem; }
.roster-group { min-width: 0; border: 1px solid #e5e9ef; border-radius: .6rem; padding: .65rem .75rem; background: #fbfcfd; }
.roster-group h5 { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin: 0 0 .45rem; font-size: .92rem; }
.roster-count { min-width: 1.6rem; border-radius: 999px; background: #e7ebf0; color: #263548; padding: .05rem .5rem; font-size: .8rem; text-align: center; }
.roster-paid .roster-count { background: #d9f2e3; color: #16452a; }
.roster-paying .roster-count, .roster-invited .roster-count { background: #fff1c7; color: #563800; }
.roster-passed .roster-count { background: #fce4e4; color: #6b2020; }
.roster-timed_out .roster-count { background: #ffe9d6; color: #65330a; }
.roster-next .roster-count { background: #dceeff; color: #143b60; }
.roster-names { margin: 0; padding-left: 1.4rem; }
.roster-names li { padding: .12rem 0; overflow-wrap: anywhere; }
.roster-when { display: inline-block; color: #536174; font-size: .85rem; }
.roster-empty, .roster-more, .roster-note { margin: .35rem 0 0; font-size: .85rem; }
.finish-match-form { display: grid; gap: .6rem; }
.finish-match-form > p { margin: .1rem 0; }
.attendance-option {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  border: 1px solid #dce5dd;
  border-radius: .55rem;
  padding: .55rem .7rem;
  background: #fbfdfb;
}
.attendance-option input { flex: 0 0 auto; margin-top: .2rem; }
main.page[data-page="customer"] input,
main.page[data-page="customer"] select,
main.page[data-page="customer"] textarea {
  border-color: #9baa9f;
}
@media (max-width: 40rem) {
  main.page[data-page="customer"] .weekly-days {
    grid-template-columns: 1fr;
  }
  main.page[data-page="customer"] .time-window {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  main.page[data-page="customer"] .time-window .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
  main.page[data-page="customer"] {
    width: min(100% - 1rem, 50rem);
    padding-top: .65rem;
  }
  main.page[data-page="customer"] .page-header {
    gap: .15rem .5rem;
    border-radius: 1rem;
  }
  main.page[data-page="customer"] .logout-form .button {
    min-height: 2.5rem;
    padding: .5rem .65rem;
  }
  main.page[data-page="customer"] .details-grid {
    grid-template-columns: minmax(5.5rem, .7fr) minmax(0, 1.3fr);
    gap: .65rem .75rem;
  }
  main.page[data-page="customer"] .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  main.page[data-page="customer"] .actions .button {
    width: 100%;
  }
}

/* Same time next week: the highlighted repeat game (🔁, words on hover or a tap) */
.repeat-tag { display: inline-block; vertical-align: middle; }
.repeat-tag summary { display: inline-block; cursor: pointer; list-style: none; padding: .1rem .5rem; border-radius: 999px;
  background: #fff3c4; color: #5c4700; font-weight: 700; font-size: .85rem; }
.repeat-tag summary::-webkit-details-marker { display: none; }
.repeat-tag small { display: block; margin-top: .25rem; max-width: 22rem; color: #5c4700; }
.crm-repeat-row td { background: #fffbea; }
.repeat-to-book { border-left: 4px solid #e0b400; }
.repeat-to-book ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.change-venue-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
/* John, 4 Nov 2026: pitch price per player on the Availability tab (pitch_prices.band) */
.pp { border-radius: 999px; padding: 0 .4rem; font-weight: 700; white-space: nowrap; }
.pp-green { background: #d9f2e3; color: #16452a; }
.pp-yellow { background: #fff1c7; color: #563800; }
.pp-orange { background: #ffdcbc; color: #6a3405; }
.pp-red { background: #fcdcdc; color: #6b2020; }
/* Unibox (John, 19 Nov 2026): one customer's activity, newest first. Unticking a Show box hides that kind at once,
   with no script (the organiser pages allow none inline). */
.ub-open { display: inline-block; margin-left: 6px; padding: 1px 9px; border: 1px solid #c9d3de; border-radius: 999px; background: #fff; color: #143b60; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ub-open:hover, .ub-open:focus-visible { background: #dceeff; }
.ub-filters { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; padding: 0; border: 0; }
.ub-filters legend { margin-bottom: 4px; padding: 0; font-weight: 700; }
.ub-filters label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 0; white-space: nowrap; }
.ub-filters input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; }
.ub-timeline { margin: 0; padding: 0; list-style: none; }
.ub-item { padding: 9px 0; border-top: 1px solid #e3e8ee; line-height: 1.45; overflow-wrap: anywhere; }
.ub-item time { margin-right: 6px; color: #536174; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ub-chip { display: inline-block; margin-right: 4px; padding: 0 8px; border-radius: 999px; background: #eef0f3; color: #354253; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.ub-chip-in { background: #dceeff; color: #143b60; }
.ub-chip-out { background: #eef0f3; color: #354253; }
.ub-chip-john { background: #dcf8c6; color: #1f4d12; }
.ub-chip-callups { background: #fff1c7; color: #563800; }
.ub-chip-payments { background: #d9f2e3; color: #16452a; }
.ub-chip-cancels { background: #fce4e4; color: #6b2020; }
.ub-chip-games { background: #e3f4f4; color: #134646; }
.ub-chip-feedback { background: #ffe9d6; color: #65330a; }
.ub-chip-codes { background: #e7e9fb; color: #303568; }
.ub-chip-account { background: #f1f3f5; color: #3d4652; }
.ub-chip-flows { background: #f1e6fb; color: #4a2466; }
.ub-words { margin: 4px 0 0; padding: 7px 10px; border-radius: .6rem; background: #f4f6f8; white-space: pre-wrap; }
.ub-in .ub-words { background: #eaf4ff; }
/* John's own WhatsApp (both sides), so it stands out from Ag3nt's messages (John, 19 Nov 2026: "show them with a
   different colour background so its easy to tell") */
.ub-john .ub-words { background: #e2f7d3; border-left: 3px solid #4caf50; }
.ub-people ul { margin: 10px 0 0; padding-left: 18px; }
.ub-people li { margin: 5px 0; }
.ub-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ub-switch { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.ub-everyone { margin-left: 6px; font-size: .9rem; font-weight: 600; }
.unibox:has(#ub-in:not(:checked)) .ub-in,
.unibox:has(#ub-out:not(:checked)) .ub-out,
.unibox:has(#ub-john:not(:checked)) .ub-john,
.unibox:has(#ub-callups:not(:checked)) .ub-callups,
.unibox:has(#ub-payments:not(:checked)) .ub-payments,
.unibox:has(#ub-cancels:not(:checked)) .ub-cancels,
.unibox:has(#ub-games:not(:checked)) .ub-games,
.unibox:has(#ub-feedback:not(:checked)) .ub-feedback,
.unibox:has(#ub-codes:not(:checked)) .ub-codes,
.unibox:has(#ub-account:not(:checked)) .ub-account,
.unibox:has(#ub-flows:not(:checked)) .ub-flows { display: none; }

/* The organiser dashboard, tidied (John, 22 Nov 2026): each tab does one job and its sections open and shut
   (organiser_layout.py). The same light look, blues and greys. */
main.page[data-page="organiser"] { max-width: 84rem; padding-top: .9rem; }
main.page[data-page="organiser"] .page-header { margin-bottom: .55rem; }
main.page[data-page="organiser"] .page-header .eyebrow { font-size: .68rem; margin-bottom: .1rem; }
main.page[data-page="organiser"] .page-header h1 { font-size: 1.3rem; margin-bottom: .05rem; }
main.page[data-page="organiser"] .page-header p.muted { font-size: .8rem; margin: 0; }
main.page[data-page="organiser"] .organiser-header-actions .button { min-height: 2.25rem; padding: .3rem .8rem; font-size: .85rem; }
main.page[data-page="organiser"] .organiser-tabs { position: sticky; top: 0; z-index: 20; align-items: center; gap: .1rem; margin-bottom: .95rem; background: #f4f6f8; }
main.page[data-page="organiser"] .organiser-tabs a { min-height: 2.6rem; padding: .6rem .8rem; font-size: .92rem; white-space: nowrap; }
main.page[data-page="organiser"] .organiser-tabs a:hover { color: #174f88; }
main.page[data-page="organiser"] .organiser-tabs a[aria-current="page"] { background: none; font-weight: 750; }
.org-tab-gap { flex: none; width: 1px; height: 1.15rem; margin: 0 .4rem; background: #c9d3dc; }
.org-tabhead { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .7rem; margin: 0 0 .8rem; }
.org-tabhead h2 { margin: 0; font-size: 1.2rem; }
.org-tabhead p { margin: 0; }
.org-tabjob { font-size: .92rem; }
.org-tabhead .org-updated { margin-left: auto; font-size: .78rem; }
.button.org-openall { min-height: 2rem; padding: .2rem .7rem; font-size: .8rem; font-weight: 650; }
.card.org-card { padding: 0; }
.org-fold > summary { display: flex; align-items: center; gap: .55rem; min-height: 2.9rem; padding: .6rem 1rem; border-radius: .9rem; cursor: pointer; list-style: none; }
.org-fold > summary::-webkit-details-marker { display: none; }
.org-fold > summary::before { content: ""; flex: none; width: .45rem; height: .45rem; margin: 0 .2rem 0 .1rem; border-right: 2px solid #536174; border-bottom: 2px solid #536174; transform: rotate(-45deg); transition: transform .12s ease; }
.org-fold[open] > summary::before { transform: translateY(-.1rem) rotate(45deg); }
.org-fold[open] > summary { border-radius: .9rem .9rem 0 0; }
.org-fold > summary:hover { background: #f5f8fb; }
.org-fold > summary h3, .org-fold > summary h4 { margin: 0; font-size: 1rem; font-weight: 700; }
.org-count { flex: none; min-width: 1.5rem; padding: .05rem .45rem; border-radius: 999px; background: #eaf1f8; color: #174f88; font-size: .78rem; font-weight: 750; font-variant-numeric: tabular-nums; text-align: center; }
.org-hint { min-width: 0; margin-left: auto; overflow: hidden; color: #536174; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.org-fold-body { padding: .8rem 1rem 1rem; border-top: 1px solid #edf0f4; }
.org-fold-body > .card { margin: 0; padding: .9rem 0; border: 0; border-top: 1px solid #edf0f4; border-radius: 0; box-shadow: none; }
.org-fold-body > .card:first-child { padding-top: 0; border-top: 0; }
.org-fold-body > .card:last-child { padding-bottom: 0; }
.org-subfold { margin: .5rem 0 0; border: 1px solid #e3e8ee; border-radius: .6rem; background: #fff; }
.org-subfold > summary { min-height: 2.5rem; padding: .4rem .75rem; border-radius: .6rem; }
.org-subfold[open] > summary { border-radius: .6rem .6rem 0 0; }
.org-subfold > summary h4 { font-size: .92rem; }
.org-subfold > .org-fold-body { padding: .2rem .75rem .5rem; }
.org-subfold .crm-table-wrap { margin: 0; }
.org-card-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .65rem; }
.org-card-head h3 { margin: 0; font-size: 1rem; }
.org-lists { margin: 0 0 1rem; }
.org-lists > .org-subfold { margin: 0 0 .6rem; border-color: #d9e0e8; border-radius: .9rem; box-shadow: 0 2px 8px #14243a0a; }
.org-lists > .org-subfold > summary { min-height: 2.9rem; padding: .6rem 1rem; border-radius: .9rem; }
.org-lists > .org-subfold[open] > summary { border-radius: .9rem .9rem 0 0; }
.org-lists > .org-subfold > summary h4 { font-size: 1rem; }
.org-lists > .org-subfold > .org-fold-body { padding: .5rem 1rem .75rem; }
main.page[data-page="organiser"] .crm-filters { display: block; }
.org-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.org-filter-bar .org-search { flex: 1 1 16rem; font-size: .85rem; }
.org-filter-bar input { min-height: 2.5rem; }
.org-filter-bar .button, .org-filter-actions .button { min-height: 2.5rem; padding: .4rem .8rem; font-size: .88rem; }
.org-filter-more { margin-top: .35rem; }
.org-filter-more > summary { width: fit-content; padding: .25rem 0; color: #174f88; font-size: .86rem; font-weight: 700; cursor: pointer; }
.org-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .6rem; align-items: end; margin: .45rem 0 .6rem; }
.org-filter-grid label { font-size: .85rem; }
.org-filter-grid input, .org-filter-grid select { min-height: 2.5rem; }
.org-filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.org-filter-more .crm-help { margin: .2rem 0 .5rem; }
main.page[data-page="organiser"] .crm-metrics { grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr)); gap: .5rem; margin: 0 0 .85rem; }
main.page[data-page="organiser"] .crm-metrics .card { gap: .1rem; padding: .5rem .75rem; border-radius: .6rem; box-shadow: none; }
main.page[data-page="organiser"] .crm-metrics span { font-size: .76rem; }
main.page[data-page="organiser"] .crm-metrics strong { font-size: 1.25rem; line-height: 1.2; }
.crm-metrics-links a { color: inherit; text-decoration: none; }
.crm-metrics-links a:hover { border-color: #174f88; background: #f5f9fd; }
.attention-head .button { min-height: 2.1rem; padding: .25rem .7rem; font-size: .82rem; font-weight: 650; }
.attention-card .attention-whatsapp { justify-self: start; min-height: 2.4rem; padding: .35rem .9rem; font-size: .9rem; }
.attention-card .attention-dealt-form textarea { height: 2.4rem; min-height: 2.4rem; }
.attention-card .attention-dealt-form .button { min-height: 2.4rem; padding: .35rem .9rem; font-size: .9rem; }
.org-record-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem; }
.org-record-head h3 { margin: 0; font-size: 1.15rem; }
.org-buttons { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.org-buttons .button { min-height: 2.3rem; padding: .3rem .8rem; font-size: .86rem; }
.org-back { margin-bottom: .75rem; }
.org-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .6rem 1rem; }
.org-bar h3 { margin: 0; font-size: 1rem; }
.org-bar p { flex: 1 1 10rem; margin: 0; }
.org-bar form { margin: 0; }
.org-bar .button { min-height: 2.2rem; padding: .25rem .8rem; font-size: .85rem; }
.org-note { margin: -.4rem 0 .9rem .25rem; font-size: .82rem; }
.org-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0 0 .9rem; }
.org-switches > .card { margin: 0; }
.crm-game-detail { margin-bottom: .9rem; }
main.page[data-page="organiser"] .crm-table td { overflow-wrap: break-word; }
main.page[data-page="organiser"] .crm-table .status { white-space: nowrap; }
.crm-detail { max-width: none; }
@media (min-width: 64rem) {
  .crm-detail .details-grid { grid-template-columns: minmax(9rem, .6fr) minmax(0, 1.4fr) minmax(9rem, .6fr) minmax(0, 1.4fr); }
}
@media (max-width: 40rem) {
  main.page[data-page="organiser"] .organiser-tabs { position: static; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: visible; }
  main.page[data-page="organiser"] .organiser-tabs a { min-height: 2.5rem; padding: .55rem .1rem; font-size: .8rem; text-align: center; }
  .org-tab-gap { display: none; }
  main.page[data-page="organiser"] .page-header { flex-wrap: nowrap; align-items: center; gap: .5rem; }
  main.page[data-page="organiser"] .page-header .eyebrow, main.page[data-page="organiser"] .page-header p.muted { display: none; }
  main.page[data-page="organiser"] .page-header h1 { font-size: 1.05rem; margin: 0; }
  main.page[data-page="organiser"] .organiser-header-actions { flex-wrap: nowrap; gap: .3rem; }
  main.page[data-page="organiser"] .organiser-header-actions .button { min-height: 2rem; padding: .15rem .5rem; font-size: .74rem; }
  .org-tabhead .org-updated { margin-left: 0; }
  .org-switches { grid-template-columns: 1fr; }
  .org-fold > summary { padding: .55rem .75rem; }
  .org-fold-body { padding: .7rem .75rem .85rem; }
  .org-subfold > .org-fold-body { padding: .2rem .5rem .5rem; }
}

/* Player app (JOH-523). Every rule is scoped to .pa-* classes that only
   render_player_page emits, so AG3NT_PLAYER_UI=classic keeps the page above. */
.pa-body { margin: 0; background: #F3F6F1; }
.pa-app {
  --pa-night: #0B211B; --pa-forest: #0F2D25; --pa-forest-2: #1B4A3A; --pa-lime: #C6F27E; --pa-lime-ink: #0B211B;
  --pa-ground: #F3F6F1; --pa-line: #DDE6DF; --pa-line-strong: #CFDAD2; --pa-ink: #0E1F1A; --pa-muted: #56665D;
  --pa-body: #3F5A4C; --pa-soft: #EEF5E6; --pa-green: #2E7D4F; --pa-good: #1E6B40; --pa-on-dark: #C9D8CF;
  --pa-amber-bg: #FFF6DA; --pa-amber-line: #F0DC9A; --pa-amber-ink: #3D2E05;
  /* Content column: phones use the full width; wider screens centre a wider column. */
  --pa-max: 560px; --pa-edge: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  background: var(--pa-ground);
  color: var(--pa-ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.pa-app { --pa-gutter: max(var(--pa-edge), calc((100% - var(--pa-max)) / 2)); }
.pa-app h1, .pa-app h2, .pa-app p { margin: 0; }
.pa-app a:not([class]) { color: var(--pa-forest); font-weight: 700; }
.pa-app :focus-visible { outline: 3px solid var(--pa-green); outline-offset: 2px; }
.pa-app [hidden] { display: none !important; }
.pa-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pa-icon { flex: 0 0 auto; }

/* App bar and bottom navigation */
.pa-appbar { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); background: var(--pa-night); }
.pa-appbar-inner { display: flex; align-items: center; gap: 9px; padding: 12px var(--pa-gutter); }
.pa-app .pa-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.pa-mark { width: 30px; height: 30px; object-fit: contain; }
.pa-wordmark { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.pa-wordmark span { color: var(--pa-lime); }
.pa-app .pa-avatar { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.pa-app .pa-avatar-large { margin: 0; flex: 0 0 auto; width: 58px; height: 58px; font-size: 20px; }
.pa-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--pa-line); }
/* Mates list (JOH-558): one equal column per item, so the menu fits 3 items, or 4 with the Mates tab. */
.pa-nav-inner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px max(10px, calc(var(--pa-gutter) - 6px)) 8px; }
.pa-app .pa-nav-item { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--pa-muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.pa-app .pa-nav-item[aria-current="page"] { color: var(--pa-forest); }
.pa-nav-pill { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.pa-nav-item[aria-current="page"] .pa-nav-pill { background: var(--pa-lime); color: var(--pa-lime-ink); }

/* Layout */
.pa-content { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }
.pa-content > :not(.pa-hero) { margin-left: var(--pa-gutter); margin-right: var(--pa-gutter); }
.pa-content > :first-child:not(.pa-hero) { margin-top: 14px; }
.pa-alerts { display: grid; gap: 8px; padding: 12px var(--pa-gutter) 0; }
.pa-alert { padding: 12px 14px; border: 1px solid; border-radius: 14px; font-size: 14px; font-weight: 600; }
.pa-alert-error { border-color: #E9B4AE; background: #FDECEA; color: #6B1D16; }
.pa-alert-notice { border-color: #B8DD95; background: #E3F5D0; color: #1E4A2C; }

/* Heroes */
.pa-hero { padding: 26px calc(var(--pa-gutter) + 4px) 24px; background: var(--pa-night); color: #fff; }
.pa-hero h1 { margin-top: 10px; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; }
.pa-hero .pa-lead { margin-top: 8px; color: var(--pa-on-dark); font-size: 15px; }
.pa-hero-photo {
  padding-top: 76px;
  background: linear-gradient(180deg, rgba(11, 33, 27, .35) 0%, rgba(11, 33, 27, .82) 55%, #0B211B 100%),
    url("/assets/ag3nt-player-hero.jpg") 62% 30% / cover no-repeat, var(--pa-night);
}
.pa-hero-tall { padding-top: 104px; }
.pa-hero-compact { padding-top: 22px; padding-bottom: 20px; }
.pa-hero-compact h1 { margin-top: 6px; font-size: 28px; }
.pa-hero-overlap { padding-bottom: 92px; }
.pa-content > .pa-hero-overlap + .pa-card-raised { margin-top: -84px; }
.pa-eyebrow { color: var(--pa-lime); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pa-card .pa-eyebrow { color: #3F6957; }
.pa-eyebrow-amber { color: #F2C26B; }
/* JOH-557: the Paid, no place message is a sentence, not a title. */
.pa-hero h1.pa-hero-note { max-width: 40em; font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; }
.pa-status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid rgba(198, 242, 126, .35); border-radius: 999px; background: rgba(11, 33, 27, .6); color: var(--pa-lime); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.pa-status-chip-amber { border-color: rgba(242, 194, 107, .45); color: #F2C26B; }
.pa-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--pa-lime); animation: pa-pulse 1.8s infinite; }
@keyframes pa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 242, 126, .7); }
  70% { box-shadow: 0 0 0 10px rgba(198, 242, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 242, 126, 0); }
}
.pa-hero-badge { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-hero-badge .pa-icon { stroke-width: 3; }
.pa-profile { display: flex; align-items: center; gap: 14px; }
.pa-profile h1 { margin-top: 0; font-size: 24px; }
.pa-profile .pa-lead { margin-top: 2px; }
.pa-jump { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.pa-app .pa-jump a { min-height: 44px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
/* JOH-553 S3: a third jump link (How far) when the travel section shows. */
.pa-jump-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pa-app .pa-jump-3 a { padding: 4px 6px; line-height: 1.2; text-align: center; }

/* Buttons and small text */
.pa-form { margin: 0; }
.pa-app .pa-btn { width: 100%; min-height: 52px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.pa-app .pa-btn-primary { background: var(--pa-forest); color: #fff; }
.pa-app .pa-btn-primary:hover { background: var(--pa-forest-2); }
.pa-app .pa-btn-primary .pa-icon { color: var(--pa-lime); }
.pa-app .pa-btn-secondary { min-height: 48px; border-color: var(--pa-line-strong); background: #fff; color: var(--pa-forest); font-size: 15px; font-weight: 700; }
.pa-app .pa-btn-lime { margin-top: 18px; background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-app .pa-btn-ghost { width: auto; min-height: 44px; margin-top: 16px; padding: 0 14px; border-color: rgba(255, 255, 255, .28); border-radius: 12px; background: transparent; color: #fff; font-size: 14px; font-weight: 700; }
.pa-app .pa-btn-dark { background: var(--pa-amber-ink); color: var(--pa-amber-bg); }
.pa-app .pa-btn-small { width: auto; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.pa-app .pa-link { display: inline-flex; align-items: center; gap: 6px; color: var(--pa-forest); font-weight: 700; }
.pa-app .pa-details + .pa-link { margin-top: 16px; }
.pa-help { color: var(--pa-muted); font-size: 13px; }
.pa-note { color: var(--pa-body); font-size: 13.5px; }
.pa-fine { color: var(--pa-muted); font-size: 12.5px; }
.pa-fine-dark { margin-top: 12px; color: #A9BDB2; text-align: center; }
.pa-center { text-align: center; }
/* JOH-563: the get-back page's three steps, and a tip shown only inside a Home Screen web app. */
.pa-getback-steps { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--pa-on-dark); font-size: 15px; font-weight: 600; }
.pa-getback-steps li { display: flex; align-items: center; gap: 10px; }
.pa-getback-no { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(198, 242, 126, .16); color: var(--pa-lime); font-size: 13px; font-weight: 800; }
.pa-home-screen-tip { display: none; }
@media (display-mode: standalone) { .pa-home-screen-tip { display: block; } }
/* JOH-568: the Me tab's Add to Home Screen block is for the browser, not the installed app. */
.pa-home-screen .pa-btn { width: 100%; margin-top: 0; justify-content: center; font-size: 15px; }
@media (display-mode: standalone) { .pa-home-screen { display: none; } }
/* iPhone Home Screen steps on the Me tab (John, 19 Oct 2026). */
.pa-home-steps { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; color: var(--pa-body); font-size: 14px; }
.pa-home-steps li { display: flex; align-items: center; gap: 10px; }
.pa-home-steps strong { color: var(--pa-ink); }
.pa-home-steps .pa-icon { vertical-align: -3px; }
.pa-home-step-no { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 12px; font-weight: 800; }
/* Samsung Internet's written steps sit below the button (John, 20 Oct 2026). */
.pa-home-screen .pa-btn + .pa-home-steps { margin-top: 12px; }
/* John (21 Nov 2026): the Get set up job lands on this box, clear of the top bar and picked out. */
.pa-app #home-screen { scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px)); }
.pa-home-screen:target { border-color: var(--pa-forest); box-shadow: 0 0 0 2px var(--pa-lime); }
.pa-home-screen h2 + .pa-btn { margin-top: 12px; }

/* Cards and sections */
.pa-card { padding: 16px; border: 1px solid var(--pa-line); border-radius: 18px; background: #fff; }
.pa-card h2 { margin-bottom: 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.pa-card-raised { position: relative; border-radius: 20px; box-shadow: 0 14px 34px rgba(11, 33, 27, .14); }
.pa-card-flush { padding: 0; overflow: hidden; }
.pa-section { display: flex; flex-direction: column; gap: 10px; }
.pa-section-head { padding: 4px 4px 0; }
.pa-section-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.pa-section-head p { margin-top: 2px; color: var(--pa-muted); font-size: 13px; }
.pa-stack, .pa-slots { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
/* John, 17 Nov 2026: a folded game in Coming up keeps its own height beside an opened one, not a stretched empty box */
.pa-coming-up .pa-stack { align-items: start; }
.pa-inline-note { display: flex; align-items: flex-start; gap: 12px; }
.pa-inline-note p { color: var(--pa-body); font-size: 14px; }
.pa-inline-note strong { color: var(--pa-ink); }
.pa-inline-note .pa-detail-icon { width: 36px; height: 36px; border-radius: 10px; }
.pa-banner { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border: 1px solid var(--pa-amber-line); border-radius: 16px; background: var(--pa-amber-bg); color: #5A4610; font-size: 13px; }
.pa-banner > div { flex: 1 1 auto; min-width: 0; }
.pa-banner-title { color: var(--pa-amber-ink); font-size: 14.5px; font-weight: 800; }

/* JOH-573: the saved set-up steps on the new player page. */
.pa-setup .pa-card-head { align-items: baseline; gap: 12px; }
.pa-setup .pa-card-head h2 { margin: 0; }
.pa-setup ul { list-style: none; margin: 8px 0 0; padding: 0; }
.pa-setup li:not([hidden]) ~ li:not([hidden]) { border-top: 1px solid var(--pa-line); }
.pa-app .pa-setup a, .pa-setup-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; color: var(--pa-ink); text-decoration: none; }
.pa-setup-icon { display: grid; place-items: center; flex: 0 0 32px; color: var(--pa-forest-2); }
.pa-setup-copy { display: grid; gap: 3px; flex: 1 1 auto; min-width: 0; }
.pa-setup-copy strong { font-size: 14px; }
.pa-setup-copy small { color: var(--pa-muted); font-size: 12px; }
.pa-setup a > .pa-icon { flex: 0 0 auto; color: var(--pa-muted); }
.pa-setup-fresh { background: #E5F4E9; border-radius: 12px; }
.pa-setup-fresh .pa-setup-row { padding-inline: 8px; }
.pa-setup-fresh .pa-setup-icon { height: 32px; border-radius: 50%; background: var(--pa-good); color: #fff; }
.pa-setup-fresh .pa-setup-icon .pa-icon { stroke-width: 3; }
.pa-setup-fresh strong { color: var(--pa-good); }
.pa-setup-pulsing { animation: pa-setup-pulse 2500ms ease-in-out; }
.pa-setup-pulsing .pa-setup-icon { animation: pa-setup-check-pop 2500ms ease-in-out; }
.pa-setup-final { padding: 18px 8px; color: var(--pa-good); font-weight: 800; }
.pa-setup-leaving { overflow: hidden; animation: pa-setup-collapse 240ms ease-in forwards; }
@keyframes pa-setup-pulse {
  0%, 33%, 66%, 100% { background: #E5F4E9; box-shadow: 0 0 0 0 rgba(46, 125, 79, 0); }
  16.5%, 49.5%, 83% { background: #CDEBD6; box-shadow: 0 0 0 6px rgba(46, 125, 79, .2); }
}
@keyframes pa-setup-check-pop {
  0%, 33%, 66%, 100% { transform: scale(1); }
  16.5%, 49.5%, 83% { transform: scale(1.25); }
}
@keyframes pa-setup-collapse {
  from { opacity: 1; max-height: 500px; transform: translateY(0); }
  to { opacity: 0; max-height: 0; transform: translateY(-4px); padding-block: 0; margin-block: 0; }
}

/* Call-up */
.pa-callup { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.pa-details { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pa-detail { display: flex; align-items: flex-start; gap: 12px; }
.pa-detail-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--pa-soft); color: var(--pa-forest-2); }
.pa-detail strong { display: block; font-size: 16px; font-weight: 800; }
.pa-detail > span + span > span { display: block; color: var(--pa-muted); font-size: 13.5px; }
.pa-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-top: 14px; border-top: 1px solid #E7EEE8; }
.pa-price strong { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.pa-price span { color: var(--pa-muted); font-size: 13px; }
.pa-founders { color: var(--pa-forest-2); font-size: 13.5px; font-weight: 700; }
.pa-hold { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #F1F7EA; }
.pa-hold p { color: var(--pa-body); font-size: 13px; font-weight: 600; }
.pa-hold-clock { display: block; color: var(--pa-forest); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pa-ring { flex: 0 0 auto; }
.pa-ring-track { fill: none; stroke: #D9E8CB; stroke-width: 6; }
.pa-ring-value { fill: none; stroke: var(--pa-green); stroke-width: 6; stroke-linecap: round; }
.pa-actions { display: grid; gap: 10px; }
.pa-test-note { padding: 10px 12px; border: 1px solid var(--pa-amber-line); border-radius: 12px; background: var(--pa-amber-bg); color: var(--pa-amber-ink); font-size: 13.5px; font-weight: 700; }

/* Teamsheet ticket and game rows */
.pa-ticket-top { display: flex; align-items: stretch; }
.pa-date-tile { flex: 0 0 48px; height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #F1F5F0; color: var(--pa-ink); line-height: 1.05; text-align: center; }
.pa-date-tile > span { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; }
.pa-date-tile strong { font-size: 20px; font-weight: 800; }
.pa-date-tile-large { flex-basis: 96px; height: auto; padding: 16px 8px; border-radius: 0; background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-date-tile-large > span { font-size: 12px; letter-spacing: .12em; }
.pa-date-tile-large strong { font-size: 40px; line-height: 1; letter-spacing: -0.04em; }
.pa-ticket-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 16px; }
.pa-ticket-main strong { font-size: 17px; font-weight: 800; }
.pa-ticket-main span { color: var(--pa-muted); font-size: 13.5px; }
.pa-ticket-paid { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px dashed var(--pa-line-strong); font-size: 14px; }
.pa-ticket-paid span { color: var(--pa-muted); }
.pa-ticket-paid strong { display: inline-flex; align-items: center; gap: 6px; color: var(--pa-good); font-weight: 800; }
.pa-ticket .pa-founders { padding: 0 16px 12px; }
/* Venue photos (John, 10 Nov 2026): the venue's own photo on a game card, kept short so the card stays neat. */
.pa-venue-photo { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; max-height: 190px; object-fit: cover; background: var(--pa-soft); }
.pa-callup .pa-venue-photo { width: calc(100% + 36px); max-width: none; margin: -18px -18px 0; border-radius: 18px 18px 0 0; }
.pa-ticket-main .pa-ticket-address { font-size: 12.5px; }
.pa-fold .pa-venue-photo { display: none; }
.pa-ticket-actions { padding: 0 16px 16px; }
.pa-app .pa-ticket-actions .pa-btn { width: 100%; }
.pa-games { margin: 0; padding: 0; overflow: hidden; list-style: none; }
.pa-game { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 13px 14px; }
.pa-game + .pa-game { border-top: 1px solid #E7EEE8; }
.pa-game .pa-date-tile { flex-basis: 44px; height: 46px; background: transparent; }
.pa-game-main { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.pa-game-main strong { font-size: 14.5px; font-weight: 700; }
.pa-game-main span { color: var(--pa-muted); font-size: 12.5px; }
.pa-game .pa-form { flex: 1 0 100%; }
/* Glance pass: each extra booked game folds to one line; the Founder code shows big */
.pa-fold > summary { display: flex; align-items: center; gap: 10px 12px; padding: 13px 14px; cursor: pointer; list-style: none; }
.pa-fold > summary::-webkit-details-marker { display: none; }
.pa-fold > summary .pa-date-tile { flex-basis: 44px; height: auto; padding: 6px 0; }
.pa-fold > summary .pa-date-tile > span + strong + span { font-size: 9.5px; color: var(--pa-muted); }
.pa-fold-icon { display: inline-flex; color: var(--pa-muted); transform: rotate(90deg); transition: transform .15s ease; }
.pa-fold[open] .pa-fold-icon { transform: rotate(-90deg); }
.pa-fold[open] > summary { border-bottom: 1px dashed var(--pa-line-strong); }
.pa-fold .pa-ticket-top { display: none; }
.pa-fold .pa-ticket-paid { border-top: 0; }
.pa-founder-code { display: grid; gap: 4px; padding: 16px; }
.pa-founder-code-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pa-founder-code-label { color: var(--pa-muted); font-size: 13px; font-weight: 700; }
.pa-founder-code-top strong { padding: 4px 12px; border-radius: 10px; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 20px; font-weight: 800; letter-spacing: .06em; }
.pa-founder-code-sub { display: flex; align-items: center; gap: 2px; color: var(--pa-ink); font-size: 14.5px; font-weight: 700; }
.pa-founder-code-sub > span { min-width: 0; }
/* John (6 Nov 2026): How it works sits behind an (i) beside the 51% line, in a small bubble the page's script opens
   under the line, its point under the (i) (--pa-tip-x). Without the script the words show as a plain line. */
.pa-app .pa-info { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -7px -6px -7px 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--pa-forest-2); cursor: pointer; }
.pa-app .pa-info:hover, .pa-app .pa-info[aria-expanded="true"] { background: var(--pa-soft); color: var(--pa-ink); }
.pa-info-tip { margin-top: 2px; color: var(--pa-body); font-size: 13px; }
.pa-info-tip.is-bubble { position: relative; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--pa-forest); color: #fff; line-height: 1.45; scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.pa-info-tip.is-bubble::before { content: ""; position: absolute; top: -5px; left: var(--pa-tip-x, calc(100% - 22px)); width: 10px; height: 10px; border-radius: 2px; background: inherit; transform: translateX(-50%) rotate(45deg); }
/* John (10 Nov 2026): the holder's own join link under their code, with Copy buttons, the card's tally of mates
   who joined and paid, and a booked game's "fancy having a mate in this one?" card. */
.pa-founder-tally { margin-top: 6px; color: var(--pa-good); font-size: 13.5px; font-weight: 700; }
.pa-founder-link { display: grid; gap: 4px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--pa-line-strong); }
.pa-founder-link-url { padding: 8px 10px; border-radius: 10px; background: var(--pa-soft); color: var(--pa-ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.pa-founder-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pa-founder-actions:empty { display: none; }
a.pa-founder-link-url { display: block; text-decoration: underline; text-underline-offset: 2px; }
/* The QR code of their invite page (ag3nt/qr.py): always black on white, which is what a phone camera reads. */
.pa-qr { display: block; width: 168px; max-width: 70%; height: auto; border-radius: 10px; background: #fff; }
.pa-founder-qr { display: grid; justify-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--pa-line-strong); text-align: center; }
/* The public invite page (ag3nt/invite_page.py). */
.pa-invite-offer { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--pa-lime); color: var(--pa-lime-ink); font-weight: 800; }
.pa-invite-note { color: rgba(255, 255, 255, 0.78); text-align: center; }
.pa-invite-qr { display: none; justify-items: center; gap: 8px; padding: 18px; text-align: center; }
@media (min-width: 720px) { .pa-invite-qr { display: grid; } }
.pa-game-mate { display: grid; gap: 2px; padding: 16px; }
.pa-game-mate p { color: var(--pa-body); font-size: 14.5px; line-height: 1.45; }
.pa-game-mate strong { color: var(--pa-ink); }
.pa-more summary { color: var(--pa-forest-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.pa-more p { margin-top: 6px; color: var(--pa-body); font-size: 13px; }
.pa-pill { max-width: 100%; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pa-pill-good { background: #E3F5D0; color: #1E5A35; }
.pa-pill-neutral { background: #EEF2EF; color: var(--pa-body); }
.pa-pill-warn { background: #FFF0C2; color: #7A5600; }

/* Who's playing a paid game, as a team sheet (JOH-555) */
.pa-squad .pa-card-head { margin-bottom: 0; }
.pa-squad .pa-card-head h2, .pa-squad-inline .pa-card-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.pa-squad .pa-pill { font-variant-numeric: tabular-nums; }
.pa-squad-inline { padding: 12px 16px 16px; border-top: 1px dashed var(--pa-line-strong); }
.pa-squad-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 14px 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.pa-squad-tile { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pa-squad-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #EEF2EF; color: var(--pa-ink); font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.pa-squad-av { position: relative; overflow: hidden; }
.pa-squad-av .pa-squad-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pa-squad-name { max-width: 100%; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--pa-ink); font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.pa-squad-tile.is-you .pa-squad-av { background: var(--pa-forest); color: var(--pa-lime); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pa-lime); }
.pa-squad-tile.is-anon .pa-squad-av { background: #fff; border: 1.5px solid var(--pa-line-strong); color: var(--pa-muted); }
.pa-squad-tile.is-open .pa-squad-av { background: transparent; border: 1.5px dashed #B9C8BE; }
.pa-squad-av.pa-av-0 { background: #E3F5D0; color: #1E5A35; }
.pa-squad-av.pa-av-1 { background: #DCEEFF; color: #143B60; }
.pa-squad-av.pa-av-2 { background: #FFEBD9; color: #65330A; }
.pa-squad-av.pa-av-3 { background: #EDE4FF; color: #3B2470; }
.pa-squad-av.pa-av-4 { background: #FFF1C7; color: #563800; }
.pa-squad-av.pa-av-5 { background: #FCE4E4; color: #6B2020; }
.pa-squad-tile .pa-squad-count { position: absolute; top: -4px; left: calc(50% + 12px); }
.pa-squad-count { min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; display: inline-grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* No photo yet (8 Nov 2026): your own circle is a link that opens WhatsApp with PHOTO typed in, marked by a
   small lime camera at its bottom right, pulsing gently (still when the phone asks for less motion). */
.pa-squad-add { position: absolute; top: 0; left: calc(50% - 23px); width: 46px; height: 46px; border-radius: 50%; }
.pa-squad-cam { position: absolute; right: -10px; bottom: -5px; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); animation: pa-pulse 2.4s ease-out infinite; }
.pa-squad-cam .pa-icon { stroke-width: 2.5; }
.pa-squad-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 16px; }
.pa-squad-note { display: flex; align-items: center; gap: 7px; color: var(--pa-body); font-size: 13px; font-weight: 700; }
.pa-squad-note.is-full { color: var(--pa-good); }
.pa-squad-key { display: flex; align-items: center; gap: 6px; color: var(--pa-muted); font-size: 12px; font-weight: 700; }
.pa-squad-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pa-lime); }
/* Add mates from Who's playing (24 Oct 2026): tapping a named face opens a small fold under it, a plain
   <details> with no script. The fold stays inside the face's own column, so it can never widen the sheet
   or be cut off by a folded Coming up card; its row grows while it is open. A mate's face has a tick. */
.pa-squad-pick { align-self: stretch; min-width: 0; }
.pa-squad-pick > summary { display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 12px; cursor: pointer; list-style: none; }
.pa-squad-pick > summary::-webkit-details-marker { display: none; }
.pa-squad-pick[open] > summary .pa-squad-av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pa-forest); }
/* .pa-app here outranks `.pa-app p { margin: 0 }`, so the "Wants to be mates" fold (a <p>) gets the same gap as the Add form. */
.pa-app .pa-squad-fold { display: grid; justify-items: center; gap: 4px; margin-top: 8px; text-align: center; }
.pa-squad-fold > span { color: var(--pa-body); font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.pa-app .pa-squad-fold .pa-btn { width: 100%; min-height: 44px; padding: 4px 6px; border-radius: 12px; font-size: 12.5px; line-height: 1.15; }
.pa-app .pa-squad-fold .pa-link { font-size: 12px; line-height: 1.25; }
.pa-squad-mate { display: inline-flex; align-items: center; gap: 3px; color: var(--pa-good); font-size: 11.5px; font-weight: 800; }
.pa-squad-mate .pa-icon { stroke-width: 3; }
/* Suggested teams under the team sheet (JOH-577) */
.pa-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pa-teams-title, .pa-teams-note { grid-column: 1 / -1; margin: 0; }
.pa-teams-title { color: var(--pa-ink); font-size: 14px; font-weight: 800; }
.pa-teams-note { color: var(--pa-muted); font-size: 12px; font-weight: 700; }
.pa-team { min-width: 0; padding: 10px 12px; border: 1px solid var(--pa-line); border-radius: 14px; background: #fff; }
.pa-team.is-yours { border-color: var(--pa-lime); box-shadow: 0 0 0 2px var(--pa-lime); }
.pa-team-label { margin: 0 0 6px; color: var(--pa-ink); font-size: 13px; font-weight: 800; }
.pa-team ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pa-team li { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--pa-ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.pa-team li.is-you { color: var(--pa-good); }
.pa-team li.is-anon { color: var(--pa-muted); }
/* Early teams (John, 9 Nov 2026): a match headline over the two teams, and each player's face */
.pa-teams-fixture, .pa-teams-when { grid-column: 1 / -1; margin: 0; text-align: center; }
.pa-teams-fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding-top: 6px; color: var(--pa-ink); font-size: clamp(15px, 4.6vw, 19px); font-weight: 800; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.pa-teams-fixture span:first-child { text-align: right; }
.pa-teams-fixture span:last-child { text-align: left; }
.pa-teams-fixture b { padding: 2px 9px; border-radius: 999px; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
.pa-teams-when { margin-top: -4px; color: var(--pa-muted); font-size: 12.5px; font-weight: 700; }
.pa-team .pa-squad-av { flex: none; width: 30px; height: 30px; font-size: 11px; }
.pa-team .pa-squad-av.is-you { background: var(--pa-forest); color: var(--pa-lime); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--pa-lime); }
.pa-team .pa-squad-av.is-anon { background: #fff; border: 1.5px solid var(--pa-line-strong); color: var(--pa-muted); }

/* Games I'm putting together */
.pa-slot { padding: 14px; border: 1px solid var(--pa-line); border-radius: 16px; background: #fff; }
.pa-slot.is-full { border-color: #9FCB7A; }
.pa-slot.is-full .pa-date-tile { background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-slot-top { display: flex; align-items: center; gap: 12px; }
.pa-slot-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pa-slot-main strong { font-size: 15px; font-weight: 800; }
.pa-slot-main span { color: var(--pa-muted); font-size: 13px; }
.pa-slot-count { display: flex; flex-direction: column; text-align: right; }
.pa-slot-count strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pa-slot-count strong span { color: var(--pa-muted); font-size: 13px; font-weight: 700; }
.pa-slot-count > span { color: var(--pa-muted); font-size: 11.5px; font-weight: 700; }
.pa-meter { display: block; width: 100%; height: 8px; margin-top: 12px; border-radius: 999px; overflow: hidden; }
.pa-meter-track { fill: #E7EEE8; }
.pa-meter-fill { fill: #A9C79A; }
.pa-slot.is-close .pa-meter-fill { fill: #7CC242; }
.pa-slot.is-full .pa-meter-fill { fill: var(--pa-green); }
.pa-slot-note { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--pa-body); font-size: 13px; font-weight: 700; }
.pa-slot.is-full .pa-slot-note { color: var(--pa-good); }
/* Booked games still taking players (John, 9 Nov 2026) */
.pa-slot.is-booked { border-color: var(--pa-green); }
.pa-slot.is-booked .pa-date-tile { background: var(--pa-forest); color: var(--pa-lime); }
.pa-slot.is-booked .pa-slot-note { color: var(--pa-good); }
.pa-slot-tag { flex: 0 0 auto; align-self: flex-start; }
.pa-slot-join { margin-top: 12px; }
.pa-slot.is-squads { border-color: #E9C46A; }
.pa-pill-squads { background: #FFF1C9; color: #6A4A00; }
.pa-app .pa-slot-squads { margin-top: 12px; }
.pa-slot-fine { margin-top: 6px; color: var(--pa-muted); font-size: 12.5px; }
.pa-slot-note + .pa-slot-fine { margin-top: 2px; }
/* Coming up's game list (John, 21 Nov 2026): one panel, hairline rows, one button each */
.pa-game-list { margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--pa-line); border-radius: 16px; background: #fff; }
.pa-game-list .pa-slot, .pa-game-list .pa-slot.is-booked, .pa-game-list .pa-slot.is-squads { padding: 12px 14px; border: 0; border-top: 1px solid var(--pa-line); border-radius: 0; background: transparent; }
.pa-game-list .pa-slot:first-child { border-top: 0; }
.pa-game-list .pa-slot-top { gap: 10px; }
.pa-game-list .pa-slot.is-booked .pa-date-tile { flex: 0 0 34px; height: auto; background: transparent; color: var(--pa-ink); }
.pa-game-list .pa-date-tile > span { color: var(--pa-muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.pa-game-list .pa-date-tile strong { font-size: 18px; font-weight: 700; }
.pa-game-list .pa-slot-main strong { white-space: nowrap; }
.pa-slot-corner { flex: 0 0 auto; margin: 0; }
.pa-app .pa-game-list .pa-btn-small { width: auto; padding: 0 12px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.pa-app .pa-game-list .pa-btn-rejoin { border: 1px solid var(--pa-line-strong); background: #fff; color: var(--pa-forest); font-weight: 700; }
.pa-app .pa-game-list .pa-btn-rejoin:hover { background: var(--pa-soft); }
.pa-app .pa-game-list .pa-btn-primary { background: var(--pa-green); color: #fff; }
.pa-app .pa-game-list .pa-btn-primary:hover { background: var(--pa-good); }
.pa-app .pa-game-list .pa-slot-squads { margin-top: 0; }
.pa-game-list .pa-slot-note.pa-slot-corner { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; }
.pa-game-list .pa-demand, .pa-game-list .pa-slot-fine, .pa-game-list .pa-slot-tag { margin-left: 44px; }
.pa-game-list .pa-slot-tag { display: inline-flex; margin-top: 6px; }
.pa-demand { display: flex; align-items: center; margin-top: 4px; color: var(--pa-muted); font-size: 13px; }
.pa-signal { display: inline-flex; flex: 0 0 auto; align-items: flex-end; gap: 2px; height: 11px; margin-right: 6px; }
.pa-signal i { width: 3px; border-radius: 1px; background: var(--pa-line-strong); }
.pa-signal i:nth-child(1) { height: 4px; }
.pa-signal i:nth-child(2) { height: 6px; }
.pa-signal i:nth-child(3) { height: 9px; }
.pa-signal i:nth-child(4) { height: 11px; }
.pa-signal-1 i:nth-child(-n+1), .pa-signal-2 i:nth-child(-n+2), .pa-signal-3 i:nth-child(-n+3), .pa-signal-4 i { background: var(--pa-green); }
@media (max-width: 359px) { .pa-game-list .pa-slot-top { flex-wrap: wrap; } .pa-game-list .pa-slot-corner { flex: 1 0 100%; } .pa-app .pa-game-list .pa-slot-corner .pa-btn-small { width: 100%; } }
/* Coming up (John, 13 Nov 2026): a green "You're in!" on a game they've paid for, a yellow Rejoin this queue */
.pa-pill-in { background: var(--pa-green); color: #fff; white-space: nowrap; }
.pa-fold > summary .pa-pill-in, .pa-fold-line .pa-pill-in { flex: 0 0 auto; }
.pa-fold-line { display: flex; align-items: center; gap: 10px 12px; padding: 13px 14px; }
.pa-fold-line .pa-date-tile { flex-basis: 44px; height: auto; padding: 6px 0; }
.pa-fold-line .pa-date-tile > span + strong + span { font-size: 9.5px; color: var(--pa-muted); }
.pa-slot.is-rejoin:not(.is-queued) { border-color: #E9C46A; }
.pa-app .pa-btn-rejoin { background: #FFD54F; color: #3D2E05; }
.pa-app .pa-btn-rejoin:hover { background: #FFCA28; }
.pa-empty p { margin-bottom: 8px; color: var(--pa-body); font-size: 14px; }
/* Previous games (John, 9 Nov 2026): folded until tapped; a game still in the queue is green, a finished one grey-blue */
.pa-history > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.pa-history > summary::-webkit-details-marker { display: none; }
.pa-history > summary .pa-fold-icon { margin-left: auto; }
.pa-history[open] > summary .pa-fold-icon { transform: rotate(-90deg); }
.pa-history > .pa-games { margin-top: 10px; }
.pa-game.is-queued { background: #F1FAE8; box-shadow: inset 3px 0 0 var(--pa-green); }
.pa-game.is-done { background: #F5F7FA; }
.pa-game.is-done .pa-game-main strong { color: #4A5568; }
.pa-pill-done { background: #E4E9F1; color: #3E4C63; }
.pa-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.pa-steps li { display: flex; flex-direction: column; padding: 12px 10px; border-radius: 12px; background: var(--pa-ground); }
.pa-steps li span:first-child { color: var(--pa-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.pa-steps li strong { margin-top: 2px; font-size: 15px; font-weight: 800; }
.pa-steps li span:last-child { color: var(--pa-muted); font-size: 12px; }
.pa-steps li.is-now { background: var(--pa-forest); color: #fff; }
.pa-steps li.is-now span:first-child { color: var(--pa-lime); }
.pa-steps li.is-now span:last-child { color: var(--pa-on-dark); }

/* Availability */
.pa-week-form { display: grid; gap: 12px; }
/* Tidy lines (John, 23 Oct 2026): one column of days, each one line with pill times and a switch; tap to change. */
.pa-avail-form { gap: 22px; }
.pa-days { display: grid; gap: 8px; }
.pa-day { position: relative; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--pa-line); border-radius: 16px; background: #fff; }
.pa-day:has(.pa-switch input:checked) { border-color: #9FCB7A; }
.pa-day:has(.pa-switch input:not(:checked)) .pa-day-body { display: none; }
.pa-app .pa-day > .pa-switch { position: absolute; z-index: 1; top: 6px; right: 12px; }
.pa-day-head { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 8px 76px 8px 14px; list-style: none; cursor: pointer; }
.pa-day-head::-webkit-details-marker { display: none; }
.pa-day-name { flex: 0 0 5.8em; font-size: 15.5px; font-weight: 800; }
.pa-day-summary { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pa-time-pill { padding: 3px 9px; border-radius: 999px; background: #E3F5D0; color: #1E5A35; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa-day-off { color: var(--pa-muted); font-size: 13px; }
.pa-day-chevron { display: inline-flex; color: var(--pa-muted); transition: transform .15s; }
.pa-day-edit[open] .pa-day-chevron { transform: rotate(90deg); }
.pa-day:has(.pa-switch input:not(:checked)) .pa-day-chevron { visibility: hidden; }
.pa-day-body { padding: 0 14px 10px; }
.pa-app .pa-switch { position: relative; flex: 0 0 auto; display: inline-flex; padding: 6px 0; cursor: pointer; }
.pa-app .pa-switch input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.pa-switch-track { position: relative; width: 52px; height: 32px; border-radius: 999px; background: #C9D3CC; transition: background .15s; }
.pa-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.pa-switch input:checked + .pa-switch-track { background: var(--pa-green); }
.pa-switch input:checked + .pa-switch-track::after { transform: translateX(20px); }
.pa-switch input:focus-visible + .pa-switch-track { outline: 3px solid var(--pa-green); outline-offset: 2px; }
.pa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-chips-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pa-chips-stack { display: grid; }
.pa-app .pa-chip { position: relative; display: inline-flex; cursor: pointer; font-weight: 700; }
.pa-app .pa-chips-grid .pa-chip, .pa-app .pa-chips-stack .pa-chip { display: flex; }
.pa-app .pa-chip input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.pa-chip span { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--pa-line-strong); border-radius: 11px; background: #fff; color: var(--pa-ink); font-size: 14px; font-weight: 700; }
.pa-chip input:checked + span { border-color: var(--pa-forest); background: var(--pa-forest); color: #fff; }
.pa-chip input:focus-visible + span { outline: 3px solid var(--pa-green); outline-offset: 2px; }
.pa-chips-grid .pa-chip span { min-height: 52px; padding: 0 6px; font-size: 15px; font-weight: 800; }
.pa-chip-row span { justify-content: space-between; padding: 10px 14px; text-align: left; }
.pa-chip-row span::after { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-left: 12px; border: 2px solid #A9BAAE; border-radius: 50%; }
.pa-chip-row input:checked + span::after { border: 5px solid var(--pa-lime); background: var(--pa-forest); }
/* Your game: each question is one row of three short buttons (John, 23 Oct 2026). */
.pa-chips-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pa-app .pa-chips-row .pa-chip { display: flex; }
.pa-chips-row .pa-chip span { padding: 4px 6px; font-size: 13.5px; line-height: 1.2; text-align: center; }
/* The Availability tab's card only: a bare .pa-game also turned the Games tab's game rows into a stack. */
.pa-card.pa-game { display: grid; gap: 18px; }
.pa-card.pa-game .pa-fieldset { padding: 0; border: 0; }
.pa-card.pa-game .pa-help { margin: -4px 0 8px; }
.pa-app .time-windows { display: grid; gap: 8px; margin: 0 0 4px; }
.pa-day-error { margin: 4px 0; color: #6B1D16; font-size: 13px; font-weight: 700; }
.pa-day.pa-day-invalid:has(.pa-switch input:checked) { border-color: #D9786D; }
.pa-app .time-window { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.pa-app .time-window label { gap: 4px; color: var(--pa-muted); font-size: 12.5px; font-weight: 700; }
.pa-app .time-window select { min-height: 44px; padding: 0 8px; border: 1px solid var(--pa-line-strong); border-radius: 10px; background: #fff; color: var(--pa-ink); font-size: 16px; }
.pa-app .time-window .button { min-height: 44px; padding: 0 10px; border: 1px solid var(--pa-line-strong); border-radius: 10px; background: #fff; color: var(--pa-body); font-size: 13px; }
.pa-app .pa-day .time-window { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 40px; align-items: center; }
.pa-time-to { color: var(--pa-muted); font-size: 13px; font-weight: 700; }
.pa-app .pa-time-remove { width: 40px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--pa-muted); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.pa-app .pa-day-add { min-height: 40px; padding: 0 2px; border: 0; background: none; color: var(--pa-green); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.pa-saved { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 16px; font-weight: 800; }
.pa-savebar { position: sticky; z-index: 5; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); padding: 8px 0; background: linear-gradient(180deg, rgba(243, 246, 241, 0), var(--pa-ground) 35%); }
.pa-fieldset { min-width: 0; margin: 0; }
.pa-fieldset legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; font-size: 15px; font-weight: 800; }
.pa-fieldset legend + * { clear: both; }
.pa-list { margin: 0; padding: 4px 16px; list-style: none; }
.pa-list li { padding: 10px 0; font-size: 14px; }
.pa-list li + li { border-top: 1px solid #E7EEE8; }

/* Me */
.pa-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pa-card-head h2 { margin: 0; }
.pa-checklist { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; }
.pa-checklist li { min-height: 40px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pa-checklist .is-todo { color: #7A5600; font-weight: 700; }
.pa-tick { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-tick .pa-icon { stroke-width: 3.4; }
.pa-checklist .is-todo .pa-tick { background: #FFF0C2; color: #7A5600; }
.pa-name-form { display: grid; gap: 10px; }
.pa-app .pa-field { display: grid; gap: 6px; color: var(--pa-muted); font-size: 13px; font-weight: 700; }
.pa-app .pa-field input { min-height: 48px; padding: 0 14px; border: 1px solid var(--pa-line-strong); border-radius: 12px; background: #fff; color: var(--pa-ink); font-size: 16px; }
/* JOH-553 S3: travel section (postcode area, distance and per-town counts). */
/* The form posts back to #travel: land below the sticky top bar, not under it. */
.pa-app #travel { scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px)); }
.pa-travel { display: grid; gap: 12px; }
.pa-travel-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pa-app .pa-travel-fields input { text-transform: uppercase; }
.pa-app .pa-travel-fields input::placeholder { text-transform: none; }
.pa-app .pa-travel-fields select { width: 100%; min-height: 48px; padding: 0 10px; border: 1px solid var(--pa-line-strong); border-radius: 12px; background: #fff; color: var(--pa-ink); font-size: 16px; }
.pa-travel-default { display: flex; align-items: flex-start; gap: 8px; color: var(--pa-body); font-size: 13.5px; }
.pa-travel-default .pa-pill { flex: 0 0 auto; }
.pa-travel-saved { display: flex; align-items: center; gap: 8px; color: var(--pa-good); font-size: 13.5px; font-weight: 700; }
.pa-travel-saved .pa-pill { flex: 0 0 auto; }
.pa-travel-preview { display: grid; gap: 6px; }
.pa-travel-line { padding: 10px 12px; border-radius: 12px; background: var(--pa-soft); color: var(--pa-ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pa-travel-warning, .pa-travel-unsaved { padding: 10px 12px; border: 1px solid var(--pa-amber-line); border-radius: 12px; background: var(--pa-amber-bg); color: var(--pa-amber-ink); font-size: 13.5px; font-weight: 700; }
.pa-travel-source { margin-top: 2px; }
.pa-travel-source small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; }
.pa-activity summary { color: var(--pa-ink); font-weight: 800; cursor: pointer; }
.pa-activity .history { margin-top: 10px; }
.pa-app .history-item { grid-template-columns: 1fr; gap: 2px; border-color: #E7EEE8; font-size: 13.5px; }
.pa-app .history-item time { color: var(--pa-muted); font-size: 12px; }
.pa-app .pa-signout .pa-btn { color: var(--pa-body); }

/* Mates list (JOH-558): the Mates tab, laid out as John's post screens (WORDING.md, "Visual target").
   Its rows reuse .pa-chip, and its avatars the team sheet's .pa-squad-av and colours. In a row only the
   row itself is a <span>: the box is an <i>, the avatar and the name are <b>s and the tag is a <small>,
   so the .pa-chip span rules leave them alone. */
.pa-mates-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pa-mates-head .pa-pill { font-variant-numeric: tabular-nums; }
.pa-mate-av { flex: 0 0 auto; width: 30px; height: 30px; font-size: 12px; }
.pa-mate-av.is-anon { background: #fff; border: 1.5px solid var(--pa-line-strong); color: var(--pa-muted); }
/* Your squad is one grid: the heading with the lime count and Select all, the squad's boxes, then the
   buttons, full width at every size. A CSS counter counts only what comes before it, so the count follows
   the boxes in the markup and the grid shows it beside the heading, only while a box is ticked. */
.pa-mates-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 10px; counter-reset: pa-ticked; }
.pa-mates-pick > .pa-mate-rows, .pa-mates-pick > .pa-btn { grid-column: 1 / -1; }
.pa-mates-pick > .pa-code-mates-note { grid-column: 1 / -1; }
.pa-mates-ticked { grid-area: 1 / 2; display: none; background: var(--pa-lime); color: var(--pa-lime-ink); font-weight: 800; white-space: nowrap; }
.pa-mates-pick:has(input:checked) .pa-mates-ticked { display: block; }
.pa-mates-count::before { content: counter(pa-ticked); font-variant-numeric: tabular-nums; }
/* Select all (John, 6 Nov 2026), beside the count: the page's script shows it and does the ticking. */
.pa-app .pa-mates-all { grid-area: 1 / 3; min-height: 32px; padding: 0 2px; border: 0; background: none; color: var(--pa-green); font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.pa-app .pa-mates-all[hidden] { display: none; }
/* The squad as boxes (John, 6 Nov 2026: "boxes with their profile image and name, rather than in list order"),
   three to a row on a phone and four wider. Each box is still its mate's tick box's label; the drawn box sits
   in its corner. */
.pa-mate-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
@media (min-width: 520px) { .pa-mate-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pa-app .pa-mate-chip { display: flex; }
.pa-mate-chip input:checked { counter-increment: pa-ticked; }
.pa-app .pa-mate-chip span { position: relative; flex-direction: column; justify-content: flex-start; gap: 7px; min-height: 112px; padding: 14px 6px 10px; border: 1px solid var(--pa-line); border-radius: 16px; background: #fff; text-align: center; }
.pa-app .pa-mate-chip input:checked + span { border-color: var(--pa-forest); background: var(--pa-soft); box-shadow: inset 0 0 0 1px var(--pa-forest); color: var(--pa-ink); }
.pa-mate-box { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #9FB3A7; border-radius: 7px; background: #fff; color: var(--pa-lime-ink); }
.pa-mate-chip .pa-mate-box { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; }
.pa-mate-box .pa-icon { visibility: hidden; stroke-width: 3; }
.pa-mate-chip input:checked + span .pa-mate-box { border-color: var(--pa-forest); background: var(--pa-lime); }
.pa-mate-chip input:checked + span .pa-mate-box .pa-icon { visibility: visible; }
.pa-app .pa-mate-chip .pa-mate-av { width: 56px; height: 56px; font-size: 19px; }
/* A long first name ends with "…" on one line, never broken mid-word, so every box keeps its shape. */
.pa-mate-chip .pa-mate-name { flex: 0 0 auto; max-width: 100%; overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.pa-mate-chip .pa-pill { flex: 0 0 auto; padding: 2px 7px; font-size: 10.5px; white-space: nowrap; }
/* On the narrowest phones a smaller face, so the box in the corner never sits on it. */
@media (max-width: 359px) { .pa-app .pa-mate-chip .pa-mate-av { width: 46px; height: 46px; font-size: 16px; } .pa-mate-chip .pa-mate-box { top: 5px; right: 5px; width: 18px; height: 18px; } }
/* A mate with no saved times is greyed, in the page's own muted grey, which stays readable. */
.pa-mate-chip.is-off .pa-mate-name { color: var(--pa-muted); }
.pa-mate-chip.is-off .pa-mate-av { background: #EEF2EF; color: var(--pa-muted); }
/* Decision 7: a greyed mate's photo is greyed too, so the row still reads as "times not set" at a glance. */
.pa-mate-chip.is-off .pa-squad-img { filter: grayscale(1); }
.pa-app .pa-mates-pick .pa-btn-lime { margin-top: 2px; border-radius: 999px; }
.pa-mates-manage summary { padding: 12px 4px; }
.pa-mate-list { margin: 0; padding: 0; list-style: none; }
.pa-mate-list.pa-card { padding: 4px 16px; }
.pa-mate-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.pa-mate-row + .pa-mate-row { border-top: 1px solid #E7EEE8; }
.pa-mate-name { flex: 1 1 auto; min-width: 0; color: var(--pa-ink); font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.pa-mate-ask { display: grid; gap: 12px; }
.pa-mate-ask-text { display: flex; align-items: flex-start; gap: 12px; }
.pa-mate-ask-text p { color: var(--pa-body); font-size: 14px; }
.pa-mate-ask-text strong { color: var(--pa-ink); }
.pa-mate-answer { display: flex; gap: 8px; }
.pa-mate-answer .pa-form { flex: 1 1 0; }
.pa-app .pa-mate-answer .pa-btn { width: 100%; }
.pa-mate-add { display: grid; gap: 10px; }
.pa-mate-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px; list-style: none; }
.pa-mate-pick { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 6px; border: 1px solid var(--pa-line-strong); border-radius: 999px; background: #fff; }
.pa-mate-pick .pa-mate-name { flex: 0 1 auto; }
.pa-app .pa-mate-pick .pa-btn { border-radius: 999px; }
@media (min-width: 600px) {
  .pa-mate-add { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
/* Mates list (JOH-558, A3): Best times, a time's Register view and Your group, laid out as screens 2-4 of
   John's post. A best-times card is one big form button, so everything inside it is a span or a <b>. The
   chosen time and the group's date tile are lime, as the best card's. */
/* One column as wide as the page, never wider: a card full of avatars can't push the tab sideways. */
.pa-times { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pa-time { position: relative; }
.pa-app .pa-time-card { width: 100%; display: grid; gap: 9px; padding: 13px 14px; border: 1px solid var(--pa-line); border-radius: 20px; background: #fff; color: var(--pa-ink); font: inherit; line-height: 1.35; text-align: left; cursor: pointer; }
.pa-app .pa-time.is-best .pa-time-card, .pa-app .pa-time-pick { border: 2px solid var(--pa-forest); box-shadow: 0 0 0 3px var(--pa-lime); }
.pa-time.is-best .pa-date-tile, .pa-time-pick .pa-date-tile, .pa-group .pa-date-tile { background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-time-tag { position: absolute; z-index: 1; top: -11px; right: 14px; background: var(--pa-lime); color: var(--pa-lime-ink); font-weight: 800; }
.pa-time-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pa-time-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pa-time-main strong { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; }
.pa-time-main span { margin-top: 2px; color: var(--pa-muted); font-size: 13px; overflow-wrap: anywhere; }
.pa-time-frac { flex: 0 0 auto; display: flex; flex-direction: column; line-height: 1.05; text-align: right; }
.pa-time-frac strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pa-time-frac span { color: var(--pa-muted); font-size: 11.5px; font-weight: 700; }
.pa-time-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 60px; color: var(--pa-muted); font-size: 12.5px; font-weight: 700; }
/* The avatars overlap by 7px and wrap onto a new row when there are many (a full 8 v 8 group). Every
   avatar steps 7px left and the stack's 7px padding takes the first step, so each row starts level. */
.pa-time-stack { display: flex; flex-wrap: wrap; row-gap: 4px; padding-left: 7px; }
.pa-time-stack .pa-mate-av { width: 24px; height: 24px; margin-left: -7px; border: 2px solid #fff; font-size: 8.5px; }
.pa-time-pick, .pa-group { display: grid; gap: 12px; border-radius: 20px; }
.pa-time-label { color: #3F6957; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pa-time-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 6px; margin: 0; padding: 0; list-style: none; }
.pa-time-names li { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* A first name too long for its column ends in an ellipsis rather than breaking mid-word. */
.pa-time-names .pa-mate-name { font-size: 14.5px; overflow: hidden; overflow-wrap: normal; white-space: nowrap; text-overflow: ellipsis; }
.pa-time-not { color: var(--pa-muted); font-size: 13px; }
.pa-time-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; text-align: center; }
.pa-time-counts li { padding: 8px 4px 7px; border-radius: 13px; background: var(--pa-soft); color: var(--pa-body); font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.pa-time-counts strong { display: block; color: var(--pa-ink); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa-app .pa-time-register { border-radius: 999px; }
.pa-time-overfull, .pa-time-one { padding: 12px 14px; border: 1px solid var(--pa-amber-line); border-radius: 14px; background: var(--pa-amber-bg); color: var(--pa-amber-ink); font-size: 14px; font-weight: 700; text-align: center; }
.pa-time-fine { color: var(--pa-muted); font-size: 12px; text-align: center; }
.pa-group-status { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.pa-group-steps { margin: 0; padding: 0; list-style: none; }
.pa-group-step { min-height: 47px; display: flex; align-items: center; gap: 11px; font-size: 14.5px; font-weight: 700; }
.pa-group-step + .pa-group-step { border-top: 1px solid #EEF2EF; }
.pa-group-step-name { flex: 1 1 auto; min-width: 0; }
.pa-group-step .pa-pill { flex: 0 0 auto; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pa-group-dot { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.pa-group-step.is-done .pa-group-dot { background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-group-step.is-done .pa-group-dot .pa-icon { stroke-width: 3; }
.pa-group-step.is-next .pa-group-dot { border: 2px solid #E9C770; background: var(--pa-amber-bg); color: #7A5600; }
.pa-group-step.is-after .pa-group-dot { border: 2px dashed #B9C8BE; }
.pa-group-step.is-after .pa-group-step-name { color: var(--pa-muted); }
.pa-group-names { padding-top: 12px; border-top: 1px solid #EEF2EF; }
.pa-group-withdraw, .pa-time-back { align-self: flex-start; }
.pa-mate-when { white-space: nowrap; }
/* JOH-561 U1: Pick a time (its form) and Check this time. */
.pa-app .pa-mates-pick .pa-mates-pick-time { border-radius: 999px; }
.pa-plan { display: grid; gap: 14px; }
.pa-plan-when { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.pa-app .pa-plan-when select { width: 100%; min-height: 48px; padding: 0 10px; border: 1px solid var(--pa-line-strong); border-radius: 12px; background: #fff; color: var(--pa-ink); font-size: 16px; }
.pa-plan-venues { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pa-check-pitch { padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 800; }
.pa-check-pitch.is-good { background: var(--pa-lime); color: var(--pa-lime-ink); }
.pa-check-pitch.is-neutral { background: var(--pa-soft); color: var(--pa-ink); font-weight: 700; }
.pa-check-friends { margin: 0; padding: 0; list-style: none; }
.pa-check-friends li { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pa-check-friends li + li { border-top: 1px solid #EEF2EF; }
.pa-check-friends .pa-pill { flex: 0 0 auto; font-size: 11.5px; white-space: nowrap; }
.pa-check-warn { padding: 10px 12px; border: 1px solid var(--pa-amber-line); border-radius: 12px; background: var(--pa-amber-bg); color: var(--pa-amber-ink); font-size: 13.5px; font-weight: 700; }
/* Squad games (5 Nov 2026): the game code box, the reserves list and a whole game's code. */
.pa-plan-code-head { margin: 18px 0 8px; font-size: 15px; font-weight: 800; color: var(--pa-ink); }
.pa-reserves .pa-check-friends li { justify-content: space-between; }
.pa-reserves .pa-mate-name { overflow: hidden; overflow-wrap: normal; white-space: nowrap; text-overflow: ellipsis; }
.pa-app .pa-reserves select { flex: 0 1 auto; max-width: 58%; min-height: 40px; padding: 0 8px; border: 1px solid var(--pa-line-strong); border-radius: 10px; background: #fff; color: var(--pa-ink); font-size: 15px; }
.pa-group-code { margin: 10px 0 0; font-size: 15px; letter-spacing: 0.04em; }
.pa-group-open { margin-top: 8px; }
/* The captain deal (5 Nov 2026): how close the ticked mates bring the captain's next game. */
.pa-check-captain { padding: 10px 12px; border-radius: 12px; background: var(--pa-soft); color: var(--pa-ink); font-size: 13.5px; font-weight: 800; }
.pa-check-form { display: grid; gap: 10px; }
.pa-check-ok { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--pa-ink); font-size: 15px; font-weight: 800; cursor: pointer; }
.pa-app .pa-check-ok input { flex: 0 0 auto; width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--pa-forest); }
/* Phones up to 419px wide (most of them) get two names a row, so names like Jonathan or Mohammed fit whole.
   Wider screens keep the post's three a row. */
@media (max-width: 419px) {
  .pa-time-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .pa-time-counts strong { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .pa-pulse, .pa-squad-cam { animation: none; }
  .pa-setup-pulsing, .pa-setup-leaving { animation: none; }
  .pa-setup-pulsing .pa-setup-icon { animation: none; }
  .pa-switch-track, .pa-switch-track::after { transition: none; }
}
@media (max-width: 359px) {
  .pa-hero h1 { font-size: 26px; }
  .pa-chips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pa-steps ol { grid-template-columns: 1fr; }
}
/* Large phones on their side and tablets: fill the screen and lay cards out side by side. */
@media (min-width: 600px) {
  /* Landscape iPhones: keep content clear of the notch / Dynamic Island. */
  .pa-app { --pa-max: 760px; --pa-edge: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
  .pa-content { gap: 18px; padding-bottom: 32px; }
  .pa-content > :first-child:not(.pa-hero) { margin-top: 20px; }
  .pa-hero { padding-top: 34px; padding-bottom: 32px; }
  .pa-hero h1 { max-width: 22ch; font-size: 36px; }
  .pa-profile h1 { font-size: 30px; }
  .pa-hero .pa-lead { max-width: 40em; font-size: 16px; }
  .pa-hero-photo { padding-top: 120px; background-position: center, 62% 35%; }
  .pa-hero-tall { padding-top: clamp(120px, 20vh, 200px); }
  .pa-hero-compact { padding-top: 28px; padding-bottom: 26px; }
  .pa-hero-compact h1 { font-size: 32px; }
  .pa-hero-overlap { padding-bottom: 100px; }
  .pa-jump { max-width: 360px; }
  .pa-jump-3 { max-width: 480px; }
  .pa-slots, .pa-stack { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
  .pa-savebar .pa-btn, .pa-savebar .pa-saved, .pa-signout .pa-btn { max-width: 420px; margin-inline: auto; display: flex; }
  .pa-actions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .pa-name-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .pa-steps li { padding: 14px; }
}
/* Phones on their side: short screens, so the top bar scrolls away and the menu is slimmer. */
@media (min-width: 600px) and (max-width: 1023px) and (max-height: 520px) {
  .pa-app { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .pa-appbar { position: static; }
  .pa-nav-inner { padding-top: 4px; padding-bottom: 4px; }
  .pa-app .pa-nav-item { min-height: 48px; flex-direction: row; gap: 8px; font-size: 13px; }
  .pa-nav-pill { height: 28px; }
  .pa-savebar { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .pa-hero-photo { padding-top: 64px; }
  .pa-hero-tall { padding-top: 80px; }
}
/* Tablets on their side and computers: wider column, menu moves into the top bar. */
@media (min-width: 1024px) {
  .pa-app { --pa-max: 1080px; --pa-edge: max(32px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  /* Focused pages (a call-up, a booked game, your profile) keep a comfortable reading width. */
  .pa-app:has(.pa-hero-overlap), .pa-app:has(.pa-profile), .pa-app:has(.pa-avail-form) { --pa-max: 800px; }
  .pa-hero h1 { font-size: 44px; }
  .pa-hero-compact h1, .pa-profile h1 { font-size: 34px; }
  .pa-hero-tall { padding-top: clamp(150px, 24vh, 260px); padding-bottom: 44px; }
  .pa-appbar .pa-avatar { display: none; }
  .pa-nav { top: 0; bottom: auto; padding: env(safe-area-inset-top, 0px) 0 0; background: none; border: 0; pointer-events: none; }
  .pa-nav-inner { display: flex; justify-content: flex-end; gap: 4px; padding: 5px var(--pa-gutter); }
  .pa-app .pa-nav-item { min-height: 44px; flex-direction: row; gap: 6px; padding: 0 16px 0 10px; border-radius: 999px; color: var(--pa-on-dark); font-size: 14px; pointer-events: auto; }
  .pa-app .pa-nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .pa-app .pa-nav-item[aria-current="page"] { background: var(--pa-lime); color: var(--pa-lime-ink); }
  .pa-nav-pill, .pa-nav-item[aria-current="page"] .pa-nav-pill { width: auto; height: auto; background: none; color: inherit; }
  .pa-savebar { bottom: env(safe-area-inset-bottom, 0px); }
}
/* JOH-565: the Me tab's Your codes list */
.pa-codes-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .6rem; }
.pa-codes-list li { display: grid; gap: .1rem; }
.pa-codes-list span { color: var(--pa-muted, #5b6b65); font-size: .92rem; }
.pa-codes-more { margin-top: .6rem; }
.pa-codes-more summary { cursor: pointer; color: var(--pa-muted); font-size: .92rem; font-weight: 700; }

/* Squad games, Join a game and Create a new game (John, 6 Nov 2026): a game lobby in the page's own light look
   (John, the same day: the first, dark "videogame" version was "kinda overwhelming", its cards too large). White
   cards with a small tile for the venue's own logo, and the page's own chips. Everything is in this file: the
   page's rules allow no inline styles. */
.pa-app .pa-lobby { gap: 12px; }
.pa-lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 0; }
.pa-app .pa-lobby .pa-lobby-title { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.pa-lobby-squad { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border: 1px solid var(--pa-line); border-radius: 999px; background: #fff; color: var(--pa-ink); font-size: 13px; font-weight: 800; white-space: nowrap; }
.pa-lobby-faces { display: inline-flex; }
.pa-app .pa-lobby-faces .pa-mate-av { width: 24px; height: 24px; margin-left: -7px; border: 2px solid #fff; font-size: 8.5px; }
.pa-app .pa-lobby-faces .pa-mate-av:first-child { margin-left: 0; }
.pa-lobby-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #E4EBE3; }
.pa-lobby-tabs .pa-form { display: contents; }
.pa-app .pa-lobby-tab { display: grid; place-items: center; min-height: 40px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--pa-muted); font: inherit; font-size: 14px; font-weight: 800; text-align: center; cursor: pointer; }
.pa-app .pa-lobby-tab.is-on { background: #fff; color: var(--pa-ink); box-shadow: 0 1px 3px rgba(14, 31, 26, .14); cursor: default; }
.pa-lobby-filters { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--pa-line); border-radius: 18px; background: #fff; }
.pa-lobby-label { margin: 2px 0 0; color: var(--pa-muted); font-size: 12px; font-weight: 800; }
.pa-lobby-sorts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pa-app .pa-lobby-sort { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border: 1px solid var(--pa-line-strong); border-radius: 11px; background: #fff; color: var(--pa-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.pa-app .pa-lobby-sort.is-on { border-color: var(--pa-forest); background: var(--pa-forest); color: #fff; }
.pa-app .pa-lobby .pa-lobby-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pa-app .pa-lobby .pa-lobby-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pa-app .pa-lobby .pa-lobby-times .pa-chip { display: flex; }
.pa-app .pa-lobby .pa-lobby-chip span { min-height: 38px; padding: 0 10px; font-size: 13.5px; }
.pa-app .pa-lobby .pa-lobby-days .pa-lobby-chip span { padding: 0; font-size: 12.5px; }
.pa-app .pa-lobby .pa-lobby-times .pa-lobby-chip span { padding: 0 6px; font-size: 13px; }
.pa-app .pa-lobby .pa-lobby-times .pa-chip-tick { margin-right: 6px; }
/* On the narrowest phones the three times show each box above its name, as the days do. */
@media (max-width: 359px) { .pa-app .pa-lobby .pa-lobby-times .pa-lobby-chip span { flex-direction: column; gap: 3px; min-height: 52px; } .pa-app .pa-lobby .pa-lobby-times .pa-chip-tick { margin-right: 0; } }
/* Create a new game's groups (and Pick a time's), and Check this time's in the lobby, sit in their card without a box of
   their own. */
.pa-plan .pa-fieldset, .pa-app .pa-lobby .pa-fieldset { padding: 0; border: 0; }
/* John (6 Nov 2026): only a private game keeps a squad on one team, so with that rule on Keep my squad on my team
   shows only while Keep it private (or, with Join a game off, Organise a whole game) is picked. */
.pa-plan-open-half:not(:has(input[name="private"]:checked)):not(:has(input[name="mode"][value="whole"]:checked)) .pa-together-tick { display: none; }
/* Keep it private below 5 stars: shown, greyed and not tappable (its box is disabled). */
.pa-app .pa-lobby .pa-chip.is-off span { border-style: dashed; background: #F3F6F1; color: var(--pa-muted); cursor: not-allowed; }
.pa-app .pa-lobby .pa-chip.is-off .pa-chip-tick { opacity: .6; }
.pa-lobby-filters.is-live .pa-lobby-show { display: none; }
.pa-lobby-count { margin: 4px 4px 0; color: var(--pa-muted); font-size: 13px; font-weight: 800; }
.pa-lobby-empty { margin: 0; padding: 18px 14px; border: 1px dashed var(--pa-line-strong); border-radius: 16px; color: var(--pa-muted); font-size: 14px; text-align: center; }
.pa-lobby-grid { display: grid; gap: 10px; }
@media (min-width: 760px) { .pa-lobby-grid { grid-template-columns: 1fr 1fr; } }
.pa-lobby-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--pa-line); border-radius: 16px; background: #fff; }
.pa-lobby-row { display: flex; align-items: flex-start; gap: 12px; }
/* The venue's tile with its own logo: Goals' white words drawn dark, and only Woodhouse Grove's crest (its words
   are white too). A private game's captain sits on the tile's corner. */
.pa-lobby-mark { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: var(--pa-soft); color: var(--pa-forest-2); }
.pa-lobby-logo { display: block; max-width: 42px; max-height: 42px; }
.pa-lobby-logo.pa-logo-goals { filter: brightness(0); }
.pa-lobby-logo.pa-logo-woodhouse { width: 38px; height: 42px; max-width: none; object-fit: cover; object-position: 0 50%; }
.pa-lobby-photo, .pa-lobby-initials { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; }
.pa-lobby-photo { display: block; object-fit: cover; }
.pa-lobby-initials { display: grid; place-items: center; background: #EDE4FF; color: #3B2470; font-size: 11px; font-weight: 800; }
.pa-lobby-main { flex: 1; min-width: 0; }
.pa-lobby-when { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; color: var(--pa-ink); font-size: 15px; font-weight: 800; }
.pa-lobby-size { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: var(--pa-soft); color: var(--pa-forest-2); font-size: 12px; font-weight: 800; }
.pa-lobby-desc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 8px; color: var(--pa-muted); font-size: 13px; }
.pa-lobby-tag { padding: 2px 8px; border-radius: 999px; background: #EEF2EF; color: var(--pa-body); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pa-lobby-tag.is-good { background: #E3F5D0; color: var(--pa-good); }
.pa-lobby-tag.is-lock { background: #EDE4FF; color: #3B2470; }
/* Squads-only games (John, 10 Nov 2026): told apart from other games at a glance. */
.pa-lobby-tag.is-squads { background: #FFF1C9; color: #6A4A00; }
.pa-lobby-card.is-squads { border-color: #E9C46A; }
.pa-lobby-bar { display: flex; align-items: center; gap: 8px; color: var(--pa-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pa-lobby-bar svg { flex: 1; height: 6px; }
.pa-lobby-track { fill: #E4EBE3; }
.pa-lobby-fill { fill: var(--pa-green); }
.pa-lobby-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pa-lobby-free { display: flex; align-items: center; gap: 8px; color: var(--pa-muted); font-size: 12.5px; font-weight: 700; }
.pa-lobby-action { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.pa-lobby-card.is-locked .pa-lobby-action { width: 100%; }
.pa-app .pa-lobby-go { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--pa-lime); color: var(--pa-lime-ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.pa-app .pa-lobby-go.is-code { padding: 0 16px; background: var(--pa-forest); color: #fff; }
.pa-app .pa-lobby-code { flex: 1; width: 0; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--pa-line-strong); border-radius: 11px; background: #fff; color: var(--pa-ink); font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
/* The 11 v 11 box below 5 stars: shown, with its button locked (John). */
.pa-app .pa-btn-locked { cursor: not-allowed; opacity: .75; }
.pa-eleven-locked { display: grid; gap: 10px; }

/* Tick boxes (John, 6 Nov 2026): a picked box shows a check, not just its colour; an unpicked one a subtle empty box. */
.pa-chip-tick { flex: 0 0 auto; width: 18px; height: 18px; display: inline-grid; place-items: center; margin-right: 8px; border: 1.5px solid #9FB3A7; border-radius: 5px; background: #fff; color: var(--pa-lime-ink); }
.pa-chip-tick .pa-icon { visibility: hidden; stroke-width: 3.5; }
.pa-chip input:checked + span .pa-chip-tick { border-color: var(--pa-lime); background: var(--pa-lime); }
.pa-chip input:checked + span .pa-chip-tick .pa-icon, .pa-lobby-sort.is-on .pa-chip-tick .pa-icon { visibility: visible; }
.pa-app .pa-lobby-sort .pa-chip-tick { width: 16px; height: 16px; margin-right: 7px; }
.pa-app .pa-lobby-sort.is-on .pa-chip-tick { border-color: var(--pa-lime); background: var(--pa-lime); }
/* Pick your teams (John, 6 Nov 2026, his mock-up): a private game's captain places players in spots. The counts, a
   Dark | White tab per side, the side's formation and keeper, its pitch (attack at the top, the keeper at the bottom),
   then the bench. */
.pa-app .pa-tb { gap: 12px; }
.pa-tb-top { padding: 4px 4px 0; }
.pa-tb-top h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.pa-tb-top p { margin: 2px 0 0; color: var(--pa-muted); font-size: 13px; font-weight: 700; }
.pa-tb-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.pa-tb-count { display: grid; place-items: center; gap: 1px; padding: 7px 2px; border: 1px solid var(--pa-line); border-radius: 12px; background: #fff; }
.pa-tb-count b { color: var(--pa-ink); font-size: 17px; font-weight: 900; }
.pa-tb-count span { color: var(--pa-muted); font-size: 11px; font-weight: 800; }
.pa-tb-count.is-paid b { color: var(--pa-good); }
.pa-tb-count.is-paying b, .pa-tb-count.is-invited b { color: #7A5600; }
.pa-tb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #E4EBE3; }
.pa-app .pa-tb-tab { display: grid; place-items: center; min-height: 42px; border-radius: 10px; color: var(--pa-muted); font-size: 14px; font-weight: 800; text-align: center; text-decoration: none; }
.pa-tb-tab small { font-size: 11.5px; font-weight: 700; }
.pa-app .pa-tb-tab.is-on { background: #fff; color: var(--pa-ink); box-shadow: 0 1px 3px rgba(14, 31, 26, .14); }
.pa-tb-team, .pa-tb-bench { display: grid; gap: 8px; }
.pa-tb-label { margin: 0; color: var(--pa-muted); font-size: 12px; font-weight: 800; }
.pa-tb-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-app .pa-tb-choice .pa-chip span { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.pa-tb-choice.is-live .pa-tb-save { display: none; }
.pa-tb-pitch { position: relative; display: grid; gap: 14px; margin-top: 4px; padding: 18px 8px 16px; overflow: hidden; border-radius: 14px;
  background: repeating-linear-gradient(180deg, #5DAE63 0 34px, #57A65D 34px 68px); }
.pa-tb-pitch::before { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(255, 255, 255, .75); border-radius: 8px; pointer-events: none; }
.pa-tb-centre { position: absolute; left: 50%; top: 8px; width: 74px; height: 37px; border: 2px solid rgba(255, 255, 255, .75); border-top: 0; border-radius: 0 0 74px 74px; transform: translateX(-50%); }
.pa-tb-box { position: absolute; left: 50%; bottom: 8px; width: 150px; height: 58px; border: 2px solid rgba(255, 255, 255, .75); border-bottom: 0; transform: translateX(-50%); }
.pa-tb-row { position: relative; display: flex; justify-content: space-evenly; gap: 4px; }
.pa-app .pa-tb-spot { position: relative; display: grid; justify-items: center; gap: 2px; width: 72px; padding: 4px 0; border-radius: 12px; color: #fff; text-decoration: none; }
.pa-app .pa-tb-spot .pa-squad-av { width: 46px; height: 46px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.pa-tb-spot > span:not(.pa-tb-plus) { max-width: 72px; overflow: hidden; color: #fff; font-size: 12.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.pa-tb-spot small { padding: 0 6px; border-radius: 999px; background: rgba(11, 33, 27, .55); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.pa-tb-plus { display: grid; place-items: center; width: 46px; height: 46px; border: 2px dashed rgba(255, 255, 255, .9); border-radius: 50%; font-size: 22px; font-weight: 700; }
.pa-tb-spot.is-picked .pa-tb-plus, .pa-tb-spot.is-picked .pa-squad-av { border: 3px solid var(--pa-lime); box-shadow: 0 0 0 4px rgba(198, 242, 126, .45); }
.pa-tb-spot.is-picked .pa-tb-plus { background: rgba(198, 242, 126, .25); }
.pa-tb-spot.is-you .pa-squad-av { border-color: var(--pa-lime); }
.pa-tb-badge { position: absolute; top: 0; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #FFF0C2; font-size: 11px; font-style: normal; }
.pa-tb-hint { margin: 0; color: var(--pa-muted); font-size: 12.5px; }
.pa-tb-off { width: fit-content; }
.pa-tb-bench-head { display: flex; align-items: center; gap: 8px; }
.pa-tb-bench-head h3 { font-size: 15px; font-weight: 800; }
.pa-tb-bench ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pa-tb-bench-row { display: flex; align-items: center; gap: 10px; }
.pa-tb-bench-row .pa-squad-av { width: 40px; height: 40px; font-size: 14px; }
.pa-tb-bench-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pa-tb-bench-name b { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.pa-tb-bench-name .pa-pill { width: fit-content; padding: 1px 8px; font-size: 11px; }
.pa-app .pa-tb-put { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pa-lime); color: var(--pa-lime-ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pa-app .pa-tb-open { width: fit-content; margin-top: 4px; }
/* The Games tab: the viewer's own team, as its captain placed it. */
.pa-tb-mine { display: grid; gap: 8px; margin-top: 16px; }
.pa-tb-mine .pa-teams-title, .pa-tb-mine .pa-teams-note { margin: 0; }

/* The seven days and the four sizes sit in one row: each box above its name. */
.pa-app .pa-lobby .pa-lobby-days .pa-chip span, .pa-app .pa-lobby .pa-chips-grid .pa-chip span { flex-direction: column; gap: 4px; min-height: 52px; white-space: nowrap; }
.pa-app .pa-lobby .pa-lobby-days .pa-chip-tick, .pa-app .pa-lobby .pa-chips-grid .pa-chip-tick { width: 14px; height: 14px; margin-right: 0; }
.pa-app .pa-lobby .pa-lobby-days .pa-chip-tick .pa-icon, .pa-app .pa-lobby .pa-chips-grid .pa-chip-tick .pa-icon { width: 11px; height: 11px; }

/* Cancel my place (John, 14 Nov 2026): the card's link, its pop-up, the cancelled card and the Super sub badge. */
.pa-app .pa-cancel { padding: 0 16px 14px; }
.pa-app .pa-cancel-link { display: inline-block; list-style: none; cursor: pointer; color: var(--pa-muted); font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pa-app .pa-cancel-link::-webkit-details-marker { display: none; }
.pa-app .pa-cancel-sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; padding: 16px; background: rgba(11, 33, 27, .55); }
.pa-app .pa-cancel-box { width: 100%; max-width: var(--pa-max); padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(11, 33, 27, .25); }
.pa-app .pa-cancel-box h3 { margin: 0 0 8px; color: var(--pa-ink); font-size: 20px; }
.pa-app .pa-cancel-box p { margin: 0 0 10px; color: var(--pa-body); font-size: 15px; line-height: 1.45; }
.pa-app .pa-cancel-box .pa-cancel-fine { color: var(--pa-muted); font-size: 13px; }
.pa-app .pa-btn-cancel { margin-top: 6px; background: #B3261E; color: #fff; }
.pa-app .pa-btn-cancel:hover { background: #9A1F18; }
.pa-app .pa-cancel-keep { margin-top: 10px; }
.pa-app .pa-cancel-late { margin: 0; padding: 0 16px 14px; color: var(--pa-muted); font-size: 13.5px; }
.pa-app .pa-cancel-late a { color: var(--pa-forest); font-weight: 700; }
.pa-app .pa-cancelled-body { padding: 0 14px 14px; }
.pa-app .pa-cancelled-body p { margin: 0; color: var(--pa-body); font-size: 14px; line-height: 1.45; }
.pa-app .pa-cancelled-body .pa-form { margin-top: 10px; }
.pa-gk-badge { display: inline-flex; flex: none; align-items: center; gap: 2px; margin-top: 2px; padding: 1px 6px; border-radius: 999px; background: var(--pa-lime); color: var(--pa-lime-ink); font-size: 10px; font-style: normal; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.pa-gk-badge i { font-style: normal; }
.pa-tb-spot .pa-gk-badge { position: absolute; top: 0; left: 2px; z-index: 1; margin: 0; padding: 0 4px; font-size: 9px; }
.pa-tb-bench-name b .pa-gk-badge { margin: 0 0 0 6px; vertical-align: middle; }
.pa-super-sub { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 999px; background: #FFD54F; color: #3D2E05; font-size: 10px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
