/* Driffield Rec Tennis — colours taken from the club crest:
   royal blue field, silver bars, green pale, gold wheat and ram, helmet red. */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --ink: #0e1c2f;
  --muted: #586579;
  --line: #d6dbe2;
  --blue: #00509e;
  --blue-soft: #e2ecf7;
  --pale: #09703c;        /* confirmed / member */
  --pale-soft: #e0f0e6;
  --gold: #8a6d0e;        /* coaching text */
  --gold-line: #cbab36;
  --gold-soft: #f8efcc;
  --red: #b3372b;         /* errors, cancel */
  --red-soft: #f7e3e0;
  --silver: #d8d9d7;
  --taken: #e9ebee;
  --on-accent: #ffffff;
  --radius: 10px;
  --display: "Lato", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
}
:root { color-scheme: light; }
/* Dark colours apply when the device is in dark mode (unless the visitor picked light with the toggle),
   or whenever the visitor picked dark with the toggle. theme.js sets data-theme on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220; --surface: #111c2e; --ink: #e8eef6; --muted: #95a3b8; --line: #23324a;
    --blue: #5f9fe6; --blue-soft: #142a4a; --pale: #4fc283; --pale-soft: #10301f;
    --gold: #e6c955; --gold-soft: #2e2710; --red: #ee7d70; --red-soft: #3a1915;
    --silver: #5c6573; --taken: #1a2537; --on-accent: #06101e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220; --surface: #111c2e; --ink: #e8eef6; --muted: #95a3b8; --line: #23324a;
  --blue: #5f9fe6; --blue-soft: #142a4a; --pale: #4fc283; --pale-soft: #10301f;
  --gold: #e6c955; --gold-soft: #2e2710; --red: #ee7d70; --red-soft: #3a1915;
  --silver: #5c6573; --taken: #1a2537; --on-accent: #06101e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
main { max-width: 980px; margin: 0 auto; padding: 20px 16px 64px; }
main.narrow { max-width: 560px; }
h1, h2 { font-family: var(--display); text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: 1.6rem; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 24px 0 10px; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
a { color: var(--blue); }

/* Header: crest + ribbon (the scroll on the crest) + blue/silver bars (the shield) */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.crest { width: 68px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(10, 42, 82, .18)); }
.brand-text { isolation: isolate; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.ribbon { position: relative; margin: 0 12px; font-family: var(--display); font-weight: 900; text-transform: uppercase;
  letter-spacing: .06em; font-size: 1.35rem; line-height: 1; color: #fff; background: #00509e; padding: 9px 18px 8px;
  border-top: 2px solid #0a2a52; border-bottom: 2px solid #0a2a52; white-space: nowrap; }
.ribbon::before, .ribbon::after { content: ""; position: absolute; top: 6px; bottom: -8px; width: 16px; background: #0a2a52; z-index: -1; }
.ribbon::before { left: -12px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -12px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
/* Light / dark toggle (added to every header by theme.js) */
.theme-toggle { margin-left: auto; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle svg { width: 20px; height: 20px; }
.brand-sub { margin: 0; padding-left: 12px; font-size: .95rem; color: var(--muted); }
.bars { height: 14px; margin: 16px 0 18px; border-radius: 3px; opacity: .9;
  background: repeating-linear-gradient(to bottom, var(--blue) 0 3.5px, var(--silver) 3.5px 7px); }

.banner { padding: 11px 14px; border-radius: var(--radius); margin: 0 0 16px; background: var(--blue-soft); }
.banner.warn { background: var(--red-soft); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--gold-soft); }

/* Day picker */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.day { flex: 0 0 auto; min-width: 64px; text-align: center; padding: 7px 10px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: inherit; font-variant-numeric: tabular-nums; }
.day small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.day[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.day[aria-pressed="true"] small { color: inherit; opacity: .85; }

/* Court grid */
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 0 0 10px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l-free::before { background: var(--surface); border: 1.5px solid var(--blue); }
.legend .l-booked::before { background: var(--taken); border: 1px solid var(--line); }
.legend .l-coaching::before { background: var(--gold-soft); border: 1.5px solid var(--gold-line); }
.legend .l-club::before { background: var(--blue-soft); border: 1.5px solid var(--blue); }
.legend .l-comp::before { background: var(--pale-soft); border: 1.5px solid var(--pale); }

.grid { display: grid; grid-template-columns: 58px repeat(3, 1fr); gap: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.grid .head { font-family: var(--display); font-weight: 700; text-align: center; padding: 4px 0 8px; }
.grid .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; display: flex; align-items: center; }
.slot { font: inherit; border-radius: 8px; padding: 8px 4px; min-height: 40px; text-align: center; font-size: .84rem; border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center; }
.slot.free { background: var(--surface); border: 1.5px solid var(--blue); color: var(--blue); cursor: pointer; font-weight: 700; }
.slot.free:hover, .slot.free:focus-visible { background: var(--blue); color: var(--on-accent); outline: none; }
.slot.booked, .slot.past { background: var(--taken); color: var(--muted); }
.slot.past { opacity: .5; }
.slot.club { background: var(--blue-soft); color: var(--blue); border: 1.5px solid var(--blue); font-weight: 600; }
.slot.comp { background: var(--pale-soft); color: var(--pale); border: 1.5px solid var(--pale); font-weight: 600; }
.slot.coaching { background: var(--gold-soft); color: var(--gold); border: 1.5px solid var(--gold-line); font-weight: 600; }
.loading { opacity: .5; pointer-events: none; }

/* Booking dialog */
dialog { border: none; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(6, 16, 30, .5); }
dialog form { padding: 22px; }
dialog h2 { margin-top: 0; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 4px; }
input, textarea { width: 100%; font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.price { background: var(--blue-soft); border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: .88rem; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.btn { font: inherit; font-weight: 700; border-radius: 8px; padding: 9px 16px; border: 1.5px solid var(--blue); background: var(--blue); color: var(--on-accent); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.small { padding: 5px 10px; font-size: .82rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.error { color: var(--red); font-weight: 600; margin-top: 10px; min-height: 1.2em; }

.code { font-family: var(--display); font-size: 2.3rem; font-weight: 900; letter-spacing: .22em; background: var(--pale-soft); color: var(--pale);
  border: 2px solid var(--pale); display: inline-block; padding: 8px 20px; border-radius: 12px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }

/* Admin */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 8px; }
.row .w { min-width: 140px; font-variant-numeric: tabular-nums; }
.row input { width: auto; flex: 1; min-width: 120px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.pill { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.pill.member { background: var(--pale-soft); color: var(--pale); }

/* Site navigation (Home / Book a court / Club shop / Coaching) and admin tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.tabs a, .tabs button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 7px 10px;
  border-radius: 7px; cursor: pointer; text-decoration: none; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--blue); color: var(--on-accent); }
.basket-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; font-size: .75rem;
  background: var(--gold-line); color: #0e1c2f; text-align: center; }
.basket-count:empty { display: none; }

/* Shop */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.product .photo { aspect-ratio: 1; max-width: 100%; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; }
.product .photo img { width: 100%; height: 100%; object-fit: cover; }
.product .photo .ph { font-family: var(--display); font-weight: 900; color: var(--blue); opacity: .35; font-size: 2.4rem; }
.product .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product h3 { font-family: var(--display); font-size: 1rem; margin: 0; }
.product .desc { color: var(--muted); font-size: .86rem; margin: 0; }
.product .price { font-weight: 700; font-variant-numeric: tabular-nums; background: none; padding: 0; margin: 0; }
.product .price small { color: var(--pale); font-weight: 600; }
.stock-note { font-size: .78rem; font-weight: 700; color: var(--muted); }
.stock-note.in { color: var(--pale); }
.stock-note.out { color: var(--red); }
.stock-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stock-grid label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; width: 76px; }
.stock-grid input { padding: 6px 8px; }
.product .controls { display: flex; gap: 8px; margin-top: auto; }
.product select, .product .qty { font: inherit; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.product select { flex: 1; min-width: 0; }
.product .qty { width: 64px; }
.product .btn { width: 100%; }

.basket { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.basket h2 { margin: 0; }
.basket-lines { display: flex; flex-direction: column; gap: 8px; }
.bline { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.bline .meta { color: var(--muted); font-size: .82rem; display: flex; gap: 10px; align-items: center; }
.bline .meta button { font: inherit; font-size: .8rem; color: var(--red); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.bline .amt { font-variant-numeric: tabular-nums; text-align: right; }
.basket .total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.basket label { margin: 4px 0 2px; }
.member-note { background: var(--pale-soft); color: var(--ink); border-radius: 8px; padding: 9px 12px; font-size: .86rem; }
.member-note strong { color: var(--pale); }
.empty { color: var(--muted); }

/* Order statuses */
.status { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.status.paid { background: var(--gold-soft); color: var(--gold); }
.status.ordered { background: var(--blue-soft); color: var(--blue); }
.status.ready { background: var(--pale-soft); color: var(--pale); }
.status.collected { background: var(--taken); color: var(--muted); }
.status.cancelled { background: var(--red-soft); color: var(--red); }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--blue-soft); display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-top: 14px; }
.check input { width: auto; }

/* Home page */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.hero h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 10px; line-height: 1.15; }
.hero p { margin: 0 0 18px; font-size: 1.05rem; max-width: 52ch; }
.hero .crest-big { width: 170px; max-width: 100%; height: auto; filter: drop-shadow(0 4px 8px rgba(10, 42, 82, .18)); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.info-card h3 { font-family: var(--display); font-size: 1.1rem; margin: 0; }
.info-card p { margin: 0; color: var(--muted); }
.info-card .btn { margin-top: auto; align-self: flex-start; }
.kicker, .info-card .kicker { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.contact-card select { width: 100%; font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.contact-card textarea { resize: vertical; }
.stack-cards { display: flex; flex-direction: column; gap: 14px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
/* ───── Have a Go competition ───── */
.event-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.event-picker label { position: relative; margin: 0; display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; background: var(--bg); font-weight: 700; }
.event-picker label small { font-weight: 400; color: var(--muted); }
.event-picker input { position: absolute; opacity: 0; pointer-events: none; }
.event-picker label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.event-picker label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.avail-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px; }
.avail-count { margin-left: auto; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.avail-wrap { overflow-x: auto; }
.avail-table { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 330px; }
.avail-table th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; border: 0; padding: 2px; }
.avail-table th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; white-space: nowrap; font-size: .8rem; }
.avail-table td { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px; vertical-align: top; text-align: center; }
.avail-table td.off { background: transparent; border-color: transparent; }
.avail-date { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.slot-chip { display: block; width: 100%; font: inherit; font-size: .78rem; font-weight: 700; padding: 5px 2px; margin-top: 3px; border-radius: 6px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.slot-chip[aria-pressed="true"], .slot-chip.on { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
span.slot-chip { cursor: default; }
.comp-tabs { margin: 4px 0 14px; width: max-content; max-width: 100%; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.league td:nth-child(2) { white-space: nowrap; }
.league td:first-child { width: 22px; color: var(--muted); }
.league td.num, .league th.num { text-align: center; width: 34px; }
.fixture { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.fixture .when { font-variant-numeric: tabular-nums; font-size: .88rem; }
.fixture .when small { display: block; color: var(--muted); }
.fixture .teams { min-width: 0; }
.fixture .teams .w { font-weight: 700; }
.fixture .score { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ko { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.ko-round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.ko-round h4 { margin: 0 0 4px; font-family: var(--display); font-size: .9rem; color: var(--blue); }
.ko-match { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; font-size: .88rem; }
.ko-match div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; }
.ko-match div + div { border-top: 1px solid var(--line); }
.ko-match .w { font-weight: 700; background: var(--pale-soft); color: var(--pale); }
.ko-match small { display: block; padding: 4px 10px; color: var(--muted); background: var(--bg); border-top: 1px solid var(--line); }
.score-form { display: grid; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 8px; }
.score-form .sets { display: grid; grid-template-columns: minmax(0, 170px) repeat(3, 56px); justify-content: start; gap: 6px; align-items: center; font-size: .88rem; }
.score-form .sets input { padding: 6px; text-align: center; }
.mini-select { font: inherit; font-size: .85rem; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.group-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.group-col { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.group-col h3 { margin: 0 0 6px; font-size: 1rem; }
.group-pair { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.score-form .one-set { grid-template-columns: minmax(0, 200px) 70px; }
.score-form .one-set label { margin: 0; font-weight: 400; }
.league td.games { white-space: nowrap; }
.contact-line { font-size: .86rem; color: var(--muted); }
.contact-line a { color: var(--blue); }
.callout { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #00509e; color: #fff; border-radius: 14px; padding: 18px 20px; margin-top: 16px; }
.callout h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.2rem; color: #fff; }
.callout p { margin: 0; opacity: .9; }
.callout .btn { background: #fff; color: #00509e; border-color: #fff; }
@media (max-width: 640px) {
  .event-picker, .two-col { grid-template-columns: 1fr; }
  .fixture { grid-template-columns: 1fr auto; }
  .fixture .when { grid-column: 1 / -1; }
}

/* Join page */
.renew-card .error:empty { display: none; }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin-top: 16px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.price-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.price-card h3 { margin: 0; font-family: var(--display); font-size: 1.1rem; }
.price-card p { margin: 0; font-size: .9rem; }
.price-card .amount { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--blue); margin-top: auto; padding-top: 6px; font-variant-numeric: tabular-nums; }
.price-card .amount span { font-family: var(--body); font-weight: 400; font-size: .9rem; color: var(--muted); }
.price-card .monthly { color: var(--muted); }
.renew-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 10px 20px; align-items: center; }
.renew-form { display: flex; gap: 8px; }
.renew-form input { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fs { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.fs legend { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; padding: 0; }
.two-col .full { grid-column: 1 / -1; }
.type-picker, .pay-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.type-picker label, .pay-picker label { position: relative; margin: 0; display: flex; flex-direction: column; gap: 3px; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--bg); font-weight: 400; }
.type-picker label .muted, .pay-picker label .muted { font-size: .84rem; }
.type-picker label .amount { font-weight: 700; color: var(--blue); margin-top: auto; }
.type-picker input, .pay-picker input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.type-picker label.on, .pay-picker label.on { border-color: var(--blue); background: var(--blue-soft); }
.type-picker label:has(input:focus-visible), .pay-picker label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.person { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr auto; gap: 0 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.person .btn { margin-bottom: 4px; }
#add-person { margin-top: 10px; }
.rules { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg); margin-bottom: 8px; }
.rules summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.rules ul { margin: 8px 0 2px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.bank-box { white-space: pre-wrap; background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 12px 14px; border-radius: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .renew-card { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr 1fr; }
  .person > div:first-child { grid-column: 1 / -1; }
}

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.stat b { display: block; font-family: var(--display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat.warn b { color: var(--red); }
.types-table input { padding: 6px 8px; }
.types-table td { vertical-align: middle; }
.mb-detail { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.mb-detail summary { cursor: pointer; color: var(--blue); }

/* Sponsor page */
.sponsor-hero .kicker { display: block; margin-bottom: 6px; }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 14px; }
.package { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.package h3 { font-family: var(--display); margin: 0; font-size: 1.1rem; }
.package ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.package.featured { border: 2px solid var(--blue); background: var(--blue-soft); }
.pkg-price { margin: 0; font-weight: 700; color: var(--blue); }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.sponsor { display: flex; align-items: center; justify-content: center; min-height: 96px; border-radius: 12px; border: 1px solid var(--line);
  background: #ffffff; padding: 12px; text-decoration: none; }
.sponsor img { max-height: 72px; max-width: 100%; object-fit: contain; }
.sponsor.empty { border: 2px dashed var(--line); background: transparent; color: var(--muted); font-weight: 600; }
.sponsor.empty:hover { border-color: var(--blue); color: var(--blue); }
.sponsor-strip { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-top: 16px; background: var(--surface); }
.sponsor-strip h3 { font-family: var(--display); margin: 0 0 4px; }
.sponsor-strip p { margin: 0; color: var(--muted); }

.site-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.site-footer a { color: var(--muted); }
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero .crest-big { display: none; }
}

@media (max-width: 820px) {
  .shop-layout { grid-template-columns: 1fr; }
  .basket { position: static; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 44px repeat(3, 1fr); padding: 8px; gap: 4px; }
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; justify-content: flex-start; }
  .tabs a, .tabs button { padding: 7px 8px; font-size: .86rem; white-space: nowrap; }
  /* keep crest, club name and the light/dark switch on one line */
  header.top { gap: 10px; }
  .brand { gap: 10px; }
  .crest { width: 48px; }
  .ribbon { font-size: .9rem; padding: 7px 10px 6px; }
  .theme-toggle { width: 36px; height: 36px; }
  .slot { font-size: .76rem; }
  .brand-sub { font-size: .88rem; }
}
@media (max-width: 380px) {
  .crest { width: 40px; }
  .ribbon { font-size: .78rem; padding: 6px 8px 5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
