:root {
  --p: #1f6feb;
  --s: #f59e0b;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --ok: #16a34a;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body.no-tabs { padding-bottom: 24px; }
a { color: var(--p); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; line-height: 1.45; }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--p); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #fff; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: transparent; border: 0; color: inherit; font-size: 1.5rem; padding: 4px 8px; cursor: pointer; }

.menu { position: fixed; top: 58px; right: 10px; z-index: 30; background: var(--card); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; min-width: 220px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }

.app { max-width: 760px; margin: 0 auto; padding: 16px; }
.madewith { text-align: center; padding: 8px 16px 20px; font-size: .78rem; }
.madewith a { color: var(--muted); text-decoration: none; }
.madewith a:hover, .madewith a:focus-visible { color: var(--text); text-decoration: underline; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .72rem; padding: 4px 0; }
.tabbar a .ic { font-size: 1.3rem; line-height: 1; }
.tabbar a.active { color: var(--p); font-weight: 600; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card.hero { background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 65%, #000)); color: #fff; }
.card.hero .muted, .card.hero small { color: rgba(255,255,255,.8); }
.card.accent { border-left: 5px solid var(--s); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.big { font-size: 2rem; font-weight: 800; }

label { display: block; font-weight: 600; font-size: .92rem; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; padding: 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--p) 40%, transparent); border-color: var(--p); }
input[type=color] { padding: 4px; height: 48px; }
input[type=checkbox] { width: auto; transform: scale(1.3); margin-right: 8px; }
.check { display: flex; align-items: center; font-weight: 500; }
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; padding: 12px 18px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--p); color: #fff; text-decoration: none;
}
.btn.block { width: 100%; }
.btn.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--p); padding: 8px 10px; }
.btn.danger { background: var(--bad); }
.btn.small { padding: 8px 12px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.tabs button { flex: none; font: inherit; font-size: .92rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.tabs button.active { background: var(--p); border-color: var(--p); color: #fff; }

.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.match:first-of-type { border-top: 0; }
.match .team { font-weight: 600; font-size: .95rem; }
.match .team.away { text-align: right; }
.match .meta { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.score { display: flex; align-items: center; gap: 6px; }
.score input { width: 52px; text-align: center; font-size: 1.15rem; font-weight: 700; padding: 8px 4px; }
.score .dash { color: var(--muted); }
.result { font-weight: 800; font-size: 1.1rem; text-align: center; min-width: 64px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.bad { background: #fee2e2; color: #991b1b; }
.pill.pts { background: color-mix(in srgb, var(--s) 25%, #fff); color: #000; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: .93rem; }
th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: color-mix(in srgb, var(--s) 18%, #fff); font-weight: 700; }
.rank { width: 34px; font-weight: 800; }

.order-list { list-style: none; padding: 0; margin: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: #fff; }
.order-list .pos { width: 26px; height: 26px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.order-list .name { flex: 1; font-weight: 600; }
.order-list .mv { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; width: 36px; height: 34px; cursor: pointer; font-size: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .9rem; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 0; }

.steps { display: flex; gap: 4px; margin-bottom: 18px; }
.steps span { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.steps span.done { background: var(--p); }

.logo-preview { width: 84px; height: 84px; border-radius: 16px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.qr { width: 220px; max-width: 100%; display: block; margin: 10px auto; border-radius: 12px; background: #fff; }
.copybox { display: flex; gap: 8px; }
.copybox input { flex: 1; font-size: .9rem; }

.msg { padding: 12px 0; border-top: 1px solid var(--line); white-space: pre-wrap; }
.msg:first-child { border-top: 0; }
.msg small { display: block; margin-bottom: 4px; }

.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.error { color: var(--bad); font-weight: 600; margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #111827; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: 90vw; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); }

.install { border: 2px dashed color-mix(in srgb, var(--p) 40%, transparent); }
.install ol { margin: 0; padding-left: 20px; line-height: 1.6; }

details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.graph { width: 100%; height: auto; display: block; }
.legend { font-size: .82rem; color: var(--muted); }

@media (min-width: 720px) {
  .app { padding: 24px; }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}

input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
label.btn { display: inline-flex; font-weight: 600; }

/* ---------- Voetbal-look "Grasmat" (0.1.9) ---------- */
@font-face { font-family: "Archivo Black"; src: url("/fonts/archivo-black.woff2") format("woff2"); font-display: swap; }
:root {
  --bg: #f2f5ef; --text: #14221a; --muted: #56655c; --line: #e1e8e2;
  --grass1: #1a8a45; --grass2: #167a3c; --dark: #14221a;
  --radius: 18px;
  --shadow: 0 2px 8px rgba(20,34,26,.06);
  --stripes: repeating-linear-gradient(0deg, var(--grass1) 0 28px, var(--grass2) 28px 56px);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, .display { font-family: "Archivo Black", system-ui, sans-serif; font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.12rem; }
.topbar { background: var(--grass2); }
.brand img { border-radius: 10px; }
.icon-btn { background: rgba(255,255,255,.15); border-radius: 10px; width: 44px; height: 44px; font-size: 1.3rem; }
.card.accent { border-left: 0; background: color-mix(in srgb, var(--p) 7%, #fff); border: 1px solid color-mix(in srgb, var(--p) 28%, transparent); }
.card.hero { background: var(--stripes); }
.btn.secondary { background: #fff; }
.tabs button.active { background: var(--dark); border-color: var(--dark); }
.tabbar { border-top-color: var(--line); }
.tabbar a .ic { display: block; height: 22px; }
.tabbar a .ic svg { width: 22px; height: 22px; display: block; margin: 0 auto; }
.tabbar a.active { color: var(--grass2); font-weight: 800; }
.steps span.done { background: var(--grass1); }

/* Grasveld bovenaan het beginscherm */
.pitch { position: relative; margin: -16px -16px 0; padding: 18px 18px 92px; background: var(--stripes); color: #fff; overflow: hidden; }
.pitch::before { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 64px; border: 2px solid rgba(255,255,255,.5); border-bottom: 0; }
.pitch::after { content: ""; position: absolute; left: 50%; bottom: 64px; width: 84px; height: 22px; margin-left: -42px; border: 2px solid rgba(255,255,255,.5); border-bottom: 0; border-radius: 90px 90px 0 0; }
.pitch small { color: rgba(255,255,255,.85); position: relative; }
.pitch h1 { position: relative; color: #fff; font-size: 1.9rem; line-height: 1.08; margin: 4px 0 0; }
.scorecard { position: relative; margin-top: -52px; display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 24px rgba(20,34,26,.12); }
.rankball { width: 62px; height: 62px; flex: none; border-radius: 50%; background: var(--p); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.rankball b { font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 1.45rem; }
.rankball small { color: rgba(255,255,255,.9); font-size: .68rem; margin-top: 2px; }
.bar { height: 6px; background: #e6ece6; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grass1); border-radius: 3px; }
.tiles { display: flex; gap: 10px; margin-bottom: 14px; }
.tile { flex: 1; border-radius: 14px; padding: 12px; text-align: center; text-decoration: none; color: var(--text); background: #fff; }
.tile b { display: block; font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 1.6rem; line-height: 1.2; }
.tile small { font-size: .74rem; }
.tile.dark { background: var(--dark); color: #fff; }
.tile.dark small { color: #b6c7bc; }
.tile.todo { border: 2px dashed var(--p); }
.tile.todo b { color: var(--p); }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cardhead a { font-size: .85rem; font-weight: 600; color: var(--grass2); white-space: nowrap; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.todo-list li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px dashed var(--p); flex: none; }

/* Wedstrijden: scorevakjes */
.match .team { font-size: .98rem; }
.score input { width: 46px; height: 46px; padding: 0; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--p) 55%, transparent); background: #fff; font-size: 1.2rem; font-weight: 800; }
.score input:not(:placeholder-shown), .score input.filled { border-color: transparent; background: var(--bg); }
.result { font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 1.2rem; background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.result.muted { font-family: inherit; font-weight: 700; }

.pill { white-space: nowrap; }
.scoreboard { background: var(--dark); color: #fff; }
.scoreboard small { color: #b6c7bc; }
.scoreboard .big { font-family: "Archivo Black", sans-serif; font-weight: 400; color: #fff; }
tr.me td { background: color-mix(in srgb, var(--grass1) 14%, #fff); }
tr.me td:first-child { box-shadow: inset 4px 0 0 var(--grass1); }

.howto { margin: 0; padding-left: 20px; }
.howto li { margin-bottom: 10px; line-height: 1.45; }

/* PouleHero-logo in de wizard */
.wiz-logo{display:block;width:88px;height:auto;margin:4px 0 10px}
/* ---------- Stijl "Stadionlicht" (0.5.0): kleuren van het logo, met voetbal ---------- */
:root{
  --bg:#f3f6f2;--card:#fff;--text:#131313;--muted:#56655c;--line:#e1e8e2;
  --p:#131313;--s:#18a8a8;--dark:#131313;--grass1:#157a3c;--grass2:#131313;
  --lime:#7fe03a;--cyan:#18d8f0;
  --glow:linear-gradient(125deg,#7fe03a 0%,#3fd38f 55%,#18d8f0 100%);
  --mow:repeating-linear-gradient(90deg,rgba(255,255,255,.13) 0 34px,rgba(255,255,255,0) 34px 68px);
  --stripes:var(--mow),var(--glow);
  --ballw:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.55'%3E%3Ccircle cx='50' cy='50' r='47' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M50 30l19 14-7 22H38l-7-22z' fill='%23fff'/%3E%3Cpath d='M50 30V6M69 44l22-8M62 66l14 19M38 66L24 85M31 44L9 36' stroke='%23fff' stroke-width='4' fill='none'/%3E%3C/g%3E%3C/svg%3E");
  --ball:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='47' fill='none' stroke='%23131313' stroke-width='5'/%3E%3Cpath d='M50 30l19 14-7 22H38l-7-22z' fill='%23131313'/%3E%3Cpath d='M50 30V6M69 44l22-8M62 66l14 19M38 66L24 85M31 44L9 36' stroke='%23131313' stroke-width='5' fill='none'/%3E%3C/svg%3E");
}
body{background:var(--bg) repeating-linear-gradient(180deg,rgba(21,122,60,.035) 0 90px,transparent 90px 180px)}
.topbar{background:var(--glow);color:#131313}
.brand{color:#131313}.brand img{background:#131313}
.icon-btn{background:rgba(19,19,19,.12);color:#131313}

/* Het veld bovenaan: gemaaide strepen, lijnen, middencirkel en een bal */
.pitch{color:#131313;background:var(--stripes)}
.pitch h1{color:#131313}.pitch small{color:rgba(19,19,19,.75)}
.pitch::before,.pitch::after{border-color:rgba(255,255,255,.75)}
.pitch .ballmark,.pitch::marker{display:none}
.pitch{background-image:var(--ballw),var(--mow),var(--glow);background-size:72px 72px,auto,auto;background-repeat:no-repeat,repeat,no-repeat;background-position:right 16px top 14px,0 0,0 0}

/* Knoppen en links */
.btn{background:#131313;color:#fff}
.btn.secondary{background:#fff;color:#131313;border:1px solid var(--line)}
.btn.ghost{background:transparent;color:#157a3c}
a{color:#157a3c}.cardhead a{color:#157a3c}

/* Jouw plek: een bal met je positie */
.rankball{background:#131313;color:var(--lime);position:relative}
.rankball{box-shadow:0 0 0 3px var(--lime)}
.rankball small{color:#cfd8d1}

/* Voortgang als middenlijn met bal */
.bar{background:#e6ece6;height:8px;border-radius:4px;overflow:visible;position:relative}
.bar>i{background:linear-gradient(90deg,var(--lime),var(--cyan));border-radius:4px;position:relative}
.bar>i::after{content:"";position:absolute;right:-9px;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;background:#fff var(--ball) center/16px no-repeat;box-shadow:0 1px 3px rgba(0,0,0,.25)}

/* Tegels als scorebord */
.tile{background:#fff;color:#131313}
.tile.dark{background:#131313;color:#fff;border-bottom:4px solid transparent;border-image:linear-gradient(90deg,var(--lime),var(--cyan)) 1}
.tile.dark b{color:var(--lime);letter-spacing:.04em}
.tile.todo{background:#fff;border:2px dashed #18a8a8}.tile.todo b{color:#0f7f7f}.tile.todo small{color:#56655c}
.todo-list li::before{border-color:#18a8a8}

/* Kopjes in kaarten met een balletje */
.card > h2:first-child,.cardhead h2{display:flex;align-items:center;gap:8px}
.card > h2:first-child::before,.cardhead h2::before{content:"";width:18px;height:18px;flex:none;background:var(--ball) center/contain no-repeat}
.card.hero > h2:first-child::before{display:none}

/* Scorevakjes als op het scorebord */
.score input{border:2px solid #131313;border-radius:10px}
.score input:not(:placeholder-shown),.score input.filled{background:#131313;color:var(--lime);border-color:#131313}
.result{background:#131313;color:var(--lime)}

.tabs button.active{background:#131313;color:var(--lime);border-color:#131313}
.steps span.done{background:linear-gradient(90deg,var(--lime),var(--cyan))}

/* Stand: jouw rij als doellijn */
tr.me td{background:rgba(24,216,240,.12)}
tr.me td:first-child{box-shadow:inset 4px 0 0 var(--cyan)}

/* Onderbalk: actieve tab met een balletje erboven */
.tabbar{background:#fff;border-top:3px solid transparent;border-image:linear-gradient(90deg,var(--lime),var(--cyan)) 1}
.tabbar a{color:#6b766f;position:relative}
.tabbar a.active{color:#131313}
.tabbar a.active::before{content:"";position:absolute;top:-10px;left:50%;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:#fff var(--ball) center/11px no-repeat;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.card.hero{color:#131313}

/* Vlaggen bij de landen (na de loting) */
.flag{width:22px;height:16px;border-radius:3px;object-fit:cover;vertical-align:-3px;margin-right:7px;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.team.away .flag{margin-right:0;margin-left:7px}
.chip small .flag{width:16px;height:12px;margin-right:4px;vertical-align:-1px}
