/* Layout: één kolom, mobiel eerst; oefenkaart is het hart. Huisstijl Spelen Met Frans: bosgroen, warm goud, terracotta, warm crème. */
:root {
  --bg: #F7F2E8; --surface: #FFFDF8; --ink: #1F2A23; --muted: #5F6B62; --line: #E3DACA;
  --green: #2F4A3A; --green-soft: #E3ECE5; --gold: #C9962E; --gold-soft: #F6EBCF; --terra: #B85C3C; --terra-soft: #F6E1D8;
  --good: #2E7D4F; --mid: #B07A12; --low: #B4442B;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141A16; --surface: #1C241F; --ink: #ECE6DA; --muted: #A3ACA3; --line: #2E3A32;
  --green: #8FC1A0; --green-soft: #22342A; --gold: #E2B455; --gold-soft: #3A3020; --terra: #E08A69; --terra-soft: #3B261E;
  --good: #6FCB92; --mid: #E2B455; --low: #EE8A6F; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #141A16; --surface: #1C241F; --ink: #ECE6DA; --muted: #A3ACA3; --line: #2E3A32;
  --green: #8FC1A0; --green-soft: #22342A; --gold: #E2B455; --gold-soft: #3A3020; --terra: #E08A69; --terra-soft: #3B261E;
  --good: #6FCB92; --mid: #E2B455; --low: #EE8A6F; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
#app { max-width: 920px; margin: 0 auto; padding-inline: 16px; padding-block: 0 48px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
small { display: block; font-size: .82rem; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--green); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font-family: var(--display); font-size: 1.15rem; display: block; }
.brand small { color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: .68rem; }
.bolt { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #1F2A23; font-size: 1.2rem; }
.who { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; font: 600 .95rem var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.on { color: var(--green); border-color: var(--gold); }
.embedbar { font-size: .85rem; background: var(--gold-soft); padding: 6px 12px; border-radius: 10px; margin-bottom: 8px; }
.embed .top { padding-block: 8px; }

/* bouwstenen */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font: 600 .95rem var(--body); border-radius: 999px; border: 1.5px solid var(--green); background: transparent; color: var(--green); padding: 9px 18px; cursor: pointer; min-height: 42px; }
.btn.primary { background: var(--green); color: var(--surface); }
.btn.big { font-size: 1.05rem; padding: 12px 24px; min-height: 50px; }
.btn.sm { padding: 5px 12px; min-height: 34px; font-size: .85rem; }
.btn:disabled { opacity: .5; }
.btn:hover { filter: brightness(1.06); }
button:focus-visible, input:focus-visible, .chip:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.link { background: none; border: 0; color: var(--green); font: 600 .9rem var(--body); cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.link.strong { color: var(--terra); }
input:not([type=checkbox]) { width: 100%; font: 1rem var(--body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
label { font-weight: 600; font-size: .9rem; display: block; margin: 10px 0 4px; }
.err { color: var(--low); min-height: 1.4em; margin-top: 8px; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.notice.bad { background: var(--terra-soft); color: var(--ink); }
.pill { display: inline-block; font: 700 .78rem var(--body); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--green-soft); color: var(--good); }
.pill.mid { background: var(--gold-soft); color: var(--mid); }
.pill.low { background: var(--terra-soft); color: var(--low); }
.list { display: grid; gap: 10px; margin-bottom: 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.row > div { min-width: 0; }
.row.plain { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 24px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid2 > * { min-width: 0; }
.center { display: grid; place-items: center; min-height: 40vh; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; z-index: 50; max-width: calc(100% - 32px); }
.toast.bad { background: var(--low); color: #fff; }

/* login */
.login { max-width: 440px; margin: 6vh auto 0; }
.login .btn { width: 100%; margin-top: 16px; }
.demo { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .9rem; }
.demo ul { padding-left: 18px; margin: 6px 0 0; }

/* oefening instellen */
.secthead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.secthead h2 { margin: 0; }
.count { font: 600 .85rem var(--body); color: var(--terra); margin-left: 6px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 600 .85rem var(--body); cursor: pointer; }
.chip.on { background: var(--green); border-color: var(--green); color: var(--surface); }
.verbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; }
.vb { position: relative; display: flex; flex-direction: column; margin: 0; padding: 6px 10px 6px 34px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; min-width: 0; }
.vb input { position: absolute; left: 10px; top: 10px; margin: 0; }
.vb .inf { font-weight: 700; line-height: 1.3; }
.vb .nl { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.vb .tag { position: absolute; right: 8px; top: 7px; font-style: normal; font-size: .7rem; color: var(--terra); }
.vb.on { background: var(--green-soft); border-color: var(--green); }
.tenses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tcheck { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.tcheck b { font-family: var(--display); }
.tcheck.extra { border-style: dashed; }
.tcheck small { color: var(--muted); }
.opt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.opt .lab { font-weight: 600; min-width: 120px; }
.seg { display: inline-flex; border: 1.5px solid var(--green); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.segb { border: 0; background: transparent; color: var(--green); font: 600 .9rem var(--body); padding: 8px 14px; cursor: pointer; }
.segb.on { background: var(--green); color: var(--surface); }
.sticky { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; }
.sticky .btn { box-shadow: 0 8px 24px rgba(31, 42, 35, .25); }
.check { display: flex; gap: 8px; align-items: center; }

/* oefenen */
.practice { max-width: 640px; margin: 0 auto; }
.pbar { margin-bottom: 14px; }
.ptop { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.track > div { height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; text-align: center; }
.tense { display: inline-block; background: var(--terra-soft); color: var(--terra); padding: 6px 14px; border-radius: 12px; }
.tense b { font-family: var(--display); font-size: 1.05rem; }
.tense small { color: var(--ink); opacity: .75; }
.verb { font-family: var(--display); font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 700; margin-top: 12px; line-height: 1.1; overflow-wrap: anywhere; }
.nl { color: var(--muted); margin-bottom: 18px; }
.answer { display: grid; gap: 10px; }
.subj { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.subj .g { font: italic 400 .95rem var(--body); color: var(--terra); }
#ans { font-size: 1.5rem; text-align: center; padding: 14px; border-width: 2px; }
#ans.ok { border-color: var(--good); background: var(--green-soft); }
#ans.no { border-color: var(--low); }
.accents { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.acc { min-width: 40px; min-height: 40px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; font: 600 1.05rem var(--body); cursor: pointer; }
.acc:active { background: var(--gold-soft); }
.actions .btn { width: 100%; }
.fb { min-height: 1.5em; margin-top: 12px; text-align: left; border-radius: 12px; }
.fb:empty { display: none; }
.fb.good, .fb.bad, .fb.hint, .fb.show { padding: 12px 14px; }
.fb.good { background: var(--green-soft); color: var(--good); font-weight: 700; text-align: center; }
.fb.bad { background: var(--terra-soft); }
.fb.hint, .fb.show { background: var(--gold-soft); }
.fb p { margin: 6px 0 0; }
.rule { font-size: .88rem; color: var(--muted); }
.helpers { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; align-items: center; }
.helpers .sp { flex: 1; }

/* resultaten */
.result-hero { display: grid; gap: 16px; margin-bottom: 20px; }
.big { display: flex; align-items: baseline; gap: 12px; }
.big .num { font-family: var(--display); font-size: clamp(3rem, 14vw, 4.6rem); font-weight: 700; line-height: 1; }
.big.good .num { color: var(--good); } .big.mid .num { color: var(--mid); } .big.low .num { color: var(--low); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; }
.facts dd small { display: inline; font-size: .8rem; color: var(--muted); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.mist th, .mist td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.mist th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mist .wrong { color: var(--low); text-decoration: line-through; text-decoration-thickness: 1px; }
.mist .right { color: var(--good); font-weight: 700; }
.bars th, .bars td { padding: 6px 4px; font-size: .9rem; text-align: left; }
.bars thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.bars td:nth-child(2) { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > div { height: 100%; border-radius: 99px; }
.bar .good { background: var(--good); } .bar .mid { background: var(--mid); } .bar .low { background: var(--low); }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* tabellen */
.tlist { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.tablehead { margin: 8px 0 12px; }
.conj { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.tcard.dim { opacity: .75; border-style: dashed; }
.tcard h3 { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tcard table { margin-top: 8px; }
.tcard td { padding: 2px 0; vertical-align: top; font-size: .95rem; }
.tcard .pr { color: var(--muted); padding-right: 10px; white-space: nowrap; }
.note { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.overlay { position: fixed; inset: 0; background: rgba(20, 26, 22, .55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: min(920px, 100%); max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.sheet .close { float: right; }
.kid { margin-bottom: 28px; }

/* mijn week */
.install { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: var(--gold); }
.install p { margin: 4px 0 0; }
.verbnote { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.verbnote p { margin: 8px 0 0; font-size: .92rem; }
.eyebrow { font: 700 .75rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--terra); margin: 0 0 4px; }
.small { font-size: .85rem; }
.inl { display: inline; }
.center-t { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.weekhero { margin: 4px 0 16px; }
.weekhero h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); margin-bottom: 2px; }
.chip.static { cursor: default; background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.chips.small .chip { font-size: .78rem; padding: 4px 10px; }
.notice.soft { background: var(--green-soft); }
.notice.gold { background: var(--gold-soft); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.today { border: 2px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); }
.today h2 { font-size: 1.45rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.today .btn { width: 100%; margin-top: 6px; }
.today.isdone { border-color: var(--good); background: linear-gradient(180deg, var(--green-soft), var(--surface) 70%); }
.today .done { font-size: 1.05rem; margin: 6px 0 0; }
.restart { border-color: var(--terra); background: var(--terra-soft); }
.daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.day { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 .85rem var(--body); cursor: pointer; min-width: 0; }
.day .d { text-transform: uppercase; letter-spacing: .04em; }
.day .dt { font-size: .7rem; color: var(--muted); font-weight: 400; }
.day .mk { min-height: 1.2em; color: var(--good); font-size: .95rem; }
.day.practiced { background: var(--green-soft); border-color: var(--green-soft); }
.day.done { background: var(--green); border-color: var(--green); color: var(--surface); }
.day.done .dt, .day.done .mk { color: var(--surface); }
.day.today { outline: 3px solid var(--gold); outline-offset: 1px; }
.day.future { opacity: .5; cursor: not-allowed; }
details.plan { margin: 8px 0; }
details.plan summary, details.privacy summary { cursor: pointer; font-weight: 600; color: var(--green); }
details.plan ul { margin-top: 8px; font-size: .9rem; }
details.privacy { margin-top: 16px; font-size: .85rem; color: var(--muted); }
details.privacy p { margin-top: 8px; }
.bignum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.bignum .num { font-family: var(--display); font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; }
.meter { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter > div { height: 100%; background: var(--gold); border-radius: 99px; }
.badges { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.badges li { display: flex; gap: 8px; align-items: center; opacity: .45; filter: grayscale(1); }
.badges li.got { opacity: 1; filter: none; font-weight: 600; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lvl { text-align: left; font: inherit; color: inherit; cursor: pointer; border-width: 2px; }
.lvl.on, .lvl:hover { border-color: var(--gold); }
.ioscta { width: 100%; margin: 4px 0 4px; }
.quiz .qcard { border: 2px solid var(--terra-soft); }
.earned { background: var(--gold-soft); border-radius: var(--r); padding: 14px 16px; }
.lb th, .lb td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lb .num { text-align: right; }
.lb tr.me { background: var(--gold-soft); font-weight: 700; }
.prefs .check { font-weight: 400; margin: 8px 0; align-items: flex-start; }
.prefs .check input { margin-top: 4px; }
.kpis div.ok { border-color: var(--good); }
.kpis div.warn { border-color: var(--terra); }
.kpis small { display: block; font-size: .72rem; }
.card h3 { font-family: var(--body); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 4px; }

@media (max-width: 560px) {
  .mist thead { display: none; }
  .mist tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mist td { border: 0; padding: 0; }
  .mist td:nth-child(1) { font-weight: 700; }
  .mist td:nth-child(4)::before { content: 'jij: '; color: var(--muted); text-decoration: none; display: inline-block; margin-right: 4px; }
  .mist td:nth-child(5)::before { content: 'juist: '; color: var(--muted); font-weight: 400; margin-right: 4px; }
}
@media (max-width: 480px) {
  .who span { display: none; }
  .opt .lab { min-width: 100%; }
  .qcard { padding: 18px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0.01ms !important; } }

/* v6 bugfix: menu op gsm in één rij (veeg opzij), geen drie rijen meer boven de workout */
@media (max-width: 560px) {
  .tabs { flex-wrap: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); margin-bottom: 14px; }
  .tab { padding: 10px 9px; font-size: .9rem; }
  .tabs .tab:last-child { margin-right: 24px; }
}
