/* Picklebar: one stylesheet, no framework.
   Look: a clubhouse sign-up sheet. Warm paper, ink lines, court green, ball yellow.
   Built for easy reading: 18px+ text, 56px buttons, strong contrast, no tiny icons. */

:root {
  --paper: #f3eee2;
  --paper-2: #e8e1d0;
  --card: #fcfaf4;
  --ink: #17251d;
  --ink-2: #44544a;
  --ink-3: #78837b;
  --rule: #d9d0be;
  --rule-2: #b9ae97;
  --court: #1f5c46;
  --court-2: #164434;
  --line: #f6f3ea;            /* court-line white */
  --ball: #dceb3a;
  --brick: #a63a24;
  --brick-bg: #f6e2da;
  --ok: #2b6a3d;
  --ok-bg: #dfecd7;
  --r: 6px;
  --body: 'Atkinson Hyperlegible', Verdana, sans-serif;
  --display: 'Big Shoulders Display', 'Big Shoulders', 'Arial Narrow', Impact, sans-serif;
  --row: 44px;                /* one time step on the court sheet */
  --head: 50px;
  --timecol: 60px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.45 var(--body);
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.h3 { font-size: 26px; }
p { margin: 0; }
a { color: var(--court); text-underline-offset: 3px; text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--court); outline-offset: 2px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1040px; }
.narrow { max-width: 560px; }
.page { padding-top: 28px; padding-bottom: 96px; }
.stack { display: grid; gap: 12px; }
.center { text-align: center; }
.loading { color: var(--ink-3); }

/* ---------- header: court-green bar with a white court line ---------- */
.top { background: var(--court); color: var(--line); border-bottom: 3px solid var(--line); }
.top :focus-visible { outline-color: var(--ball); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--line); text-decoration: none; font: 900 32px/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; }
.brand-badge { width: 44px; height: 44px; flex: none; }
.me { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--line); text-decoration: none; font-weight: 700; }
.initials { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ball); color: var(--ink); font: 800 19px/1 var(--display); letter-spacing: 0.04em; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 8px 12px 10px; color: var(--line); opacity: 0.82; text-decoration: none; white-space: nowrap;
  font: 800 21px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 6px solid transparent; margin-bottom: -3px;
}
.tabs a:hover { opacity: 1; }
.tabs a.on { opacity: 1; border-bottom-color: var(--ball); }
@media (max-width: 480px) { .me-name { display: none; } .brand { font-size: 28px; } }

/* ---------- type ---------- */
.kicker { margin-bottom: 10px; color: var(--court); font: 800 17px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.page-title { font-size: clamp(44px, 10vw, 64px); }
.page-title + .card, .page-title + form { margin-top: 24px; }
.lede { max-width: 34em; margin: 12px 0 24px; color: var(--ink-2); font-size: 20px; }
.note { color: var(--ink-2); font-size: 16px; }
.sub { margin: 8px 0 20px; color: var(--ink-2); font-size: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 22px;
  border: 2px solid var(--ink); border-radius: var(--r);
  background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 18px; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 64px; font-size: 20px; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 16px; }
.btn.primary { background: var(--court); border-color: var(--court-2); color: var(--line); }
.btn.primary:hover { background: var(--court-2); }
.btn.danger { background: transparent; border-color: var(--brick); color: var(--brick); }
.btn.danger:hover { background: var(--brick-bg); }
.btn.quiet { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn.quiet:hover { background: var(--paper-2); }
.btn.apple { background: #000; border-color: #000; color: #fff; }
.btn.apple:hover { background: #222; }
.btn.google { background: #fff; border-color: #747775; color: #1f1f1f; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn[aria-busy='true']::after { content: '…'; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 17px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 56px; padding: 10px 14px;
  border: 2px solid var(--ink); border-radius: var(--r); background: var(--card);
  font-size: 19px;
}
textarea { min-height: 50vh; line-height: 1.5; resize: vertical; }
select { appearance: none; padding-right: 44px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2317251d' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--ball); outline-offset: 0; border-color: var(--court); }
.code-input { font-size: 30px !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.check input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--court); }
.form-error { color: var(--brick); font-weight: 700; }
.form-error:empty { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.seg { display: flex; margin-bottom: 16px; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.seg button { flex: 1; min-height: 50px; border: 0; background: var(--card); font-weight: 700; cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

.card { padding: 20px; margin-bottom: 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.chip { display: inline-block; padding: 3px 8px; border-radius: 4px; background: var(--paper-2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.no { background: var(--brick-bg); color: var(--brick); }
.chip.admin { background: var(--ink); color: var(--paper); }
.banner { margin: 0 0 14px; padding: 12px 16px; border-left: 6px solid var(--ball); background: var(--card); font-weight: 700; }
.count { margin: -8px 0 16px; color: var(--ink-2); }
.banner.limit { font-weight: 400; }
.banner.limit .btn { margin-top: 10px; }
.held { margin: 0 0 20px; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.held li { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.held span { color: var(--ink-2); }
.flag { display: inline-block; margin-top: 10px; padding: 6px 10px; border-radius: 4px; background: var(--brick-bg); color: var(--brick); font-weight: 700; font-size: 16px; }
.flag.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- sign-in ---------- */
.hero { position: relative; overflow: hidden; background: var(--court); color: var(--line); }
.hero .court-art { position: absolute; right: -60px; bottom: -40px; width: 620px; max-width: none; color: var(--line); opacity: 0.32; }
.hero-in { position: relative; padding-top: 36px; padding-bottom: 56px; }
.hero-badge { position: absolute; top: 22px; right: 16px; width: clamp(130px, 32vw, 230px); height: auto; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.25)); }
@media (max-width: 480px) { .hero-badge { position: static; display: block; width: 150px; margin: -8px 0 16px; } }
.hero h1 { font-size: clamp(76px, 20vw, 132px); line-height: 0.84; font-weight: 900; }
.hero-sub { max-width: 20em; margin-top: 18px; font-size: 21px; }
.signin { margin-top: -28px; position: relative; }
.signin-card { padding: 24px 20px; box-shadow: 6px 6px 0 var(--ink); }
.signin-card h2 { font-size: 40px; }
.signin-card > .note { margin: 6px 0 18px; }
.providers { gap: 10px; }
.gsi { display: flex; justify-content: center; min-height: 44px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--ink-2); font-size: 16px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 2px dashed var(--rule-2); }
.devcode { padding: 10px 12px; border: 2px dashed var(--court); border-radius: var(--r); background: #fffbe0; }
.devbox { margin-top: 28px; padding: 18px; border: 2px dashed var(--ink-2); border-radius: 10px; background: #fffbe0; }
.devbox h3 { margin-bottom: 12px; font-size: 26px; }
.devbox [data-reset] { margin-top: 16px; }
.devbox > .note { margin-top: 6px; }
.dev-users { display: grid; gap: 8px; }
.dev-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); text-align: left; cursor: pointer; }
.dev-user:hover { background: #fff; }
.dev-user b, .dev-user small { display: block; }
.dev-user small { color: var(--ink-2); font-size: 15px; }

/* ---------- day strip: tear-off calendar pages ---------- */
.days { display: flex; gap: 8px; padding: 4px 2px 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.day { flex: 0 0 68px; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); color: var(--ink); text-align: center; text-decoration: none; scroll-snap-align: start; }
.day .dow { display: block; padding: 6px 0 5px; background: var(--ink); color: var(--paper); font: 800 15px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.day .num { display: block; padding-top: 6px; font: 800 34px/1 var(--display); }
.day .mon { display: block; padding-bottom: 7px; color: var(--ink-2); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.day:hover { background: #fff; }
.day.on { background: var(--ball); }
.day.on .dow { background: var(--court); }

.day-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 4px; }
.day-title h2 { font-size: 32px; }
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav input { width: auto; min-height: 44px; font-size: 16px; padding: 6px 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; }
.legend i { display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; border-radius: 3px; border: 1.5px solid var(--rule-2); }
.k-open { background: var(--card); }
.k-taken { background: repeating-linear-gradient(135deg, #e4dccb 0 4px, #f0eadc 4px 8px); }
.k-mine { background: var(--ball); border-color: var(--ink) !important; }
.k-block { background: var(--court); border-color: var(--court) !important; }

/* ---------- the court sheet grid ---------- */
.sheet { margin-top: 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); overflow: clip; }
.grid { position: relative; display: grid; }
.corner, .court-h { position: sticky; top: 0; z-index: 6; grid-row: 1; background: var(--ink); color: var(--paper); }
.corner, .t { grid-column: 1; }
.court-h { display: grid; place-items: center; padding: 0 4px; border-left: 1px solid #3a4a40; text-align: center; overflow: hidden; font: 800 19px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.t { padding: 3px 8px 0 0; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t.hour { border-top-color: var(--rule-2); color: var(--ink); font-weight: 700; }
.slot {
  min-width: 0; padding: 0; border: 0; border-top: 1px dashed var(--rule); border-left: 1px solid var(--rule);
  background: transparent; color: var(--rule-2); font-size: 22px; cursor: pointer;
}
.slot.hour { border-top: 1px solid var(--rule-2); }
.slot::after { content: '+'; }
.slot:hover, .slot:focus-visible { background: rgba(220, 235, 58, 0.5); color: var(--ink); }
.slot.past { background: var(--paper-2); color: transparent; cursor: default; }
.it {
  z-index: 2; min-width: 0; margin: 2px 3px; padding: 4px 7px; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 0; border-radius: 4px; text-align: left; font-size: 14px; line-height: 1.15;
}
button.it { cursor: pointer; }
.it-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.it-time { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.it.short .it-time { display: none; }
.it.taken { border: 1.5px solid var(--rule-2); background: repeating-linear-gradient(135deg, #e4dccb 0 6px, #efe9db 6px 12px); color: var(--ink-3); }
.it.mine { border: 2px solid var(--ink); background: var(--ball); color: var(--ink); }
.it.mine .it-name { font: 800 17px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.it.other { border: 2px solid var(--ink-2); background: #fff; color: var(--ink); }
.it.other:hover, .it.mine:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.it.block { background: var(--court); color: var(--line); align-items: center; justify-content: flex-start; padding-top: 8px; text-align: center; }
.it.block.short { justify-content: center; padding-top: 4px; }
.it.block .it-name { font: 800 17px/1.05 var(--display); letter-spacing: 0.08em; text-transform: uppercase; white-space: normal; }
.now { position: relative; z-index: 4; grid-column: 1 / -1; align-self: start; height: 0; border-top: 2px solid var(--brick); transform: translateY(calc(var(--f) * var(--row))); pointer-events: none; }
.now::before { content: 'Now'; position: absolute; right: 4px; top: -10px; padding: 3px 5px; border-radius: 3px; background: var(--brick); color: #fff; font: 800 12px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
/* One court: no header row, wide rows that say "Open", bookings on one line. */
.grid.single .slot { padding-left: 16px; text-align: left; font-size: 16px; color: var(--ink-3); }
.grid.single .slot::after { content: 'Open'; }
.grid.single .slot:hover::after, .grid.single .slot:focus-visible::after { content: 'Book this time'; font-weight: 700; }
.grid.single .slot.past::after { content: ''; }
.grid.single .it { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 14px; }
.grid.single .it.short { align-items: center; padding-top: 4px; padding-bottom: 4px; }
.grid.single .it-name { font-size: 16px; }
.grid.single .it-time, .grid.single .it.short .it-time { display: inline; font-size: 15px; }
.grid.single .it.block { justify-content: flex-start; text-align: left; }
.grid.single .it.mine .it-name, .grid.single .it.block .it-name { font-size: 19px; }
.grid.single .now::before { right: 8px; }
.sheet-in h2 + form, .sheet-in h2 + .seg { margin-top: 18px; }
.outside { margin-top: 18px; }
.outside h3 { font-size: 22px; margin-bottom: 8px; }
.outside ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 480px) {
  :root { --timecol: 50px; }
  .court-h { font-size: 16px; }
  .t { font-size: 13px; padding-right: 5px; }
}

/* ---------- bottom sheet ---------- */
.sheet-dlg { width: 100%; max-width: 100vw; max-height: 100dvh; margin: auto auto 0; padding: 0; border: 0; background: transparent; overflow: visible; }
.sheet-dlg::backdrop { background: rgba(23, 37, 29, 0.55); }
.sheet-in {
  max-width: 560px; max-height: 92dvh; margin: 0 auto; padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  overflow: auto; border: 2px solid var(--ink); border-bottom: 0; border-radius: 16px 16px 0 0; background: var(--paper);
}
.sheet-in > .stack, .sheet-in > form { margin-top: 4px; }
.sheet-in > .btn.quiet { margin-top: 8px; }
.grab { width: 48px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: var(--rule-2); }
.sheet-in h2 { font-size: 38px; }
@media (min-width: 700px) {
  .sheet-dlg { margin: auto; }
  .sheet-in { border-bottom: 2px solid var(--ink); border-radius: 12px; padding-top: 24px; }
  .grab { display: none; }
}
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; padding: 0; border: 0; }
.choices legend { margin-bottom: 10px; padding: 0; font-weight: 700; }
.choice { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 70px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); cursor: pointer; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice b { font-size: 21px; }
.choice small { color: var(--ink-2); font-size: 15px; }
.choice:has(input:checked) { background: var(--ball); box-shadow: inset 0 0 0 2px var(--ink); }
.choice:has(input:disabled) { border-style: dashed; border-color: var(--rule-2); background: transparent; color: var(--ink-3); cursor: not-allowed; }
.choice:has(input:focus-visible) { outline: 3px solid var(--court); outline-offset: 2px; }
.conflicts { margin: 8px 0 0; padding-left: 20px; }
.conflicts li { margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.chip-btn { min-height: 40px; padding: 0 12px; border: 1.5px solid var(--ink-2); border-radius: 20px; background: var(--card); font-size: 15px; cursor: pointer; }
.chip-btn:hover { background: var(--ball); }
.court-pick { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0; padding: 0; border: 0; }
.court-pick legend { margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 17px; }
details.edit { margin: 16px 0; padding: 0 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); }
details.edit summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details.edit[open] { padding-bottom: 14px; }
.sheet-in form[data-cancel] { margin-top: 16px; }

/* ---------- My bookings: tickets ---------- */
.tickets { display: grid; gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; }
.ticket { position: relative; display: grid; grid-template-columns: 88px 1fr; overflow: hidden; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.ticket::before, .ticket::after { content: ''; position: absolute; left: 77px; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); }
.ticket::before { top: -13px; }
.ticket::after { bottom: -13px; }
.tk-date { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 0; border-right: 2px dashed var(--line); background: var(--court); color: var(--line); text-transform: uppercase; }
.tk-date .dow { font: 800 16px/1 var(--display); letter-spacing: 0.1em; }
.tk-date .num { font: 900 46px/1 var(--display); }
.tk-date .mon { font: 800 16px/1 var(--display); letter-spacing: 0.1em; opacity: 0.85; }
.tk-main { padding: 14px 18px 16px; }
.tk-time { font: 800 32px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.tk-meta { margin-top: 6px; color: var(--ink-2); font-size: 17px; }
.tk-actions { margin-top: 12px; }
.ticket.cancelled { background: var(--paper); }
.ticket.cancelled .tk-date { background: var(--ink-3); }
.ticket.cancelled .tk-time { text-decoration: line-through; color: var(--ink-3); }
.empty { display: grid; justify-items: center; gap: 12px; padding: 40px 0; color: var(--ink-2); font-size: 20px; }
.empty .ball { width: 72px; height: 72px; }

/* ---------- waiver ---------- */
.waiver-doc { max-height: 46vh; overflow: auto; margin-bottom: 22px; padding: 20px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-size: 17px; line-height: 1.6; }
.waiver-doc .logo-wide { display: block; width: min(260px, 70%); height: auto; margin: 0 auto 14px; }
.waiver-doc h3 { margin: 20px 0 6px; font: 700 17px/1.4 var(--body); letter-spacing: 0.02em; }
.waiver-doc h3:first-of-type { margin-top: 0; text-align: center; font-size: 18px; }
.waiver-doc p { margin: 0 0 12px; }
.logo-wide { height: auto; }
.sign { gap: 18px; }
.sigbox { position: relative; height: 180px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; }
.sigbox canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-x { position: absolute; left: 18px; bottom: 42px; color: var(--ink-3); font: 800 24px/1 var(--display); pointer-events: none; }
.sig-line { position: absolute; left: 44px; right: 18px; bottom: 44px; border-bottom: 2px solid var(--rule-2); pointer-events: none; }
.sig-clear { position: absolute; top: 6px; right: 6px; }
.sig-date { font-size: 18px; }
.signed { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 12px 0 20px; padding: 14px; border: 2px dashed var(--rule-2); border-radius: 8px; }
.signed img { width: 220px; height: 80px; object-fit: contain; background: #fff; border-bottom: 2px solid var(--ink); }

/* ---------- admin ---------- */
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; }
.subtabs a { padding: 10px 16px; border: 2px solid var(--ink); border-radius: 30px; color: var(--ink); text-decoration: none; font-weight: 700; }
.subtabs a.on { background: var(--ink); color: var(--paper); }
.group { margin: 0 0 18px; padding: 18px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); display: grid; gap: 14px; }
.group legend { padding: 0 8px; font: 800 24px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.court-list { display: grid; gap: 8px; }
.court-row { display: flex; gap: 8px; }
.savebar { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 12px 0 16px; background: linear-gradient(transparent, var(--paper) 30%); }
.members { margin: 0; padding: 0; list-style: none; }
.member { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-2); }
.member-info { display: grid; gap: 3px; justify-items: start; }
.member-info small { color: var(--ink-2); font-size: 15px; }
.member-act { display: flex; gap: 8px; align-items: center; }
.member-act select { width: auto; min-height: 44px; font-size: 16px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 1000; max-width: calc(100vw - 32px);
  padding: 14px 20px; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 700;
  transform: translate(-50%, 200px); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.bad { background: var(--brick); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- free play ---------- */
.it.block.freeplay { background: #dcebe2; color: var(--court-2); box-shadow: inset 0 0 0 2px var(--court); background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(31, 92, 70, 0.07) 10px 20px); }
.it.block.freeplay:hover { box-shadow: inset 0 0 0 3px var(--court); }
.it-sub { font-size: 12px; font-weight: 700; opacity: 0.85; }
.it.short .it-sub { display: none; }
.grid.single .it-sub, .grid.single .it.short .it-sub { display: inline; }
.k-free { background: #dcebe2; border: 2px dashed var(--court) !important; }
.fp-card { margin-top: 20px; }
.fp-list { margin: 10px 0 12px; padding: 0; list-style: none; }
.fp-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-top: 1px dashed var(--rule-2); }
.fp-day { min-width: 120px; }
.fp-time { font-weight: 700; }
.fp-title { color: var(--ink-2); }

/* ---------- rules page ---------- */
.rule-list { margin: 10px 0 0; padding: 0; list-style: none; }
.rule-list li { position: relative; padding: 10px 0 10px 30px; border-top: 1px dashed var(--rule-2); }
.rule-list li:first-child { border-top: 0; }
.rules-logo { margin: 4px 0 8px; }
.rules-logo .logo-wide { display: block; width: min(340px, 80%); }
.club-card p { margin: 10px 0; }
.club-rules { margin: 12px 0; padding: 0; list-style: none; counter-reset: r; }
.club-rules li { position: relative; padding: 12px 0 12px 44px; border-top: 1px dashed var(--rule-2); counter-increment: r; }
.club-rules li::before { content: counter(r); position: absolute; left: 0; top: 10px; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; background: var(--ball); font: 900 18px/26px var(--display); text-align: center; }
.rule-list li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; background: var(--ball); }

/* ---------- booking note, players, signing ---------- */
.booking-note { display: grid; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; border-left: 6px solid var(--court); border-radius: 4px; background: var(--card); font-size: 16px; }
.booking-note .check { font-size: 17px; }
details.edit summary small { font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.picked { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; padding: 0; list-style: none; }
.picked:empty { display: none; }
.pchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border: 2px solid var(--ink); border-radius: 22px; background: var(--ball); font-weight: 700; }
.pchip button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; cursor: pointer; }
.pchip button:hover { background: rgba(0, 0, 0, 0.08); }
.results { display: grid; gap: 6px; margin: 8px 0; }
.result { min-height: 48px; padding: 0 14px; border: 2px solid var(--ink-2); border-radius: var(--r); background: #fff; text-align: left; font-weight: 700; cursor: pointer; }
.result:hover { background: var(--ball); }
.people { display: grid; gap: 4px; margin: 6px 0 16px; padding: 0; list-style: none; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px dashed var(--rule-2); }
.people li > span:not(.mark) { display: grid; }
.people small { color: var(--ink-2); font-size: 15px; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; font-weight: 800; }
.mark.ok { background: var(--ok-bg); color: var(--ok); }
.mark.no { background: var(--brick-bg); color: var(--brick); }
.sig-thumb { width: 140px; height: 50px; object-fit: contain; background: #fff; border-bottom: 2px solid var(--ink); margin-left: 42px; }
.sheet-h3 { margin: 18px 0 4px; font-size: 24px; }
.tk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
textarea.short { min-height: 0; }
.note-form { margin-top: 28px; }
@media (max-width: 480px) { .seg button { font-size: 16px; } }
.linkbox input { font-size: 15px; background: #fff; }
.fp-card .note { margin-top: 6px; }
