/* Publieke pagina's: programma, indeling en uitslagenmatrix */
body.public { background: var(--bg); }

.pub-head { background: var(--header-grad); color: #fff; }
.pub-head-in { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.pub-head .brand img { height: 44px; width: auto; display: block; line-height: 44px; }
.pub-name { font-family: var(--font-head); color: #fff; font-size: 1.25rem; line-height: 1.15; }
.pub-head-in { flex-wrap: wrap; }
.pub-title { min-width: 0; flex: 1 1 auto; }
.pub-head-picker { margin-left: auto; }
.pub-foot-picker { display: none; }
.pub-picker select { min-height: 40px; max-width: 260px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.95); color: var(--text); font-weight: 600; padding: 6px 14px; }
body.embed .pub-picker { margin: 0 0 12px; }
body.embed .pub-picker select { border-color: var(--line); }
.pub-dates { color: rgba(255,255,255,.92); font-size: .85rem; }

.pub-tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; justify-content: center; background: #fff; padding: 6px 8px; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(22,41,63,.05); }
.pub-tabs { overflow-x: auto; scrollbar-width: none; }
/* rand vervaagt als er meer tabs zijn dan passen (alleen in een iframe; anders is er de balk onderin) */
body.embed .pub-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.pub-tabs a { white-space: nowrap; flex: none; color: var(--text); text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.pub-tabs a[aria-current] { background: var(--green); color: #fff; }
.pub-tabs .ic { width: 20px; height: 20px; flex: none; }
.tab-more { display: none; }
body.embed .pub-tabs { position: static; background: none; justify-content: flex-start; padding: 8px 16px 0; }
body.embed .pub-tabs a { color: var(--ink); border: 2px solid var(--line); }
body.embed .pub-tabs a[aria-current] { border-color: var(--green); color: #fff; }

.pub-wrap { padding-top: 16px; }
.pub-provisional { font-size: .9rem; }
.pub-intro h1 { margin-bottom: 8px; }
.pub-now { margin: 0 0 12px; }
.pub-now strong { background: var(--lime-soft); padding: 2px 8px; border-radius: 6px; }
.pub-search input { width: 100%; font-size: 1.1rem; min-height: 52px; border-radius: 999px; padding: 10px 20px; max-width: 520px; }
.pub-group { margin: 24px 0 10px; font-size: 1.1rem; }

/* Nu & straks: lopende en volgende ronde bovenaan het programma */
.pub-nu { display: grid; gap: 10px; margin: 4px 0 20px; }
.nu-round { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.nu-round > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px; font-family: var(--font-head); font-weight: 600; }
.nu-round > summary::-webkit-details-marker { display: none; }
.nu-round > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.nu-round[open] > summary::after { transform: rotate(-135deg); }
.nu-kicker { background: var(--green); color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 999px; }
.nu-list { list-style: none; margin: 0; padding: 0; }
.nu-list a { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 10px; align-items: center; min-height: 56px; padding: 8px 16px; color: var(--text); text-decoration: none; border-top: 1px solid #f0f0ea; }
.nu-list a:hover { background: var(--lime-soft); }
.nu-veld { font-family: var(--font-head); font-size: 1.5rem; line-height: 1; text-align: center; }
.nu-veld small { display: block; font-family: var(--font); font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nu-match { min-width: 0; }
.nu-teams { display: block; font-weight: 600; overflow-wrap: anywhere; }
.nu-teams .vs { color: var(--muted); font-weight: 400; }
.nu-teams .won { color: var(--ok); }
.nu-meta { display: block; color: var(--muted); font-size: .78rem; }
.nu-poule { font-weight: 700; color: var(--pc); }
.nu-res { font-family: var(--font-head); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.nu-list li.is-followed a { background: #eef6c8; box-shadow: inset 4px 0 0 var(--lime-dark); }
.nu-list li.is-followed .nu-teams::after { content: " ★"; color: var(--lime-dark); }
.pub-indeling-kop { margin-top: 8px; }
.nu-static .nu-head { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 52px; padding: 8px 16px; font-size: 1.05rem; }
.nu-res .muted { font-family: var(--font); font-weight: 400; }
.chip.now:not(.on) { border-color: var(--warn); }

/* Poulekaarten met teams */
.pub-poules { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.pub-poule { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pub-poule-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px; background: var(--pc); color: #fff; text-decoration: none; }
.pub-poule-head:hover { filter: brightness(1.08); }
.pub-poule-head .pname { font-family: var(--font-head); font-size: 1.05rem; }
.pub-poule-head .pfield { font-size: .78rem; opacity: .9; text-align: right; }
.pub-teamlist { list-style: none; margin: 0; padding: 4px 0; }
.pub-teamlist a { display: flex; gap: 10px; align-items: center; padding: 8px 14px; min-height: 40px; color: var(--text); text-decoration: none; border-top: 1px solid #f0f0ea; }
.pub-teamlist a:hover, .pub-teamlist li.hit a { background: var(--lime-soft); }
.pub-teamlist .nr, .pub-chips .nr { font-family: var(--font-head); color: var(--muted); width: 1.2em; text-align: right; flex: none; }

/* Poule-detail */
.pub-poulebar { border-left: 8px solid var(--pc); background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.pub-poulebar h1 { margin: 4px 0 2px; }
.pub-poulebar .pfield { color: var(--muted); }
.pub-back { font-size: .9rem; text-decoration: none; }
.pub-switch { margin-top: 10px; max-width: 360px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 44px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip.on .nr { color: #fff; opacity: .8; }

.pub-day h2 { margin-bottom: 10px; }
.pub-matches { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pub-matches th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.pub-matches td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pub-matches .num { text-align: right; width: 3em; }
.pub-matches .teams { font-weight: 600; }
.pub-matches .teams .vs { color: var(--muted); margin: 0 6px; }
.pub-matches .teams .won { color: var(--ok); }
.pub-matches .me { background: var(--lime-soft); border-radius: 4px; padding: 1px 4px; }
.pub-matches .res { white-space: nowrap; }
.pub-matches .setpts { display: block; font-size: .75rem; color: var(--muted); }
.pub-matches .ref { color: var(--muted); font-size: .9rem; }
.pub-matches tr.now td { background: #fff8d6; }
.pub-matches tr.now td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.pub-matches tr.refs .teams { font-weight: 400; color: var(--muted); }
.pub-matches tr.bye td { background: #fafaf7; }
.pub-round label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.pub-round select { min-width: 0; width: auto; max-width: 100%; }
.pub-round { max-width: 100%; }
.pub-round label { flex-wrap: wrap; }

/* Matrix */
.mx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { border-collapse: collapse; font-variant-numeric: tabular-nums; background: #fff; }
.matrix th, .matrix td { border: 1px solid #c9c9c1; }
.mx-corner { background: var(--pc); color: #fff; font-family: var(--font-head); font-size: 1.3rem; text-align: left; vertical-align: bottom; padding: 8px 12px; min-width: 190px; line-height: 1.1; }
.mx-col, .mx-sum, .mx-place { vertical-align: bottom; padding: 8px 4px; font-weight: 600; font-size: .85rem; background: #fafaf7; }
.mx-col span, .mx-sum span, .mx-place span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; white-space: nowrap; max-height: 170px; overflow: hidden; text-overflow: ellipsis; }
.mx-row { text-align: left; padding: 6px 10px; font-weight: 600; white-space: nowrap; background: #fafaf7; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mx-row, .mx-corner { position: sticky; left: 0; z-index: 1; }
.mx-row { box-shadow: 1px 0 0 #c9c9c1; }
.mx-row .nr { font-family: var(--font-head); color: var(--muted); margin-right: 8px; }
.mx-cell, .mx-self { width: 38px; min-width: 38px; height: 38px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.mx-cell a { display: block; color: inherit; text-decoration: none; line-height: 38px; }
.mx-self { background: var(--ink); }
.mx-cell.open { color: #b5b5ad; font-weight: 400; }
.mx-cell.v2 { background: #e3f2e4; }
.mx-cell.v1 { background: #fff8d6; }
.mx-cell.v0 { background: #fdecea; }
.mx-cell.sc { width: auto; min-width: 44px; padding: 0 4px; font-size: .9rem; white-space: nowrap; }
.mx-sum { text-align: center; min-width: 40px; }
td.mx-sum { font-size: 1rem; }
td.mx-saldo { min-width: 48px; font-size: .95rem; }
td.mx-saldo.pos { color: var(--ok); }
td.mx-saldo.neg { color: var(--err); }
.mx-gap { border: 0 !important; width: 10px; min-width: 10px; background: transparent !important; }
.mx-place { text-align: center; min-width: 44px; background: var(--ink) !important; color: var(--lime); font-family: var(--font-head); }
td.mx-place { font-size: 1.15rem; }
.matrix .hl { outline: 3px solid var(--warn); outline-offset: -3px; }
.matrix td.mx-cell.hl { background: var(--lime); color: var(--ink); }
.matrix th.hl { background: var(--lime-soft); }
.matrix th.ref { background: #fff4d1; }
.mx-reftag { font-size: .7rem; font-weight: 700; color: var(--warn-text); background: #fff; border-radius: 4px; padding: 0 4px; margin-left: 6px; }

/* elke matrix heeft ~500 px nodig; liever minder naast elkaar dan scrollen in de matrix */
.mx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); }
.mx-grid > * { min-width: 0; }
.mx-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.mx-card .ps-head { border-radius: var(--radius) var(--radius) 0 0; }
.mx-link { display: block; overflow: hidden; text-decoration: none; color: inherit; padding: 10px; border-radius: 0 0 var(--radius) var(--radius); }
.mx-card:hover { border-color: var(--lime-dark); }
.mx-card.is-followed { box-shadow: 0 0 0 3px var(--lime); }

/* Veldfilter (niet tijdens zoeken: dan alle velden) */
body:not(.searching) .vf-out { display: none !important; }
body.searching .vf-note { display: none; }
.veld-filter { margin: 10px 0 4px; }
.vf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vf-chips .chip { min-height: 34px; padding: 3px 12px; font-size: .88rem; cursor: pointer; font-family: inherit; }
.vf-chips .chip small { font-weight: 400; font-size: .72rem; margin-left: 5px; opacity: .75; }
.vf-select { display: none; margin: 0; }
.vf-select select { width: 100%; min-height: 44px; }
.vf-note { margin: 8px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--lime-dark); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 600px) {
  .vf-chips { display: none; }
  .vf-select { display: block; }
}
.mx-compact .mx-corner { font-size: 1rem; min-width: 110px; padding: 6px 8px; }
.mx-compact .mx-row { font-size: .8rem; max-width: 150px; padding: 3px 6px; }
.mx-compact .mx-col span, .mx-compact .mx-sum span, .mx-compact .mx-place span { font-size: .72rem; max-height: 140px; }
.mx-compact .mx-cell, .mx-compact .mx-self { width: 26px; min-width: 26px; height: 26px; font-size: .85rem; }
.mx-compact .mx-sum, .mx-compact .mx-place { min-width: 28px; }
.mx-compact .mx-reftag { display: none; }

.pub-stand td, .pub-stand th { white-space: nowrap; }

/* Standen */
.st-winner { display: flex; gap: 16px; align-items: center; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; border-left: 8px solid var(--lime); }
.st-trophy { font-size: 2.6rem; line-height: 1; }
.st-kicker { color: var(--lime); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.st-name { font-family: var(--font-head); font-size: 1.6rem; line-height: 1.15; margin: 2px 0 4px; }
.st-stat { color: #ddd; font-size: .9rem; }
.st-table tr.first td { background: var(--lime-soft); }
.st-table th.sortcol { color: var(--ink); }
.st-table td, .st-table th { white-space: nowrap; }
.print-title { display: none; }
@media print { .print-title { display: block; } .st-winner { background: #fff; color: #000; border: 2px solid #000; } .st-kicker, .st-stat { color: #000; } }
.pub-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }
.pub-intro.screen h1 { font-size: 2rem; }

@media (max-width: 600px) {
  .pub-head-in { padding: 8px 12px; }
  .pub-head .brand img { height: 34px; line-height: 34px; }
  .pub-name { font-size: 1.05rem; }
  .pub-tabs { justify-content: space-between; gap: 0; padding: 6px 4px; }
  .pub-tabs a { padding: 8px 6px; font-size: .88rem; }
  .pub-tabs a[aria-current] { padding: 8px 10px; }
  .pub-tabs .tab-long { display: none; }
  body.embed .pub-tabs .ic { display: none; }
  /* Navigatiebalk onderin (Material 3 navigation bar): icoon met label eronder, actieve tab met een pil om het icoon */
  body.public:not(.embed) { --navh: calc(64px + env(safe-area-inset-bottom)); padding-bottom: var(--navh); }
  .pub-nav { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; gap: 0; padding: 6px 4px env(safe-area-inset-bottom); border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -2px 12px rgba(22, 41, 63, .08); overflow: visible; }
  .pub-nav > a, .tab-more > summary { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 52px; border-radius: 0; background: none; font-size: .72rem; font-weight: 600; color: var(--muted); justify-content: center; }
  .pub-nav > a[aria-current], .tab-more.has-current > summary { background: none; color: var(--text); padding: 4px 2px; font-weight: 700; }
  .pub-nav .ic { width: 56px; height: 30px; padding: 4px 16px; border-radius: 999px; transition: background .15s; }
  .pub-nav > a[aria-current] .ic, .tab-more.has-current > summary .ic { background: var(--green); color: #fff; }
  .pub-nav .tab-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .pub-nav > a.tab-extra { display: none; }
  .tab-more { display: flex; flex: 1 1 0; min-width: 0; }
  .tab-more > summary { display: flex; align-items: center; list-style: none; cursor: pointer; position: relative; z-index: 1; }
  .tab-more > summary::-webkit-details-marker { display: none; }
  /* scrim: tikken naast het menu klikt op de summary en sluit het weer */
  .tab-more[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(14, 26, 43, .35); }
  .tab-sheet { position: fixed; left: 0; right: 0; bottom: var(--navh); z-index: 2; background: var(--card); border-radius: 20px 20px 0 0; padding: 8px 8px 12px; box-shadow: 0 -8px 24px rgba(14, 26, 43, .15); }
  .tab-sheet a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
  .tab-sheet a[aria-current] { background: var(--green-soft); color: var(--green-dark); }
  .tab-sheet .ic { width: 24px; height: 24px; padding: 0; border-radius: 0; background: none !important; color: var(--muted); }
  body.public .mijn-go { bottom: var(--navh, 0); }
  .pub-foot { padding-bottom: 24px; }
  .pub-matches:not(.mcards) th:nth-child(1), .pub-matches:not(.mcards) td:nth-child(1) { display: none; }
  .pub-matches td { padding: 8px 4px; }
  .mx-grid { grid-template-columns: 1fr; }
  .mx-corner { min-width: 120px; font-size: 1.05rem; }
  .mx-row { max-width: 150px; font-size: .9rem; }
}

/* PDF-menu: één rustige knop naast de titel */
.pub-h1row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pub-h1row h1 { margin-bottom: 8px; }
.pdf-menu { position: relative; flex: none; }
.pdf-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 10px; border-radius: 999px; color: var(--muted); font-size: .8rem; font-weight: 700; border: 1px solid transparent; }
.pdf-menu summary::-webkit-details-marker { display: none; }
.pdf-menu summary:hover, .pdf-menu[open] summary { color: var(--text); border-color: var(--line); background: var(--card); }
.pdf-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.pdf-row { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 8px; }
.pdf-row + .pdf-row { border-top: 1px solid #f0efea; }
.pdf-name { flex: 1; font-size: .9rem; font-weight: 600; }
.pdf-row a { font-size: .82rem; text-decoration: none; padding: 6px 8px; border-radius: 6px; min-height: 32px; display: inline-flex; align-items: center; }
.pdf-row a:hover { background: var(--lime-soft); }
/* PDF-knop in de gekleurde kop van een poulekaart */
/* eigen laag boven de matrix (vaste kolom heeft z-index), geopend menu boven de kaarten eronder */
.ps-headrow { position: relative; z-index: 5; }
.ps-headrow:has(details[open]) { z-index: 40; }
.mx-card:has(details[open]), .ps-card:has(details[open]) { position: relative; z-index: 40; }
.ps-headrow > .ps-head { padding-right: 70px; }
.pdf-menu.on-dark { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); }
.pdf-menu.on-dark summary { color: #fff; opacity: .9; min-height: 30px; padding: 2px 8px; }
.pdf-menu.on-dark summary:hover, .pdf-menu.on-dark[open] summary { color: var(--text); opacity: 1; }
.ps-card { overflow: visible; }
.ps-card .ps-head { border-radius: var(--radius) var(--radius) 0 0; }

/* Printen van de gewone pagina's: geen paginamarge = geen URL/datum van de browser; witruimte zelf */
@page { margin: 0; }
@media print {
  body.public { padding: 12mm 12mm 10mm; background: #fff; }
  .pub-tabs, .pub-foot, .pub-provisional { display: none !important; }
  .mx-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mx-link { border: 0; padding: 0; break-inside: avoid; }
  .pub-poule, .pub-day { break-inside: avoid; }
  .matrix .hl { outline: 0; }
}

/* Winnaars */
.win-prizes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.win-col h2 { border-bottom: 4px solid var(--pc); padding-bottom: 6px; }
.win-card { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--pc); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.win-card.main { background: var(--ink); color: #fff; border-left-color: var(--lime); }
.win-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); }
.win-card.main .win-kicker { color: var(--lime); }
.win-name { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.2; margin: 4px 0 6px; }
.win-card.main .win-name { font-size: 1.7rem; }
.win-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; color: var(--muted); }
.win-card.main .win-stats { color: #ddd; }
.win-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }
.win-card.main .win-stats strong { color: #fff; }
.win-table td, .win-table th { vertical-align: middle; }
@media print { .win-card.main { background: #fff; color: #000; border: 2px solid #000; } .win-card.main .win-kicker, .win-card.main .win-stats, .win-card.main .win-stats strong { color: #000; } .win-card { break-inside: avoid; } }

/* Poulenaam + veld in de matrixhoek */
.mx-sub { display: block; font-family: var(--font-body, inherit); font-size: .72rem; opacity: .9; margin-top: 2px; }

/* Stand per poule / veld */
.ps-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.ps-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; break-inside: avoid; }
.ps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px; background: var(--pc); color: #fff; text-decoration: none; }
.ps-head .pname { font-family: var(--font-head); font-size: 1.05rem; }
.ps-head .pfield { font-size: .85rem; font-weight: 700; }
.ps-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .9rem; }
.ps-table th { font-size: .7rem; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 6px; border-bottom: 2px solid var(--line); }
.ps-table td { padding: 6px; border-bottom: 1px solid #f0f0ea; }
.ps-table .num { text-align: right; white-space: nowrap; }
.ps-table .tname { font-weight: 600; overflow-wrap: anywhere; }
.ps-table tr.first td { background: var(--lime-soft); }

/* Mijn teams */
.mijn-pick summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.mijn-pick .pub-search input { margin: 10px 0; }
/* geen eigen scrollvak (scrollen in scrollen werkt slecht op touch): de lijst scrolt met de pagina mee */
.mijn-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.mijn-list fieldset { border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 8px; padding: 6px 10px 8px; margin: 0; }
.mijn-list legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.mijn-list label.check { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 -10px; padding: 0 10px; border-radius: 8px; font-weight: 400; cursor: pointer; }
.mijn-list label.check:hover { background: var(--lime-soft); }
.mijn-list label.check input { width: 22px; height: 22px; flex: none; accent-color: var(--green); }
.mijn-list label.check:has(input:checked) { font-weight: 700; }
.mijn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.mijn-chips:empty { display: none; }
.chip-input { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); cursor: pointer; font: inherit; font-weight: 600; }
.mijn-go { position: sticky; bottom: 0; background: var(--card); padding: 10px 0; margin: 0 -20px -20px; padding: 12px 20px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -6px 12px rgba(14, 26, 43, .06); z-index: 2; }
.mijn-go .btn { width: 100%; }
.mijn-teams { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); margin-bottom: 14px; }
.mijn-team { background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 8px solid var(--tc); border-radius: var(--radius); padding: 12px 14px; }
.mt-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mt-head h2 { margin: 0; font-size: 1.15rem; }
.mt-x { text-decoration: none; color: var(--muted); font-size: 1.1rem; min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.mt-x:hover { background: #f0f0ea; }
.mt-poule { font-size: .9rem; color: var(--muted); margin: 2px 0 6px; }
.mt-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; }
.mt-next { margin-top: 6px; font-size: .9rem; background: var(--lime-soft); border-radius: 6px; padding: 4px 8px; }
.fdot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--tc); margin-right: 5px; vertical-align: .05em; }
.mijn-matches .tm { white-space: nowrap; }
.mijn-matches .mrnd { font-family: var(--font-head); color: var(--muted); margin-right: 4px; }
.mijn-matches .mpoule { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.mijn-matches tr.newround td { border-top: 2px solid var(--line); }
.mijn-matches .ref .me { font-weight: 600; color: var(--text); }
@media (max-width: 600px) {
  .mijn-matches .ref { font-size: .8rem; }
}

/* Gevolgde teams (Mijn teams) vooraan en gemarkeerd */
.follow-note { font-size: .9rem; margin: 0 0 10px; }
.pub-poule.is-followed, .ps-card.is-followed { box-shadow: 0 0 0 3px var(--lime); }
.pub-teamlist li.is-followed a { background: var(--lime-soft); font-weight: 700; }
.pub-teamlist li.is-followed a::after, .ps-table tr.is-followed .tname::after { content: " ★"; color: var(--lime-dark); }
.ps-table tr.is-followed td, .st-table tr.is-followed td { background: #eef6c8; font-weight: 700; }
.matrix tr.is-followed th.mx-row { background: var(--lime); color: var(--ink); }
.win-table tr.is-followed td { background: #eef6c8; }
.follow-top tr:first-child td { background: var(--ink); color: var(--lime); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.follow-top tr:last-child td { border-bottom: 3px solid var(--ink); }
.fsponsor { display: block; font-size: .68rem; font-weight: 400; color: var(--muted); white-space: nowrap; }

/* Navigatie: zoeken + "Ga naar veld", tabbladen in één rij */
.pub-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.pub-tools .pub-search { flex: 1 1 260px; margin: 0; }
[id^="veld-"] { scroll-margin-top: 72px; }
.st-poule { white-space: nowrap; }
.st-sub { display: none; }

@media (max-width: 600px) {
  .pub-head-in { gap: 6px 10px; }
  /* een ander toernooi kiezen is zelden nodig: op de telefoon onderaan de pagina, zodat de kop één regel blijft */
  .pub-head-picker { display: none; }
  .pub-foot-picker { display: block; margin: 0 auto 16px; max-width: 360px; }
  .pub-foot-picker .pub-picker select { width: 100%; max-width: none; border-color: var(--line); }
  .pub-head-in { flex-wrap: nowrap; }
  .pub-title { overflow: hidden; }
  .pub-name, .pub-dates { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pub-name { font-size: .95rem; }
  .pub-dates { font-size: .75rem; }
  .hide-phone { display: none !important; }
  .pub-chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
  .pub-chips-row .chip { flex: none; min-height: 40px; padding: 6px 12px; }
  /* vervagende rand aan de kant waar nog chips buiten beeld staan (app.js zet fade-l/fade-r) */
  .pub-chips-row.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .pub-chips-row.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
  .pub-chips-row.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
  /* stand per poule: punten voor–tegen weg (staan in de tooltip van het saldo en in de matrix), teamnaam krijgt de ruimte */
  .ps-table .pts { display: none; }
  .st-table .opt { display: none; }
  .st-table .st-team { white-space: normal; overflow-wrap: anywhere; }
  .st-table .st-cls { display: none; }
  .st-sub { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
  .st-table { width: 100%; }
  .st-table td, .st-table th { padding-left: 6px; padding-right: 6px; }

  /* Wedstrijdtabellen (.mcards) als kaartjes: [1][2] ··· [uitslag] / wedstrijd / scheidsrechter */
  .mcards thead { display: none; }
  .mcards, .mcards tbody { display: block; border-collapse: separate; }
  .mcards tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .mcards tr.newround { border-top: 2px solid var(--line); }
  .pub-matches.mcards tr.newround td { border: 0; }
  .pub-matches.mcards td.c-tijd { color: var(--text); font-weight: 700; font-size: 1rem; }
  .pub-matches.mcards td, .pub-matches.mcards th { display: block; padding: 0; border: 0; background: none; width: auto; }
  .pub-matches.mcards tr.now { background: #fff8d6; box-shadow: inset 4px 0 0 var(--warn); }
  .pub-matches.mcards tr.now td { background: none; box-shadow: none; }
  .pub-matches.mcards tr.bye { background: #fafaf7; }
  .mcards td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; text-align: left; white-space: nowrap; }
  .mcards td:nth-child(2) { grid-column: 2; grid-row: 1; text-align: left; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; align-self: center; }
  .mcards td:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; }
  .mcards td:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
  .mcards td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; font-size: .82rem; }
  .mcards td:nth-child(5):not(:empty)::before { content: "Scheidsrechter: "; }
  .mcards tr.bye td:nth-child(5) { display: none; }
  .mcards .c-rnd::before { content: "R"; }
  .mcards .c-rnd { color: var(--muted); font-family: var(--font-head); }
  .mcards .c-veld::before { content: "Veld "; }
  .mcards .c-veld strong { color: var(--text); }
  .mcards .c-veld .fsponsor { display: inline; font-size: .8rem; }
  .mcards .c-veld .fsponsor::before { content: " · "; }
}
.win-beker { margin-bottom: 16px; }
.win-beker .win-name { font-size: 2rem; }
/* Mededeling van de organisatie (Beheer → Overzicht) */
.pub-notice { background: #fff6dc; border-left: 5px solid #ffb020; color: var(--text); font-size: 1.05rem; }
.pub-notice strong { display: block; text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; color: #8a5a00; }
/* Taalkeuze NL/EN in de kop */
.pub-lang { margin-left: auto; align-self: center; color: #fff; font-weight: 700; font-size: .85rem; text-decoration: none; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px; padding: 2px 10px; }
.pub-lang:hover { background: rgba(255, 255, 255, .15); }

/* Finales (knock-outschema): kolommen per ronde, van links naar rechts; op een smal scherm horizontaal scrollen */
.fb-card h2 { margin-bottom: 8px; }
.fb-champ { background: var(--lime-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 1.1rem; }
.fb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 6px; }
.fb-bracket { display: flex; gap: 18px; min-width: min-content; }
.fb-col { display: flex; flex-direction: column; min-width: 190px; flex: 1; }
.fb-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.fb-list { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 10px; }
.fb-m { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; font-size: .92rem; }
.fb-m.done { border-color: var(--green-soft); }
.fb-dead { visibility: hidden; min-height: 40px; }
.fb-bye { border-style: dashed; }
.fb-meta { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.fb-t { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }
.fb-t.won { font-weight: 700; }
.fb-t.lost .fb-n { color: var(--muted); }
.fb-seed { font-size: .72rem; color: var(--muted); min-width: 1.4em; text-align: right; }
.fb-n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fb-s { font-weight: 700; min-width: 1.5em; text-align: right; }
.fb-detail { font-size: .75rem; color: var(--muted); text-align: right; }
.fb-third { margin-top: 14px; max-width: 280px; }
.fb-third h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
@media print { .fb-scroll { overflow: visible; } .fb-col { min-width: 0; } }
/* telefoon: rondes onder elkaar (geen zijwaarts scrollen), met knoppen om naar een ronde te springen */
.fb-jump { display: none; }
.fb-nu { display: none; }
@media (max-width: 700px) {
  .fb-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .fb-jump .chip { padding: 4px 12px; font-size: .85rem; }
  .fb-scroll { overflow: visible; margin: 0; padding: 0; }
  .fb-bracket { flex-direction: column; gap: 16px; min-width: 0; }
  .fb-col { min-width: 0; scroll-margin-top: 12px; }
  .fb-col.cur h3 { color: var(--green); }
  .fb-nu { display: inline-block; background: var(--lime); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: .72rem; margin-left: 4px; text-transform: none; letter-spacing: 0; }
  .fb-list { justify-content: flex-start; gap: 8px; }
  .fb-dead { display: none; }
  .fb-m { padding: 8px 10px; font-size: 1rem; }
  .fb-third { max-width: none; scroll-margin-top: 12px; }
}

/* Vrije teksten (Beheer → Teksten): introtekst boven een pagina en de regelspagina */
.pub-tekst { line-height: 1.6; overflow-wrap: anywhere; }
.pub-tekst > :first-child { margin-top: 0; }
.pub-tekst > :last-child { margin-bottom: 0; }
.pub-tekst h3, .pub-tekst h4 { margin: 1.2em 0 .4em; }
.pub-tekst ul, .pub-tekst ol { padding-left: 1.4em; }
.pub-intro-tekst { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.pub-regels { max-width: 760px; }
@media print { .pub-intro-tekst { border: 0; padding: 0; } }

/* Tikvlakken van minstens 44–48 px op touchschermen (Material: 48 dp), ook als het element er kleiner uitziet */
.pub-lang { position: relative; }
.pub-lang::after { content: ""; position: absolute; inset: -10px -6px; }
.pub-foot a { display: inline-block; padding: 12px 4px; }
[data-follow-cta] a { display: inline-block; padding: 10px 0; }
.pub-teamlist a { min-height: 44px; }
.mt-x { min-width: 44px; min-height: 44px; }
@media (pointer: coarse) {
  .pdf-menu summary { min-height: 44px; }
  .chip-sm { min-height: 44px; }
}

/* "Bijgewerkt om …" (app.js) */
.pub-fresh { font-size: .8rem; color: var(--muted); margin: -6px 0 10px; }
.pub-fresh.stale { font-size: .9rem; color: var(--text); background: var(--warn-soft); border-left: 4px solid var(--warn); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.mijn-agenda { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 16px; }

/* Toernooi in cijfers */
.cf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cf-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cf-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--green); line-height: 1.1; }
.cf-num small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.cf-lbl { font-weight: 600; }
.cf-sub { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.cf-bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cf-bar span { display: block; height: 100%; background: var(--lime); }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.cf-blok h2 { font-size: 1.05rem; margin-bottom: 6px; }
.cf-list { margin: 0; padding-left: 1.4em; }
.cf-list li { padding: 5px 0; border-top: 1px solid var(--line); }
.cf-list li:first-child { border-top: 0; }
.cf-list strong { overflow-wrap: anywhere; }
.cf-waar { display: block; font-size: .8rem; color: var(--muted); }
.cf-veld { font-size: 1.1rem; margin: 0; }
.pub-offline { background: #fff4dc; border: 1px solid #f0c36d; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
