/* Dink District booking. Layout: a court-blue header band with court lines, then a court board
   (hours x courts) beside a sticky booking ticket; on phones the ticket stacks and a bottom bar
   carries the running total. */
:root {
  /* Brand: navy, green, gold, cyan and orange from the Dink District badge */
  --band: #0a2f85;          /* navy */
  --band-ink: #ffffff;
  --band-line: rgba(255, 255, 255, .14);
  --bg: #f2f5fa;
  --surface: #ffffff;
  --ink: #0f1d3d;
  --muted: #5a6683;
  --line: #d9dfeb;
  --court: #1747b8;         /* actions */
  --court-ink: #ffffff;
  --turf: #1b8a2e;          /* brand green */
  --ball: #ffc21a;          /* brand gold */
  --ball-ink: #2b1d00;
  --cyan: #19b8e0;
  --orange: #f47b20;
  --mine: #1b8a2e;
  --taken: #e6e9f0;
  --taken-ink: #8a93a8;
  --warn: #b45309;
  --danger: #b42318;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 29, 61, .06), 0 8px 24px rgba(15, 29, 61, .07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --band: #0a2266; --band-ink: #eef3ff; --band-line: rgba(255, 255, 255, .1);
    --bg: #0b1226; --surface: #131c36; --ink: #e6ebf7; --muted: #9aa5c2; --line: #26314f;
    --court: #5b8cff; --court-ink: #061033; --turf: #3fbf5c; --ball: #ffc93d; --ball-ink: #2b1d00;
    --mine: #3fbf5c; --taken: #1b2542; --taken-ink: #6c779a; --warn: #f0a44b; --danger: #f07167;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--court); outline-offset: 2px; }
a { color: var(--court); }
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h2 { font-size: 22px; text-transform: uppercase; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header band with court lines ---------- */
.band {
  position: relative; overflow: hidden; background: var(--band); color: var(--band-ink);
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 30px max(16px, env(safe-area-inset-left, 0px));
}
.band::before, .band::after { content: ""; position: absolute; pointer-events: none; }
.band::before { /* court outline + kitchen line */
  inset: 14px -40px -40px auto; width: min(520px, 70vw);
  border: 3px solid var(--band-line); border-right: 0; border-bottom: 0;
  background: linear-gradient(90deg, transparent calc(38% - 1.5px), var(--band-line) calc(38% - 1.5px), var(--band-line) calc(38% + 1.5px), transparent calc(38% + 1.5px));
}
.band::after { /* centre line */
  right: 0; top: 58%; width: min(560px, 74vw); height: 3px; background: var(--band-line);
}
.band-inner { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.band h1 { font-size: clamp(34px, 6.4vw, 56px); line-height: .98; text-transform: uppercase; max-width: 16ch; }
.band .lede { margin: 0; max-width: 52ch; color: color-mix(in srgb, var(--band-ink) 82%, transparent); font-size: 16px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand .mark { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.band-slim .brand .mark { width: 48px; height: 48px; }
.hero-img { background: var(--band); line-height: 0; }
.hero-img img { display: block; width: 100%; max-width: 1800px; margin: 0 auto; height: clamp(150px, 30vw, 420px); object-fit: cover; object-position: center; }
.band { border-top: 4px solid var(--ball); background-image: linear-gradient(90deg, var(--band), color-mix(in srgb, var(--band) 80%, var(--cyan))); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { font-size: 13px; color: color-mix(in srgb, var(--band-ink) 70%, transparent); }
.band .facts { margin-top: 6px; }
.band .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: var(--band-ink); }
.band .chip.hl { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 700; }
.band a.chip { color: inherit; text-decoration: none; }
a.chip:hover { border-color: var(--ball); }
.chip.demo { color: #ffd18a; border-color: #ffd18a; background: transparent; }
.band-slim { padding-top: 18px; padding-bottom: 18px; }
.band-slim::before, .band-slim::after { display: none; }
.band-slim h1 { font-size: clamp(26px, 4vw, 34px); max-width: none; }
.band-row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.band .btn.on-band { color: var(--band-ink); border-color: rgba(255, 255, 255, .35); text-decoration: none; }

/* ---------- Page body ---------- */
.wrap {
  max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px));
}
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.chip.demo { border-style: dashed; color: var(--warn); border-color: var(--warn); background: transparent; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.steps li span { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--taken); color: var(--muted); font-size: 12px; }
.steps li.on { color: var(--ink); border-color: var(--court); }
.steps li.on span { background: var(--court); color: var(--court-ink); }
.steps li.done span { background: var(--mine); color: #fff; }
@media (max-width: 520px) { .steps li { flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; font-size: 12px; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font: 600 14px var(--font-body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--court); }
.notice { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.notice.warn { border-color: var(--warn); }

.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.date { flex: 0 0 auto; width: 62px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: center; font-family: var(--font-body); scroll-snap-align: start; }
.date:hover { border-color: var(--court); }
.date .dow, .date .mon { font-size: 11px; color: var(--muted); }
.date .dow { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.date .dnum { font-family: var(--font-display); font-size: 26px; line-height: 1.05; font-weight: 800; }
.date[aria-pressed="true"] { background: var(--band); border-color: var(--band); color: var(--band-ink); box-shadow: 0 4px 12px rgba(10, 47, 133, .28); }
.date[aria-pressed="true"] .dow, .date[aria-pressed="true"] .mon { color: var(--band-ink); }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 880px) { .main { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: var(--shadow); }
.board-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--sw); border: 1px solid var(--line); }

/* ---------- Court board ---------- */
.grid-scroll { overflow-x: auto; }
table.grid { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 340px; font-variant-numeric: tabular-nums; }
.grid th { font: 800 15px var(--font-display); text-transform: uppercase; color: var(--ink); padding: 6px 0; letter-spacing: .04em; }
.grid thead th, .grid tr:first-child th:not(.hr) { background: color-mix(in srgb, var(--turf) 12%, var(--surface)); border-radius: 8px; border-bottom: 3px solid var(--turf); }
.grid th.vip { background: color-mix(in srgb, var(--ball) 30%, var(--surface)); border-bottom-color: var(--ball); }
.grid th.hr { text-align: right; font: 500 12px var(--font-body); color: var(--muted); padding-right: 6px; white-space: nowrap; width: 60px; background: none; border: 0; }
.vip-tag { display: block; font: 700 10px var(--font-body); letter-spacing: .08em; color: var(--ball-ink); background: var(--ball); border-radius: 4px; padding: 0 4px; margin: 2px auto 0; width: max-content; }
.slot { width: 100%; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 12px var(--font-body); cursor: pointer; padding: 2px; }
.slot:hover:not(:disabled) { border-color: var(--court); background: color-mix(in srgb, var(--court) 6%, var(--surface)); }
.slot.prime { background: color-mix(in srgb, var(--court) 5%, var(--surface)); }
.slot.vip:not(.taken):not(.past):not(.sel) { border-color: color-mix(in srgb, var(--ball) 70%, var(--line)); background: color-mix(in srgb, var(--ball) 14%, var(--surface)); }
.slot.sel { background: var(--ball); color: var(--ball-ink); border-color: color-mix(in srgb, var(--ball) 70%, #000); font-weight: 800; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ball) 60%, #000); }
.slot.taken { background: var(--taken); color: var(--taken-ink); cursor: not-allowed; font-weight: 500; background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .035) 6px 12px); }
.slot.past { opacity: .4; cursor: not-allowed; background: transparent; border-style: dashed; }
@media (max-width: 480px) {
  .panel { padding: 10px; }
  table.grid { min-width: 0; border-spacing: 3px; }
  .grid th.hr { width: 40px; padding-right: 2px; font-size: 11px; }
  .slot { font-size: 11px; min-height: 38px; padding: 0; }
}

/* ---------- Booking ticket ---------- */
.ticket { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; padding: 18px; border-top: 4px solid var(--ball); scroll-margin-top: 12px; }
@media (max-width: 880px) { .ticket { position: static; } }
.sel-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.row { display: flex; justify-content: space-between; gap: 8px; }
.row.discount { color: var(--mine); font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px dashed var(--line); padding-top: 10px; }
.total strong { font-family: var(--font-display); font-size: 32px; font-weight: 800; }
form { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
input, select, textarea { font: 400 16px var(--font-body); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--court); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--court) 20%, transparent); }
textarea { resize: vertical; min-height: 56px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { appearance: none; border: 0; border-radius: 10px; padding: 12px 16px; font: 700 15px var(--font-body); cursor: pointer; background: var(--court); color: var(--court-ink); text-align: center; text-decoration: none; display: inline-block; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 7px 12px; font-size: 13px; font-weight: 600; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.msg { font-size: 14px; min-height: 1em; }
.msg.ok { color: var(--mine); } .msg.err { color: var(--danger); }
.done { display: flex; flex-direction: column; gap: 8px; }
.done .code { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: .14em; }
#doneBox { border: 2px solid var(--mine); border-radius: 12px; padding: 14px; background: color-mix(in srgb, var(--mine) 6%, var(--surface)); }
.paybox { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 10px; padding: 12px; font-variant-numeric: tabular-nums; }
.paybox strong { overflow-wrap: anywhere; text-align: right; font-size: 18px; }
.warnline { margin: 0; font-size: 13px; color: var(--warn); }
.qrbox { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.qrbox img { width: 100%; max-width: 280px; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.qrbox p { margin: 0; font-size: 12px; }

/* ---------- Mobile bottom bar ---------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--band); color: var(--band-ink); box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.mbar div { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.mbar strong { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.mbar .btn { background: var(--ball); color: var(--ball-ink); }
@media (min-width: 881px) { .mbar { display: none !important; } }

/* ---------- Lists, staff page ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-variant-numeric: tabular-nums; }
.item.cancelled { opacity: .55; }
.item .what { font-weight: 600; }
.item .meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.pill.paid { background: color-mix(in srgb, var(--mine) 18%, transparent); color: var(--mine); }
.pill.unpaid { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.checking { background: color-mix(in srgb, var(--court) 18%, transparent); color: var(--court); }
.pill.cancelled { background: var(--taken); color: var(--taken-ink); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 130px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.narrow { max-width: 460px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.section-title { display: flex; align-items: baseline; gap: 10px; }
.qr-admin { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qr-admin img { max-width: 200px; border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--line); }
fieldset.notify { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; margin: 0; min-width: 0; }
fieldset.notify legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }
footer b { color: var(--ink); font-family: var(--font-display); font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }

@media (prefers-reduced-motion: no-preference) { .slot, .date, .btn { transition: background .12s, border-color .12s, filter .12s; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Add-ons */
.addons { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.addon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.addon .aname { font-weight: 600; }
.addon .aprice { font-size: 12px; color: var(--muted); }
.addon .amt { grid-column: 2; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper button:hover:not(:disabled) { background: var(--bg); }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Photo slideshow */
.gallery { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-top: 14px; }
.slides { position: relative; aspect-ratio: 16 / 7; border-radius: 12px; overflow: hidden; background: var(--band); }
.slides figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; }
.slides figure.on { opacity: 1; }
.slides img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slides figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 10px; color: #fff; font-weight: 600; font-size: 14px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--court); }
@media (max-width: 520px) { .slides { aspect-ratio: 4 / 3; } }
@media (prefers-reduced-motion: reduce) { .slides figure { transition: none; } }

/* Staff: photos and add-ons editor */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.addon-edit { display: grid; grid-template-columns: minmax(0, 2fr) minmax(70px, 1fr) minmax(70px, 1fr) auto; gap: 8px; align-items: end; }
@media (max-width: 560px) { .addon-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.extras-line { font-size: 13px; color: var(--muted); }

/* Address strip under the banner */
.addr-strip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 16px; background: var(--ball); color: #0a2f85; text-decoration: none; font-weight: 700; font-size: 16px; text-align: center; border-bottom: 3px solid var(--orange); }
.addr-strip[hidden] { display: none; }
.addr-strip .pin { font-size: 18px; }
.addr-strip .go { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #0a2f85; color: #fff; }
.addr-strip:hover .go { background: var(--turf); }
@media (max-width: 480px) { .addr-strip { font-size: 15px; } }

