/* SlimmeKids School – Zetmeester – © 2026 SlimmeKids. Alleen systeemlettertypen. Basis = dezelfde knoppen, kaarten en duelkamer als Klasduel (School-huisstijl). */
:root {
    --ink: #1c3348; --muted: #5b7084; --line: #d5dee7; --paper: #f4f7fb; --card: #fff;
    --mint: #1fb5a8; --mint-d: #128a80; --pink: #ff7fa8; --accent: #ff9a3c;
    --ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: Fredoka, "Trebuchet MS", Verdana, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: manipulation;
    font-family: var(--ui); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
button { font: inherit; touch-action: manipulation; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
.app { display: flex; flex-direction: column; height: 100%; }
.top { flex: 0 0 auto; display: flex; align-items: center; gap: .85rem; padding: calc(.45rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .45rem max(1rem, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.title { min-width: 0; padding-left: .85rem; border-left: 1px solid #e6edf3; margin-left: auto; text-align: right; }
.kicker { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.15; white-space: nowrap; }
.t-sk { color: var(--mint-d); }
.tools { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }
.mini { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 36px; min-width: 36px; padding: 0 .75rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; font-size: .85rem; font-weight: 600; }
.sound-mark { width: 12px; height: 12px; border-radius: 50%; background: #1f9d45; box-shadow: 0 0 0 3px rgba(31,157,69,.2), 0 0 8px rgba(31,157,69,.75); }
.sound-btn.off .sound-mark { background: #e11d2e; box-shadow: 0 0 0 3px rgba(225,29,46,.18), 0 0 8px rgba(225,29,46,.7); }
.size-control { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .45rem 0 .4rem; border: 1px solid #d5dee7; border-radius: 6px; background: #fff; color: #1c3348; }
.size-a { font-weight: 700; line-height: 1; color: #5d7388; }
.size-a-sm { font-size: .68rem; } .size-a-lg { font-size: 1.05rem; }
.text-size { width: 92px; height: 18px; margin: 0; accent-color: #2f9ed8; cursor: pointer; }
@media (max-width: 900px) { .text-size { width: 64px; } }
:root { --blue: #2f9ed8; --blue-d: #1f7fb5; --cs: 120px; }
.mem-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .88rem; font-weight: 650; }
.mem-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mem-sw { flex: 0 0 auto; width: 40px; height: 24px; border-radius: 99px; background: #cfd8e2; position: relative; transition: background .2s; }
.mem-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.mem-switch input:checked + .mem-sw { background: var(--mint); }
.mem-switch input:checked + .mem-sw::after { transform: translateX(16px); }
.mem-switch input:focus-visible + .mem-sw { outline: 3px solid rgba(47,158,216,.4); outline-offset: 2px; }
.mem-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 750; font-size: .95rem; color: var(--ink); }
.mem-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mem-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(47,158,216,.28); }
.mem-btn:hover { filter: brightness(1.04); } .mem-btn:active { transform: scale(.98); }
.mem-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(28,51,72,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: mem-fade .35s ease both; overflow-y: auto; }
@keyframes mem-fade { from { opacity: 0; } to { opacity: 1; } }
.mem-sc { width: min(900px, 100%); max-height: calc(100% - 1rem); overflow-y: auto; display: grid; grid-template-columns: 1fr 1.25fr; background: #fff; border-radius: 26px; box-shadow: 0 30px 80px rgba(28,51,72,.28); animation: mem-up .45s cubic-bezier(.2,.9,.3,1.15) both; zoom: var(--ui-zoom, 1); }
@keyframes mem-up { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.mem-sc-hero { padding: 1.6rem 1.6rem 1.4rem; background: linear-gradient(165deg, #f4fbff 0%, #e8f6f4 100%); border-right: 1px solid #e6edf3; }
.mem-sc-art { width: 150px; height: 112px; margin: 0 0 .5rem -6px; }
.mem-sc-art .sp { transform-box: fill-box; transform-origin: center; animation: mem-tw 2.6s ease-in-out infinite; }
@keyframes mem-tw { 0%,100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
.mem-sc-sk { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-d); }
.mem-sc-name { margin: .1rem 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.05; }
.mem-sc-sub { margin: .35rem 0 .7rem; font-weight: 700; font-size: .95rem; color: #3e556b; }
.mem-sc-intro { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.mem-sc-count { display: inline-block; margin: 1rem 0 0; padding: .35rem .7rem; border-radius: 99px; background: #fff; border: 1px solid #dbe7ef; font-size: .78rem; font-weight: 750; color: #3e556b; }
.mem-sc-pick { padding: 1.3rem 1.5rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.mem-sc-lbl { margin: .35rem 0 0; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mem-sc-lbl:first-child { margin-top: 0; }
.mem-seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.mem-seg-b, .mem-size { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: .5rem .2rem; border: 2px solid #e3eaf1; border-radius: 14px; background: #fff; transition: border-color .15s, background .15s, transform .15s; }
.mem-seg-b b, .mem-size b { font-family: var(--display); font-size: 1.15rem; line-height: 1; }
.mem-seg-b small, .mem-size small { font-size: .66rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mem-seg-b .dots { display: flex; gap: 2px; height: 8px; } .mem-seg-b .dots i { width: 8px; height: 8px; border-radius: 50%; }
.mem-seg-b.on, .mem-size.on { border-color: var(--blue); background: #eef7fd; box-shadow: 0 4px 12px rgba(47,158,216,.18); }
.mem-seg-b:hover, .mem-size:hover:not(:disabled) { transform: translateY(-1px); }
.mem-names { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.mem-name { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 38px; border: 1.5px solid #e3eaf1; border-radius: 10px; background: #fff; }
.mem-name i { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); flex: 0 0 auto; }
.mem-name input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: .85rem; font-weight: 650; color: var(--ink); background: transparent; -webkit-user-select: text; user-select: text; }
.mem-name:focus-within { border-color: var(--tc); }
.mem-chip { padding: .38rem .7rem; border-radius: 99px; border: 1.5px solid #e3eaf1; background: #fff; font-size: .8rem; font-weight: 700; }
.mem-chip small { color: var(--muted); font-weight: 700; margin-left: 2px; }
.mem-chip.on { border-color: var(--blue); background: #eef7fd; color: var(--blue-d); }
.mem-sc-go { margin-top: .6rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 54px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #ffb25c, #ff8f2e); color: #fff; font-family: var(--display); font-size: 1.2rem; font-weight: 800; box-shadow: 0 10px 22px rgba(255,143,46,.32); }
.mem-sc-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mem-sc-go:hover { filter: brightness(1.04); } .mem-sc-go:active { transform: scale(.98); }
.mem-done { width: min(480px, 100%); background: #fff; border-radius: 26px; padding: 1.6rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 30px 80px rgba(28,51,72,.28); animation: mem-up .45s cubic-bezier(.2,.9,.3,1.15) both; zoom: var(--ui-zoom, 1); }
.mem-trophy { width: 84px; height: 84px; }
.mem-done h2 { margin: .3rem 0 .2rem; font-family: var(--display); font-size: 1.9rem; }
.mem-done-sub { margin: 0 0 1rem; color: var(--muted); font-weight: 650; }
.mem-rank { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.mem-rank li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid #e3eaf1; }
.mem-rank li.win { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 8%, #fff); }
.mem-rank .p { width: 22px; font-weight: 800; color: var(--muted); } .mem-rank i { width: 14px; height: 14px; border-radius: 50%; background: var(--tc); }
.mem-rank .n { flex: 1; font-weight: 750; } .mem-rank b { font-family: var(--display); }
.mem-done-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mem-version { position: fixed; left: 12px; bottom: 12px; margin: 0; font-size: 11.52px; color: #5b7084; opacity: .85; z-index: 7; pointer-events: none; }
.mem-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.mem-mode-b { display: flex; align-items: center; gap: .6rem; text-align: left; padding: .55rem .7rem; border: 2px solid #e3eaf1; border-radius: 14px; background: #fff; transition: border-color .15s, background .15s, transform .15s; }
.mem-mode-b svg { flex: 0 0 auto; width: 30px; height: 30px; fill: #eef7fd; stroke: #2f9ed8; stroke-width: 2; stroke-linejoin: round; }
.mem-mode-b span { display: flex; flex-direction: column; min-width: 0; }
.mem-mode-b b { font-size: .84rem; line-height: 1.2; } .mem-mode-b small { font-size: .7rem; font-weight: 650; color: var(--muted); }
.mem-mode-b.on { border-color: var(--blue); background: #eef7fd; box-shadow: 0 4px 12px rgba(47,158,216,.18); }
.mem-mode-b:hover { transform: translateY(-1px); }
@keyframes mem-fadein { from { opacity: 0; } to { opacity: 1; } }
.mem-rank .tr { color: var(--muted); font-weight: 650; font-size: .8rem; margin-right: .5rem; }

@keyframes tk-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* Startscherm */
.tk-sc-wide { width: min(1180px, 100%); grid-template-columns: minmax(300px, .82fr) 1.5fr; }
.tk-hero { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 18px; margin: 0 0 .9rem; box-shadow: 0 10px 24px rgba(28,51,72,.16); background: #cfe9f7; }
.tk-names { display: grid; grid-template-columns: 1fr; gap: .45rem; margin-top: .45rem; }
.tk-names .mem-name { height: 44px; }
.tk-names .mem-name input { font-size: .95rem; }
.tk-grades { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.tk-grades .mem-seg-b { padding: .5rem .15rem; min-height: 56px; }
.tk-grades .mem-seg-b b { font-size: .92rem; text-align: center; }
.tk-grades .mem-seg-b small { white-space: normal; text-align: center; line-height: 1.15; font-size: .62rem; }
.tk-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.tk-subj { display: flex; align-items: center; gap: .55rem; min-height: 46px; padding: .4rem .6rem; border: 2px solid #e3eaf1; border-radius: 14px; background: #fff; text-align: left; font-weight: 750; font-size: .86rem; line-height: 1.15; transition: border-color .15s, background .15s, transform .15s; }
.tk-subj svg { flex: 0 0 auto; width: 26px; height: 26px; padding: 3px; border-radius: 8px; background: #eef7fd; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-subj.on { border-color: var(--blue); background: #eef7fd; box-shadow: 0 4px 12px rgba(47,158,216,.18); }
.tk-subj.on svg { background: var(--blue); stroke: #fff; }
.tk-subj:hover { transform: translateY(-1px); }
.tk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tk-chips .mem-chip { min-height: 38px; padding: .38rem .8rem; }
.tk-chips .mem-chip b { font-weight: 750; }
.tk-row3 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.tk-seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.tk-seg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.tk-seg3 .mem-seg-b, .tk-seg4 .mem-seg-b { min-height: 46px; }
.tk-seg3 .mem-seg-b b, .tk-seg4 .mem-seg-b b { font-size: .95rem; }
.tk-speak { margin-top: .5rem; }
.mem-sc-pick .mem-sc-go { margin-top: .8rem; }
.tk-win-ov { background: rgba(28,51,72,.16); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.tk-win-ov .mem-done { border-top: 6px solid var(--tc); }
.tk-trophy { animation: tk-pop .7s cubic-bezier(.2,1.4,.4,1) .1s both; }
.mem-rank li .tr { margin-left: auto; }

@media (max-width: 1100px) { .tk-sc-wide { grid-template-columns: 1fr; } .tk-sc-wide .mem-sc-hero { border-right: 0; border-bottom: 1px solid #e6edf3; } .tk-hero { max-width: 340px; } .tk-names { grid-template-columns: 1fr 1fr; } }
@media (max-height: 700px) { .tk-panel { height: 50%; } .tk-sc .n { font-size: .95rem; } }
@media (min-width: 1700px) and (min-height: 900px) { .mem-sc, .mem-done { zoom: calc(var(--ui-zoom, 1) * 1.22); } .tk-hud, .tk-ph, .tk-fb { zoom: calc(var(--ui-zoom, 1) * 1.25); } }
@media (min-width: 2500px) and (min-height: 1300px) { .mem-sc, .mem-done { zoom: calc(var(--ui-zoom, 1) * 1.6); } .tk-hud, .tk-ph, .tk-fb { zoom: calc(var(--ui-zoom, 1) * 1.6); } }
@media (prefers-reduced-motion: reduce) { .tk-mk { transition: none; } .tk-panel.is-no, .tk-opt.reveal, .tk-count b, .tk-sudden, .tk-trophy, .tk-time.low { animation: none; } }
.tk-hero-go { display: flex; flex-direction: column; gap: .2rem; margin-top: .8rem; }
.tk-hero-go .mem-sc-go { width: 100%; }
.mem-sc-hero { display: flex; flex-direction: column; }

/* contrast (Lighthouse AA) – visueel gelijk aan de andere School-spellen */
.mem-chip.on { color: #16679a; }
.mem-version { color: #55697d; opacity: 1; }
.sk-school-copy { color: #55697d; }
.top .title .t-sk { color: #0f7f75; }

/* ---------- duelkamer ---------- */
.go-duel { display: none; } .tk-duel-host .go-duel { display: inline; } .tk-duel-host .go-solo { display: none; }
.mem-sc-go.wait { filter: saturate(.55) brightness(1.02); box-shadow: none; }
.tk-duel-btn { width: 100%; margin-top: .7rem; min-height: 60px; justify-content: flex-start; gap: 12px; padding: 8px 16px; border: 1.5px solid #dbe4ee; border-radius: 16px; box-shadow: 0 1px 0 rgba(28,51,72,.04), 0 4px 12px rgba(28,51,72,.06); text-align: left; font-family: var(--ui); }
.tk-duel-btn svg { width: 30px; height: 30px; flex: 0 0 auto; color: #16679a; stroke-width: 1.9; }
.tk-duel-btn span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tk-duel-btn b { font-weight: 700; font-size: 1rem; color: var(--ink); }
.tk-duel-btn small { font-weight: 500; font-size: .8rem; color: #55697d; }
.tk-duel-host .tk-duel-btn b::after { content: " ✓"; color: #0f7f75; }
.tk-duel-host .tk-names, .tk-duel-host #tkTeamsLbl, .tk-duel-host #tkModeLbl, .tk-duel-host #tkMode { display: none; }
.tk-duel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: .7rem 0 .2rem; padding: 10px 14px; border-radius: 16px; background: #f2f7fc; border: 1.5px solid #dbe4ee; }
.tk-duel-bar .lbl { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #55697d; }
.tk-duel-bar .st { flex: 1 1 100%; font-weight: 600; font-size: .92rem; color: #55697d; }
.tk-duel-bar.ok { background: #eefaf6; border-color: #bfe8da; } .tk-duel-bar.ok .st { color: #0f6e63; }
.tk-code-s { display: inline-flex; gap: 4px; } .tk-code-s span { min-width: 1.35em; padding: 2px 0; text-align: center; border-radius: 8px; background: #fff; border: 1px solid #dbe4ee; font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: #163b5c; font-variant-numeric: tabular-nums; }

.tk-duel-ov { z-index: 60; }
.tk-duel-card { width: min(760px, 100%); padding: 1.5rem 1.8rem 1.4rem; }
.tk-duel-card .dv[hidden] { display: none; }
.tk-d-kick { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #0f7f75; }
.tk-duel-card h2 { font-weight: 800; line-height: 1.15; }
.tk-d-name { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin: 1rem auto .2rem; text-align: left; font-weight: 600; font-size: .9rem; color: #4d6478; }
.tk-d-name input { min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid #dbe4ee; font: 600 1.05rem var(--ui); color: var(--ink); background: #fff; }
.tk-d-name input:focus { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
.tk-d-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1rem 0 .4rem; }
.tk-d-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 16px; border-radius: 20px; border: 1.5px solid #dbe4ee; background: #fff; color: var(--ink); font-family: var(--ui); box-shadow: 0 1px 0 rgba(28,51,72,.04), 0 6px 16px rgba(28,51,72,.07); transition: transform .12s, box-shadow .2s, border-color .2s; }
.tk-d-big svg { width: 44px; height: 44px; padding: 9px; border-radius: 14px; background: #eaf4fb; color: #16679a; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tk-d-big b { font-size: 1.15rem; font-weight: 700; } .tk-d-big small { font-size: .86rem; font-weight: 500; color: #55697d; }
.tk-d-big:hover { border-color: #9ccbe8; box-shadow: 0 8px 22px rgba(28,51,72,.11); } .tk-d-big:active { transform: scale(.985); }
.tk-d-big:disabled { opacity: .6; }
.tk-d-err { margin: .6rem auto 0; max-width: 520px; padding: 10px 14px; border-radius: 12px; background: #fdeeee; color: #a3262a; font-weight: 600; font-size: .95rem; }
.tk-d-err[hidden] { display: none; }
.tk-code-big { display: flex; justify-content: center; gap: clamp(10px, 1.6vw, 22px); margin: 1rem 0 .8rem; }
.tk-code-big span { width: 1.25em; padding: .08em 0; border-radius: .2em; background: #f4f8fc; border: 2px solid #dbe4ee; box-shadow: inset 0 -4px 0 #e6eef6; font-family: var(--display); font-weight: 800; font-size: clamp(4.4rem, 13vh, 8.5rem); line-height: 1.12; color: #163b5c; font-variant-numeric: tabular-nums; }
.tk-d-st { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 30px; margin: .6rem 0 0; font-weight: 600; font-size: 1.02rem; color: #4d6478; }
.tk-d-st.ok { color: #0f6e63; } .tk-d-st.ok .tk-spin { display: none; }
.tk-d-st.ok::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #20a67f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/16px no-repeat; }
.tk-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #d6e4f0; border-top-color: var(--blue); animation: tk-spin .9s linear infinite; flex: 0 0 auto; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
.tk-pad-code { display: flex; justify-content: center; gap: 14px; margin: .9rem 0 .7rem; }
.tk-pad-code span { width: 1.2em; height: 1.35em; display: inline-flex; align-items: center; justify-content: center; border-radius: .2em; background: #f4f8fc; border: 2px solid #dbe4ee; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 8.5vh, 5rem); color: #163b5c; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; }
.tk-pad-code span.cur { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.tk-pad-code span.on { background: #fff; }
.tk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; margin: .8rem auto .2rem; }
.tk-key { min-height: clamp(62px, 9.6vh, 96px); border-radius: 18px; border: 1.5px solid #dbe4ee; background: #fff; color: #163b5c; font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4.4vh, 2.6rem); font-variant-numeric: tabular-nums; box-shadow: 0 1px 0 rgba(28,51,72,.04), 0 4px 12px rgba(28,51,72,.07); transition: transform .1s, background .15s; touch-action: manipulation; }
.tk-key:active { transform: scale(.96); background: #eef5fb; }
.tk-key svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.tk-key.fn { color: #4d6478; }
.tk-key.ok { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); border-color: var(--blue); color: #fff; font-family: var(--ui); font-size: 1.1rem; font-weight: 700; box-shadow: 0 6px 16px rgba(47,158,216,.28); }
.tk-key.ok svg { width: 26px; height: 26px; stroke-width: 3; }
.tk-key.ok:disabled { background: #c9d9e6; border-color: #c9d9e6; box-shadow: none; }
.tk-d-sum { margin: 1rem auto 0; max-width: 560px; } .tk-d-sum ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: .4rem 0 0; padding: 0; list-style: none; }
.tk-d-sum li { padding: 7px 12px; border-radius: 99px; background: #f2f7fc; border: 1px solid #dbe4ee; font-weight: 600; font-size: .92rem; color: #163b5c; }
.tk-d-sum[hidden] { display: none; }
.tk-d-tip { margin: .5rem auto 0; max-width: 560px; padding: 10px 14px; border-radius: 12px; background: #fff8e8; color: #6b4e0a; font-size: .92rem; font-weight: 500; }
.tk-d-tip[hidden] { display: none; }
.tk-d-warn { width: 54px; height: 54px; margin: .4rem auto 0; display: block; fill: #fff3d6; stroke: #c98a12; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tk-d-note { display: none; margin: .7rem 0 0; font-weight: 600; color: #4d6478; }
.tk-duel-guest .tk-d-note { display: block; } .tk-duel-guest #tkAgain { display: none; }
.tk-toast { position: fixed; z-index: 70; left: 50%; top: 84px; transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 99px; background: #163b5c; color: #fff; font-weight: 600; box-shadow: 0 10px 28px rgba(28,51,72,.28); animation: mem-fade .25s ease both; }
.tk-toast[hidden] { display: none; }
/* ===== huisstijl SlimmeKids School (zelfde als /school/sk-school-kaarten.css, Klokleren en Ballonrekenen) =====
   systeemletter (--ui), inkt #1c3348, lijnen #d5dee7 / #e6edf3, hoeken 8px (knoppen) en 10px (kaarten),
   geen zware schaduwen, kleine labels in hoofdletters (.7rem, .08em), hoofdknop = inkt. */
:root { --sk-line: #d5dee7; --sk-line2: #e6edf3; --sk-ink: #1c3348; --sk-ink-h: #274865; --sk-muted: #5b7084; --sk-sel: #eef7fd; --sk-sel-b: #2f9ed8; }
.mem-sc, .mem-done, .tk-duel-card { border-radius: 10px; border: 1px solid var(--sk-line); box-shadow: 0 12px 40px rgba(16,32,48,.18); }
.mem-sc-hero { background: #f7fafc; border-right: 1px solid var(--sk-line2); }
.tk-hero { border-radius: 8px; box-shadow: none; border: 1px solid var(--sk-line2); }
.mem-lbl, .mem-sc-lbl, .tk-duel-bar .lbl { font-family: var(--ui); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.mem-sc-sk, .tk-d-kick { font-family: var(--ui); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.mem-sc h1, .mem-sc h2, .mem-done h2, .tk-duel-card h2 { font-family: var(--ui); font-weight: 700; letter-spacing: -.01em; color: var(--sk-ink); }
/* hoofdtitel van het startscherm en de kleine titels in de keuzeknoppen: Fredoka 600, net als de School-hub */
.mem-sc .mem-sc-name { font-family: var(--display); font-weight: 600; letter-spacing: -.005em; }
.mem-seg-b b, .mem-size b { font-weight: 600; }
/* knoppen */
.mem-btn { border-radius: 8px; border: 1px solid var(--sk-line); font-family: var(--ui); font-weight: 600; font-size: .95rem; box-shadow: none; }
.mem-btn:hover { filter: none; background: #f4f7fb; }
.mem-btn.primary, .mem-sc-go, .tk-key.ok { background: var(--sk-ink); border: 1px solid var(--sk-ink); color: #fff; box-shadow: none; border-radius: 8px; font-family: var(--ui); font-weight: 600; }
.mem-btn.primary:hover, .mem-sc-go:hover, .tk-key.ok:hover:not(:disabled) { background: var(--sk-ink-h); border-color: var(--sk-ink-h); filter: none; }
.mem-sc-go { font-size: 1.05rem; min-height: 52px; }
.mem-sc-go.wait { background: #8796a6; border-color: #8796a6; filter: none; }
.tk-key.ok:disabled { background: #c9d4df; border-color: #c9d4df; }
/* terug / verlaten onder een venster: klein, in hoofdletters, zonder kader */
.mem-btn.tk-back { min-height: 34px; padding: 0 12px; border: 0; background: transparent; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.mem-btn.tk-back:hover { background: #f4f7fb; color: var(--sk-ink); }
.mem-btn.tk-back:focus-visible { outline: 3px solid var(--sk-sel-b); outline-offset: 1px; }
/* keuzes: rustig kader, gekozen = lichtblauw met blauwe rand (zoals Klokleren), geen gloed */
.mem-seg-b, .mem-size, .mem-mode-b, .tk-subj, .tk-d-big, .tk-key { border: 1px solid var(--sk-line); border-radius: 8px; box-shadow: none; }
.mem-seg-b.on, .mem-size.on, .mem-mode-b.on, .tk-subj.on { border-color: var(--sk-sel-b); background: var(--sk-sel); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.mem-chip { border: 1px solid var(--sk-line); border-radius: 8px; font-weight: 600; }
.mem-chip.on { border-color: var(--sk-sel-b); background: var(--sk-sel); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.tk-subj svg { border-radius: 6px; }
.tk-d-big svg, .tk-rem svg { border-radius: 8px; }
.tk-d-big:hover { border-color: #9ccbe8; box-shadow: none; background: #fbfdff; }
.mem-name, .tk-d-name input { border: 1px solid var(--sk-line); border-radius: 8px; }
.tk-duel-btn { border: 1px solid var(--sk-line); border-radius: 8px; box-shadow: none; }
.tk-duel-bar { border-radius: 8px; border: 1px solid var(--sk-line); }
.tk-code-big span, .tk-pad-code span { border-radius: 8px; border: 1px solid var(--sk-line); box-shadow: none; font-family: var(--ui); font-weight: 700; }
.tk-pad-code span.cur { border-color: var(--sk-sel-b); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.tk-key { font-family: var(--ui); font-weight: 600; }
.tk-d-err, .tk-d-tip { border-radius: 8px; }
.tk-d-sum li { border-radius: 8px; }
.mem-rank li { border: 1px solid var(--sk-line); border-radius: 8px; }
.mem-done-btns { gap: .6rem; }
/* =================== Schaken =================== */
:root { --w: #f3ead8; --b: #26201c; --sch-side: 300px; }
.tk-sc-wide { grid-template-columns: minmax(300px, .8fr) 1.55fr; }
.mem-sc-go { width: 100%; }
.tk-duel-btn { width: 100%; margin-top: .6rem; display: flex; align-items: center; gap: .7rem; text-align: left; padding: .7rem .9rem; background: #fff; }
.tk-duel-btn svg { width: 30px; height: 30px; flex: 0 0 auto; }
.tk-duel-btn span { display: flex; flex-direction: column; } .tk-duel-btn b { font-size: .92rem; } .tk-duel-btn small { font-size: .78rem; font-weight: 500; color: var(--sk-muted); }
.go-duel { display: none; } body.tk-duel-host .go-duel { display: inline; } body.tk-duel-host .go-solo { display: none; }
body.tk-duel #rowMode, body.tk-duel #rowLvl, body.tk-duel #rowFlip { display: none; }
body.tk-duel-guest .mem-sc-pick > :not(.sch-sets):not(.sch-pk-own):not(#schSetNote) { }
.mem-name.sch-nm-w i { background: #f3ead8; box-shadow: inset 0 0 0 1.5px #b9a98d; } .mem-name.sch-nm-b i { background: #26201c; }
.mem-mode-b img { width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain; }
.sch-seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.sch-seg2 .mem-seg-b, .tk-seg3 .mem-seg-b, .tk-seg4 .mem-seg-b { min-height: 52px; }
.sch-seg2 .mem-seg-b small, .tk-seg3 .mem-seg-b small, .tk-seg4 .mem-seg-b small { white-space: normal; text-align: center; line-height: 1.15; }
.sch-seg5 { grid-template-columns: repeat(5, 1fr); }
.mem-seg-b:disabled { opacity: .45; cursor: default; }
.mem-sc-pick .mem-switch { margin: .2rem 0 .35rem; font-size: .86rem; font-weight: 600; }
.sch-sets { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; }
.sch-set { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border: 1px solid var(--sk-line); border-radius: 8px; background: #fff; transition: border-color .15s, background .15s, transform .15s; }
.sch-set:hover { transform: translateY(-1px); }
.sch-set.on { border-color: var(--sk-sel-b); background: var(--sk-sel); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.sch-set .sw { position: relative; width: 100%; aspect-ratio: 1.6; border-radius: 6px; overflow: hidden; background: #ddd; }
.sch-set .sw canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sch-set .sw span { position: absolute; bottom: 4%; width: 50%; aspect-ratio: 1; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-set .sw span.a { left: 2%; } .sch-set .sw span.b { right: 2%; }
.sch-set b { font-size: .84rem; font-weight: 700; margin-top: 3px; } .sch-set small { font-size: .66rem; font-weight: 600; color: var(--sk-muted); text-align: center; line-height: 1.15; }
.sch-note { margin: .2rem 0 0; font-size: .8rem; color: var(--sk-muted); }

/* speelveld */
.sch-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(220px, var(--sch-side)) minmax(0, 1fr) minmax(220px, var(--sch-side)); gap: 14px; padding: 12px 16px 16px; zoom: var(--ui-zoom, 1); }
.sch-board { position: relative; min-width: 0; min-height: 0; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, var(--bg1, #fff) 0%, var(--bg2, #d9cbb8) 100%); border: 1px solid var(--sk-line2); }
.sch-board canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
body.sch-2d .sch-board { background: transparent; border-color: transparent; }
.sch-load { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: #fff; border-radius: 8px; border: 1px solid var(--sk-line); font-weight: 600; }
.sch-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.sch-pl { padding: 12px 14px; background: #fff; border: 1px solid var(--sk-line); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.sch-pl.on { border-color: var(--sk-sel-b); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.sch-pl-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sch-pl-ico { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; }
.sch-pl-n { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sch-pl-c { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.sch-pl-name { font-size: 1.12rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-pl-turn { flex: 0 0 auto; padding: 4px 9px; border-radius: 8px; background: var(--sk-ink); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sch-clock { margin: 10px 0 0; padding: 6px 10px; border-radius: 8px; background: #f4f7fb; border: 1px solid var(--sk-line2); font: 700 1.9rem/1.1 var(--ui); font-variant-numeric: tabular-nums; text-align: center; color: var(--sk-ink); letter-spacing: .02em; }
.sch-pl.on .sch-clock { background: var(--sk-ink); color: #fff; border-color: var(--sk-ink); }
.sch-clock.low { color: #b4232a; } .sch-pl.on .sch-clock.low { background: #b4232a; border-color: #b4232a; color: #fff; }
.sch-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0; min-height: 32px; margin-top: 8px; }
.sch-cap i { width: 28px; height: 28px; margin-right: -8px; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-cap .adv { margin-left: 14px; font-size: .85rem; font-weight: 700; color: var(--sk-muted); }
.sch-cap .none { font-size: .8rem; color: var(--sk-muted); }
.sch-status { margin: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; font-size: 1.15rem; font-weight: 700; color: var(--sk-ink); }
.sch-status.check { color: #b4232a; }
.sch-status .tk-spin { margin-right: 10px; }
.sch-lbl { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.sch-moves { flex: 1 1 auto; min-height: 80px; overflow-y: auto; background: #fff; border: 1px solid var(--sk-line); border-radius: 10px; padding: 6px 0; }
.sch-moves ol { list-style: none; margin: 0; padding: 0; }
.sch-moves li { display: grid; grid-template-columns: 2.6em 1fr 1fr; gap: 4px; padding: 3px 12px; font-size: 1rem; font-variant-numeric: tabular-nums; }
.sch-moves li:nth-child(even) { background: #f7fafc; }
.sch-moves li .n { color: var(--sk-muted); font-weight: 600; }
.sch-moves li span { font-weight: 600; border-radius: 6px; padding: 0 4px; }
.sch-moves li span.cur { background: var(--sk-sel); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.sch-nomoves { margin: 8px 12px; color: var(--sk-muted); font-size: .9rem; }
.sch-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sch-acts .mem-btn { min-height: 46px; padding: 0 10px; font-size: .86rem; justify-content: flex-start; gap: 8px; text-align: left; line-height: 1.15; }
.sch-acts .mem-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sch-acts .mem-btn:disabled { opacity: .45; cursor: default; }
.sch-acts #btnHelp, .sch-acts .sch-new { grid-column: 1 / -1; }
.sch-viewsw { display: inline-flex; border: 1px solid var(--sk-line); border-radius: 8px; overflow: hidden; }
.sch-viewsw .mini { border: 0; border-radius: 0; min-width: 44px; font-weight: 700; }
.sch-viewsw .mini[aria-checked="true"] { background: var(--sk-ink); color: #fff; }
.sch-viewsw .mini:disabled { opacity: .45; }

/* promotie */
.sch-promo-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: .6rem; }
.sch-promo-opts button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--sk-line); border-radius: 8px; background: #fff; font-weight: 600; }
.sch-promo-opts button:hover { border-color: var(--sk-sel-b); background: var(--sk-sel); }
.sch-promo-opts i { width: 84px; height: 84px; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-promo { width: min(560px, 100%); }

/* uitleg */
.sch-help { width: min(980px, 100%); max-height: calc(100% - 1rem); overflow-y: auto; text-align: left; }
.sch-help h2, .sch-help > .mem-done-sub { text-align: center; }
.sch-help-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: .4rem 0 .9rem; }
.sch-help-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border: 1px solid var(--sk-line); border-radius: 8px; background: #fff; font-weight: 600; font-size: .85rem; }
.sch-help-tabs button[aria-selected="true"] { border-color: var(--sk-sel-b); background: var(--sk-sel); box-shadow: inset 0 0 0 1px var(--sk-sel-b); }
.sch-help-tabs i { width: 54px; height: 54px; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-help-body { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; align-items: center; }
.sch-help-cv { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; }
.sch-help-txt h3 { margin: 0 0 .4rem; font-size: 1.3rem; }
.sch-help-txt p { margin: 0; font-size: 1.05rem; line-height: 1.55; }
.sch-help-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 1rem; }
.sch-help-rules div { padding: 10px 12px; border: 1px solid var(--sk-line); border-radius: 10px; background: #fbfdff; }
.sch-help-rules b { display: block; margin-bottom: 4px; font-size: .95rem; }
.sch-help-rules p { margin: 0; font-size: .9rem; line-height: 1.5; color: #334b61; }
.sch-win-pc { width: 96px; height: 96px; object-fit: contain; }
.sch-win-stat { margin: -.4rem 0 1rem; color: var(--sk-muted); font-weight: 600; font-size: .9rem; }
.tk-d-note { display: none; } body.tk-duel-guest .tk-d-note { display: block; margin: 0 0 .8rem; color: var(--sk-muted); font-size: .9rem; }
body.tk-duel-guest #schAgain, body.tk-duel-guest #schChange { display: none; }
.mem-overlay.sch-soft { background: rgba(28,51,72,.14); backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); }

@media (max-width: 1500px) { :root { --sch-side: 260px; } .sch-sets { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1500px) { .sch-acts { grid-template-columns: 1fr; } } /* 21-11: geen afgebroken knoplabels (Bord draaien) tussen 1250 en 1500 px */
@media (max-width: 1250px) { :root { --sch-side: 230px; } .sch-main { gap: 10px; padding: 10px; } .sch-pl-name { font-size: 1rem; } .sch-clock { font-size: 1.5rem; } .sch-acts { grid-template-columns: 1fr; } .sch-acts .mem-btn { min-height: 40px; } }
@media (max-width: 1100px) { .sch-sets { grid-template-columns: repeat(3, 1fr); } .sch-help-body { grid-template-columns: 1fr; } .sch-help-cv { max-width: 300px; margin: 0 auto; } }
@media (max-height: 800px) { .sch-pl { padding: 8px 10px; } .sch-clock { font-size: 1.4rem; margin-top: 6px; } .sch-cap { min-height: 26px; } .sch-cap i { width: 24px; height: 24px; } .sch-acts .mem-btn { min-height: 38px; } }
@media (prefers-reduced-motion: reduce) { .sch-pl { transition: none; } }

.mem-mode-b .sch-mi { width: 44px; height: 44px; flex: 0 0 auto; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-ci { display: inline-block; width: 30px; height: 30px; background-repeat: no-repeat; background-size: 600% 200%; }
.sch-ci-r { border-radius: 50%; width: 22px; height: 22px; margin: 4px; background: linear-gradient(90deg, #f3ead8 50%, #26201c 50%); box-shadow: inset 0 0 0 1.5px #8a7a62; }
#schColor .mem-seg-b { flex-direction: row; gap: 6px; }
.sch-right { padding-bottom: 52px; }
body:not(.sch-playing) .sch-main { visibility: visible; }

.sch-kids { margin-top: auto; text-decoration: none; color: inherit; } .sch-kids img { width: 36px; height: 36px; object-fit: contain; flex: 0 0 auto; }
body.tk-duel .sch-kids { display: none; }
@media (max-width: 1250px) { .sch-acts .mem-btn { font-size: .82rem; gap: 6px; padding: 0 8px; } }
