:root {
  --bg: #0b0e0d; --surface: #151a18; --surface2: #1e2522; --line: #2b3430;
  --fg: #edf3ef; --muted: #98a69f; --accent: #3ee08f; --accent-ink: #04140b;
  --warn: #f2b53a; --danger: #ff6b5e; --wm: rgba(255,255,255,.13);
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #f2f5f3; --surface: #ffffff; --surface2: #e7ece9; --line: #d3dcd7;
  --fg: #0d1310; --muted: #56665e; --accent: #0c8f52; --accent-ink: #ffffff;
  --warn: #a86a00; --danger: #c3362b; --wm: rgba(0,0,0,.10); color-scheme: light; } }
:root[data-theme="light"] {
  --bg: #f2f5f3; --surface: #ffffff; --surface2: #e7ece9; --line: #d3dcd7;
  --fg: #0d1310; --muted: #56665e; --accent: #0c8f52; --accent-ink: #ffffff;
  --warn: #a86a00; --danger: #c3362b; --wm: rgba(0,0,0,.10); color-scheme: light; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font: 16px/1.45 var(--body); -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; text-wrap: balance; margin: 0; line-height: 1.05; }
h1 { font-size: 2.1rem; text-transform: uppercase; }
h2 { font-size: 1.45rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.label { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px; }
.bar-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar img { width: 34px; height: 34px; border-radius: 8px; }
.bar .brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bar .brand .who { display: block; }
.bar .gear { background: none; border: 0; color: var(--muted); padding: 6px; margin: -6px -6px -6px 0; border-radius: 10px; cursor: pointer; line-height: 0; }
.bar .gear[aria-pressed="true"], .bar .gear:hover { color: var(--accent); }
.bar .who { flex: 1; min-width: 0; line-height: 1.15; }
.bar .who b { font-family: var(--display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .who span { font-size: .8rem; color: var(--muted); }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px 4px; }
.link.danger { color: var(--danger); }

main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 60px; }
.wrap { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.demo { background: var(--surface2); border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; font-size: .88rem; color: var(--muted); }
.demo b { color: var(--fg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); padding: 10px 16px; font-weight: 600; min-height: 44px; }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .9rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600;
  background: var(--surface2); color: var(--muted); white-space: nowrap; }
.chip.open { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.chip.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.bad { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

/* login */
.login { display: grid; gap: 22px; }
.login .crest { display: flex; align-items: center; gap: 14px; }
.login .crest img { width: 64px; height: 64px; border-radius: 14px; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pl { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 52px; }
.pl .nr { font-family: var(--display); font-weight: 700; font-size: 1.4rem; width: 32px; text-align: center; color: var(--accent); }
.pl span { display: block; font-size: .78rem; color: var(--muted); }
.pl b { font-weight: 600; font-size: .95rem; line-height: 1.2; display: block; }

/* match cards */
.mcard { display: grid; gap: 10px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.mcard.locked { opacity: .78; }
.mcard .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.mcard .opp { font-family: var(--display); font-weight: 700; font-size: 1.7rem; text-transform: uppercase; line-height: 1; }
.mcard .meta { font-size: .9rem; color: var(--muted); }
.mcard .prog { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.list { display: grid; gap: 10px; }

/* match screen */
.mhead { display: grid; gap: 6px; }
.seg { display: flex; background: var(--surface2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px 10px; font-weight: 600; color: var(--muted); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); border-color: var(--accent); }
.fm { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fm .seg { flex: 0 1 280px; }

/* slides */
.slides { display: grid; gap: 16px; }
.slide { display: grid; gap: 8px; }
.frame { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--line); }
.frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frame .open-btn { position: absolute; inset: 0; background: none; border: 0; }
.wm { position: absolute; inset: 0; pointer-events: none; background-repeat: repeat; z-index: 2; }
.slide .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.notebtn { display: inline-flex; gap: 6px; align-items: center; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .88rem; color: var(--muted); min-height: 36px; }
.notebtn.has { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.notepreview { font-size: .92rem; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 8px 12px; white-space: pre-wrap; }
.oldnote { border-left-color: var(--warn); }

/* video list */
.vcat { display: grid; gap: 8px; }
.vcat .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.grow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-height: 56px; }
.grow b { font-weight: 600; min-width: 0; }
.grow .sub { grid-column: 1; font-size: .82rem; color: var(--muted); }
.grow .pct { grid-row: 1 / span 2; grid-column: 2; }
.grow.na { opacity: .5; }
.ring { width: 38px; height: 38px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .bgc { stroke: var(--surface2); }
.ring .fgc { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font: 600 10px var(--body); fill: var(--muted); text-anchor: middle; dominant-baseline: central; }

/* player */
.player { display: grid; gap: 14px; }
.vbox { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; max-width: 100%; }
.vbox video { width: 100%; height: 100%; display: block; background: #000; }
.vbox .wm { z-index: 1; }
.vbox .vtap { position: absolute; inset: 0 0 44px 0; z-index: 3; background: none; border: 0; padding: 0; cursor: pointer; }
.vctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; }
.vctl button { background: none; border: 0; color: #fff; font-size: 1.05rem; min-width: 36px; min-height: 36px; cursor: pointer; }
.vctl input[type=range] { flex: 1; min-width: 0; accent-color: #fff; }
.vtime { font-size: .78rem; opacity: .9; }
.vbox.isfull, .vbox:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.vbox.full { position: fixed; inset: 0; z-index: 1000; max-width: none; height: 100dvh; }
.vbox.isfull video { object-fit: contain; }
.watchrow { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: 999px; padding: 6px 12px; font-size: .82rem; cursor: pointer; }
.nowrow { display: flex; align-items: center; gap: 10px; }
.nowrow .info { flex: 1; min-width: 0; }
.nowrow .info b { display: block; font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; }
.nowrow .info span { font-size: .85rem; color: var(--muted); }
.clips { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 2px; }
.clip { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.clip .i { grid-row: 1 / span 2; font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 1.1rem; align-self: center; text-align: center; }
.clip b { font-weight: 600; font-size: .92rem; }
.clip span { font-size: .78rem; color: var(--muted); }
.clip[aria-current="true"] { border-color: var(--accent); }
.clip[aria-current="true"] .i { color: var(--accent); }
/* video v2: picks first, coach tools per clip, New / My clips labels */
.cliprow { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.cliprow.off { display: none; }
.cliprow.hid .clip { opacity: .45; border-style: dashed; }
.ctools { display: flex; gap: 2px; align-items: center; }
.ctools .link { min-width: 36px; min-height: 36px; font-size: 1rem; }
.ctools .star.on { color: #f5b301; }
.clipsec { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0 2px; }
.newtag, .minetag { font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.newtag { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.minetag { background: color-mix(in srgb, #f5b301 22%, transparent); color: #c48f00; }
.tpick { color: #f5b301; font-size: .8rem; font-weight: 700; }
.tleaf.mine .tname { color: #c48f00; font-weight: 700; }
.vmatches { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; display: grid; gap: 8px; }
.vmatches summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-weight: 600; }
.vmrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 6px; }
.vmrow > div { display: grid; }
.vmrow.hid { opacity: .55; }
.vmrow select { min-height: 36px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
@media (min-width: 900px) {
  .player.wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .player.wide .side { grid-row: 1 / span 3; grid-column: 2; }
}

/* note editor */
.noteed { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.noteed textarea { width: 100%; min-height: 90px; resize: vertical; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.noteed .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }

/* viewer overlay */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94); display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(10px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 10px) max(10px, env(safe-area-inset-left, 0px)); color: #edf3ef; }
.viewer .vt { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.viewer .vt button { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 999px; min-height: 40px; padding: 6px 14px; font-weight: 600; }
.viewer .stage { position: relative; overflow: auto; display: grid; place-items: center; touch-action: pan-x pan-y pinch-zoom; }
.viewer .stage .inner { position: relative; width: 100%; }
.viewer .stage.zoom .inner { width: 220%; }
.viewer .stage img { width: 100%; display: block; }
.viewer .vb { display: grid; gap: 8px; max-width: 760px; width: 100%; margin: 0 auto; }
.viewer .vb textarea { width: 100%; min-height: 60px; max-height: 26vh; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 8px 10px; }
.viewer .nav { display: flex; gap: 8px; }
.viewer .nav button { flex: 1; background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 999px; min-height: 44px; font-weight: 600; }
.viewer .hint { font-size: .78rem; color: #a9b5af; }

/* coach */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; color: var(--muted); background: var(--surface2); }
tr:last-child td { border-bottom: 0; }
td.cellbar { min-width: 70px; }
.mini { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.mini i { display: block; height: 100%; background: var(--accent); }
.rowbtn { background: none; border: 0; padding: 0; font-weight: 600; text-align: left; color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.formrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.formrow label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.formrow input, .formrow select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.secchips { display: flex; flex-wrap: wrap; gap: 6px; }
.secchips button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 11px; font-size: .82rem; color: var(--muted); }
.secchips button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: transparent; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 60; }
@media (prefers-reduced-motion: no-preference) { .mcard, .grow, .pl { transition: transform .12s ease; } .mcard:active, .grow:active, .pl:active { transform: scale(.985); } }

/* added for the live app */
html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.small { font-size: .86rem; }
.pre { white-space: pre-wrap; }
.formrow.col { display: grid; gap: 4px; }
.formrow.col label { font-size: .85rem; color: var(--muted); }
.formrow.col input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
.formrow.spread { justify-content: space-between; }
.vload { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd8d3; font-size: .9rem; pointer-events: none; }
.frame img:not([src]) { visibility: hidden; }

/* video tree (like the compilation menu) */
.tree { display: grid; gap: 8px; }
.tsearch { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 44px; }
.tcat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tcat > summary { display: flex; align-items: center; gap: 10px; padding: 14px 14px; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; }
.tcat > summary::-webkit-details-marker, .tnode > summary::-webkit-details-marker { display: none; }
.tcat > summary::before, .tnode > summary::before { content: "›"; display: inline-block; width: 14px; color: var(--muted); font-family: var(--body); font-weight: 600; transition: transform .15s ease; }
.tcat[open] > summary::before, .tnode[open] > summary::before { transform: rotate(90deg); }
.tsub { padding: 0 14px 8px 38px; font-size: .82rem; color: var(--muted); margin-top: -6px; }
.tnode > summary, .tleaf { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  padding: 11px 14px 11px calc(24px + var(--d, 0) * 18px); min-height: 46px; cursor: pointer; list-style: none; font-size: .95rem; }
.tnode > summary { font-weight: 600; }
.tleaf { color: var(--fg); }
.tleaf::before { content: ""; width: 14px; flex: none; }
.tleaf.on { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.tname { flex: 1; min-width: 0; }
.tcount { font-size: .78rem; color: var(--muted); background: var(--surface2); border-radius: 999px; padding: 2px 8px; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.tpct { font-size: .75rem; font-weight: 600; min-width: 34px; text-align: right; color: var(--muted); font-family: var(--body); letter-spacing: 0; }
.tpct.part { color: var(--warn); }
.tpct.done { color: var(--accent); }
.tnote { color: var(--accent); font-size: .85rem; }

/* player */
.ptitle { font-size: 1.5rem; }
.pctl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchips .label { margin-right: 4px; }
.fchips button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 12px; font-size: .85rem; color: var(--muted); min-height: 34px; }
.fchips button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: transparent; }
.cliplist > summary { cursor: pointer; padding: 6px 0; }
.cliplist .clips { margin-top: 8px; }
.gnav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gnav .btn { flex: 1 1 200px; min-width: 0; }
.player { display: grid; gap: 14px; }

/* wide screens: tree left, player right */
.wrap:has(.vsplit) { max-width: 1240px; }
.vsplit { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.vnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 70px); max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 4px; }
.vmain { min-width: 0; }

/* "For me" rules editor */
.rulebox { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.rulerow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rulerow button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 11px; font-size: .82rem; color: var(--muted); }
.rulerow .rulecat { font-weight: 600; }
.rulesubs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding-left: 8px; border-left: 2px solid var(--line); }
.rulerow button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: transparent; }
details.card > summary { cursor: pointer; }

/* next match on the home page */
.hero { display: grid; gap: 14px; padding: 18px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.hopp { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; text-transform: uppercase; text-wrap: balance; }
.hopp .vs { font-size: 1rem; color: var(--muted); padding: 0 4px; vertical-align: middle; }
.hinfo { display: grid; gap: 8px; margin: 0; }
.hinfo div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; }
.hinfo dt { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); }
.hinfo dd { margin: 0; min-width: 0; }
.hinfo .link { padding: 0 0 0 6px; }

/* practice games */
.pcard { display: grid; gap: 10px; }
.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.podium li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface2); }
.podium li.gap { display: block; background: none; padding: 0; text-align: center; color: var(--muted); line-height: 1; }
.podium .rk { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--accent); text-align: center; }
.podium li.me, table.rank tr.me td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
table.rank td:first-child { width: 36px; }
.sesslist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rotframe { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.rotframe iframe { display: block; width: 100%; height: 78vh; border: 0; }
.rotframe .wm { position: absolute; inset: 0; pointer-events: none; }

/* cards (the deck as phone screens) */
.kwrap { position: relative; display: grid; gap: 12px; }
.kwrap > .wm { position: absolute; inset: 0; pointer-events: none; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; }
.khead { display: flex; gap: 12px; align-items: center; }
.khead .knr { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.6rem; min-width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); }
.khead b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; }
.khead span { color: var(--muted, #8a948f); font-size: .85rem; }
.kseg { justify-self: start; }
.kcols { display: grid; gap: 16px; }
.kcol { display: grid; gap: 10px; align-content: start; }
.kcol.off { display: none; }
.kvideo { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.kvideo .player { gap: 10px; }
.kwatch { justify-self: start; }
.ktitle { display: none; margin: 0; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.kstats { display: grid; gap: 2px; font-size: .85rem; color: var(--muted); }
.krow { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.krow .kl { min-width: 4.2em; }
.krow b { color: var(--fg); font-weight: 650; }
.krow i { font-style: normal; font-size: .75rem; }
.krow.vhl, .krow.vhl b { color: #b05cc8; } .krow.fb b { color: #3aa83a; }
.klegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted); }
.klegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.kcalls { display: grid; gap: 4px; }
.kcall { border-radius: 6px; padding: 6px 10px; font-weight: 600; font-size: .85rem; text-align: center; letter-spacing: .02em; }
.court { width: 100%; max-width: 420px; justify-self: center; display: block; border-radius: 8px; }
.court .cf { fill: #f8cba0; } .court .co { fill: none; stroke: #333; stroke-width: .05; }
.court .cg { stroke: #c9a27e; stroke-width: .02; stroke-dasharray: .1 .1; }
.court .cl { stroke: #333; stroke-width: .03; } .court .cn { stroke: #111; stroke-width: .07; }
.knotes { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.knotes li.l1 { margin-left: 16px; list-style: circle; } .knotes li.l2 { margin-left: 32px; list-style: square; }
@media (min-width: 900px) {
  .kseg { display: none; }
  .kcols { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
  .kcol.off { display: grid; }
  .ktitle { display: block; }
}

/* card edits (coach), suggestions (players), "Updated", changes since the paper booklet */
.chip.new { background: color-mix(in srgb, #b05cc8 20%, transparent); color: #b05cc8; margin-left: auto; }
.kchanged { font-size: .78rem; color: #b05cc8; }
.ktools { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ksugg { background: var(--surface2); border-left: 3px solid #b05cc8; border-radius: 6px; padding: 8px 10px; font-size: .88rem; display: grid; gap: 4px; }
.ksugg.mine { border-left-color: var(--line); color: var(--muted); }
.kedit, .ksform { display: grid; gap: 8px; background: var(--surface2); border-radius: 8px; padding: 10px; }
.kedit textarea, .ksform textarea { width: 100%; font: inherit; }
.kerows { display: grid; gap: 6px; }
.kerow { display: grid; grid-template-columns: 40px 1fr auto; gap: 6px; align-items: center; }
.kerow input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: none; }
.kedit .row, .ksform .row { display: flex; gap: 8px; flex-wrap: wrap; }
.usepref { display: grid; gap: 6px; }
.chgcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chgcols > div { display: grid; gap: 6px; align-content: start; }
@media print {
  #bar, .noprint, #toast { display: none !important; }
  body { background: #fff; color: #000; }
  .changes .kcard { break-inside: avoid; border: 1px solid #999; box-shadow: none; }
}

/* side-out per rotation */
.kbanner { background: color-mix(in srgb, #3aa83a 22%, transparent); border-radius: 8px; padding: 6px 10px; font-size: .85rem; text-align: center; }
.kso { display: grid; grid-template-columns: minmax(0, 1fr) 34%; gap: 8px; align-items: start; }
.court .clab { font-size: .95px; font-weight: 800; font-family: "Barlow Condensed", sans-serif; }
.court .cbig { font-size: 1.7px; font-weight: 800; fill: #111; opacity: .85; font-family: "Barlow Condensed", sans-serif; }
.court .csub { font-size: .62px; font-weight: 800; fill: #111; letter-spacing: .02px; font-family: "Barlow Condensed", sans-serif; paint-order: stroke; stroke: #fff; stroke-width: .12px; }
.rtab { width: 100%; height: auto; border-radius: 6px; background: #fff; }
.rtab.native { display: grid; gap: 6px; background: none; font-size: .8rem; }
.rb .rh { display: flex; gap: 6px; align-items: baseline; }
.rb .rh span { background: var(--fg); color: var(--bg, #fff); border-radius: 4px; padding: 0 6px; font-weight: 700; font-size: .75rem; }
.rb .rh em { margin-left: auto; font-style: normal; font-weight: 600; }
.rg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.rc { height: 3.3em; overflow: hidden; align-content: center; padding: 2px 4px; border: 1px solid var(--line); display: grid; justify-items: center; position: relative; }
.rc:nth-child(-n+3) { background: var(--surface2); }
.rc i { position: absolute; left: 3px; top: 1px; font-size: .6rem; font-style: normal; color: var(--muted); }
.rc b { font-size: .95rem; } .rc em { font-style: normal; font-size: .7rem; color: var(--muted); }
.rtab .neg, .rb .neg { color: var(--danger, #c0392b); }
/* on a laptop the three rotations of a slide sit next to each other, like on paper */
@media (min-width: 900px) {
  .kwrap:has(> .kcard.so) { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
}
@media (min-width: 900px) {
  .kwrap:has(> .kcard.serve), .kwrap:has(> .kcard.reception) { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
}
.kcard.serve .court { max-width: 260px; }
.kintro { font-size: .9rem; color: var(--muted); }

/* call library */
button.kcall { border: 0; width: 100%; cursor: pointer; font: inherit; font-weight: 600; font-size: .85rem; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; align-items: end; justify-items: center; z-index: 50; }
.sheetin { background: var(--surface); width: min(520px, 100%); max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 14px 16px 22px; display: grid; gap: 12px; }
@media (min-width: 900px) { .sheet { align-items: center; } .sheetin { border-radius: 16px; } }
.sheetin .kcall { display: block; flex: 1; margin-right: 12px; }
.sheetin .row { display: flex; gap: 8px; }
.court g.drag { cursor: grab; touch-action: none; }
.calllist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.callitem { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; text-align: left; cursor: pointer; }
.callitem .kcall { display: block; border-radius: 6px; padding: 6px 8px; text-align: center; }

/* ---- coach session: every action, filters, playlists (session.js) ---- */
.wrap:has(.sess:not(.reel)) { max-width: 1600px; }
.sess { display: grid; gap: 14px; }
.sesshead { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sesshead .seg { flex: 0 0 auto; }
.sessgrid { display: grid; gap: 16px; }
.sessleft, .sessright { display: grid; gap: 12px; align-content: start; min-width: 0; }
.sfil { display: grid; gap: 8px; }
.sfil .fchips button { padding: 4px 10px; min-height: 30px; }
.sfil .fchips .num { opacity: .6; font-size: .75rem; }
.sfil details.more summary { cursor: pointer; padding: 4px 0; }
.sfil details.more[open] { display: grid; gap: 8px; }
.slisthead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.srows { display: grid; gap: 4px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.srow { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.srow.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.srow.hid { opacity: .5; border-style: dashed; }
.srow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.srow .i { font-family: var(--display); font-weight: 700; color: var(--muted); min-width: 24px; text-align: center; }
.sact { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; padding: 4px 2px; display: grid; gap: 1px; cursor: pointer; }
.sact b { font-weight: 600; font-size: .9rem; }
.sact span { font-size: .76rem; color: var(--muted); }
.stag { font-style: normal; color: var(--accent); font-weight: 600; }
.pord { display: flex; flex: none; }
.splayer { display: grid; gap: 10px; }
.snow { display: none; position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: 10px 16px; color: #fff; font: 600 1.4rem var(--display); text-transform: uppercase; background: linear-gradient(rgba(0,0,0,.6), transparent); pointer-events: none; }
.vbox.isfull .snow, .vbox.full .snow, .vbox:fullscreen .snow { display: block; }
#svbox .vtap { inset: 0; }
.spls { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.spl { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.spl select, .spls select, .spls input { min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2); color: var(--fg); padding: 4px 8px; max-width: 100%; }
.spls input { flex: 1; min-width: 160px; }
.coachclips { justify-self: start; margin-top: 4px; }
.frow { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (min-width: 1000px) {
  .sessgrid { grid-template-columns: minmax(0, 1fr) minmax(440px, 46%); }
  .sessright { position: sticky; top: 70px; }
}
@media print { .sess { display: none; } }
.sess .row, .frow .row, .wrap > .row, .tabs ~ .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sesshead .seg button { white-space: nowrap; }
@media (max-width: 999px) { .sessright { order: -1; } }
.terms { display: grid; gap: 6px; }
.terms div { display: grid; grid-template-columns: minmax(70px, auto) 1fr; gap: 10px; font-size: .88rem; }
.terms b { font-family: var(--display); letter-spacing: .03em; }
.terms span { color: var(--muted); }
.terms i { font-style: normal; color: var(--fg); }
.kcall.sys { background: var(--surface2); color: var(--fg); }

/* Playbook: agreements, codes, match targets, and the codes fold under booklet cards */
.pbsecs { display: grid; gap: 8px; }
.pbsec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; }
.pbsec > summary { cursor: pointer; list-style: none; padding: 12px 0; font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .03em; }
.pbsec > summary::-webkit-details-marker { display: none; }
.pbsec > summary::after { content: "+"; float: right; color: var(--muted); }
.pbsec[open] > summary::after { content: "−"; }
.pbitem { border-top: 1px solid var(--line); padding: 10px 0; }
.pbitem ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.pbitem li { font-size: .94rem; }
.pbcodes { display: grid; gap: 14px; }
.lgrid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 6px 0 8px; font-size: .92rem; align-items: baseline; }
.lgrid b { color: var(--accent); font-family: var(--display); }
.zgrid { display: grid; grid-template-columns: repeat(3, 52px); gap: 3px; margin: 8px 0; }
.zgrid span { display: grid; place-items: center; height: 44px; background: var(--surface2); border-radius: 6px; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.zgrid .znet { grid-column: 1 / -1; height: 18px; background: none; border-bottom: 3px solid var(--fg); border-radius: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tile { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.tile b { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.kcodes { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.kcodes > summary { cursor: pointer; padding: 4px 0; }
.kcodes[open] > summary { margin-bottom: 8px; }

/* After the match */
.wrap.after { grid-template-columns: minmax(0, 1fr); }
.wrap.after > * { min-width: 0; }
.ares { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 12px 14px; }
.ares.lost { border-left-color: var(--danger); }
.ares > b { font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.ares > span:first-of-type { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.asets { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.asets i { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--surface2); font-size: .88rem; }
.asets i.w { color: var(--accent); }
.amsg.callout { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 10px 14px; display: grid; gap: 4px; }
.fpt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.fpt:first-of-type { border-top: 0; }
.fpt > span:first-child { flex: 1 1 200px; font-weight: 500; }
.fpt b { font-family: var(--display); font-size: 1.3rem; }
.fpt b.g, .tile.g b { color: var(--accent); }
.fpt b.o, .tile.o b { color: var(--warn); }
.fpt b.r, .tile.r b { color: var(--danger); }
.tile.g { border-left: 4px solid var(--accent); }
.tile.o { border-left: 4px solid var(--warn); }
.tile.r { border-left: 4px solid var(--danger); }
.atiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 6px 0; }
.ascope { margin: 6px 0; flex-wrap: wrap; }
.amr { margin: 6px 0; }
.amr table { font-size: .84rem; }
.amr caption { text-align: left; padding: 8px 10px; font-weight: 600; }
.amr th, .amr td { padding: 6px 7px; text-align: right; }
.amr th.grp { text-align: center; border-left: 1px solid var(--line); }
.amr .nm { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.amr th.nm { background: var(--surface2); }
.amr tr.me td { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-weight: 600; }
.amr tfoot td { font-weight: 700; background: var(--surface2); }
.amr2 th, .amr2 td { padding: 5px 5px; text-align: center; }
.amr2 .nm { text-align: left; }
.amr2 .gs { border-left: 1px solid var(--line); }
.amr2 th.ar .sortb { color: var(--danger); }
.amr2 td.ar { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.amr2 td.b { font-weight: 700; }
.amr2 td.neg { color: var(--danger); }
.amr2 td.kg, .amr2 td.ko, .amr2 td.kr { box-shadow: inset 0 0 0 2px var(--kc); }
.amr2 td.kg { --kc: #2e9e44; } .amr2 td.ko { --kc: #f08c00; } .amr2 td.kr { --kc: #d62828; }
.amr2 td.kcan { padding: 0; outline: 1px dashed var(--line); outline-offset: -3px; }
.amr2 .kbtn { all: unset; display: block; box-sizing: border-box; width: 100%; min-height: 28px; padding: 5px; cursor: pointer; text-align: center; }
.amr2 td.kown { background-image: radial-gradient(circle at 88% 18%, var(--fg) 2px, transparent 2.5px); }
.amr2 tr.aset td { font-weight: 600; background: var(--surface2); }
.amr2 tr.aset .w { color: #2e9e44; } .amr2 tr.aset .l { color: var(--danger); }
.amr td.neg { color: var(--danger); }
.prevm { display: grid; gap: 8px; }
.pastm { font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 8px 0; }
.prevm .prevh { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.prevm .prevh > span:first-child { display: grid; gap: 2px; }
.amr .zs { margin-left: 6px; color: var(--muted); font-size: .75rem; letter-spacing: .05em; }
.sortb { background: none; border: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; cursor: pointer; }
.sortb[aria-pressed="true"] { color: var(--fg); }
.athem > summary { cursor: pointer; padding: 6px 0; }
.aph { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.aph.strong b.num { color: var(--accent); }
.aph.weak b.num { color: var(--danger); }
.aph.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.aphases .vbox { position: relative; }
.aphases video { width: 100%; display: block; border-radius: 10px; background: #000; }
.aphases .wm { position: absolute; inset: 0; pointer-events: none; }
.atrend > summary { cursor: pointer; }
.atrendf { width: 100%; height: 80vh; border: 0; border-radius: 8px; background: #fff; }
.arefl label { display: grid; gap: 4px; font-weight: 500; }
.arefls td { white-space: pre-wrap; vertical-align: top; min-width: 160px; }
.aolder { padding: 4px 0; }
.aolder > summary { cursor: pointer; }
.aolder .link { display: block; }

/* notifications (notify.js) */
.toggle.nt{display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.toggle.nt:last-of-type{border-bottom:0}
.toggle.nt input{margin-top:3px;flex:none}
.toggle.nt>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.nrems{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.nrems .formrow{margin:0}
.card > .callout{background:var(--surface2);border-left:3px solid var(--warn);border-radius:0 var(--r) var(--r) 0;padding:10px 14px;font-size:.92rem}

/* install the app (install.js) */
.wrap.install .iicon { border-radius: 16px; display: block; margin-bottom: 10px; }
.isteps { margin: 6px 0 12px; padding-left: 1.4em; display: grid; gap: 10px; }
.isteps li { line-height: 1.45; }
.ishare { vertical-align: -5px; color: var(--accent); }
.ilater { justify-self: center; opacity: .75; }

/* coach "View as player" */
.pvbar { background: var(--warn); color: #111; font-size: .85rem; padding: 6px 16px; text-align: center; }
/* "Suggest a change": quiet, under the Watch button (Eli 26/10) */
.ktools .ksugbtn { color: var(--muted); font-weight: 400; text-decoration: underline; text-underline-offset: 2px; }
/* blocked notifications: the way to the phone's settings (Eli 26/10) */
.callout .steps { margin: 6px 0 6px 18px; padding: 0; display: grid; gap: 2px; }
.callout.flash { animation: ntflash 1.2s ease 2; }
@keyframes ntflash { 50% { box-shadow: 0 0 0 3px var(--accent); } }
/* Spelletjes: teams maken (head coach) */
.splist { display: grid; gap: 2px; }
.sprow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); min-height: 44px; }
.sprow input[type="checkbox"] { width: 20px; height: 20px; }
.sprow.ex { opacity: .6; }
.card .sprow select { min-width: 0; }
.spteams { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.spteam { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 4px; }

/* ---- UI/UX pass (Eli 26/10): less scrolling, one main button per screen, thumb-friendly ---- */
/* darker grey text, easier to read in a bright hall */
:root { --muted: #a9b6af; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --muted: #4b5a53; } }
:root[data-theme="light"] { --muted: #4b5a53; }
:root[data-theme="dark"] { --muted: #a9b6af; }
.chip { font-size: .8rem; }

/* one main button per screen: only .primary is filled; the rest are quiet outlines */
.btn:not(.primary) { background: transparent; border-color: color-mix(in srgb, var(--line) 80%, var(--muted)); }
.btn.small { min-height: 36px; }
/* every tap area at least 44 px, also where the button looks smaller */
.btn.small, .link, .chipbtn, .fchips button, .secchips button, .notebtn, .chip-clip { position: relative; }
.btn.small::after, .link::after, .chipbtn::after, .fchips button::after, .secchips button::after, .notebtn::after, .chip-clip::after { content: ""; position: absolute; inset: -5px -2px; }
.vctl button { min-width: 44px; min-height: 44px; }
/* "Voeg notitie toe" under a slide: small and quiet */
.notebtn { border: 0; padding: 6px 4px; min-height: 32px; }
.notebtn::before { content: "✎"; font-size: 1rem; }
/* clip buttons on the cards (booklet thread): small chips in one row */
.chip-clip { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 5px 11px; min-height: 32px; font-weight: 600; font-size: .85rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); cursor: pointer; }
.chip-clip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
  padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar-in { max-width: 760px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabbar button { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: var(--muted); padding: 7px 2px 6px; min-height: 56px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.tabbar button[aria-current="page"] { color: var(--accent); }
.tabbar button[aria-current="page"] svg { transform: translateY(-1px); }
body.hastabs main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.hastabs .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); }
body.sheetopen { overflow: hidden; }

/* home: fits on one phone screen */
h1.hello { font-size: 1.7rem; }
.hero { gap: 10px; padding: 14px 16px; }
.hopp { font-size: 1.8rem; }
.hinfo { gap: 4px; font-size: .95rem; }
.hinfo div { grid-template-columns: 82px 1fr; }
.mcard { padding: 14px; gap: 8px; }
.mcard .opp { font-size: 1.5rem; }
.goon { display: flex; align-items: center; gap: 10px; }
.goon-t { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.goon .btn { flex: none; }
.mrows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; min-height: 52px; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow > div { display: grid; min-width: 0; line-height: 1.25; }
.mrow b { font-family: var(--display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* match screen: title row with a small Voor mij/Alles switch, tabs pinned under the bar while scrolling */
:root { --barh: 55px; }
.mhead { gap: 4px; }
.mtitle { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mtitle h1 { flex: 1 1 auto; min-width: 0; font-size: 1.9rem; }
.mtitle .seg { flex: none; padding: 3px; gap: 2px; }
.mtitle .seg button { min-height: 32px; padding: 4px 12px; font-size: .85rem; white-space: nowrap; }
.msub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.offbtn { font-weight: 600; padding: 2px 0; }
.wrap > .tabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--barh)); z-index: 8; background: var(--bg);
  margin-inline: -16px; padding-inline: 12px; scrollbar-width: none; }
.wrap > .tabs::-webkit-scrollbar { display: none; }
.bar .ctx { display: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.scrolled .bar .ctx { display: block; }
body.scrolled .bar .brand .who { display: none; }

/* video: stays at the top while you read the card under it; turned phone = whole screen */
.vtip { background: var(--surface2); border-radius: 8px; padding: 8px 10px; }
.vhint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none; background: rgba(0,0,0,.6); color: #fff;
  border-radius: 999px; padding: 6px 14px; font-weight: 700; opacity: 0; }
.vhint.show { animation: vhint .7s ease; }
@keyframes vhint { 15%, 60% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 899px) {
  .player > .vbox { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--barh) + 6px); z-index: 6; }
  body.scrolled .player > .vbox { top: calc(env(safe-area-inset-top, 0px) + var(--barh) + 48px); }
  .player > .vbox.full { position: fixed; top: 0; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .vbox.on { position: fixed !important; inset: 0 !important; z-index: 1000; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100dvh; max-width: none; }
  body:has(.vbox.on) .tabbar { display: none; }
}

/* panels from the bottom: notes, Voor onderweg */
.nsheet .sheetin { gap: 10px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.nsheet textarea { width: 100%; min-height: 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 1rem; }
.grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); justify-self: center; margin: -4px 0 2px; }
@media (prefers-reduced-motion: no-preference) { .nsheet .sheetin { animation: sheetup .18s ease-out; } }
@keyframes sheetup { from { transform: translateY(30px); opacity: .6; } }
.offopts { display: grid; gap: 8px; }
.offopts .btn { display: grid; justify-items: center; gap: 0; padding-block: 8px; }
.offopts .btn .small { font-weight: 400; opacity: .85; }
.okline { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.okline.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); }

/* grey shapes while loading */
.skel { display: grid; gap: 12px; }
.skel i { display: block; height: 18px; border-radius: 8px; background: var(--surface2); }
.skel i:nth-child(1) { width: 40%; height: 28px; }
.skel i:nth-child(2) { height: 130px; border-radius: var(--r); }
.skel i:nth-child(3) { width: 75%; }
.skel i:nth-child(4) { height: 90px; border-radius: var(--r); }
@media (prefers-reduced-motion: no-preference) { .skel i { animation: skel 1.2s ease-in-out infinite alternate; } }
@keyframes skel { to { opacity: .45; } }
/* the booklet in groups (Eli 26/10): folds like the compilation, video inside each group */
.booklet { display: grid; gap: 10px; }
.bkgrp > summary .tname { display: grid; gap: 2px; }
.bkgrp > summary .tsub { padding: 0; margin: 0; font-family: var(--body); font-size: .8rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.bkgrp > summary .chip { margin-left: 0; }
.bkbody { display: grid; gap: 12px; padding: 0 12px 14px; }
.bkfilter { display: grid; gap: 6px; }
.bkfilter .seg, .bkside { flex-wrap: wrap; }
.bkside button { font-size: .88rem; }
.rotjump { display: flex; flex-wrap: wrap; gap: 6px; }
.rotjump .chipbtn { min-width: 44px; min-height: 36px; font-weight: 700; }
.bkc { scroll-margin-top: 80px; }
.bkpc.off { display: none; }
.bkp { border-top: 1px solid var(--line); }
.bkp > summary { display: flex; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; list-style: none; }
.bkp > summary::-webkit-details-marker { display: none; }
.bkp > summary .knr { font-family: var(--display); font-weight: 700; font-size: 1.2rem; min-width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); }
.bkp > summary .tname { display: grid; }
.bkp > summary b { font-family: var(--display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; }
.bkp[open] > summary { padding-bottom: 8px; }
.bkp > .seg { margin-bottom: 10px; }
.bkmore { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.bkcoach > summary { cursor: pointer; padding: 6px 0; }
.watchrow > .label { align-self: center; margin-right: 2px; }
.chip-clip .num { opacity: .65; font-size: .78rem; }
/* their setter under pressure (money time) */
.kmoney { display: grid; gap: 6px; background: var(--surface2); border-radius: 10px; padding: 10px 12px; }
.kmh { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.kmh b { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; }
.kmh span { color: var(--muted); font-size: .8rem; }
.kmr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: baseline; font-size: .9rem; }
.kmp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kmbar { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, transparent); }
.kmbar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent); }
.kmbar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--fg); opacity: .55; }
.kmr b { text-align: right; }
/* the team: photo with numbers, starting line-up and roster */
.kcard.team { padding: 0; overflow: hidden; }
.tphoto { position: relative; width: 100%; background: #000; }
.tphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tphoto img:not([src]) { visibility: hidden; }
.tphoto .wm { position: absolute; inset: 0; pointer-events: none; }
/* hidden for the players (Eli 28/10): the coach still sees it, dimmed and marked */
.hidebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; padding: 4px 12px 8px; }
.hidebar.on { justify-content: space-between; background: color-mix(in srgb, var(--muted) 18%, transparent); padding-top: 8px; font-weight: 600; font-size: .9rem; }
.khidden > :not(.hidebar) { opacity: .55; }
.wrow.khidden > .wfoot { opacity: 1; }
.wfoot .wact { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.slide.khidden .hidebar { order: -1; }
.tphoto.tagging { cursor: crosshair; outline: 3px solid var(--accent); }
.tphoto .ttag.on { background: var(--accent); outline: 2px solid #fff; }
.ptools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; }
.ptools.tagging { display: grid; }
.tpadd { cursor: pointer; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pchip { min-width: 2.4em; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 700; }
.pchip.done { opacity: .55; }
.pchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; }
.pnrin { width: 6em; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.ttag { position: absolute; transform: translate(-50%, -50%); background: #d81e1e; color: #fff; font-weight: 700; font-size: .85rem; min-width: 1.8em; padding: 1px 5px; text-align: center; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.lcourt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: #f8cba0; color: #111; border: 2px solid #169ba6; border-radius: 8px; overflow: hidden; }
.lnet { grid-column: 1 / -1; background: #169ba6; color: #fff; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; text-align: center; padding: 1px 0; }
.lz { display: grid; justify-items: center; align-content: center; gap: 0; min-height: 76px; padding: 6px 4px; text-align: center; border-right: 1px solid rgba(0,0,0,.08); }
.lz:nth-child(3n) { border-right: 0; }
.lz:nth-child(n + 4) { border-top: 1px dashed rgba(0,0,0,.25); }
.lz b { font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.lz span { font-size: .8rem; font-weight: 600; }
.lz i { font-style: normal; font-size: .7rem; opacity: .7; }
.lstrip { grid-template-columns: 1fr; margin-top: -4px; }
.lstrip .lz { min-height: 0; border: 0; }
.lstart { font-size: .9rem; }
/* Eli 28/10: Lefty takes no extra line: next to the number in the matrix, right of Voordeel/Nadeel on the card */
.ksegrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ksegrow .lefty { margin-left: auto; flex: none; }
.cmx tbody th b .lefty { display: inline-block; font-family: system-ui, sans-serif; white-space: nowrap; font-size: .5rem; padding: 1px 4px; margin-left: 3px; vertical-align: 3px; letter-spacing: 0; }
.lefty { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #7030a0; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.lfbtn { margin-left: 6px; padding: 1px 6px; border-radius: 999px; border: 1px dashed var(--line); background: none; color: var(--muted); font-size: .7rem; cursor: pointer; }
.lfbtn:not([aria-pressed="true"]) { opacity: .6; }
.lfbtn[aria-pressed="true"] { background: #7030a0; border: 1px solid #7030a0; color: #fff; font-weight: 700; }
.luedit { display: grid; gap: 10px; padding: 12px; }
.lsel .lz { min-height: 64px; gap: 4px; min-width: 0; padding: 6px; }
.lsel select { width: 100%; max-width: 100%; font: inherit; font-size: .8rem; padding: 4px; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); background: #fff; color: #111; }
table.roster { width: 100%; border-collapse: collapse; font-size: .88rem; }
.roster th { text-align: left; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.roster td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.roster tr.st td { font-weight: 700; }
.roster td:first-child { width: 2.4em; }
.lstaff { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--muted); }
.lstaff b { color: var(--fg); font-weight: 600; margin-right: 4px; }
@media (min-width: 900px) {
  .bkgrid.rots, .bkgrid.receptie, .bkgrid.opslag { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .bkgrid.ploeg { display: grid; grid-template-columns: 3fr 2fr; align-items: start; }
}
/* rotation card: the court on top, the five situations (R+#, R!, R-, DEF, FREE) in a grid under it */
.kcard.so .kso { grid-template-columns: 1fr; }
.kcard.so .rtab.native { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.kcard.so .rc em { font-size: .62rem; } .kcard.so .rc { padding: 2px 1px; }
.kcard.so .rtab:not(.native) { max-width: 160px; justify-self: center; }
.bkgrp, .bkbody, .bkc, .bkbody .kwrap, .bkbody .kcard { min-width: 0; }
.roster td:nth-child(2) { overflow-wrap: anywhere; }
.roster td:nth-child(2) > span { display: inline; }
.roster td:nth-child(n + 3), .roster th:nth-child(n + 3) { text-align: right; white-space: nowrap; }
.kcard.lineup { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.kcard.lineup > * { min-width: 0; }
.bkmcat { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; margin-top: 4px; }
.bkmore .watchrow > .label { flex-basis: 100%; }
/* her note on a card: tap the text (or the pencil) to open the panel */
button.knp { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--accent); color: inherit; font: inherit; font-size: .92rem; cursor: pointer; }
.knp .label { color: var(--accent); }
.notebtn.has { color: var(--accent); }
/* rotations: one at a time */
.bkrots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bkrots button { padding-inline: 4px; font-weight: 700; }
/* attack folds: the fold already names the player and her position */
.bkp .kcard > .khead { display: none; }
/* who does what */
table.cmx { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .66rem; }
.cmx col.w1 { width: 60px; } .cmx col.w2 { width: 34px; }
.cmx th, .cmx td { border-bottom: 1px solid var(--line); padding: 4px 1px; text-align: center; background: none; }
.cmx tr.first > * { border-top: 2px solid var(--line); }
.cmx tr.cmxpos th { text-align: left; padding: 10px 4px 4px; font-family: var(--display); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); border-bottom: 2px solid var(--accent); }
.cmx thead th { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-size: .66rem; }
.cmx tbody th { text-align: left; font-weight: 500; line-height: 1.15; vertical-align: top; padding-left: 2px; white-space: normal; overflow: hidden; }
.cmx tbody th b { font-family: var(--display); font-size: 1.1rem; display: block; }
.cmx tbody th span { display: block; font-size: .66rem; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; white-space: normal; }
.cmx td { font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cmxcall { display: inline-grid; justify-items: center; gap: 1px; background: none; border: 0; padding: 2px 0; min-width: 32px; min-height: 32px; color: var(--fg); font-size: .62rem; cursor: pointer; }
.cmxcall i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.cmxcall b { font-size: .72rem; }
.cmxcall span { color: var(--muted); font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* booklet: pick one player or part, show one card (Eli 26/10) */
.bkpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.bkpick .chipbtn { min-height: 36px; }
.bkpick .chipbtn[aria-pressed="true"] { background: var(--accent, var(--fg)); border-color: var(--accent, var(--fg)); color: var(--accent-ink, #fff); font-weight: 700; }
.bkpick .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger, #c0392b); vertical-align: middle; }
/* the setter switch above already picks her column of the second-ball card */
.bkhands .kseg { display: none; }

/* round 4 (Eli 26/10) */
/* the picked chip/switch already says who or what: no card header repeating it in the booklet */
.bkbody .kwrap .kcard:not(.lineup):not(.team):not(.hands) > .khead { display: none; }
/* players: name and number stay in the bar when it shrinks; the opponent is not needed there */
.bar .wnr { display: none; font-style: normal; }
body.scrolled .bar.pl .brand .who { display: block; }
body.scrolled .bar.pl .who > span, .bar.pl .ctx { display: none !important; }
body.scrolled .bar.pl .wnr { display: inline; }
/* roster: one line per player, starters stand out */
.roster td.rp { font-weight: 700; width: 2.2em; }
.roster tr.st td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.roster tr.st td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.stkey { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.kswitch { display: grid; gap: 4px; }
.kcnote { display: block; font-size: .72rem; color: var(--muted); margin: -2px 0 4px; }
.roster td.rp, .roster th:nth-child(3) { text-align: center; }
.kseg button { white-space: nowrap; }
/* RED INSIDE: same colour as RED, but marked as coming inside (Eli 26/10) */
.cmx td.ins { box-shadow: inset 0 0 0 3px #fff; }
.cmx td.ins small { display: block; font-size: .56rem; }
.cmxcall span { white-space: normal; line-height: 1.05; font-size: .56rem; max-width: 34px; }
.cmxcall em { font-style: normal; font-weight: 700; font-size: .56rem; color: #00b0f0; white-space: nowrap; }

/* laptop (Eli 27/10: "it feels like a phone app on a laptop"): side menu instead of the bottom tab bar,
   wide content, the booklet as a list of groups on the left with one group open on the right */
.tabbar .tlogo, .bktoc, .tabbar button.lp { display: none; }
@media (min-width: 1100px) {
  body.hastabs { --side: 228px; }
  body.hastabs .tabbar { top: 0; bottom: 0; right: auto; width: var(--side); border-top: 0; border-right: 1px solid var(--line); padding: 14px 12px; z-index: 41; }
  .tabbar-in { max-width: none; grid-auto-flow: row; grid-auto-columns: auto; align-content: start; gap: 4px; }
  .tabbar .tlogo { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 8px 18px; color: var(--fg); cursor: pointer;
    font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .03em; }
  .tabbar .tlogo img { width: 38px; height: 38px; border-radius: 9px; }
  .tabbar button[data-tb] { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: .98rem; letter-spacing: 0; cursor: pointer; }
  .tabbar button[data-tb]:hover { background: var(--surface2); color: var(--fg); }
  .tabbar button[data-tb][aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
  .tabbar button[data-tb][aria-current="page"] svg { transform: none; }
  .tabbar button.ph { display: none; } .tabbar button.lp { display: flex; }
  .wrap > .tabs.ctabs { display: none; }
  body.hastabs .bar, body.hastabs main { padding-left: calc(var(--side) + 32px); padding-right: 32px; }
  body.hastabs main { padding-top: 24px; padding-bottom: 60px; }
  body.hastabs .toast { bottom: 24px; left: calc(50% + var(--side) / 2); }
  body.hastabs .bar .brand img { display: none; }
  body.hastabs .bar.pl { display: block; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 0; padding-block: 10px; }
  body.hastabs .bar-in, body.hastabs .wrap { max-width: 1280px; margin: 0 auto; }
  body.hastabs .wrap > .wrap { margin: 0; width: 100%; }
  body.hastabs .bar .bar-in { min-height: 36px; }
  body.hastabs .wrap > .tabs { margin-inline: 0; padding-inline: 0; }
  /* the booklet: groups on the left, the open group fills the rest */
  .booklet.hastoc { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; }
  .bkmain { display: grid; gap: 12px; min-width: 0; }
  .booklet .bktoc { display: grid; gap: 2px; position: sticky; top: calc(var(--barh) + 64px); }
  .bktoc button { text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 12px; color: var(--muted); cursor: pointer;
    font-family: var(--display); font-weight: 600; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .03em; }
  .bktoc button:hover { background: var(--surface2); color: var(--fg); }
  .bktoc button[aria-current="true"] { background: var(--surface); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
  .booklet.hastoc details.bkgrp:not([open]) { display: none; }
  .booklet.hastoc details.bkgrp > summary { pointer-events: none; }
  .booklet.hastoc details.bkgrp > summary::before { display: none; }
  /* a whole card fits on the screen: smaller courts, the rotation table next to its court */
  .bkbody .court { max-width: min(340px, 42vh); }
  .kcard.so .kso { grid-template-columns: minmax(0, min(340px, 42vh)) minmax(0, 1fr); gap: 20px; }
  .bkbody .seg { justify-self: start; max-width: 100%; flex-wrap: wrap; border-radius: 22px; }
  .bkbody .seg button { flex: none; padding: 8px 18px; min-width: 64px; }
  /* Playbook: the points of a part side by side */
  .pbitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); column-gap: 28px; }
  /* Samenvatting: readable on a big screen */
  table.cmx { font-size: .82rem; } .cmx thead th { font-size: .8rem; }
  .cmx col.w1 { width: 130px; } .cmx col.w2 { width: 64px; }
  .cmx tbody th b { font-size: 1.3rem; } .cmx tbody th span { font-size: .82rem; }
  .cmxcall i { width: 18px; height: 18px; } .cmxcall b, .cmxcall em { font-size: .8rem; } .cmxcall span { font-size: .7rem; max-width: 60px; }
  .cmx td.ins small { font-size: .66rem; }
  .pbcodes { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px 28px; }
}

/* Playbook › Calls instellen: the standard call per attack position, the calls per opponent */
.cslist { display: grid; gap: 10px; }
.csrow { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line, #e5e5e5); }
.cslist > .csrow:first-child, .card > b + .csrow { border-top: 0; }
.cstog { display: flex; flex-wrap: wrap; gap: 6px; }
button.kcall.cst { width: auto; background: transparent; color: inherit; border: 2px solid #999; padding: 4px 8px; font-size: .78rem; opacity: .75; }
button.kcall.cst.on { opacity: 1; border-color: transparent; }
button.kcall.cst.none.on { background: #555; color: #fff; }
.cscols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.cscol { display: grid; gap: 4px; align-content: start; }
.cschips { display: flex; flex-wrap: wrap; gap: 4px; }
.cschips .kcall { font-size: .78rem; padding: 4px 8px; }
.cscol > .link { justify-self: start; text-align: left; }
/* pick and play: every word of a call is a choice */
.cwords { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.cw { display: grid; gap: 2px; font-size: .72rem; color: var(--muted, #888); }
.cw select { font: inherit; font-size: .85rem; color: var(--fg); padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface, #fff); }
.ceditor { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.cecall { display: grid; gap: 6px; }
.cprev { max-width: 320px; }
.kprev .cprev { margin-top: 6px; }
.csopen { justify-self: start; text-align: left; }
/* Plan against the opponent: the system on the attack card */
.ksys { display: grid; gap: 6px; margin: 6px 0; }
.ksys > .link { justify-self: start; }
.kcheck { margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .75rem; cursor: pointer; white-space: nowrap; }
.kcheck.on { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.plan { display: grid; gap: 12px; }
.planlist { display: grid; gap: 14px; }
.nsmall { width: 4.5em; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font: inherit; }
.clib > summary { cursor: pointer; }
.lblist { display: grid; gap: 4px; }
.lblist input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font: inherit; }

/* ---- the paper booklet from the app (print.js): A4 landscape, two A5 pages per side, folded ---- */
body.printing > *:not(#pview) { display: none !important; }
#pview { --fg: #111; --muted: #333; --line: #ccc; --surface2: #f1f1f1; background: #e4e4e4; color: #111; min-height: 100vh; padding-bottom: 40px; }
#pview .pbar { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid #ccc; flex-wrap: wrap; }
#pview .pmuted { color: #555; font-size: .85rem; }
#pview .prow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#pview .pread { display: grid; grid-template-columns: repeat(auto-fill, 148.5mm); gap: 8mm; justify-content: center; padding: 8mm; }
#pview .pprint { display: none; }
#pview.show-print .pread { display: none; }
#pview.show-print .pprint { display: grid; gap: 12mm; justify-content: center; padding: 12mm 8mm; }
#pview .ppage { width: 148.5mm; height: 210mm; background: #fff; padding: 3mm 3mm 5mm; display: flex; flex-direction: column; gap: 1.5mm; position: relative; box-sizing: border-box; overflow: hidden; }
#pview .pspread .ppage { box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
#pview .psheet { width: 297mm; height: 210mm; display: flex; background: #fff; position: relative; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
#pview .pslabel { position: absolute; top: -6mm; left: 0; font-size: .8rem; color: #555; }
#pview .ptick { position: absolute; left: 50%; height: 2mm; border-left: .2mm solid #999; } #pview .ptick.t { top: 0; } #pview .ptick.b { bottom: 0; }
#pview .pslot { position: relative; overflow: hidden; min-height: 0; flex-basis: 0; display: flex; align-items: center; justify-content: center; }
#pview .pfoot { position: absolute; bottom: 1mm; left: 0; right: 0; text-align: center; font-size: 7pt; color: #999; }
/* Eli 27/10: no boxes. NOTES is a title with dotted lines, as in 4. Boekje */
#pview .pnote { padding: 1mm 4mm 2mm; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
#pview .pnote > b { text-align: center; text-decoration: underline; font-size: 11pt; font-family: var(--display); font-weight: 700; letter-spacing: .04em; }
#pview .pnote .plines { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
#pview .pnote .plines i { flex: none; height: 8mm; border-bottom: .3mm dashed #888; }
#pview .pskip { position: absolute; top: 1mm; right: 1mm; font: inherit; font-size: 8pt; background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 1px 6px; color: #a33; cursor: pointer; opacity: 0; }
#pview .pslot:hover .pskip, #pview .pskip:focus { opacity: 1; }
#pview .pprint .pskip { display: none; }
#pview .wm { display: none; }
#pview .court .cf { fill: #fff; } #pview .court .cg { stroke: #ddd; }
#pview .court .csub { font-size: .8px; }
/* the svg itself already cuts off at its edges; a clip path in a scaled print page can drop a whole court */
#pview svg.court g[clip-path] { clip-path: none; }
/* one "slide": drawn at 960 px wide and scaled into its third of the page */
#pview .pblk { width: 960px; flex: none; box-sizing: border-box; font-size: 22px; line-height: 1.18; color: #111; padding: 2px 4px; display: flex; gap: 14px; background: #fff; overflow: hidden; }
#pview .pblk h2, #pview .pblk h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; color: #111; }
#pview .pblk h3 { font-size: 32px; }
#pview .pprev { display: block; } #pview .pprevin { height: 100%; width: 100%; overflow: hidden; font-size: 17px; }
#pview .pprevin h3 { font-size: 1.6em; } #pview .pprevin .tablewrap { width: max-content; max-width: none; }
#pview .pprev .tablewrap { overflow: visible; margin: 4px 0 0; } #pview .pprev table { font-size: 1em; width: 100%; border-collapse: collapse; color: #111; }
#pview .pprev caption { padding: 0 0 2px; font-weight: 700; font-size: 1.05em; } #pview .pprev th, #pview .pprev td { padding: .12em .2em; border-bottom: 1px solid #ccc; background: none; position: static; }
#pview .pprev .zs { display: none; }
#pview img[data-path]:not([src]) { visibility: hidden; }
#pview .pblk .pnl { margin: 2px 0 6px; padding: 0; list-style: none; display: grid; gap: 1px; }
#pview .pblk .pnl li { position: relative; padding-left: 1em; } #pview .pblk .pnl li::before { content: "•"; position: absolute; left: .15em; }
#pview .pblk .pnl li.l1 { margin-left: 1.1em; } #pview .pblk .pnl li.l1::before { content: "◦"; } #pview .pblk .pnl li.l2 { margin-left: 2.2em; } #pview .pblk .pnl li.l2::before { content: "▪"; }
#pview .pblk .psub { font-weight: 700; font-size: .9em; text-transform: uppercase; font-family: var(--display); letter-spacing: .04em; margin-top: 8px; }
#pview .pblk .pcols { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; }
#pview .pblk .pcol { min-width: 0; display: flex; flex-direction: column; gap: 3px; min-height: 0; }
#pview .pblk .plab { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 21px; text-align: center; }
#pview .pblk .pstat { font-size: 17px; text-align: center; line-height: 1.25; }
#pview .pblk .pcalls { display: grid; gap: 2px; }
#pview .pblk .pcalls div { padding: 3px 4px; font-weight: 700; font-size: 17px; text-align: center; line-height: 1.1; }
#pview .pblk .pcourt { flex: 1; min-height: 0; display: flex; justify-content: center; }
#pview .pblk .pcourt svg { height: 100%; width: auto; max-width: 100%; }
#pview .pblk .pnotes { font-size: 19px; overflow: hidden; }
/* attack, 2e hands, defence: title and notes on the left, the courts on the right */
#pview .pside2 .ptxt { width: 380px; flex: none; overflow: hidden; }
#pview .pside2 .ptxt.pfix { display: grid; grid-template-rows: auto repeat(var(--n), 1fr); }
#pview .pside2 .pcols { max-width: 560px; margin-left: auto; }
/* as the old booklets: every court column is a thin grey frame with its header on top */
#pview .pside2 .pcol, #pview .psetter .pcol { border: 1px solid #c9c9c9; padding: 2px 3px 3px; }
/* their setter: name and intro on top, three courts with the notes under them */
#pview .psetter { flex-direction: column; gap: 4px; }
#pview .psetter .ptop { display: flex; gap: 24px; align-items: flex-start; max-height: 110px; }
#pview .psetter .ptop h3 { flex: none; padding-top: 4px; }
#pview .psetter .pintro { font-size: 19px; overflow: hidden; max-height: 110px; columns: 2; column-gap: 24px; flex: 1; }
#pview .psetter .pintro .pnl { margin: 0; display: block; } #pview .psetter .pmoney { break-inside: avoid; }
#pview .psetter .pcols { gap: 30px; }
#pview .psetter .pcourt { flex: 1 1 200px; align-items: flex-start; } #pview .psetter .pcourt svg { width: 100%; height: auto; max-height: 100%; } #pview .psetter .pnotes { flex: 0 1 auto; min-height: 0; max-height: 120px; }
/* the rotations: three per slide, court with the table next to it, notes under it */
#pview .prots { gap: 28px; }
#pview .prot, #pview .prots .pfill { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#pview .prot .prh { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
#pview .prot .prh b { font-family: var(--display); font-size: 28px; }
#pview .prot .prh span { background: #fff; color: #111; border: 1.5px solid #111; font-weight: 800; font-size: 15px; padding: 0 6px; border-radius: 3px; }
#pview .prot .pbanner { background: #d4f0da; color: #111; border: 1.5px solid #111; border-radius: 4px; font-style: normal; font-weight: 800; font-size: 14px; line-height: 1.1; padding: 2px 6px; max-width: 150px; text-align: center; }
#pview .prot .prow2 { flex: 1 1 310px; min-height: 0; display: flex; gap: 3px; }
#pview .prot .prow2 .pcourt { flex: 1; min-width: 0; }
#pview .prot .ptab { flex: 0 0 150px; min-height: 0; display: flex; justify-content: center; }
#pview .prot .ptab img.rtab { height: 100%; width: auto; max-width: 100%; border-radius: 0; }
#pview .prt { border-collapse: collapse; font-size: 14px; line-height: 1; width: 100%; height: 100%; table-layout: fixed; }
#pview .prt td, #pview .prt th { border: 1px solid #888; text-align: center; padding: 0; }
#pview .prt tr.rh > * { background: #222; color: #fff; font-weight: 700; } #pview .prt tr.rh th { text-align: left; padding-left: 2px; }
#pview .prt tr.rh td.neg { color: #ff8a80; }
#pview .prt i { display: block; font-style: normal; font-size: .85em; color: #222; } #pview .prt .neg { color: #c62828; }
/* the serve: six servers next to each other */
#pview .pserve { gap: 8px; }
#pview .psv, #pview .pserve .pfill { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pview .psv .plab { font-size: 19px; line-height: 1.05; min-height: 2.1em; display: flex; align-items: flex-end; justify-content: center; }
#pview .psv .pstat { font-size: 15px; }
#pview .psv .pcourt { flex: 0 1 270px; } #pview .psv .pnotes { flex: 1; min-height: 0; font-size: 17px; }
#pview .psv .pnotes .pnl li { padding-left: .8em; }
/* the reception: one list, two columns when it is long */
#pview .precep { flex-direction: column; gap: 4px; }
#pview .precep .pcols2 { flex: 1; min-height: 0; overflow: hidden; }
#pview .precep .pcols2.two { columns: 2; column-gap: 28px; }
#pview .precep .prc { break-inside: avoid; margin-bottom: 4px; }
#pview .precep .prc > b { font-weight: 800; } #pview .precep .prc > span { font-weight: 700; font-size: .88em; }
#pview .precep .pnl { margin: 0; }
/* the team: line-up on a little court, the roster next to it */
#pview .plineup { gap: 26px; }
#pview .plu { flex: 0 0 330px; display: flex; flex-direction: column; gap: 10px; }
#pview .plc { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid #111; font-family: var(--display); font-weight: 700; font-size: 34px; text-align: center; }
#pview .plc > div { padding: 10px 0; }
#pview .plc.back + .plc.front { border-top: 1px solid #888; margin-top: -10px; }
#pview .plc .pnet { grid-column: 1 / -1; padding: 0; border-top: 4px solid #111; font-family: var(--body, inherit); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
#pview .pls { font-size: 17px; margin-top: -4px; }
#pview .plc.lib { grid-template-columns: 1fr; }
#pview .pros { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pview .pros h2 { font-size: 36px; text-align: center; text-decoration: underline; }
#pview .pros .pwhen { text-align: center; font-size: 18px; color: #222; margin-bottom: 4px; }
#pview .pros table { border-collapse: collapse; font-size: 18px; line-height: 1.1; }
#pview .pros th { text-align: left; text-decoration: underline; font-size: 15px; padding: 0 10px 2px 0; }
#pview .pros td { padding: 0 10px 0 0; } #pview .pros tr.st td { font-weight: 800; }
#pview .pros .pstaff { display: flex; gap: 18px; font-size: 17px; margin-top: 4px; }
/* the matrix, the other slides */
#pview .pmatrix { flex-direction: column; gap: 4px; }
#pview .pmatrix .cmx { width: 100%; font-size: 19px; } #pview .pmatrix .cmx col.w1 { width: 150px; } #pview .pmatrix .cmx col.w2 { width: 90px; }
#pview .pmatrix .cmx th, #pview .pmatrix .cmx td { padding: 2px 1px; }
#pview .pmatrix .cmx tbody th b { font-size: 18px; display: inline; margin-right: 6px; } #pview .pmatrix .cmx tbody th span { display: inline; font-size: 17px; }
#pview .pmatrix .cmxcall { grid-auto-flow: column; min-height: 0; font-size: 15px; gap: 4px; } #pview .pmatrix .cmxcall span { max-width: none; font-size: 14px; }
#pview .pmatrix .pleg { font-size: 15px; color: #222; }
#pview .pphoto { padding: 0; display: flex; justify-content: center; align-items: center; }
#pview .pph { position: relative; height: 100%; max-width: 100%; }
#pview .pph img { display: block; width: 100%; height: 100%; object-fit: contain; }
#pview .pph .ttag { font-size: 18px; }
/* line-up, roster and the team photo side by side on page 1 */
#pview .plineup .plph { flex: 0 0 330px; display: flex; align-items: flex-start; justify-content: center; }
#pview .plineup .plph .pph { height: auto; width: 100%; }
#pview .plineup .plph .pph .ttag { font-size: 14px; padding: 0 4px; }
#pview .plineup:has(.plph) { gap: 16px; } #pview .plineup:has(.plph) .plu { flex-basis: 230px; } #pview .plineup:has(.plph) .plc { font-size: 30px; }
#pview .pros.withph h2 { font-size: 30px; } #pview .pros.withph table { font-size: 16px; }
/* a slide without a drawing the app can read: its text only, the columns next to each other */
#pview .pnodraw .ptxt { width: 100%; } #pview .pnodraw .pcolsx { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 24px; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body.printing { background: #fff; }
  #pview { background: #fff; padding: 0; }
  #pview .noprint, #pview .pread, #pview .pslabel { display: none !important; }
  #pview .pprint { display: block !important; padding: 0 !important; }
  #pview .psheet { box-shadow: none; break-after: page; page-break-after: always; }
  #pview, #pview * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* the analysis from the data next to the notes (coach) */
.khints { display: grid; gap: 4px; margin: 4px 0 8px; }
.khints .kh { display: flex; gap: 8px; align-items: baseline; text-align: left; font: inherit; font-size: .85rem; background: var(--surface2); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.khints .kh i { font-style: normal; font-weight: 800; width: 1em; flex: none; text-align: center; }
.khints .kh b { font-weight: 600; color: var(--accent, #0a7a3d); }
.khints .kh.used { opacity: .5; }
.khints.plh { margin-top: 6px; }
.khints.plh .kh { cursor: default; }
.khints .kh.info { background: none; border: none; padding: 0 2px; color: var(--muted); font-size: .8rem; cursor: default; }
/* the pre-match quiz */
.quizcard { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz h2 { font-size: 1.5rem; margin: 6px 0; text-transform: none; }
.qopts { display: grid; gap: 8px; margin: 12px 0; }
.qopt { font: inherit; font-weight: 600; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.qopt.right { border-color: #1e9b4f; background: #e3f5ea; color: #0d4d26; }
.qopt.wrong { border-color: #c0392b; background: #fbe7e5; color: #6b1a12; }
.qres { margin: 8px 0 12px; }

/* Herbekijk de match (rewatch.js): the video and its main buttons stay in view while the list scrolls under
   them (below the top bar); the rest of the controls under "Meer". Side by side on a laptop. */
.rwgrid { display: grid; gap: 10px; }
.rwplay { position: sticky; top: calc(var(--barh, 56px) + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 4px 0 6px; display: grid; gap: 6px; margin: 0 -2px; }
.rwplay .vbox { max-height: 34dvh; margin: 0 auto; width: auto; aspect-ratio: 16 / 9; }
.rwrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.rwnow { display: grid; gap: 1px; font-size: .9rem; }
.rwctl { display: grid; gap: 6px; }
.rwctl .pgrp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rwctl .btn.on { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); color: var(--fg); }
.rwctl .seg { flex: 0 1 auto; }
.rwctl .seg button { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.rwctl .ptrans .btn { min-height: 40px; padding: 4px 12px; }
.rwctl .pplay { min-width: 56px; font-size: 1.1rem; }
.rwctl .ppre { min-width: 4.5ch; text-align: center; font-size: .85rem; }
@media (max-width: 899px) { .rwplay { margin: 0 -16px; padding: 4px 16px 6px; } .rwctl .u { display: none; } .rwctl .ptrans .btn { min-width: 52px; font-size: 1.2rem; } .rwrow { flex-wrap: nowrap; } }
.rwmore { margin-bottom: 6px; }
.rwmore summary { cursor: pointer; padding: 6px 0; }
.rwmore .rwctl { padding: 4px 0 8px; }
.rwfil { display: grid; gap: 6px; }
.rwfil .fchips button { padding: 4px 10px; min-height: 32px; white-space: nowrap; }
@media (max-width: 899px) {     /* phone: one swipeable row per filter, so the list starts high */
  .rwfil .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .rwfil .fchips::-webkit-scrollbar { display: none; }
  .rwfil .fchips .label { min-width: 4.6em; position: sticky; left: 0; background: var(--bg); padding-right: 4px; }
}
.rwlist { display: grid; gap: 4px; margin-top: 8px; }
.rwset { margin-top: 10px; }
.rwit { display: grid; grid-template-columns: 3.6em 1fr auto; gap: 8px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 8px 10px; min-height: 44px; }
.rwit:has(> span:nth-child(4)) { grid-template-columns: 3.6em 1fr auto auto; }
.rwit > .num:first-child { color: var(--muted); }
.rwit.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
/* Live tags: Hele match | Tags | Van de coach, and the head coach's send row under the video */
.rwmode { margin-bottom: 8px; }
.rwmode button { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.rwtag.me { border-left: 3px solid var(--accent); }
.rwsend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.rwsend input { flex: 1 1 12em; min-width: 0; min-height: 36px; }
.rwsend select { min-height: 36px; max-width: 100%; }
.rwpt { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.rwpt.w { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.rwpt.l { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
@media (min-width: 900px) {
  .rwgrid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
  .rwplay .vbox { max-height: none; width: 100%; }
  .rwside { max-height: calc(100dvh - 140px); overflow-y: auto; padding-right: 4px; }
}

/* Schrijven: every card on one page, notes typed straight in (saved by themselves) */
.write { display: grid; gap: 12px; }
.wlist { display: grid; gap: 10px; }
.wgrp { margin: 14px 0 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wrow { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wrow .wname { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.wrow textarea { width: 100%; font: inherit; resize: vertical; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.wrow .kcalls { display: flex; flex-wrap: wrap; gap: 4px; }
.wsaved { min-height: 1.2em; }
.wcourt { justify-self: center; width: 100%; max-width: 260px; }
.wcourt .court { max-width: 100%; }
.wdraft { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-color: var(--accent); }
@media (min-width: 1100px) { .wrow { grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .wrow > .wname, .wrow > .kcalls, .wrow > .formrow { grid-column: 1 / -1; } .wrow > .wcourt { grid-column: 1; } .wrow > textarea { grid-column: 2; } .wrow:not(:has(> .wcourt)) > textarea { grid-column: 1 / 3; } .wrow > .kedit { grid-column: 2 / -1; } .wrow > .khints { grid-column: 3; grid-row: span 1; } }


/* Eli 28/10: serve numbers, one row per kind of serve (float / spin) */
.svstats { display: grid; gap: 3px; font-size: .82rem; color: var(--muted); }
.svrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.svrow b { color: var(--fg); font-weight: 650; }
.svrow b.neg { color: #c00000; } .svrow b.pos { color: #1d7a3a; }
.svk { display: inline-flex; align-items: center; gap: 4px; min-width: 4.4em; font-weight: 700; color: var(--fg); }
.svk i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
#pview .svstats { font-size: 15px; gap: 1px; justify-items: center; }
#pview .svrow { gap: 0 6px; } #pview .svk { min-width: 0; } #pview .svk i { width: 8px; height: 8px; }

/* Eli 28/10: our plan per rotation (block per outside spiker, our middles' option) */
.rplan { display: grid; gap: 6px; margin: 8px 0; }
.rplan .label { margin-top: 4px; }
.rpr { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.rpn { display: flex; gap: 4px; flex: none; }
.rpn .chipbtn { min-width: 40px; justify-content: center; padding-inline: 0; }
.rpn .chipbtn[aria-pressed="true"] { background: var(--accent, var(--fg)); border-color: var(--accent, var(--fg)); color: var(--accent-ink, #fff); font-weight: 700; }
.rpr > b { min-width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--surface2)); color: #fff; font-size: .95rem; }
.rpr > span { flex: 1; min-width: 0; }
.rpr > span i { color: var(--muted); font-style: normal; font-size: .85rem; }
.rpr select { min-width: 9.5em; }
.rpt { font-style: normal; font-weight: 700; font-family: var(--display, inherit); letter-spacing: .02em; }
#pview .rplan { gap: 2px; margin: 2px 0; font-size: .8em; }
#pview .rpr > b { min-width: 20px; height: 20px; font-size: .8em; }
/* Na de match: the tactical changes from GHL Live (coaches) */
.achgl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.achgl li { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; padding: 6px 0 6px 10px; border-left: 3px solid #f2b53a; }
@media (max-width: 480px) { .achgl li { grid-template-columns: 1fr; gap: 2px; } }
/* coach to-do for the next match (Eli 28/10) */
.todocard { display: grid; gap: 6px; }
.todo { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line, #2b3430); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.todo.warn { border-color: #f2b53a; }

/* the tactics log (tactics.js) */
.tlog { display: grid; gap: 10px; }
.tllist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tlline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 4px; }
.tlline.dec { border-left: 4px solid var(--accent, #0a7a3d); }
.tlline s { color: var(--muted); }
.tlmeta .chip { font-size: .72rem; padding: 1px 6px; }
.tlrow { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.tlshow { display: flex; gap: 6px; align-items: center; font-size: .85rem; }
.tlform { display: grid; gap: 8px; }
.tlform textarea, .tlform input { width: 100%; box-sizing: border-box; }
.tlcard .tlline { border: none; padding: 4px 0; background: none; }
