/* Via Latina: one stylesheet, touch first, offline. */
:root {
  --bg: #fbf6ec; --card: #fffdf8; --ink: #2b2118; --muted: #74685c; --line: #e6dccb;
  --terra: #b5532c; --terra-d: #8e3e1f; --olive: #5a7d2a; --olive-l: #e8efd9; --gold: #d4a017; --gold-l: #fbf0c9;
  --bad: #c0392b; --bad-l: #fbe3df; --good: #2e8b3d; --good-l: #e0f2e3;
  --c-pv: #c0392b; --c-o: #2f6fa3; --c-lv: #2e8b3d; --c-nwd: #4f8fc0; --c-bvb: #1f8a87; --c-mv: #c27c00;
  --c-bwb: #7b3f8c; --c-aansp: #8d6e63; --c-bijst: #607d8b; --c-adj: #c2417a;
  --radius: 14px; --shadow: 0 2px 0 rgba(43, 33, 24, .12), 0 6px 18px rgba(43, 33, 24, .06);
  --lat: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button { font: inherit; color: inherit; }
a { color: var(--terra-d); }
h1, h2, h3 { line-height: 1.2; margin: .2em 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.lat { font-family: var(--lat); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- shell ---- */
#app { max-width: 820px; margin: 0 auto; padding: 0 12px 96px; }
.topbar { position: sticky; top: 0; z-index: 20; padding: 8px 0 6px; background: var(--bg); } /* solid: sticky bars sit right under it */
/* Top bar: Home · Studeren · Oefenen on the left, 💾 and the name menu on the right */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.navleft, .navright { display: flex; align-items: center; gap: 4px; min-width: 0; }
.navlink { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.navlink .ic { font-size: 1.15rem; }
.navlink.on { background: var(--card); border-color: var(--line); box-shadow: 0 2px 0 var(--line); }
.userwrap { position: relative; }
.userbtn { min-height: 44px; max-width: 132px; padding: 0 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; }
.userbtn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.usermenu a { padding: 12px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.usermenu a:hover, .usermenu a:focus-visible { background: var(--gold-l); }
.pagehead { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pagehead .title { font-weight: 700; font-size: 1.1rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) {
  /* phone: Home is an icon; Studeren / Oefenen are words without icon */
  .topnav { gap: 2px; }
  .navleft, .navright { gap: 2px; }
  .navlink { padding: 0 7px; font-size: .95rem; }
  .navlink.home .lab { display: none; }
  .navlink:not(.home) .ic { display: none; }
  .navright .iconbtn { min-width: 40px; padding: 0 6px; }
  .userbtn { max-width: 76px; padding: 0 7px; }
}
@media (max-width: 345px) { .navlink { padding: 0 5px; font-size: .88rem; } .userbtn { max-width: 54px; } }
/* Home page and the choice screen */
.home-intro h1 { margin: 0 0 4px; }
.home-steps { margin: 12px 0 8px; padding-left: 1.3em; display: grid; gap: 8px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 4px 14px; }
.choice.ll-note { min-height: 130px; font-size: 1.05rem; }
.choice.ll-note b { font-size: 1.45rem; }
.choice.ll-note:nth-child(1) { transform: rotate(-1.2deg); } .choice.ll-note:nth-child(2) { transform: rotate(1deg); }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.iconbtn { border: 1px solid var(--line); background: var(--card); border-radius: 12px; min-width: 44px; height: 44px; padding: 0 10px; cursor: pointer; }
.iconbtn:active { transform: translateY(1px); }
.iconbtn.backup { position: relative; font-size: 1.15rem; }
.iconbtn.backup.todo::after { content: ""; position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); border: 2px solid var(--card); }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: center; background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; font-size: .72rem; text-decoration: none; color: var(--muted); border-radius: 10px; }
.tabbar a .ic { font-size: 1.35rem; line-height: 1.2; }
.tabbar a.on { color: var(--terra-d); background: var(--gold-l); font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin: 10px 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700;
  background: var(--terra); color: #fff; box-shadow: 0 3px 0 var(--terra-d); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--terra-d); }
.btn[disabled] { background: #cfc5b6; box-shadow: 0 3px 0 #b2a795; cursor: not-allowed; color: #fff; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn.olive { background: var(--olive); box-shadow: 0 3px 0 #3f5a1c; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .9rem; }
.btn.wide { width: 100%; }

/* ---- options (multiple choice) ---- */
.opts { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 8px 0; }
.opts.one { grid-template-columns: 1fr; }
.opts.many { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.opt { position: relative; min-height: 52px; padding: 10px 12px 10px 34px; text-align: left; border-radius: 12px; border: 2px solid var(--line); background: var(--card); cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.opt .k { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.opt.sel { border-color: var(--terra); background: #fdf0e9; }
.opt.right { border-color: var(--good); background: var(--good-l); }
.opt.wrong { border-color: var(--bad); background: var(--bad-l); }
.opt[disabled] { cursor: default; opacity: .75; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.seg .lab { width: 100%; font-size: .85rem; color: var(--muted); font-weight: 600; }
.seg button { min-height: 44px; min-width: 52px; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; }
.seg button.sel { border-color: var(--terra); background: #fdf0e9; }
.seg button.right { border-color: var(--good); background: var(--good-l); }
.seg button.wrong { border-color: var(--bad); background: var(--bad-l); }

input.typed { width: 100%; min-height: 52px; font: 1.2rem var(--lat); padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; }
input.typed:focus { outline: none; border-color: var(--terra); }
input.typed.right { border-color: var(--good); background: var(--good-l); }
input.typed.wrong { border-color: var(--bad); background: var(--bad-l); }

/* ---- exercise frame ---- */
.ex-head { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.progress { flex: 1; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--olive); border-radius: 99px; transition: width .3s; }
.ex-type { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.question { font-size: 1.1rem; font-weight: 600; margin: 6px 0; }
.question .lat, .big-lat { font-family: var(--lat); font-weight: 600; }
.big-lat { font-size: 1.8rem; text-align: center; margin: 10px 0; }
.flag { border: 0; background: none; color: var(--muted); font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 6px; min-height: 36px; }
.actions { position: sticky; bottom: 70px; z-index: 10; display: flex; gap: 8px; padding: 10px 0; background: linear-gradient(rgba(251, 246, 236, 0), var(--bg) 30%); }
.actions .btn.primary { flex: 1; }

/* ---- feedback with Lupa ---- */
.fb { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; border: 2px solid transparent; }
.fb.good { background: var(--good-l); border-color: #b9dfc0; }
.fb.bad { background: var(--bad-l); border-color: #f1bdb5; }
.fb.info { background: var(--gold-l); border-color: #efd98d; }
.fb .lupa { flex: 0 0 52px; width: 52px; height: 52px; }
.fb .msg { flex: 1; min-width: 0; }
.fb .msg p { margin: .1em 0 .3em; }
.rule { display: inline-block; font-size: .78rem; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: #fff; margin-right: 4px; vertical-align: 1px; }
.cardref { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--olive); color: #fff; margin-right: 4px; }

/* ---- the sentence (ontleding) ---- */
.sentence { position: relative; display: flex; flex-wrap: wrap; gap: 10px 6px; align-items: flex-start; padding: 16px 10px 26px; margin: 8px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sentence svg.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wtok { display: inline-flex; align-items: flex-start; }
.punct { font: 1.45rem var(--lat); padding-top: 6px; }
.w { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 44px; min-height: 52px; padding: 4px 6px 2px; border-radius: 10px; border: 2px solid transparent; background: none; cursor: pointer; font: 1.45rem var(--lat); }
.w:hover { background: #f6efe2; }
.w.sel { border-color: var(--terra); background: #fdf0e9; }
.w.focus { border-color: var(--gold); background: var(--gold-l); }
.w.dim { opacity: .55; }
.w .t { line-height: 1.25; }
.w .labs { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 0; }
.w .lab { font: 700 .68rem/1.2 var(--sans); color: #fff; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.w .gl { font: italic .72rem/1.2 var(--sans); color: var(--muted); }
.w .tick { position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font: 700 .75rem/20px var(--sans); text-align: center; transform: scale(0); transition: transform .2s; }
.w.ticked .tick { transform: scale(1); }
.w.t-pv .t { text-decoration: underline 3px var(--c-pv); text-underline-offset: 4px; }
.lab.pv { background: var(--c-pv); } .lab.o { background: var(--c-o); } .lab.lv { background: var(--c-lv); } .lab.nwd { background: var(--c-nwd); }
.lab.bvb { background: var(--c-bvb); } .lab.mv { background: var(--c-mv); } .lab.bwb { background: var(--c-bwb); } .lab.aansp { background: var(--c-aansp); }
.lab.bijst { background: var(--c-bijst); } .lab.adj { background: var(--c-adj); } .lab.key { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.lab.ref { background: #555; }
.stepdots { display: flex; gap: 4px; flex-wrap: wrap; }
.stepdots span { font-size: .72rem; padding: 2px 7px; border-radius: 99px; background: var(--line); color: var(--muted); font-weight: 700; }
.stepdots span.on { background: var(--terra); color: #fff; }
.stepdots span.done { background: var(--olive-l); color: var(--olive); }
.modebadge { font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--gold-l); border: 1px solid #efd98d; }

/* label palette (Snel) */
.palette { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chip { touch-action: none; user-select: none; -webkit-user-select: none; min-height: 44px; min-width: 64px; padding: 8px 14px; border-radius: 12px; border: 0; color: #fff; font-weight: 800; cursor: grab; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.chip.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.chip.pv { background: var(--c-pv); } .chip.o { background: var(--c-o); } .chip.lv { background: var(--c-lv); }
.chip.ghost { position: fixed; z-index: 100; pointer-events: none; opacity: .9; }
.lab.removable { cursor: pointer; }

/* tiles (step 6, T17) */
.answer-line { min-height: 64px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border-radius: var(--radius); border: 2px dashed var(--line); background: #fff; margin: 8px 0; }
.answer-line:empty::before { content: attr(data-empty); color: var(--muted); font-size: .9rem; }
.tile-bank { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tile { min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 3px 0 var(--line); cursor: pointer; font-size: 1rem; }
.tile.used { visibility: hidden; }
.tile.wrong { border-color: var(--bad); background: var(--bad-l); }
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .review { grid-template-columns: 1fr; } }
.timer { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.timer > i { display: block; height: 100%; width: 0; background: var(--gold); }

/* tables (cards, T7) */
table.t { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: .95rem; }
table.t th, table.t td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; }
table.t th { background: var(--olive-l); }
.cardhtml table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: .9rem; }
.cardhtml th, .cardhtml td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
.cardhtml th { background: var(--olive-l); }
.cardhtml .tip { background: var(--gold-l); border-left: 4px solid var(--olive); padding: 6px 10px; margin: 8px 0; border-radius: 6px; }
.cardhtml .small { font-size: .82rem; color: var(--muted); }
.tablewrap { overflow-x: auto; }
td input.cellin { width: 100%; min-width: 90px; min-height: 40px; font: 1rem var(--lat); border: 2px solid var(--line); border-radius: 8px; padding: 4px 6px; }
td input.cellin.right { border-color: var(--good); background: var(--good-l); }
td input.cellin.wrong { border-color: var(--bad); background: var(--bad-l); }

/* split (T9) */
.splitword { display: flex; justify-content: center; flex-wrap: wrap; margin: 16px 0; font: 2rem var(--lat); }
.splitword .ch { padding: 0 1px; }
.splitword .cut { width: 22px; min-height: 52px; border: 0; background: none; cursor: pointer; position: relative; }
.splitword .cut::after { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.splitword .cut.on::after { background: var(--terra); width: 4px; left: 9px; }

/* buckets (T11) */
.buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.bucket { min-height: 90px; border: 2px dashed var(--line); border-radius: 12px; padding: 8px; background: #fff; cursor: pointer; }
.bucket h4 { margin: 0 0 6px; font-size: .9rem; }
.bucket .tile { font-family: var(--lat); }

/* home / map */
.hero { display: flex; gap: 12px; align-items: center; }
.hero .lupa { width: 76px; height: 76px; flex: 0 0 76px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.stat b { display: block; font-size: 1.3rem; }
.region { margin: 18px 0 8px; padding: 12px; border-radius: var(--radius); }
.region h2 { display: flex; align-items: center; gap: 8px; }
.region.castra { background: #f2e6d3; } .region.oraculum { background: #e7eedd; } .region.troia { background: #f3e0d6; } .region.itinera { background: #dfe9f1; } .region.arena { background: #efe3f1; }
.region.off { opacity: .5; }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.node { position: relative; display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; min-height: 92px; box-shadow: 0 3px 0 var(--line); }
.node.gold { border-color: var(--gold); background: #fff8df; box-shadow: 0 3px 0 #c9a43a; }
.node.boss { border-color: var(--terra); }
.node .nm { font-weight: 700; font-size: .95rem; }
.node .st { font-size: .9rem; letter-spacing: 1px; }
.node .bar { height: 6px; border-radius: 99px; background: var(--line); margin-top: 6px; overflow: hidden; }
.node .bar i { display: block; height: 100%; background: var(--olive); }
.node .sug { position: absolute; top: -8px; right: -6px; background: var(--terra); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.quest { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.quest:last-child { border: 0; }
.quest .qbar { flex: 0 0 70px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.quest .qbar i { display: block; height: 100%; background: var(--gold); }
.lessons { display: grid; gap: 8px; }
.lessonbtn { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px; min-height: 56px; }
.hydra-heads { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: flex-end; margin: 10px 0; }
.head { display: flex; flex-direction: column; align-items: center; font-size: .75rem; font-weight: 700; }
.head .hd { border-radius: 50% 50% 40% 40%; background: #3f6b3a; color: #fff; display: flex; align-items: center; justify-content: center; }
.head.cut .hd { background: #c9c0b1; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.badge { text-align: center; font-size: .75rem; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.badge .bi { font-size: 1.6rem; display: block; }
.badge.off { opacity: .35; filter: grayscale(1); }
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shopitem { text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; }
.shopitem .ico { font-size: 2rem; }
.lexrow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lexrow .h { font-family: var(--lat); font-weight: 700; }
.gbadge { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.gbadge.g-m { background: #e8f1fb; color: #174ea6; } .gbadge.g-v { background: #fce8f0; color: #9c1d56; } .gbadge.g-o { background: #eaf7ee; color: #196b38; } .gbadge.g-mv { background: #f1e9fb; color: #5b2a9c; }
.bars .barrow { display: grid; grid-template-columns: 158px 1fr 44px; gap: 8px; align-items: center; margin: 4px 0; font-size: .9rem; }
.bars .barrow .b { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bars .barrow .b i { display: block; height: 100%; background: var(--olive); }
.passage { font: 1.15rem/1.7 var(--lat); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.passage .ln { display: flex; gap: 10px; }
.passage .ln .n { flex: 0 0 22px; color: var(--muted); font: .8rem/2.1 var(--sans); text-align: right; }
.passage .pw { cursor: pointer; border-radius: 6px; padding: 0 1px; }
.passage .pw.sel { background: #fdf0e9; outline: 2px solid var(--terra); }
.passage .pw.right { background: var(--good-l); }
.passage .pw.wrong { background: var(--bad-l); }
.passage .pw.glossed { text-decoration: underline dotted var(--muted); }
.glosses { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.scylla { display: flex; justify-content: center; gap: 6px; font-size: 2rem; }
.scylla span.cut { opacity: .2; filter: grayscale(1); }
.toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }
.modal-bg { position: fixed; inset: 0; z-index: 150; background: rgba(43, 33, 24, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); border-radius: var(--radius); padding: 16px; max-width: 480px; width: 100%; max-height: 90vh; overflow: auto; }
textarea { width: 100%; min-height: 80px; font: inherit; border-radius: 10px; border: 2px solid var(--line); padding: 8px; }
.kbd { font-size: .75rem; color: var(--muted); }

/* animations */
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.shake { animation: shake .35s; }
@keyframes pop { 0% { transform: scale(.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop .25s ease-out; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.lupa.happy { animation: bob .6s 2; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 900px) {
  #app { max-width: 900px; }
  .w { font-size: 1.6rem; }
}

/* map skins from the shop */
body[data-skin="nacht"] { --bg: #1f2430; --card: #2a3040; --ink: #f1ead9; --muted: #b9b1a0; --line: #3b4357; --olive-l: #33402a; --gold-l: #4a3f1c; }
body[data-skin="nacht"] .region { background: #262c3a !important; }
body[data-skin="nacht"] .topbar { background: var(--bg); }
body[data-skin="nacht"] .actions { background: linear-gradient(rgba(31, 36, 48, 0), var(--bg) 30%); }
body[data-skin="nacht"] input.typed, body[data-skin="nacht"] .answer-line, body[data-skin="nacht"] .bucket { background: #20252f; color: var(--ink); }
body[data-skin="marmer"] { --bg: #f4f4f2; --card: #ffffff; --line: #dcdcd6; --olive-l: #ececea; --gold-l: #f3efe2; }
body[data-skin="marmer"] .region { background: #ebebe7 !important; }

/* references in hints (js/refs.js): buttons, the panel under the hint, highlights */
.refbtn { font: inherit; color: var(--ink); background: var(--gold-l); border: 1px solid #c9a43a; border-radius: 6px; padding: 0 5px; margin: 0 1px; cursor: pointer; text-decoration: underline dotted 1px; text-underline-offset: 2px; min-height: 24px; }
.refbtn:hover, .refbtn:focus-visible { background: #f7e39a; outline: 2px solid var(--terra); outline-offset: 1px; }
.refbtn .refmark { display: inline-block; font-size: .85em; line-height: 1; margin-left: 4px; font-weight: 700; text-decoration: none; transition: transform .15s; }
.refbtn.open { background: var(--olive-l); border-color: var(--olive); }
.refbtn.open .refmark { transform: rotate(180deg); }
.refbtn.rule { color: #fff; background: var(--ink); border-color: var(--ink); text-decoration: none; padding: 1px 7px; font-size: .78rem; font-weight: 800; }
.refbtn.rule.open { background: var(--olive); border-color: var(--olive); }
.refpanel { margin: 6px 0 10px; border: 2px solid var(--olive); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); max-height: 45vh; overflow: auto; overscroll-behavior: contain; scroll-margin-bottom: 170px; animation: pop .2s ease-out; }
.refpanel .rp-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--olive-l); border-bottom: 1px solid var(--line); }
.refpanel .rp-title { flex: 1; font-size: .95rem; }
.refpanel .rp-close { border: 1px solid var(--line); background: var(--card); border-radius: 8px; min-width: 36px; min-height: 36px; cursor: pointer; }
.refpanel .rp-body { padding: 8px 10px; font-size: .95rem; }
.refpanel .rp-body table { font-size: .85rem; }
.refpanel .rp-foot { padding: 6px 10px 10px; font-size: .9rem; }
.refpanel .rp-words { display: flex; flex-wrap: wrap; gap: 6px; }
.refpanel .rp-word { font: inherit; font-size: .9rem; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; min-height: 40px; cursor: pointer; }
.refpanel .rp-word:hover, .refpanel .rp-word:focus-visible { border-color: var(--terra); }
.hl, .cardhtml .hl, table.t .hl { background: #fff3c4 !important; box-shadow: inset 0 0 0 2px #d4a017; }
.hl-strong, .cardhtml .hl-strong, table.t .hl-strong { background: #ffd966 !important; box-shadow: inset 0 0 0 3px #8e6d10; font-weight: 700; }
li.hl, li.hl-strong, .lexrow.hl-strong, .passage .ln.hl, h3.hl { border-radius: 6px; padding-left: 4px; }
@media (prefers-reduced-motion: reduce) { .refpanel { animation: none; } .refbtn .refmark { transition: none; } }

/* ---------------------------------------------------------------------------
   Kaarten: the looseleaf look of the start page (assets/looseleaf-lite.css).
   Kevin Sans has no macrons, so it is only for Dutch headings and buttons;
   Latin and the card text stay in the print font. Not with the night skin.
   --------------------------------------------------------------------------- */
.iconbtn.home { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
body[data-screen="kaarten"]:not([data-skin="nacht"]) { background: var(--ll-desk); --line: rgba(143, 176, 212, .7); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .topbar { background: var(--ll-desk); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .topbar .title, body[data-screen="studeren"]:not([data-skin="nacht"]) .topbar .title { font-family: var(--ll-hand); font-size: 1.25rem; color: var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .topbar .pill,
body[data-screen="kaarten"]:not([data-skin="nacht"]) .topbar .iconbtn { background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 2px 0 var(--ll-ink); color: var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .kaartentabs { gap: 8px; }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .kaartentabs .btn { font-family: var(--ll-hand); font-size: 1rem; color: var(--ll-ink); background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 2px 0 var(--ll-ink); min-height: 40px; }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .kaartentabs .btn:not(.ghost) { background: var(--ll-hi); transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card { background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r1); box-shadow: 4px 5px 0 var(--ll-shadow); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card h2,
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card h3 { font-family: var(--ll-hand); color: var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card h3 { border-bottom: 2px solid var(--ll-pencil-mark); border-radius: 0 0 40% 60% / 0 0 3px 2px; }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .cardhtml th { font-family: var(--ll-hand); background: transparent; border: 0; border-bottom: 2px solid var(--ll-ink); color: var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .cardhtml td { border: 0; border-bottom: 1px solid var(--line); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .cardhtml tr:hover td { background: rgba(248, 220, 76, .22); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .cardhtml .tip { background: var(--ll-sticky-yellow); border-left: 0; border-radius: 2px 3px 12px 3px / 3px 2px 14px 3px; box-shadow: 2px 3px 0 rgba(58, 44, 30, .16), 4px 7px 10px rgba(58, 44, 30, .18); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .lexrow { border-bottom: 1px solid var(--line); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card input,
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card select { border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); background: var(--ll-card); color: var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card .btn.small { font-family: var(--ll-hand); color: var(--ll-ink); background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 2px 0 var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card .btn.small:not(.ghost) { background: var(--ll-sticky-green); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .tabbar { background: var(--ll-paper); border-top: 2px solid var(--ll-ink); }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .card select { min-height: 40px; padding: 6px 10px; font-size: .95rem; margin: 4px 0; }
@media (max-width: 640px) {
  /* phone: one scrolling row of tabs, as on the start page */
  .kaartentabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 4px 8px 2px; -webkit-overflow-scrolling: touch; }
  .kaartentabs .btn { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------------------------------------------------------------------------
   Overhoor (flashcards): an index card like on the start page, two big grade buttons.
   --------------------------------------------------------------------------- */
.fc-deck select { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; flex: 1 1 200px; min-width: 0; max-width: 100%; }
.fc-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; text-align: center; }
.fc-counts > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; }
.fc-counts b { display: block; font-size: 1.5rem; }
.fc-counts span { font-size: .8rem; color: var(--muted); }
.fcard { display: block; width: 100%; min-height: 230px; margin: 12px 0; padding: 18px 16px 18px 58px; text-align: left; cursor: pointer; color: var(--ink); font: inherit;
  background: linear-gradient(90deg, transparent 43px, #d9776a 43px, #d9776a 45px, transparent 45px), repeating-linear-gradient(#fbf6e9 0 29px, rgba(143, 176, 212, .6) 29px 30px);
  border: 2px solid #2a2420; border-radius: 10px 14px 9px 13px / 13px 9px 14px 10px; box-shadow: 5px 6px 0 rgba(58, 44, 30, .28); transform: rotate(-.4deg); transition: transform .2s; }
.fcard.flipped { transform: rotate(.3deg); cursor: default; }
.fc-front { font-size: 2rem; font-weight: 700; margin: 18px 0 10px; }
.fc-back { border-top: 2px dashed #8e887f; margin-top: 10px; padding-top: 10px; display: grid; gap: 6px; }
.fc-head { font-size: 1.15rem; }
.fc-nl { font-size: 1.25rem; font-weight: 700; color: #2e5a27; }
.fc-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-grade .btn { flex-direction: column; gap: 0; min-height: 64px; font-size: 1.1rem; }
.fc-grade .btn small { font-weight: 400; font-size: .78rem; opacity: .9; }
.btn.good { background: var(--good); box-shadow: 0 3px 0 #1f6129; }
.btn.bad { background: var(--bad); box-shadow: 0 3px 0 #8e2a1f; }
body[data-skin="nacht"] .fcard { filter: brightness(.92); }
@media (max-width: 430px) { .tabbar a { font-size: .64rem; padding: 4px 0; } .tabbar a .ic { font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .fcard, .fcard.flipped { transform: none; transition: none; } }

/* ---------------------------------------------------------------------------
   Studeren: section lists, marks (✓ / ?), word tables, samenvatting chapters, Mijn vragen
   --------------------------------------------------------------------------- */
.seclist { display: grid; gap: 6px; margin: 6px 0 10px; }
.secitem { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.secitem:hover, .secitem:focus-visible { background: var(--gold-l); }
.mk { display: inline-grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: .95rem; }
.mk-ok { background: var(--good); color: #fff; }
.mk-q { background: #e8a33d; color: #fff; }
.mk-none { color: var(--muted); }
.markbar { margin: 6px 0 10px; }
.markbar .mkbtn { min-height: 40px; }
.markbar .mkbtn.ok.on { background: var(--good); box-shadow: 0 3px 0 #1f6129; color: #fff; }
.markbar .mkbtn.q.on { background: #e8a33d; box-shadow: 0 3px 0 #a86c15; color: #fff; }
.mknote { width: 100%; margin-top: 8px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.pager { margin-top: 14px; }
.pager .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 26px; }
.wordtbl td.la { font-size: 1.05rem; }
.wordtbl td.kern { font-weight: 700; }
.wordtbl td .gbadge { margin-left: 6px; }
.wordtbl.hide-nl td.nl:not(.shown), .wordtbl.hide-la td.la:not(.shown) { color: transparent; background: repeating-linear-gradient(-45deg, #ece6da 0 6px, #e2dccf 6px 8px); cursor: pointer; }
.wordtbl.hide-nl td.nl:not(.shown) *, .wordtbl.hide-la td.la:not(.shown) * { visibility: hidden; }
/* samenvatting chapters (same look as the printed summary, but on screen) */
.sv h3 { color: #3d5a17; margin: 1em 0 .3em; }
.sv h3.sub { font-size: 1.15rem; border-bottom: 2px solid #5a7d2a; }
.sv .tip { background: #f3f3f3; border-left: 4px solid #5a7d2a; padding: 6px 10px; margin: .6em 0; border-radius: 6px; }
.sv .warn { background: #fff6d6; border-left: 4px solid #d9a400; padding: 6px 10px; margin: .6em 0; border-radius: 6px; }
.sv .grid2, .sv .grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
.sv .grid3 { grid-template-columns: 1fr 1fr 1fr; }
.sv td.c, .sv th.c, .sv td.g { background: #f1f4e8; font-weight: 600; }
.sv .k { color: #c05a00; font-weight: 700; }
.sv .box { display: inline-block; width: 12px; height: 12px; border: 1px solid #333; margin-right: 6px; vertical-align: -1px; }
.sv td.nw { white-space: nowrap; }
@media (max-width: 640px) { .sv .grid2, .sv .grid3 { grid-template-columns: 1fr; } }
.vraag { border-top: 1px solid var(--line); padding: 10px 0; }
.vraag-t { font-weight: 700; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }

/* ---------------------------------------------------------------------------
   Cultuur: stories in panels
   --------------------------------------------------------------------------- */
.storylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; }
.storycard { display: block; border: 2px solid var(--ll-ink, #2a2420); border-radius: 12px 16px 10px 14px; overflow: hidden; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 3px 4px 0 rgba(58, 44, 30, .25); }
.storycard img { display: block; width: 100%; height: 150px; object-fit: cover; }
.storytxt { display: grid; gap: 4px; padding: 10px 12px 12px; }
.storytxt .mk { justify-self: start; }
.story-intro { font-size: 1.05rem; }
.panel { margin: 18px 0 8px; }
.panel figure { margin: 0 0 8px; }
.panel img { display: block; width: 100%; max-height: 480px; object-fit: contain; background: #2a2420; border: 2px solid var(--ll-ink, #2a2420); border-radius: 10px 14px 9px 13px; box-shadow: 4px 5px 0 rgba(58, 44, 30, .28); }
.panel figcaption { margin-top: 6px; }
.panel h3 { margin: 6px 0 4px; }
.panel p { font-size: 1.05rem; line-height: 1.55; }
.panel.noimg { border-left: 4px solid var(--olive); padding-left: 12px; }
.storywords { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wchip { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; }
.quiz { display: grid; gap: 6px; }
details.qa { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); }
details.qa summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
details.qa[open] summary { border-bottom: 1px dashed var(--line); }
details.qa p { margin: 8px 0 10px; }

/* Sticky bar of a word section: stays under the top bar while the list scrolls */
.stickybar { position: sticky; top: var(--topbar-h, 96px); z-index: 15; margin: -14px -14px 8px; padding: 10px 14px 8px; background: var(--card); border-bottom: 2px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
body[data-screen="kaarten"]:not([data-skin="nacht"]) .stickybar { background: var(--ll-paper); border-bottom: 2px solid var(--ll-ink); box-shadow: 0 4px 0 rgba(58, 44, 30, .12); }
.stickybar h2 { margin: 0 0 6px; font-size: 1.3rem; }
.stickybar .sb-tools { gap: 6px; }
.stickybar .markbar { margin: 0; }
.stickybar .markbar .row { gap: 6px; }
.stickybar .btn.small { min-height: 38px; padding: 4px 10px; }
@media (max-width: 430px) { .stickybar h2 { font-size: 1.15rem; } .stickybar .btn.small { font-size: .85rem; padding: 4px 8px; } }
.notebox:empty { display: none; }
.notebox { margin: 4px 0 8px; }
.lupa.cheer { animation: bob .6s 3; }

/* Voor ouders: language choice; right-to-left for Arabic */
.langpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.langpick .btn.small { min-height: 38px; }
.screen[dir="rtl"] .barrow { direction: rtl; }
.screen[dir="rtl"] ul { padding-right: 1.3em; padding-left: 0; }

.warn-ai { background: #fff6d6; border-left: 4px solid #d9a400; }

/* Home: language menu and the four promises (free, in your browser, take it along, for parents) */
.home-lang { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 4px 0 -2px; }
.home-lang select { min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; color: var(--ink); }
.home-badges { list-style: none; padding: 0; margin: 12px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-badges li { padding: 8px 10px; border-radius: 3px 4px 12px 4px / 4px 3px 14px 4px; box-shadow: 2px 3px 0 rgba(58, 44, 30, .14); font-size: .92rem; line-height: 1.3; }
.home-badges a { color: inherit; text-decoration: underline; }
@media (max-width: 420px) { .home-badges { grid-template-columns: 1fr; } }
.screen[dir="rtl"] .home-steps { padding-right: 1.3em; padding-left: 0; }

/* ===========================================================================
   The standard look everywhere: looseleaf, like the start page (assets/looseleaf-lite.css).
   body.ll is set unless a shop skin (nacht, marmer) is chosen. Dutch headings and buttons are
   handwritten (Kevin Sans); Latin keeps the print font (.lat, var(--lat)), and the coloured
   function labels (PV, O, LV …) keep their colours for readability.
   =========================================================================== */
body.ll { --bg: var(--ll-desk); --card: var(--ll-paper); --line: #d6ccbb; --gold-l: #fbf0c9; background: var(--ll-desk); }
body.ll h1, body.ll h2, body.ll h3, body.ll .pagehead .title, body.ll .ex-type, body.ll .navlink, body.ll .userbtn,
body.ll .btn, body.ll .tabbar a, body.ll .modebadge, body.ll .region h2, body.ll .node .nm, body.ll .lessonbtn, body.ll .stat b {
  font-family: var(--ll-hand); letter-spacing: 0; }
body.ll .ex-type { text-transform: none; font-size: .95rem; color: var(--ll-ink-soft); }
body.ll a { color: var(--ll-ink-you); }
/* paper with an inked outline */
body.ll .card, body.ll .sentence, body.ll .modal, body.ll .usermenu, body.ll .shopitem {
  background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r1); box-shadow: 4px 5px 0 var(--ll-shadow); }
body.ll .stat, body.ll .badge { background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 3px 0 var(--ll-shadow); }
/* top bar and bottom bar */
body.ll .topbar { background: var(--ll-desk); }
body.ll .navlink { color: var(--ll-ink); }
body.ll .navlink.on, body.ll .iconbtn, body.ll .userbtn, body.ll .pill {
  background: var(--ll-paper); border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 2px 0 var(--ll-ink); color: var(--ll-ink); }
body.ll .tabbar { background: var(--ll-paper); border-top: 2px solid var(--ll-ink); }
body.ll .tabbar a { color: var(--ll-ink-soft); }
body.ll .tabbar a.on { background: var(--ll-hi); color: var(--ll-ink); }
/* buttons: inked, the main one a sticky-note orange */
body.ll .btn { border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 3px 3px 0 var(--ll-ink); background: var(--ll-sticky-orange); color: var(--ll-ink); font-size: 1.05rem; }
body.ll .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ll-ink); }
body.ll .btn.ghost { background: var(--ll-paper); color: var(--ll-ink); }
body.ll .btn.olive { background: var(--ll-sticky-green); color: var(--ll-ink); }
body.ll .btn.good { background: var(--good); color: #fff; }
body.ll .btn.bad { background: var(--bad); color: #fff; }
body.ll .btn[disabled] { background: #e7e1d5; color: #8e887f; border-color: #8e887f; box-shadow: 2px 2px 0 #b9b2a6; }
body.ll .btn.small { font-size: .95rem; }
/* answer options, segments, tiles, inputs */
body.ll .opt, body.ll .seg button, body.ll .tile, body.ll .lessonbtn, body.ll .node, body.ll .secitem {
  border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); background: var(--ll-card); box-shadow: 2px 3px 0 var(--ll-ink); color: var(--ll-ink); }
body.ll .opt.sel, body.ll .seg button.sel, body.ll .w.sel { background: var(--ll-hi); border-color: var(--ll-ink); }
body.ll .opt.right, body.ll .seg button.right { background: var(--good-l); border-color: var(--good); }
body.ll .opt.wrong, body.ll .seg button.wrong, body.ll .tile.wrong { background: var(--bad-l); border-color: var(--bad); }
body.ll .opt .k { border-color: var(--ll-ink); }
body.ll input.typed, body.ll textarea, body.ll select { border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); background: var(--ll-card); color: var(--ll-ink); }
body.ll input.typed:focus, body.ll textarea:focus, body.ll select:focus { outline: 3px solid var(--ll-ink-you); outline-offset: 1px; }
body.ll input.typed.right { border-color: var(--good); background: var(--good-l); }
body.ll input.typed.wrong { border-color: var(--bad); background: var(--bad-l); }
/* exercise frame and feedback */
body.ll .progress { background: var(--ll-paper-shade); border: 1.5px solid var(--ll-ink); }
body.ll .progress > i { background: var(--ll-green); }
body.ll .actions { background: linear-gradient(rgba(168, 200, 187, 0), var(--ll-desk) 30%); }
body.ll .fb { border: 2px solid var(--ll-ink); border-radius: var(--ll-r2); box-shadow: 2px 3px 0 var(--ll-shadow); }
body.ll .fb.good { background: #dcefd0; } body.ll .fb.bad { background: #fde8dc; } body.ll .fb.info { background: var(--ll-sticky-yellow); }
body.ll .answer-line { border-color: var(--ll-ink); background: repeating-linear-gradient(var(--ll-card) 0 29px, rgba(143, 176, 212, .55) 29px 30px); }
body.ll .bucket { border-color: var(--ll-ink); background: var(--ll-card); }
/* the map */
body.ll .region { border: 2px solid var(--ll-ink); border-radius: var(--ll-r1); box-shadow: 4px 5px 0 var(--ll-shadow); }
body.ll .region.castra { background: #f3e3c6; } body.ll .region.oraculum { background: #dfe6f5; } body.ll .region.troia { background: #f6dcd2; } body.ll .region.itinera { background: #dcefe0; } body.ll .region.arena { background: #f1e6f6; }
body.ll .node.gold { background: var(--ll-sticky-yellow); }
body.ll .node.boss { background: var(--ll-sticky-pink); }
body.ll .quest { border-bottom: 1px solid rgba(143, 176, 212, .7); }
/* tables: ruled paper */
body.ll table.t th { background: transparent; border: 0; border-bottom: 2px solid var(--ll-ink); font-family: var(--ll-hand); }
body.ll table.t td { border: 0; border-bottom: 1px solid rgba(143, 176, 212, .7); }
@media (prefers-reduced-motion: reduce) { body.ll .btn:active { transform: none; } }
/* Voor ouders in another language: the rule card with its explanation under it */
.bars .barrow.wide { grid-template-columns: minmax(0, 1.5fr) 1fr 44px; }
.rulelab { display: grid; gap: 2px; justify-items: start; }
/* Home title: who it is for */
.home-intro h1 .audience { display: block; font-size: .95rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
