/* KLASVAS – modern, rustig en eenvoudig */
:root {
  --accent: #0d9488; --accent-d: #0f766e; --accent-l: #ccfbf1;
  --ink: #0f172a; --ink2: #334155; --mute: #64748b; --line: #e2e8f0; --soft: #f1f5f9; --card: #ffffff;
  --danger: #dc2626; --danger-l: #fee2e2;
  --r: 18px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.16);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  font-family: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); }
.hidden { display: none !important; }
button { font-family: inherit; }
#bg { position: fixed; inset: 0; z-index: 0; background: #2d5639; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; display: none; }
#board { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#alarm { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 140px 30px rgba(239, 68, 68, .8); transition: opacity .4s; }
#alarm.on { opacity: 1; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Vensters ---------- */
.win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(15,23,42,.06); }
.win.dragging { box-shadow: 0 24px 60px rgba(15,23,42,.3); }
.win.flash { animation: flash .6s; }
@keyframes flash { 30% { transform: scale(1.03); box-shadow: 0 0 0 5px var(--accent); } }
.win-head { flex: 0 0 38px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; cursor: grab;
  background: var(--card); border-bottom: 1px solid var(--soft); user-select: none; touch-action: none; }
.win-head:active { cursor: grabbing; }
.win-ico { font-size: 15px; }
.win-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-btns { display: flex; gap: 2px; opacity: .6; transition: opacity .2s; }
.win:hover .win-btns { opacity: 1; }
.win-btn { width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; font-size: 13px; color: var(--mute); }
.win-btn:hover { background: var(--soft); color: var(--ink); }
.win-body { flex: 1; position: relative; min-height: 0; container-type: size; overflow: hidden; }
.win-resize { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; opacity: .5;
  background: radial-gradient(circle, #94a3b8 1.4px, transparent 1.6px) 0 0 / 6px 6px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.win:hover .win-resize { opacity: .9; }
.view, .set { position: absolute; inset: 0; }
.win.settings-open .view { display: none; }
.win:not(.settings-open) .set { display: none; }
.set { overflow: auto; padding: 14px 16px; font-size: 14px; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.set label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; color: var(--ink2); }
.set label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.set h4 { margin: 4px 0 0; font-size: 13px; color: var(--ink2); }

/* ---------- Formulierelementen ---------- */
.kb-input { font: inherit; font-size: 14px; padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.kb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-l); }
textarea.kb-input { resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=range] { accent-color: var(--accent); }
.kb-btn { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--soft); color: var(--ink); white-space: nowrap; transition: background .15s; }
.kb-btn:hover { background: var(--line); }
.kb-btn.primary { background: var(--accent); color: #fff; }
.kb-btn.primary:hover { background: var(--accent-d); }
.kb-btn.danger { background: var(--danger-l); color: var(--danger); }
.kb-btn.danger:hover { background: #fecaca; }
.kb-btn.big { font-size: 16px; padding: 12px 18px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; color: var(--ink2); }
.chip:hover { border-color: var(--accent); color: var(--accent-d); }
.chip.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--mute); font-size: 13px; font-weight: 400; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ---------- Werkbalk ---------- */
#toolbar { position: fixed; z-index: 50; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; max-width: calc(100vw - 24px); padding: 6px; border-radius: 22px;
  background: rgba(255,255,255,.9); box-shadow: 0 10px 40px rgba(15,23,42,.25); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  overflow-x: auto; scrollbar-width: none; }
#tbBrand { flex: 0 0 auto; width: 40px; height: 40px; margin: 0 4px 0 2px; border-radius: 11px; }
#tbWidgets, #tbMenu { display: flex; flex-wrap: nowrap; gap: 2px; }
#toolbar button { flex: 0 0 auto; min-width: 62px; height: 56px; padding: 0 6px; border: none; border-radius: 14px; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink2); transition: background .15s; }
#toolbar button:hover { background: var(--soft); }
#toolbar button span { font-size: 22px; line-height: 1; }
#toolbar button small { font-size: 11px; font-weight: 600; white-space: nowrap; }
#toolbar button.more { background: var(--accent); color: #fff; }
#toolbar button.more:hover { background: var(--accent-d); }
.tb-sep { width: 1px; align-self: stretch; background: var(--line); margin: 6px 6px; flex: 0 0 auto; }
@media (max-width: 1300px) {
  #toolbar button { min-width: 48px; height: 48px; }
  #toolbar button small { display: none; }
  #tbBrand { display: none; }
}
#tbShow { position: fixed; z-index: 50; left: 50%; bottom: 0; transform: translateX(-50%); border: none; padding: 6px 18px 8px;
  border-radius: 14px 14px 0 0; background: rgba(255,255,255,.85); font-weight: 600; cursor: pointer; opacity: .7; color: var(--ink2); }
#tbShow:hover { opacity: 1; }

/* ---------- Modaal ---------- */
#modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-card { width: min(780px, 94vw); max-height: 90vh; display: flex; flex-direction: column; border-radius: 24px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.35); }
.modal-head { display: flex; align-items: center; padding: 20px 24px 8px; }
.modal-head h2 { flex: 1; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
#modalClose { border: none; background: var(--soft); width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-size: 15px; color: var(--ink2); }
#modalClose:hover { background: var(--line); }
#modalBody { overflow: auto; padding: 4px 24px 24px; }
.m-sec { margin: 12px 0 20px; }
.m-sec h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bg-grid.small { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.bg-tile { border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #f8fafc; font: inherit; font-weight: 600; padding: 14px 4px; color: var(--ink2); }
.bg-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-l); }
.bg-tile:hover { border-color: var(--accent); }
.scene-tile span { display: block; font-size: 30px; margin-bottom: 4px; }
.swatch { height: 46px; padding: 0; }
.color-inp { width: 100%; height: 46px; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2px; cursor: pointer; background: #fff; }
.cls-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
.cls-side { display: flex; flex-direction: column; gap: 6px; }
.cls-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; font-weight: 600; }
.cls-item.sel { border-color: var(--accent); background: #f0fdfa; }
.cls-item small { font-weight: 400; color: var(--mute); }
.cls-main { display: flex; flex-direction: column; gap: 12px; }
.cls-main label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
.scr-list { display: flex; flex-direction: column; gap: 8px; }
.scr-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.scr-item b { font-size: 15px; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.big-action { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; }
.big-action:hover { border-color: var(--accent); background: #f0fdfa; }
.big-action > span { font-size: 26px; }
.big-action b { display: block; font-size: 15px; }
.big-action small { color: var(--mute); font-size: 12.5px; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pal-item { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; }
.pal-item:hover { border-color: var(--accent); background: #f0fdfa; transform: translateY(-1px); }
.pal-item > span { font-size: 28px; line-height: 1; }
.pal-item b { font-size: 14px; }
.pal-item small { color: var(--mute); font-size: 12px; line-height: 1.35; }

/* ---------- Melding & banner ---------- */
#toast { position: fixed; z-index: 200; left: 50%; top: 20px; transform: translate(-50%, -160%); padding: 12px 20px; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 600; transition: transform .3s; max-width: 90vw; box-shadow: var(--shadow); }
#toast.show { transform: translate(-50%, 0); }
#banner { position: fixed; z-index: 40; top: 16%; left: 50%; transform: translateX(-50%); padding: 18px 36px; pointer-events: none;
  border-radius: 22px; background: rgba(255,255,255,.95); color: var(--ink); text-align: center; backdrop-filter: blur(10px);
  font-size: clamp(22px, 3vw, 40px); font-weight: 700; box-shadow: 0 20px 60px rgba(15,23,42,.3); animation: pop .5s ease-out; }
#banner small { display: block; font-size: .45em; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
@keyframes pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } }

/* ---------- Timer & stopwatch ---------- */
.tm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqh; padding: 8px; }
.tm-disp { font-size: min(30cqh, 21cqw); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; cursor: pointer; letter-spacing: -1px; }
.tm-disp.warn { color: var(--danger); }
.tm.done .tm-disp { animation: blink .5s 6; color: var(--danger); }
@keyframes blink { 50% { opacity: .2; } }
.tm-bar { width: 86%; height: max(6px, 2.5cqh); border-radius: 99px; background: var(--soft); overflow: hidden; }
.tm-fill { height: 100%; width: 100%; background: var(--accent); transition: width .25s linear, background .5s; border-radius: 99px; }
.tm-btns .kb-btn { font-size: max(14px, 6cqmin); padding: .35em .9em; }
.tm-presets { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.sw-laps { max-height: 26cqh; overflow: auto; font-size: max(12px, 4.5cqmin); color: var(--ink2); font-variant-numeric: tabular-nums; text-align: center; }

/* ---------- Klok & kalender ---------- */
.clk-time { font-size: min(38cqh, 19cqw); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -1px; }
.clk-time small { font-size: .45em; color: var(--mute); }
.clk-date { font-size: min(11cqh, 7cqw); color: var(--mute); margin-top: 2cqh; text-transform: capitalize; }
.clk-svg { width: min(78cqh, 90cqw); height: min(78cqh, 90cqw); }
.cal { display: flex; flex-direction: column; padding: 8px 12px 12px; gap: 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; font-size: min(9cqh, 7cqw); font-weight: 700; text-transform: capitalize; }
.cal-head button { border: none; background: var(--soft); border-radius: 9px; cursor: pointer; font-size: 16px; width: 32px; height: 30px; color: var(--ink2); }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 3px; }
.cal-grid div { display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: min(7cqh, 4.5cqw); font-weight: 600; }
.cal-grid .dn { color: var(--mute); font-weight: 700; }
.cal-grid .we { color: #94a3b8; }
.cal-grid .today { background: var(--accent); color: #fff; }
.cal-grid .other { opacity: .25; }

/* ---------- Dagplanning ---------- */
.plan { overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.plan-row { display: flex; gap: 12px; align-items: center; padding: .4em .7em; border-radius: 12px; font-size: max(14px, 5.5cqmin); }
.plan-row b { font-variant-numeric: tabular-nums; color: var(--mute); min-width: 3.2em; font-weight: 600; }
.plan-row.past { opacity: .4; }
.plan-row.now { background: #f0fdfa; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.plan-row.now b { color: var(--accent-d); }
.plan-row em { margin-left: auto; font-size: .7em; font-style: normal; color: var(--accent-d); white-space: nowrap; }

/* ---------- Naamkiezer & groepjes ---------- */
.np { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqh; padding: 10px; text-align: center; }
.np-name { font-size: min(22cqh, 11cqw); font-weight: 800; line-height: 1.1; min-height: 1.2em; letter-spacing: -.5px; }
.np-name.spin { color: #94a3b8; }
.np-name.won { color: var(--accent-d); animation: pop2 .4s; }
@keyframes pop2 { from { transform: scale(.7); } }
.np .kb-btn { font-size: max(15px, 5.5cqmin); }
.grp { display: flex; flex-direction: column; padding: 10px; gap: 10px; }
.grp-cards { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(max(130px, 24cqw), 1fr)); gap: 8px; align-content: start; }
.grp-card { border-radius: 14px; padding: 10px 12px; font-size: max(13px, 3.6cqmin); }
.grp-card h5 { margin: 0 0 4px; font-size: 1.05em; }
.grp-card div { line-height: 1.4; }
.presence { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 10px; }
.presence label { flex-direction: row; align-items: center; font-weight: 500; gap: 6px; }

/* ---------- Dobbelstenen ---------- */
.dice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqh; cursor: pointer; user-select: none; }
.dice-row { display: flex; gap: 3cqmin; flex-wrap: wrap; justify-content: center; }
.die { width: min(46cqh, 30cqw); height: min(46cqh, 30cqw); border-radius: 20%; background: #fff; border: 2px solid #cbd5e1;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12%; box-shadow: 0 6px 0 #cbd5e1, 0 10px 24px rgba(15,23,42,.12); }
.die.rolling { animation: roll .15s linear infinite; }
@keyframes roll { 50% { transform: rotate(14deg) scale(.94); } }
.die i { border-radius: 50%; background: var(--ink); margin: 12%; visibility: hidden; }
.die i.on { visibility: visible; }
.dice-sum { font-size: min(10cqh, 6cqw); font-weight: 700; color: var(--ink2); }

/* ---------- Verkeerslicht ---------- */
.tl { display: flex; align-items: center; justify-content: center; }
.tl-box { height: 92cqh; aspect-ratio: 1 / 2.6; max-width: 90cqw; background: #1e293b; border-radius: 22cqmin; display: flex; flex-direction: column;
  justify-content: space-around; align-items: center; padding: 4%; }
.tl-lamp { width: 72%; aspect-ratio: 1; border-radius: 50%; cursor: pointer; opacity: .18; transition: opacity .2s, box-shadow .2s; border: none; }
.tl-lamp.on { opacity: 1; }
.tl-lamp.r { background: #ef4444; } .tl-lamp.r.on { box-shadow: 0 0 34px #ef4444; }
.tl-lamp.o { background: #f59e0b; } .tl-lamp.o.on { box-shadow: 0 0 34px #f59e0b; }
.tl-lamp.g { background: #22c55e; } .tl-lamp.g.on { box-shadow: 0 0 34px #22c55e; }

/* ---------- Werksymbolen ---------- */
.sym { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqh; cursor: pointer; text-align: center; padding: 6px; }
.sym-emoji { font-size: min(52cqh, 50cqw); line-height: 1; }
.sym-label { font-size: min(13cqh, 10cqw); font-weight: 700; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sym-grid button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 4px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.sym-grid button span { display: block; font-size: 28px; }
.sym-grid button.sel { border-color: var(--accent); background: #f0fdfa; }

/* ---------- Scorebord ---------- */
.sb { display: flex; gap: 8px; padding: 10px; }
.sb-team { flex: 1; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; padding: 6px; min-width: 0; }
.sb-name { font-size: max(13px, 5cqmin); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; opacity: .9; }
.sb-score { font-size: min(36cqh, 22cqw); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sb-btns { display: flex; gap: 6px; }
.sb-btns button { border: none; border-radius: 12px; background: rgba(255,255,255,.22); color: #fff; font-size: max(16px, 6cqmin); font-weight: 800; width: 2em; height: 1.6em; cursor: pointer; }
.sb-btns button:hover { background: rgba(255,255,255,.38); }

/* ---------- Tekst ---------- */
.txt { display: flex; flex-direction: column; }
.txt-bar { display: flex; gap: 3px; padding: 6px 8px; border-bottom: 1px solid var(--soft); flex-wrap: wrap; }
.txt-bar button { border: none; background: transparent; border-radius: 8px; min-width: 30px; height: 28px; cursor: pointer; font-weight: 700; color: var(--ink2); }
.txt-bar button:hover { background: var(--soft); }
.txt-bar input[type=color] { width: 30px; height: 28px; border: none; padding: 0; background: none; cursor: pointer; }
.txt-edit { flex: 1; overflow: auto; padding: 12px 16px; outline: none; line-height: 1.35; word-wrap: break-word; }
.txt-edit:empty::before { content: 'Typ hier je tekst…'; color: #94a3b8; }

/* ---------- Tekenen ---------- */
.drw { display: flex; flex-direction: column; }
.drw-bar { display: flex; gap: 5px; padding: 6px 8px; border-bottom: 1px solid var(--soft); align-items: center; flex-wrap: wrap; }
.drw-col { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; }
.drw-col.sel { box-shadow: 0 0 0 3px var(--accent); }
.drw-bar .chip { padding: 3px 9px; }
.drw-wrap { flex: 1; position: relative; background: #fff; }
.drw-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

/* ---------- QR, afbeelding, webcam ---------- */
.qr { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.qr canvas { image-rendering: pixelated; border-radius: 6px; }
.qr-txt { font-size: 12px; color: var(--mute); max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img { display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.img img { width: 100%; height: 100%; object-fit: contain; }
.img .drop { border: 2px dashed #cbd5e1; border-radius: 16px; padding: 22px; text-align: center; color: var(--mute); margin: 12px; }
.img .drop.over { border-color: var(--accent); background: #f0fdfa; }
.cam { background: #0b1120; display: flex; align-items: center; justify-content: center; }
.cam video, .cam canvas { width: 100%; height: 100%; object-fit: contain; }
.cam.mirror video { transform: scaleX(-1); }
.cam-bar { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; opacity: .3; transition: opacity .2s; }
.cam:hover .cam-bar { opacity: 1; }

/* ---------- Takenlijst ---------- */
.todo { display: flex; flex-direction: column; }
.todo-list { flex: 1; overflow: auto; padding: 8px 12px; }
.todo-item { display: flex; align-items: center; gap: .55em; padding: .3em 0; font-size: max(14px, 6cqmin); border-bottom: 1px solid var(--soft); }
.todo-item input { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.todo-item span { flex: 1; word-break: break-word; }
.todo-item.done span { text-decoration: line-through; color: #94a3b8; }
.todo-item button { border: none; background: none; color: #cbd5e1; cursor: pointer; font-size: .8em; }
.todo-item button:hover { color: var(--danger); }
.todo-add { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--soft); }

/* ---------- Geluidsmeter ---------- */
.snd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; padding: 10px 16px; text-align: center; }
.snd-face { font-size: min(34cqh, 26cqw); line-height: 1; }
.snd-label { font-size: max(15px, 6.5cqmin); font-weight: 700; }
.snd-meter { position: relative; width: 100%; height: max(14px, 7cqh); border-radius: 99px; background: var(--soft); overflow: hidden; }
.snd-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #22c55e; transition: width .12s; border-radius: 99px; }
.snd-fill.werk { background: #f59e0b; } .snd-fill.luid { background: #ef4444; }
.snd-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(15,23,42,.3); }
.snd-dots { display: flex; gap: 6px; }
.snd-dots span { width: max(10px, 3.2cqmin); height: max(10px, 3.2cqmin); border-radius: 50%; background: var(--line); }
.snd-dots span.on { background: var(--accent); }
.snd.stil .snd-label { color: #16a34a; } .snd.werk .snd-label { color: #d97706; } .snd.luid .snd-label { color: var(--danger); }

/* ---------- Hulp ---------- */
.help-btn { font-weight: 800; color: var(--accent) !important; }
.help { position: absolute; inset: 0; display: none; overflow: auto; padding: 14px 16px; background: #f8fafc; font-size: 14px; line-height: 1.5; z-index: 5; }
.win.help-open .help { display: block; }
.help h4 { margin: 0 0 6px; font-size: 15px; }
.help p { margin: 0 0 8px; }
.help ul { margin: 0 0 10px; padding-left: 20px; }
.help li { margin-bottom: 3px; }
.help .kb-btn { margin-top: 4px; }
.help-intro p { margin: 0 0 8px; line-height: 1.5; }
.chalk-tile { font-size: 16px; padding: 22px 4px; font-weight: 700; }

/* ---------- Website ---------- */
.web { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px; }
.web-go { display: flex; gap: 8px; }
.web-go .kb-input { flex: 1; font-size: 15px; padding: 11px 13px; }
.web-links { display: flex; flex-wrap: wrap; gap: 6px; }
.web-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.web-link .chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.web-link .x { border: none; background: none; color: #94a3b8; cursor: pointer; padding: 0 2px; }
.web-link .x:hover { color: var(--danger); }

/* ---------- iPad / aanraakschermen ---------- */
body { touch-action: manipulation; }
.win-head, #toolbar, .win-btn, .chip, .kb-btn { -webkit-user-select: none; user-select: none; }
@media (hover: none) {
  .win-btns, .cam-bar, .win-resize { opacity: 1 !important; }
}
@media (pointer: coarse) {
  .win-head { flex-basis: 46px; }
  .win-btn { width: 38px; height: 38px; font-size: 16px; }
  .win-resize { width: 34px; height: 34px; }
  .kb-btn { padding: 11px 16px; }
  .chip { padding: 8px 13px; }
}
@media (max-width: 900px) {
  #toolbar { flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
  #tbWidgets, #tbMenu { flex-wrap: wrap; justify-content: center; }
  .tb-sep { width: 100%; height: 1px; margin: 2px 0; }
}
