/* ==========================================================
   TAALWERELD – stijlen
   Leesinstellingen worden via CSS-variabelen ingesteld (zie ui.applySettings)
   ========================================================== */
:root {
  --read-font: Verdana, Tahoma, Arial, sans-serif;
  --read-size: 22px;
  --read-lh: 1.9;
  --read-ls: 0.03em;
  --read-ws: 0.12em;
  --read-bg: #fdf8ec;
  --read-fg: #22283a;
  --ui-font: "Trebuchet MS", Verdana, Arial, sans-serif;

  --ink: #22283a;
  --ink-soft: #55607a;
  --line: #dfe4ef;
  --paper: #ffffff;
  --bg: #eaf3ff;
  --brand: #3b6fd8;
  --brand-d: #2a52a8;
  --good: #2f9e68;
  --good-bg: #e3f7ec;
  --soft: #e48a2a;          /* "probeer opnieuw" – warm oranje, geen hard rood */
  --soft-bg: #fff3e2;
  --gold: #f2b631;
  --dia: #39b8e6;
  --radius: 18px;
  --shadow: 0 4px 0 rgba(30, 45, 80, .12), 0 8px 24px rgba(30, 45, 80, .08);

  /* zinsdeel-kleuren */
  --c-pv: #e2553f;
  --c-ow: #2f74e0;
  --c-ww: #2e9e57;
  --c-lv: #8d4fd6;
  --c-mv: #e09a12;
  --c-bwb: #1a9e9e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--ui-font);
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- App-kader ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, .94);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(6px);
}
.topbar .title { font-weight: 700; font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet { display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: #f4f6fb; border: 2px solid var(--line);
  font-weight: 700; font-size: 15px; white-space: nowrap;
}
.chip.coin { background: #fff7dd; border-color: #f4dc8f; }
.chip.dia { background: #e3f6fd; border-color: #a9def2; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; font-size: 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.iconbtn:active { transform: translateY(2px); }
.main { flex: 1; padding: 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.main.full { max-width: none; padding: 0; position: relative; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 22px; border-radius: 16px;
  border: 0; cursor: pointer; font-size: 19px; font-weight: 700;
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 0 var(--brand-d);
  transition: transform .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-d); }
.btn.secondary { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.good { background: var(--good); box-shadow: 0 4px 0 #1f7a4e; }
.btn.warm { background: var(--soft); box-shadow: 0 4px 0 #b86a17; }
.btn.small { min-height: 40px; font-size: 16px; padding: 6px 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- Kaarten ---------- */
.card {
  background: var(--paper); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 2px solid #eef1f8;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 28px; } h2 { font-size: 23px; } h3 { font-size: 19px; }
p { line-height: 1.55; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

.activity {
  display: flex; gap: 14px; align-items: center; cursor: pointer; text-align: left;
  width: 100%; font: inherit; color: inherit;
}
.activity .ico { font-size: 34px; width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #f0f4ff; }
.activity .txt { flex: 1; }
.activity .txt b { font-size: 18px; display: block; }
.activity .txt span { font-size: 14px; color: var(--ink-soft); }
.activity.locked { opacity: .55; cursor: default; }
.activity.recommended { border-color: #9cc4ff; background: linear-gradient(180deg, #f6faff, #fff); }
.stars { color: var(--gold); font-size: 16px; letter-spacing: 1px; white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #eef2fb; color: var(--ink-soft); }
.badge.good { background: var(--good-bg); color: #1d7a4b; }
.badge.soft { background: var(--soft-bg); color: #a65e10; }
.badge.blue { background: #e5efff; color: #2a55a8; }

.world-banner {
  border-radius: var(--radius); padding: 18px; color: #fff; margin-bottom: 16px;
  display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow);
}
.world-banner .big { font-size: 52px; }
.world-banner h1 { margin: 0; }
.world-banner p { margin: 4px 0 0; opacity: .95; }

/* ---------- Taakscherm (missie) ---------- */
.task-wrap { max-width: 860px; margin: 0 auto; }
.progress-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; flex-wrap: wrap; }
.progress-dots i { width: 16px; height: 16px; border-radius: 50%; background: #d7deec; display: block; }
.progress-dots i.done { background: var(--good); }
.progress-dots i.now { background: var(--brand); box-shadow: 0 0 0 4px #cfe0ff; }
.step-label { font-size: 14px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }

.question {
  font-family: var(--read-font); font-size: calc(var(--read-size) * 1.02);
  line-height: 1.5; letter-spacing: var(--read-ls); word-spacing: var(--read-ws);
  font-weight: 700; margin: 6px 0 14px; display: flex; gap: 10px; align-items: flex-start;
}
.question .qtext { flex: 1; }
.speak { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #cfdcf5; background: #f2f7ff; cursor: pointer; font-size: 19px; }
.speak.small { width: 34px; height: 34px; font-size: 15px; }
.speak.playing { background: #ffe9b8; border-color: #f2c25c; }

.options { display: grid; gap: 12px; }
.options.two { grid-template-columns: 1fr 1fr; }
.options.emoji { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 60px; padding: 12px 16px; border-radius: 16px; cursor: pointer;
  background: #fff; border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line);
  font-family: var(--read-font); font-size: var(--read-size); letter-spacing: var(--read-ls); word-spacing: var(--read-ws);
  color: var(--ink); line-height: 1.4;
}
.opt .otext { flex: 1; }
.options.emoji .opt { flex-direction: column; justify-content: center; text-align: center; font-size: 46px; min-height: 110px; }
.opt:hover { border-color: #b9cdf3; }
.opt.chosen { border-color: var(--brand); background: #eef4ff; }
.opt.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 3px 0 #9ad8b8; }
.opt.tried { border-color: #f1c58e; background: var(--soft-bg); opacity: .8; }
.opt[disabled] { cursor: default; }

.feedback {
  margin-top: 16px; border-radius: 16px; padding: 14px 16px;
  font-family: var(--read-font); font-size: calc(var(--read-size) * .9); line-height: 1.6;
  display: flex; gap: 12px; align-items: flex-start;
}
.feedback .fb-ico { font-size: 30px; line-height: 1; }
.feedback .fb-body { flex: 1; }
.feedback.good { background: var(--good-bg); border: 2px solid #9ad8b8; }
.feedback.soft { background: var(--soft-bg); border: 2px solid #f4cd99; }
.feedback.info { background: #eef4ff; border: 2px solid #c6d8fb; }
.feedback b { display: block; margin-bottom: 4px; }
.task-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Leesvak (rustige achtergrond) ---------- */
.readbox {
  background: var(--read-bg); color: var(--read-fg);
  border-radius: 16px; padding: 16px 18px; border: 2px solid rgba(0,0,0,.06);
  font-family: var(--read-font); font-size: var(--read-size); line-height: var(--read-lh);
  letter-spacing: var(--read-ls); word-spacing: var(--read-ws);
  margin-bottom: 12px;
}
.readbox .line { display: flex; gap: 8px; align-items: flex-start; padding: 2px 8px; border-radius: 10px; margin: 2px -8px; }
.readbox .line .ltext { flex: 1; }
.readbox.ruler .line.active { background: rgba(255, 214, 92, .38); box-shadow: inset 4px 0 0 #f2b631; }
.readbox.ruler .line:not(.active) { opacity: .62; }
.readbox .line.hint { background: rgba(120, 190, 255, .28); box-shadow: inset 4px 0 0 #3b8ae0; opacity: 1 !important; }
.readbox .w { border-radius: 6px; padding: 0 1px; cursor: pointer; }
.readbox .w.say { background: #ffd65c; }
.readbox .controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-family: var(--ui-font); }
.readbox .controls .btn { min-height: 40px; font-size: 15px; padding: 6px 12px; }
.sentence-show {
  background: var(--read-bg); border-radius: 14px; padding: 12px 16px; margin: 8px 0;
  font-family: var(--read-font); font-size: var(--read-size); line-height: var(--read-lh);
  letter-spacing: var(--read-ls); word-spacing: var(--read-ws); border: 2px solid rgba(0,0,0,.05);
}
.sentence-show .lbl { display: block; font-family: var(--ui-font); font-size: 13px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }

/* tikbare woorden */
.tokens { display: flex; flex-wrap: wrap; gap: 10px; background: var(--read-bg); padding: 14px; border-radius: 16px; border: 2px solid rgba(0,0,0,.05); }
.tok {
  font-family: var(--read-font); font-size: var(--read-size); letter-spacing: var(--read-ls);
  padding: 8px 12px; border-radius: 12px; background: #fff; border: 3px solid var(--line); cursor: pointer;
  box-shadow: 0 3px 0 var(--line); color: var(--ink); min-height: 52px;
}
.tok.sel { border-color: var(--brand); background: #e7f0ff; }
.tok.right { border-color: var(--good); background: var(--good-bg); }
.tok.miss { border-color: #f1c58e; background: var(--soft-bg); }
.tok.grouped { border-style: dashed; }
.tok.placed { opacity: .3; }
.tokens.answer { min-height: 76px; background: #fff; border: 3px dashed #c9d6ef; }
.tokens.answer:empty::before { content: "Tik de woorden in de juiste volgorde"; color: #9aa6bd; font-size: 16px; align-self: center; }

/* kleuren voor zinsdelen */
.zd-pv { border-color: var(--c-pv) !important; background: #fde9e5 !important; }
.zd-ow { border-color: var(--c-ow) !important; background: #e3eeff !important; }
.zd-ww { border-color: var(--c-ww) !important; background: #e2f6e9 !important; }
.zd-lv { border-color: var(--c-lv) !important; background: #f1e7fc !important; }
.zd-mv { border-color: var(--c-mv) !important; background: #fff1d6 !important; }
.zd-bwb { border-color: var(--c-bwb) !important; background: #dff6f6 !important; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.legend span { font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 2px solid; }

/* sorteren & koppelen */
.sort-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px; border-radius: 14px; background: #fff; border: 2px solid var(--line); }
.sort-item .word { font-family: var(--read-font); font-size: var(--read-size); font-weight: 700; min-width: 140px; }
.sort-item.right { border-color: var(--good); background: var(--good-bg); }
.sort-item.miss { border-color: #f1c58e; background: var(--soft-bg); }
.bin-btn { min-height: 46px; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--line); background: #f6f8fc; font-size: 16px; font-weight: 700; cursor: pointer; }
.bin-btn.on { border-color: var(--brand); background: #e7f0ff; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match .col { display: grid; gap: 10px; align-content: start; }
.match .opt { font-size: calc(var(--read-size) * .85); min-height: 56px; }
.match .opt.done { border-color: var(--good); background: var(--good-bg); opacity: .75; }

.input-big {
  width: 100%; font-family: var(--read-font); font-size: calc(var(--read-size) * 1.05);
  padding: 12px 16px; border-radius: 14px; border: 3px solid var(--line); letter-spacing: .06em;
}
.input-big:focus { outline: none; border-color: var(--brand); }
textarea.input-big { min-height: 120px; line-height: 1.6; letter-spacing: var(--read-ls); }

/* leerkaart (begrip) */
.learn-card { text-align: center; }
.learn-card .emoji { font-size: 84px; line-height: 1.1; }
.learn-card .word { font-size: calc(var(--read-size) * 1.6); font-weight: 800; font-family: var(--read-font); letter-spacing: .04em; }
.learn-card .part { text-align: left; background: var(--read-bg); border-radius: 14px; padding: 10px 14px; margin-top: 10px; font-family: var(--read-font); font-size: var(--read-size); line-height: var(--read-lh); display: flex; gap: 10px; align-items: flex-start; }
.learn-card .part .ptxt { flex: 1; }
.learn-card .part small { display: block; font-family: var(--ui-font); font-weight: 700; color: var(--ink-soft); font-size: 13px; text-transform: uppercase; }

.rule-card { background: #f4f8ff; border: 2px solid #c6d8fb; border-radius: 16px; padding: 14px 16px; font-family: var(--read-font); font-size: calc(var(--read-size) * .92); line-height: 1.7; }
.rule-card ol, .rule-card ul { margin: 6px 0; padding-left: 24px; }
.rule-card .ex { background: #fff; border-radius: 10px; padding: 6px 10px; margin: 6px 0; display: block; }

/* ---------- Doolhof ---------- */
.maze { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 4px 14px; margin-bottom: 10px; }
.maze .room { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; background: #d8e9cf; display: flex; align-items: center; justify-content: center; font-size: 26px; border: 3px solid #a9cf98; }
.maze .door { flex: 0 0 auto; width: 22px; height: 44px; border-radius: 6px 6px 0 0; background: #8a5a35; border: 2px solid #5f3c22; }
.maze .door.open { background: transparent; border-style: dashed; border-color: #a9cf98; }
.maze .room.here { background: #fff6c9; border-color: #f2c25c; }

/* ---------- Canvaswereld ---------- */
.world-canvas-wrap { position: relative; width: 100%; height: calc(100vh - 62px); height: calc(100dvh - 62px); overflow: hidden; touch-action: none; }
.world-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; z-index: 5; }
.hud.left { left: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.hud.right { right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.hud.bottom { left: 0; right: 0; bottom: 0; padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.hud .panel { background: rgba(255,255,255,.95); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.hotbar { display: flex; gap: 8px; overflow-x: auto; padding: 8px; background: rgba(255,255,255,.95); border-radius: 18px; box-shadow: var(--shadow); max-width: 980px; margin: 0 auto; }
.slot { flex: 0 0 auto; width: 66px; height: 66px; border-radius: 14px; border: 3px solid var(--line); background: #f7f9fd; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; position: relative; padding: 2px; }
.slot.on { border-color: var(--brand); background: #e7f0ff; }
.slot .sw { width: 30px; height: 30px; border-radius: 6px; margin-bottom: 2px; border: 2px solid rgba(0,0,0,.15); }
.slot .em { font-size: 26px; line-height: 1.1; }
.slot .cnt { position: absolute; top: -6px; right: -6px; background: var(--ink); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; }
.slot.empty { opacity: .45; }
.modebar { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; flex-wrap: wrap; }
.modebar .btn { min-height: 44px; font-size: 16px; padding: 6px 14px; }
.modebar .btn.on { background: var(--ink); box-shadow: 0 4px 0 #000; }
.map-label {
  position: absolute; transform: translate(-50%, -100%); z-index: 4;
  background: #fff; border: 3px solid var(--line); border-radius: 14px; padding: 6px 12px;
  font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; color: var(--ink);
}
.map-label.below { transform: translate(-50%, 0); }
.map-label small { display: block; font-weight: 600; font-size: 12px; color: var(--ink-soft); }
.map-label.locked { opacity: .75; background: #f1f3f8; }
.map-hit { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; z-index: 3; background: transparent; border: 0; }

/* ---------- Overlays ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(25, 35, 60, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 14px; }
.modal { background: #fff; border-radius: 22px; padding: 20px; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 980px; }
.modal h2 { display: flex; align-items: center; gap: 10px; }
.modal .close { margin-left: auto; }
.toast-wrap { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 700; box-shadow: var(--shadow); border: 2px solid var(--line); animation: toastIn .3s ease-out; }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.fly { position: fixed; z-index: 300; font-size: 26px; pointer-events: none; transition: transform .8s cubic-bezier(.5,-0.3,.6,1), opacity .8s; }
.confetti { position: fixed; z-index: 250; width: 10px; height: 14px; top: -20px; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.pop { animation: pop .4s ease-out; }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.bounce { animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-6px); } }

.pause-screen { position: fixed; inset: 0; z-index: 150; background: linear-gradient(180deg, #cfe6ff, #eaf6ec); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; text-align: center; padding: 20px; }
.breathe { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, #fff, #9fd0ff); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.75); } 50% { transform: scale(1.1); } }

/* ---------- Beginscherm ---------- */
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg, #8ec5ff 0%, #c8e6ff 50%, #bfe8b4 100%); }
.splash .card { max-width: 620px; width: 100%; }
.logo { font-size: 46px; font-weight: 900; letter-spacing: .02em; color: var(--brand-d); text-shadow: 0 3px 0 #fff; }
.logo span:nth-child(odd) { color: #e2553f; }

.avatar-editor { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.avatar-editor canvas { width: 100%; height: 300px; background: linear-gradient(180deg, #d7ecff, #f3faff); border-radius: 18px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.swatch { width: 42px; height: 42px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--brand); }
.pill { min-height: 42px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 15px; }
.pill.on { border-color: var(--brand); background: #e7f0ff; }
.pill[disabled] { opacity: .45; }

/* ---------- Dagelijkse uitdagingen ---------- */
.daily-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.daily-item:last-child { border-bottom: 0; }
.bar { height: 12px; background: #e6ebf5; border-radius: 999px; overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5fc58f, #2f9e68); border-radius: 999px; }
.bar.blue > i { background: linear-gradient(90deg, #7fb0ff, #3b6fd8); }
.bar.warm > i { background: linear-gradient(90deg, #ffc27a, #e48a2a); }

/* ---------- Oudergedeelte ---------- */
.parent { background: #f5f7fb; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 15px; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; text-transform: uppercase; color: var(--ink-soft); letter-spacing: .04em; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 10px 0; border-bottom: 2px solid var(--line); }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart .col i { display: block; width: 100%; max-width: 34px; background: #6c9cf0; border-radius: 6px 6px 0 0; min-height: 2px; }
.chart .col small { font-size: 11px; color: var(--ink-soft); }
.chart .col b { font-size: 11px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.field input[type=text], .field input[type=password], .field input[type=number], .field select, .field textarea {
  width: 100%; padding: 10px 12px; font-size: 16px; border-radius: 10px; border: 2px solid var(--line); font-family: inherit;
}
.field textarea { min-height: 140px; line-height: 1.5; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.kv .card { padding: 12px; }
.kv .num { font-size: 28px; font-weight: 800; }
.settings-grid { display: grid; gap: 14px; }
.setting { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.setting > label { min-width: 170px; font-weight: 700; }
.setting input[type=range] { flex: 1; min-width: 160px; height: 32px; }
.preview-text { background: var(--read-bg); border-radius: 14px; padding: 12px 16px; font-family: var(--read-font); font-size: var(--read-size); line-height: var(--read-lh); letter-spacing: var(--read-ls); word-spacing: var(--read-ws); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.toggle input { width: 24px; height: 24px; }

/* ---------- Bewegingsarm ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
body.reading .bounce { animation: none !important; }

/* ---------- Responsief ---------- */
@media (max-width: 700px) {
  .main { padding: 10px; }
  .topbar .title { font-size: 16px; }
  .avatar-editor { grid-template-columns: 1fr; }
  .avatar-editor canvas { height: 220px; }
  .options.two { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr 1fr; gap: 8px; }
  .chip { padding: 4px 8px; font-size: 14px; }
  .iconbtn { width: 40px; height: 40px; }
  .world-banner .big { font-size: 40px; }
  .slot { width: 58px; height: 58px; }
}
@media (max-width: 420px) {
  .wallet .chip.mat { display: none; }
}

@media print {
  .topbar, .tabs, .no-print, .btn { display: none !important; }
  body, .parent { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
