/* Basis voor de losse pagina's */
html{background:#0a0001; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
[hidden]{display:none!important}
img{max-width:100%}
/* Layout: één kolom (max 760px). Setup en eindstand openen met het clublogo; tijdens het spel een smalle balk
   met het schildje. Doel van de ronde bovenaan, daaronder de beurt (3 pijlen + toetsenblok), onderaan het scoreblad.
   Look: zwart van het logo, vossen-oranje als accent, gotisch lettertype alleen voor titels en namen. */
:root{
  --bg:#0a0001; --surface:#150b0b; --surface2:#1e1010; --ink:#f6eee8; --muted:#b1a095; --line:#3a2219;
  --orange:#f26a1b; --orange-hi:#ff9a3c; --orange-lo:#d9500f; --orange-ink:#1a0800; --orange-soft:#2b1408;
  --good:#6fcf8e; --good-soft:#10261a; --bad:#f0505c; --bad-soft:#2f1015;
  --font-gothic:'Pirata One','UnifrakturCook',Georgia,serif;
  --font-display:'Barlow Condensed','Arial Narrow',Arial,sans-serif;
  --font-body:'Barlow',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  color-scheme:dark;
}

*{box-sizing:border-box}
body{
  background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:16px; line-height:1.45;
  padding-block:16px 40px;
  padding-left:max(16px,env(safe-area-inset-left,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px));
  -webkit-text-size-adjust:100%;
}
.wrap{max-width:760px; margin:0 auto; display:flex; flex-direction:column; gap:14px}
button{font:inherit; touch-action:manipulation}
:focus-visible{outline:3px solid var(--orange-hi); outline-offset:2px}

.logo{display:block; width:min(240px,62vw); height:auto}
.logo.sm{width:min(150px,40vw)}
.mark{flex:none; display:block; width:52px; height:auto}

.grad{
  color:var(--orange);
  background-image:linear-gradient(180deg,var(--orange-hi),var(--orange-lo));
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.hero{display:flex; flex-direction:column; align-items:center; gap:4px; padding-top:4px; text-align:center}
.top{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.brandrow{display:flex; align-items:center; gap:10px}
.brand{margin:0; font-family:var(--font-gothic); font-weight:400; font-size:40px; line-height:1}
.hero .brand{font-size:60px}
.newbox{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:14px}

.card{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px; display:flex; flex-direction:column; gap:12px; min-width:0}
.eyebrow{margin:0; font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.h1{margin:0; font-family:var(--font-gothic); font-weight:400; font-size:clamp(32px,8vw,48px); line-height:1.05; text-wrap:balance}
.h2{margin:0; font-family:var(--font-gothic); font-weight:400; font-size:28px; line-height:1.1}
.rule{margin:0; color:var(--muted); max-width:65ch}

.btn{min-height:44px; padding:0 16px; border-radius:10px; border:1px solid var(--line); background:var(--surface2); color:var(--ink); font-weight:600; cursor:pointer; transition:background .12s,border-color .12s}
.btn.primary{background:linear-gradient(180deg,var(--orange-hi),var(--orange)); border-color:var(--orange); color:var(--orange-ink)}
.btn.ghost{background:transparent}
.btn:disabled{opacity:.4; cursor:not-allowed}
@media (hover:hover){ .btn:not(:disabled):hover{border-color:var(--orange)} }

.prog{display:grid; grid-template-columns:repeat(16,1fr); gap:3px}
.seg{height:8px; border-radius:2px; background:var(--line)}
.seg.done{background:var(--orange)}
.seg.now{background:var(--ink)}

.turn{display:flex; justify-content:space-between; align-items:flex-end; gap:12px}
.who{margin:0; font-family:var(--font-gothic); font-weight:400; font-size:32px; line-height:1.1; overflow-wrap:anywhere}
.sc{text-align:right; flex:none}
.big{display:block; font-family:var(--font-display); font-weight:800; font-size:42px; line-height:1; font-variant-numeric:tabular-nums; color:var(--orange-hi)}

.slots{display:grid; grid-template-columns:repeat(3,1fr); gap:8px}
.slot{min-height:72px; border:2px solid var(--line); border-radius:12px; background:var(--bg); color:var(--ink); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; cursor:pointer; padding:4px}
.slot b{font-family:var(--font-display); font-size:26px; line-height:1; font-weight:700}
.slot small{color:var(--muted); font-size:12px}
.slot.active{border-color:var(--orange); background:var(--surface2)}
.slot.scores{background:var(--good-soft)}

.pad{display:grid; gap:6px}
.pad.c3{grid-template-columns:repeat(3,1fr)}
.pad.c4{grid-template-columns:repeat(2,1fr)}
@media (min-width:480px){ .pad.c4{grid-template-columns:repeat(4,1fr)} }
.pad.c5{grid-template-columns:repeat(5,1fr)}
.pad.row{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
.key{min-height:50px; border:1px solid var(--line); border-radius:10px; background:var(--surface2); color:var(--ink); cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:4px 2px; transition:background .12s,border-color .12s}
.key b{font-family:var(--font-display); font-size:20px; line-height:1.1; font-weight:700}
.key small{font-size:11px; color:var(--muted); line-height:1}
.key.miss b{color:var(--bad)}
.key.sel{border:2px solid var(--orange); background:var(--orange-soft)}
.pad.c4 .key{min-height:64px}
@media (hover:hover){ .key:hover{border-color:var(--orange)} }

.segc{display:grid; grid-template-columns:repeat(3,1fr); border:1px solid var(--line); border-radius:10px; overflow:hidden}
.segb{min-height:42px; border:0; background:var(--surface2); color:var(--ink); font-weight:600; cursor:pointer}
.segb + .segb{border-left:1px solid var(--line)}
.segb.on{background:var(--orange); color:var(--orange-ink)}

.preview{border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; justify-content:center; gap:2px; min-height:64px}
.preview strong{font-family:var(--font-display); font-size:24px; line-height:1.1; font-weight:700}
.preview span{font-size:14px}
.preview.up{background:var(--good-soft)}
.preview.up strong{color:var(--good)}
.preview.down{background:var(--bad-soft)}
.preview.down strong{color:var(--bad)}
.preview.idle{background:var(--bg); color:var(--muted)}

.actions{display:flex; gap:8px; flex-wrap:wrap}
.actions .primary{flex:1 1 200px}

.tablewrap{overflow-x:auto}
table{border-collapse:collapse; width:max-content; min-width:100%; font-variant-numeric:tabular-nums}
th,td{padding:7px 10px; text-align:left; border-bottom:1px solid var(--line); min-width:84px}
thead th{vertical-align:bottom}
th.rl{min-width:96px; font-weight:600; white-space:nowrap}
.rn{display:inline-block; min-width:1.7em; color:var(--muted); font-family:var(--font-display); font-weight:700}
.hs{display:block; font-family:var(--font-display); font-size:24px; font-weight:800; line-height:1.1; color:var(--orange-hi)}
.pname{font-size:13px; font-weight:600; overflow-wrap:anywhere}
tr.now th, tr.now td{background:var(--orange-soft)}
td.empty{color:var(--muted)}
.after{font-family:var(--font-display); font-size:20px; font-weight:700; margin-right:8px}
.delta{font-size:12px; font-weight:700}
.delta.up{color:var(--good)}
.delta.down{color:var(--bad)}
.legend{margin:0; font-size:13px; color:var(--muted)}

.rules{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:6px 16px}
.rules li{display:flex; gap:6px; align-items:baseline}
.rules li span.t{min-width:0}

.plist{display:flex; flex-direction:column; gap:8px}
.prow{display:flex; gap:8px}
.inp{font:inherit; min-height:46px; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--ink); padding:0 12px; width:100%; min-width:0}
.opts summary{cursor:pointer; font-weight:600}
.chk{display:flex; gap:10px; align-items:flex-start; padding-top:10px}
.chk input{margin-top:4px; width:18px; height:18px; accent-color:var(--orange)}
.start{min-height:52px; font-size:18px}
details.card summary{cursor:pointer; font-weight:600}

.rank{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px}
.rank li{display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; border:1px solid var(--line); border-radius:12px; padding:10px 14px}
.rank li.first{background:var(--orange-soft); border-color:var(--orange)}
.rank .pos{font-family:var(--font-display); font-size:32px; font-weight:800; line-height:1; min-width:1.2em}
.rank li.first .pos{color:var(--orange-hi)}
.rank .nm{font-weight:600; overflow-wrap:anywhere}
.rank .st{display:block; font-size:13px; color:var(--muted); font-weight:400}
.rank .pts{font-family:var(--font-display); font-size:34px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums}

.stats{font-size:14px}
.stats th,.stats td{min-width:0; padding:7px 6px}
.stats th{font-size:12px; font-weight:600; color:var(--muted)}
.stats th:first-child,.stats td:first-child{padding-left:0}
.stats .num{text-align:right}
.stats td.nm{font-weight:600; overflow-wrap:anywhere; min-width:70px}
.btn.danger{border-color:var(--bad); color:var(--bad)}

@media (prefers-reduced-motion:reduce){ *{transition:none !important} }

/* Pagina's rond het spel: beginpagina, spelkeuze en navigatie */
.stack{display:flex; flex-direction:column; gap:14px}
.topnav{display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:14px}
.topnav a{color:var(--muted); text-decoration:none; min-height:44px; display:inline-flex; align-items:center}
@media (hover:hover){ .topnav a:hover{color:var(--orange-hi)} }
a.btn{display:inline-flex; align-items:center; justify-content:center; text-decoration:none}
.field{display:flex; flex-direction:column; gap:6px}
.field label{font-weight:600}
.games{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px}
.gcard .h2{font-size:34px}
.gcard .btn{align-self:flex-start}
