/* Structuur en componenten. Alle kleuren/fonts/rondingen komen uit themes.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: var(--fs, 14px); line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
h1, h2 { margin: 0; }
.app { max-width: 1280px; margin: 0 auto; padding: var(--pad-page); display: flex; flex-direction: column; gap: var(--gap); }

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--bar-bg); color: var(--bar-fg); padding: var(--bar-pad); border-radius: var(--bar-radius);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  background: var(--accent); color: var(--accent-fg);
  width: var(--logo-size); height: var(--logo-size); border-radius: var(--logo-radius); font-size: 12px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-weight: 700; font-size: var(--brand-size); line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--bar-muted); font-family: var(--font-num); }
.tabs, .theme-picker { display: flex; gap: 4px; }
.tab, .theme-picker button, .upload {
  border: 1px solid transparent; background: transparent; padding: 6px 12px; cursor: pointer;
  border-radius: var(--pill-radius); color: var(--bar-muted); white-space: nowrap;
}
.tab:hover, .theme-picker button:hover { color: var(--bar-fg); }
.tab.on { background: var(--tab-on-bg); color: var(--tab-on-fg); }
.theme-picker { border: 1px solid var(--bar-line); border-radius: var(--pill-radius); padding: 2px; }
.theme-picker button { padding: 4px 10px; font-size: 12px; }
.theme-picker button[aria-checked="true"] { background: var(--accent); color: var(--accent-fg); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upload { border-color: var(--accent); color: var(--accent); font-size: 12px; }
.upload:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- layout ---- */
.view { display: flex; flex-direction: column; gap: var(--gap); outline: none; }
.page-title { font-size: var(--title-size); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.grid { display: grid; gap: var(--gap); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-1 { grid-template-columns: 1fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-1-1-1 { grid-template-columns: repeat(3, 1fr); }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }

.card {
  background: var(--card); border: var(--card-border); border-radius: var(--radius);
  padding: var(--pad); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card h2 { font-size: var(--h2-size); font-weight: var(--h2-weight); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hint, .note, .muted { color: var(--muted); }
.hint, .note { font-size: 12px; margin: 0; }
.mono { font-family: var(--font-num); }

/* ---- tegels ---- */
.tile { gap: 4px; }
.label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.value { font-family: var(--font-num); font-size: var(--value-size); font-weight: var(--value-weight); line-height: 1.05; letter-spacing: -.01em; }
.delta { font-family: var(--font-num); font-size: 12px; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); }
.spark { width: 100%; height: 24px; display: block; }
.spark-line { fill: none; stroke: var(--s1); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark-base { stroke: var(--line); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

/* ---- grafiek ---- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-num); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { stroke: var(--card-solid); stroke-width: 2; }
.s1 { --c: var(--s1); } .s2 { --c: var(--s2); } .s3 { --c: var(--s3); } .s4 { --c: var(--s4); }
.chart .line { stroke: var(--c); } .chart .dot { fill: var(--c); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 12px; height: 12px; border-radius: 3px; background: var(--c); display: inline-block; }
.key.p1 { background: var(--pass1, var(--s1)); } .key.p2 { background: var(--pass2, var(--accent)); } .key.p3 { background: var(--line); }

/* ---- tabellen ---- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-family: var(--font-num); font-size: 12px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; padding: 4px 6px; border-bottom: 1px solid var(--fg); white-space: nowrap; }
.tbl td { padding: 5px 6px; border-top: 1px solid var(--row-line); white-space: nowrap; }
.tbl .num { text-align: right; }
.heatmap tbody tr { cursor: pointer; }
.heatmap tbody tr:hover td { box-shadow: inset 0 0 0 999px var(--hover); }
.heat { background: rgba(var(--heat-rgb), calc(var(--a) * var(--heat-max))); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* ---- ranglijst ---- */
.bars { display: flex; flex-direction: column; }
.bar-row {
  display: grid; grid-template-columns: 22px 30px 1fr 2fr 40px; gap: 10px; align-items: center;
  background: none; border: 0; border-top: 1px solid var(--row-line); padding: 6px 0; cursor: pointer; text-align: left;
}
.bar-row:hover .nm { text-decoration: underline; }
.rk { color: var(--muted); font-family: var(--font-num); font-size: 12px; }
.avatar {
  width: 28px; height: 28px; border-radius: var(--avatar-radius); background: var(--fg); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.avatar.big { width: 88px; height: 88px; font-size: 36px; flex-shrink: 0; }
.bar { height: 8px; background: var(--track); border-radius: var(--bar-r); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--bar-fill); border-radius: var(--bar-r); }
.pts { text-align: right; font-family: var(--font-num); font-weight: 600; }

/* ---- badges ---- */
.badge-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge {
  display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer;
  background: var(--badge-bg); border: var(--badge-border); border-radius: var(--badge-radius); padding: 10px 12px;
}
.badge .icon { width: 40px; height: 40px; border-radius: var(--badge-icon-radius); background: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.bt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bt .label { font-size: 11px; }
.bn { font-weight: 700; font-size: 16px; }
.bv { font-family: var(--font-num); font-weight: 700; font-size: 18px; }

/* ---- speler ---- */
.chips { position: relative; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips-label { font-weight: 600; margin-right: 4px; }
.chip {
  border: var(--chip-border); background: var(--chip-bg); color: var(--fg); border-radius: var(--chip-radius);
  padding: 6px 12px; cursor: pointer; font-family: var(--font-num); min-width: 40px;
}
.chip.on { background: var(--chip-on-bg); color: var(--chip-on-fg); border-color: var(--chip-on-bg); }
.hero { flex-direction: row; align-items: center; gap: 20px; }
.hero-name { font-size: var(--hero-size); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.pos { color: var(--hero-pos); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.stat { gap: 2px; padding: calc(var(--pad) * .75); }
.cmp { display: flex; flex-direction: column; gap: 12px; }
.cmp-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.cmp-bar { position: relative; height: 8px; background: var(--track); border-radius: var(--bar-r); }
.cmp-bar .me { display: block; height: 100%; background: var(--bar-fill); border-radius: var(--bar-r); }
.cmp-bar .avg { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--s2); margin-left: -1px; }
.stack { display: flex; height: 28px; border-radius: var(--bar-r); overflow: hidden; gap: 2px; }
.stack .p1 { background: var(--pass1, var(--s1)); } .stack .p2 { background: var(--pass2, var(--accent)); } .stack .p3 { background: var(--line); }

.foot { font-size: 12px; color: var(--muted); font-family: var(--font-num); padding: 8px 0 24px; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .g-1-1-1 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --pad-page: 12px; --gap: 10px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .g-2-1, .g-1-1, .g-1-2, .g-1-1-1 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .badge-list { grid-template-columns: 1fr; }
  .hero { gap: 14px; }
  .avatar.big { width: 64px; height: 64px; font-size: 26px; }
  .value { font-size: calc(var(--value-size) * .8); }
}

.frac { color: var(--muted); font-size: 10px; margin-left: 2px; }
.stat .sub { font-size: 12px; }

/* ---- import-melding & uitleg ---- */
.report { border-left: 4px solid var(--up); }
.report.bad { border-left-color: var(--down); }
.report ul { margin: 0; padding-left: 18px; }
.report .warns { font-family: var(--font-num); font-size: 12px; color: var(--muted); max-height: 220px; overflow: auto; }
.report summary, .help summary { cursor: pointer; }
.report code { font-family: var(--font-num); font-size: 12px; }
.upload.ghost { border-color: var(--bar-line); color: var(--bar-muted); }
.help summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.help summary::before { content: "＋"; color: var(--muted); }
.help[open] summary::before { content: "－"; }
.help summary h2 { display: inline; }
.help dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0 0; font-size: 13px; }
.help dt { font-weight: 600; }
.help dd { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .help dl { grid-template-columns: 1fr; } .help dd { margin-bottom: 6px; } }

/* ---- highlights ---- */
.hl-group h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.hl-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hl { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-left: 4px solid var(--up); background: var(--hl-bg, rgba(127,127,127,.06)); border-radius: var(--hl-r, 0); }
.hl.work { border-left-color: var(--s2); }
.hl-k { font-weight: 600; }
.hl-v { font-family: var(--font-num); font-size: 13px; }
.highlights .hl-group + .hl-group { margin-top: 6px; }

/* ---- hulp ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tile-sub { font-size: 11px; color: var(--muted); }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { box-shadow: inset 0 0 0 999px var(--hover); }
.tbl tr.on td { background: rgba(var(--heat-rgb), .35); font-weight: 600; }
.chart .mark { stroke: var(--accent); stroke-width: 10; opacity: .35; }
.chip:disabled { opacity: .4; cursor: default; }

/* ---- vorm ---- */
.wl-strip { display: flex; gap: 6px; align-items: center; }
.wl { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
  border-radius: var(--avatar-radius); background: var(--track); color: var(--muted); }
.wl.w { background: var(--accent); color: var(--accent-fg); }
.wl.l { background: var(--fg); color: var(--bg); }
.form-list { display: flex; flex-direction: column; }
.form-row { display: grid; grid-template-columns: 1fr 70px 130px; gap: 10px; align-items: center; background: none; border: 0;
  border-top: 1px solid var(--row-line); padding: 6px 0; cursor: pointer; text-align: left; }
.form-row:hover .nm { text-decoration: underline; }
.form-pill { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--pill-radius); background: var(--track); color: var(--fg); white-space: nowrap; justify-self: end; }
.form-pill.up { background: var(--up); color: #fff; }
.form-pill.down { background: var(--s2); color: #fff; }
.hero-form { margin-top: 8px; }
.hero-form .form-pill { justify-self: start; }

/* ---- keuze seizoen/wedstrijd (menubalk) ---- */
.scope { position: relative; display: flex; align-items: center; gap: 4px; margin-right: auto; }
.scope-btn, .scope-arrow {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--bar-fg);
  background: var(--scope-bg, transparent); border: 1px solid var(--bar-line); border-radius: var(--pill-radius);
}
.scope-btn { padding: 4px 12px; min-width: 190px; max-width: 300px; text-align: left; }
.scope-btn.is-match { border-color: var(--accent); }
.scope-arrow { padding: 0; width: 30px; height: 34px; justify-content: center; font-size: 18px; }
.scope-arrow:disabled { opacity: .35; cursor: default; }
.scope-btn:hover, .scope-arrow:not(:disabled):hover { border-color: var(--accent); }
.sb-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sub { font-size: 11px; color: var(--bar-muted); font-family: var(--font-num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-caret { color: var(--accent); transition: transform .15s; }
.scope.open .sb-caret { transform: rotate(180deg); }
.scope-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: 360px; max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--card-solid); color: var(--fg); border: var(--pop-border, 1px solid var(--line));
  border-radius: var(--pop-radius, var(--radius)); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px;
}
.scope-pop ul { list-style: none; margin: 0; padding: 0; }
.so-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 10px 4px; }
.scope-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  background: none; border: 0; border-radius: var(--pop-item-radius, 0); padding: 8px 10px; cursor: pointer; color: var(--fg);
}
.scope-opt:hover, .scope-opt:focus-visible { background: var(--hover); outline: none; box-shadow: inset 3px 0 0 var(--accent); }
.scope-opt.on { background: rgba(var(--heat-rgb), .3); }
.so-main { display: flex; flex-direction: column; min-width: 0; }
.so-title { font-weight: 600; }
.so-meta { font-size: 11px; color: var(--muted); font-family: var(--font-num); }
.so-right { font-family: var(--font-num); font-weight: 700; white-space: nowrap; }

.scope-pop[hidden] { display: none; }
.so-search { padding: 2px 2px 6px; }
.so-search input { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: var(--chip-border);
  border-radius: var(--pop-item-radius, 0); padding: 8px 10px; }
.scope-pop ul.so-fixed { border-bottom: 1px solid var(--row-line); padding-bottom: 4px; }
.so-list { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.so-list .so-sep { position: sticky; top: 0; background: var(--card-solid); z-index: 1; }
.so-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }
.so-right.w, .so-right.l { padding: 2px 7px; border-radius: var(--pop-item-radius, 0); font-size: 12px; }
.so-right.w { background: var(--accent); color: var(--accent-fg); }
.so-right.l { background: var(--track); color: var(--fg); }
.scope-opt { padding: 6px 10px; }

/* ---- beheer ---- */
.admin { width: min(560px, calc(100vw - 24px)); max-height: 85vh; border: var(--pop-border, 1px solid var(--line));
  border-radius: var(--pop-radius, var(--radius)); background: var(--card-solid); color: var(--fg); padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); font-family: var(--font); }
.admin::backdrop { background: rgba(0,0,0,.45); }
.admin h2 { font-size: var(--h2-size); font-weight: var(--h2-weight); margin: 0; }
.admin h3 { font-size: 14px; margin: 16px 0 6px; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.admin-login { display: flex; flex-direction: column; gap: 8px; }
.admin input[type=password] { font: inherit; padding: 9px 12px; border: var(--chip-border); border-radius: var(--chip-radius); background: var(--bg); color: var(--fg); }
.btn { font: inherit; font-weight: 600; cursor: pointer; padding: 8px 14px; border-radius: var(--chip-radius);
  background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); }
.btn.ghost { background: transparent; color: var(--fg); border: var(--chip-border); }
.btn.danger { background: var(--down); color: #fff; border-color: var(--down); }
.btn:disabled { opacity: .6; cursor: wait; }
.drop { border: 2px dashed var(--line); border-radius: var(--pop-radius, var(--radius)); padding: 18px; text-align: center; margin-bottom: 12px; }
.drop p { margin: 0 0 8px; }
.adm-list { list-style: none; margin: 0; padding: 0; }
.adm-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--row-line); }
.adm-m { display: flex; flex-direction: column; min-width: 0; }
.adm-m .muted { font-size: 12px; font-family: var(--font-num); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-msg { color: var(--down); font-weight: 600; }
.admin .report { margin-bottom: 8px; }
.empty { padding: 32px; }

/* =================== MOBIEL-EERST =================== */
.more, .tools-title { display: none; }
.mobile-only { display: none; }
.mlist ol { list-style: none; margin: 0; padding: 0; }
.msort { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-weight: 600; }
.msort select { flex: 1; font: inherit; font-size: 16px; padding: 9px 12px; color: var(--fg); background: var(--card-solid);
  border: var(--chip-border); border-radius: var(--chip-radius); }
.mrow { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto 6px; gap: 2px 10px; align-items: center;
  background: none; border: 0; border-top: 1px solid var(--row-line); padding: 10px 0; text-align: left; cursor: pointer; min-height: 56px; }
.mname { display: flex; flex-direction: column; min-width: 0; }
.mname .nm { font-weight: 600; font-size: 15px; }
.mname .muted { font-size: 12px; }
.mval { text-align: right; font-size: 18px; font-weight: 700; white-space: nowrap; }
.mval .frac { display: block; font-size: 11px; font-weight: 400; }
.mbar { grid-column: 2 / 4; height: 6px; background: var(--track); border-radius: var(--bar-r); overflow: hidden; }
.mbar span { display: block; height: 100%; background: var(--bar-fill); border-radius: var(--bar-r); }

@media (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { font-size: max(var(--fs), 14px); padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .app { padding-top: 0; padding-left: max(var(--pad-page), env(safe-area-inset-left)); padding-right: max(var(--pad-page), env(safe-area-inset-right)); }

  /* kop: logo · wedstrijdkeuze · menu */
  .topbar { position: sticky; top: 0; z-index: 30; flex-wrap: nowrap; gap: 6px; border-radius: 0;
    margin: 0 calc(var(--pad-page) * -1); padding: calc(8px + env(safe-area-inset-top)) var(--pad-page) 8px;
    background: var(--mbar-bg, var(--bar-bg)); }
  .brand-text { display: none; }
  .logo { width: 40px; height: 40px; flex-shrink: 0; font-size: 11px; }
  .scope { flex: 1; min-width: 0; margin-right: 0; position: static; }
  .scope-btn { flex: 1; min-width: 0; max-width: none; min-height: 44px; }
  .scope-arrow { width: 30px; height: 44px; flex-shrink: 0; }
  .more { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--bar-fg); background: var(--scope-bg, transparent); border: 1px solid var(--bar-line); border-radius: var(--pill-radius); }

  /* onderbalk: Team · Spelers (duimbereik) */
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 6px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--nav-bg, var(--bar-bg)); border-top: var(--nav-line, 1px solid var(--bar-line)); }
  .tabs .tab { flex: 1; min-height: 48px; font-size: 15px; font-weight: 600; }

  /* menu-blad met stijl + upload */
  .tools { display: none; }
  .app.menu-open .tools { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40;
    flex-direction: column; align-items: stretch; gap: 8px; padding: 16px; color: var(--fg); background: var(--card-solid);
    border: var(--pop-border, 1px solid var(--line)); border-radius: var(--sheet-radius, 0);
    box-shadow: 0 0 0 100vmax rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.25); }
  .tools-title { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .tools .theme-picker { border-color: var(--line); }
  .tools .theme-picker button { flex: 1; min-height: 44px; font-size: 15px; color: var(--muted); }
  .tools .theme-picker button[aria-checked="true"] { color: var(--accent-fg); }
  .tools .upload { min-height: 48px; font-size: 15px; font-weight: 600; background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
  .tools .upload.ghost { background: transparent; color: var(--fg); border-color: var(--line); }

  /* wedstrijdkeuze als onderblad */
  .scope-pop { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 78vh; z-index: 50;
    border-radius: var(--sheet-radius, 0) var(--sheet-radius, 0) 0 0; padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .scope-pop::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
  .scope-opt { min-height: 54px; }
  .so-search input, .admin input[type=password], .scope-pop input { font-size: 16px; min-height: 44px; }

  /* spelerkeuze: horizontaal swipen */
  .chips { position: relative; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 calc(var(--pad-page) * -1); padding: 4px var(--pad-page) 6px; scroll-padding-inline: var(--pad-page);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--pad-page), #000 calc(100% - 36px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 var(--pad-page), #000 calc(100% - 36px), transparent 100%); }
  .chips .chips-label { display: none; }
  .chips::after { content: ""; flex: 0 0 24px; } /* ruimte achter de laatste speler */
  .scope-arrow:disabled { display: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip, .chips-label { flex-shrink: 0; }
  .chip { min-height: 44px; scroll-snap-align: start; }

  /* beheer als volledig onderblad */
  .admin { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--sheet-radius, 0) var(--sheet-radius, 0) 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .btn { min-height: 44px; }
  .drop { border: 0; padding: 4px 0; } .drop p { display: none; } .drop .btn { width: 100%; }

  /* compacter en duimvriendelijk */
  .card { padding: calc(var(--pad) * .85); }
  .page-title { font-size: calc(var(--title-size) * .8); }
  .bar-row { min-height: 44px; }
  .form-row { grid-template-columns: 1fr 56px auto; min-height: 44px; }
  .badge { min-height: 60px; }
  .tbl td { padding: 8px 6px; }
  .hero { padding: var(--pad); }
  .stat .value { font-size: calc(var(--value-size) * .65); }
  .stat-grid { gap: 8px; }
  .cmp-top { font-size: 14px; }
  .foot { padding-bottom: 8px; }
}
