/* Leer Klavier: the player pages, on top of the site's tokens (bou.mjs CSS). Ported from the spike: one screen-high
   app (header row, then a framed plate with the caption strip, the note lane and the keys), soft brutalism like the
   rest of the site, Leer wears lilac (--c on .lk-app). Every class is lk- prefixed so the site's .plate, .card and
   .chip rules never reach in. */
[hidden] { display: none !important; }
html:has(.lk-app) { padding-block: 0; scrollbar-gutter: stable; }
html.lk-speel { overflow: hidden; overscroll-behavior: none; }

.lk-app { height: 100vh; height: 100dvh; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }

/* One wrapping row: brand and crumbs, the song, then the switches and the player's buttons */
.lk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.lk-head .top { padding: 0; margin: 0; max-width: none; flex: 0 1 auto; justify-content: flex-start; gap: 6px 16px; }
.lk-head .top nav { font-size: 15px; gap: 4px 14px; }
.lk-song { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lk-song h1 { font: 700 17px/1.2 var(--head); margin: 0; }
.lk-tag { font: 600 13px/1 var(--head); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 7px; background: var(--c); }
.lk-tag.plain { background: var(--sheet); }
.lk-ctl, .lk-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lk-ctl { margin-left: auto; }
.lk-ctl .tog, .lk-acts .tog { font-size: 15px; padding: 9px 12px; box-shadow: 3px 3px 0 var(--shade); }
.lk-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--sheet); box-shadow: 3px 3px 0 var(--shade); }
.lk-seg button { font: 600 15px/1 var(--head); color: var(--ink); border: 0; background: none; padding: 9px 13px; cursor: pointer; }
.lk-seg button + button { border-left: 2px solid var(--ink); }
.lk-seg button[aria-pressed="true"] { background: var(--c); }
.lk-start, .lk-btn { font: 700 16px/1 var(--head); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 10px 18px; background: var(--honey); box-shadow: 3px 3px 0 var(--shade); cursor: pointer; }
.lk-start:active, .lk-btn:active, .lk-ctl .tog:active, .lk-acts .tog:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.lk-btn.alt, .lk-start.alt { background: var(--sheet); }

/* The plate: the caption strip above the lane (instructions never cover a note), the lane, the keys */
.lk-stage { flex: 1; min-height: 0; display: flex; padding: 0 6px 6px 0; }
.lk-plate { position: relative; flex: 1; max-height: 720px; display: flex; flex-direction: column; background: var(--sheet); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shade); overflow: hidden; touch-action: none; }
.lk-cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 7px 14px; background: var(--c); border-bottom: 2px solid var(--ink); }
.lk-say { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.lk-msg { font: 700 17px/1.25 var(--head); }
.lk-sub { font: 500 14px/1.35 var(--head); color: var(--ink2); }
.lk-chip { font: 700 15px/1 var(--head); background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; padding: 5px 8px; white-space: nowrap; }
.lk-chip.count { background: var(--honey); font-size: 22px; padding: 4px 11px; }
.lk-lane { position: relative; flex: 1; min-height: 0; border-bottom: 2px solid var(--ink); }
.lk-bare .lk-lane { border-bottom: 0; } /* the keys belong to the page (a shared keyboard right under the plate) */
.lk-lane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.lk-keys { position: relative; height: clamp(104px, 44%, 260px); display: flex; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lk-w { flex: 1; position: relative; background: var(--sheet); border-right: 2px solid var(--ink); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; padding-bottom: 10px; cursor: pointer; }
.lk-w:last-child { border-right: 0; }
.lk-n { font: 700 clamp(14px, 2.2vw, 20px)/1 var(--head); }
/* The laptop letter on each key, only where there is a laptop keyboard to press */
.lk-k { display: none; font: 600 11px/1 var(--head); color: var(--ink2); border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 4px; min-width: 18px; text-align: center; }
@media (hover: hover) and (pointer: fine) { .lk-k { display: inline-block; } }
.lk-b { position: absolute; top: 0; height: 60%; z-index: 2; background: var(--ink); border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 7px 7px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; cursor: pointer; }
.lk-b .lk-k { color: var(--sheet); opacity: .8; }
.lk-keys .target { background: var(--honey); }
.lk-w.on { background: #E4DBC8; box-shadow: inset 0 5px 0 rgba(29, 26, 21, .12); }
.lk-b.on { background: #4A443A; }
.lk-keys .target.on { background: #E9B93F; }
.lk-keys .ok { background: var(--mint); }
.lk-keys .no { background: var(--peach); }
/* The teacher shows a key again (wys-weer): it blinks between honey and the paper a few times */
.lk-keys .wys { animation: lk-wys .32s steps(1, end) 4; }
@keyframes lk-wys { 0% { background: var(--sheet); } 50% { background: var(--honey); } }
@media (prefers-reduced-motion: reduce) { .lk-keys .wys { animation: none; } }

/* The result card, over the whole plate once the song is over (scoped: the song library has cards too) */
.lk-plate .lk-card { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92%, 420px); max-height: calc(100% - 16px); overflow: auto;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--shade); padding: 18px 20px; text-align: center; touch-action: manipulation; }
.lk-plate .lk-card .lk-big { font: 800 56px/1 var(--head); letter-spacing: -0.03em; margin: 0 0 4px; color: var(--ink); }
.lk-plate .lk-card h2 { font: 800 26px/1.1 var(--head); letter-spacing: -0.015em; margin: 0 0 6px; }
.lk-plate .lk-card p { margin: 4px 0; font-size: 15px; color: var(--ink2); }
.lk-plate .lk-card .lk-beste { margin-top: 2px; font: 600 13px/1.3 var(--head); } /* the best so far, under the tally */
.lk-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* Landscape phones: every pixel of height goes to the piano */
@media (max-height: 520px) {
  .lk-app { gap: 8px; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .lk-head { gap: 8px 12px; }
  .lk-song { display: none; }
  .lk-head .mark { font-size: 18px; }
  /* The crumbs go; the last one stays as a compact link back (to the path, or to the library) beside the logo */
  .lk-head .top { column-gap: 8px; }
  .lk-head .top nav a:not(:last-child) { display: none; }
  .lk-head .top nav a:last-child { display: inline-flex; align-items: center; gap: 4px; font: 600 14px/1 var(--head); color: var(--ink); text-decoration: none;
    background: var(--sheet); border: 2px solid var(--ink); border-radius: 8px; padding: 5px 8px; box-shadow: 2px 2px 0 var(--shade); }
  .lk-head .top nav a:last-child::before { content: "←"; content: "←" / ""; font-weight: 700; } /* older Safari: the first */
  .lk-head .top nav a:last-child:active { transform: translate(2px, 2px); box-shadow: none; }
  .lk-ctl, .lk-controls { gap: 8px; }
  .lk-seg button { padding: 7px 10px; font-size: 14px; }
  .lk-ctl .tog, .lk-acts .tog { padding: 7px 10px; font-size: 14px; }
  .lk-start { padding: 7px 14px; font-size: 15px; }
  .lk-cap { min-height: 34px; padding: 4px 10px; }
  .lk-msg { font-size: 15px; }
  .lk-sub { display: none; }
  .lk-chip { font-size: 13px; padding: 3px 6px; }
  .lk-chip.count { font-size: 17px; padding: 2px 9px; }
  .lk-plate .lk-card { padding: 10px 14px; }
  .lk-plate .lk-card .lk-big { font-size: 38px; }
  .lk-plate .lk-card h2 { font-size: 19px; }
  .lk-plate .lk-card p { font-size: 13px; margin: 2px 0; }
  .lk-plate .lk-card .lk-beste { display: none; } /* the compact card keeps its size */
  .lk-row { margin-top: 8px; }
  .lk-btn { padding: 8px 12px; font-size: 14px; }
}
/* Small landscape phones (667 wide): tighter still, so brand and buttons share one row */
@media (max-height: 520px) and (max-width: 760px) {
  .lk-head, .lk-ctl, .lk-controls { gap: 6px; }
  .lk-head .mark { font-size: 16px; }
  .lk-seg button, .lk-ctl .tog, .lk-acts .tog { padding: 6px 8px; font-size: 13px; }
  .lk-start { padding: 6px 11px; font-size: 14px; }
  .lk-seg, .lk-ctl .tog, .lk-acts .tog, .lk-start { box-shadow: 2px 2px 0 var(--shade); }
  /* A song step's head row is full here (mode, speed, start, Volgende): the way back is the arrow alone (its name,
     the crumb's label, stays for screen readers), and Volgende is as compact as the teacher's buttons. */
  .lk-lied .lk-head .top nav a:last-child { font-size: 0; gap: 0; padding: 4px 7px; }
  .lk-lied .lk-head .top nav a:last-child::before { font-size: 15px; }
  .lk-lied .lk-ctl .lk-btn { padding: 6px 10px; font-size: 13px; }
  .lk-lied .lk-head .top { column-gap: 6px; }
  .lk-lied .lk-head .mark { font-size: 15px; }
  .lk-lied .lk-seg button { padding: 6px 7px; }
}
.lk-nw { white-space: nowrap; }

/* Portrait phones: ask for landscape */
.lk-turn { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 900px) {
  .lk-turn { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--page); flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
  .lk-turn h2 { font: 800 30px/1.1 var(--head); letter-spacing: -0.02em; margin: 14px 0 0; }
  .lk-turn p { margin: 0; max-width: 28ch; color: var(--page-ink2); }
  html:has(.lk-turn) { overflow: hidden; }
}
.lk-turn .lk-phone { transform-origin: 32px 32px; animation: lk-turn 2.6s ease-in-out infinite; }
@keyframes lk-turn { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .lk-turn .lk-phone { animation: none; transform: rotate(-90deg); } }

/* Course list, doors and song library: ordinary pages (the player pages above are screen-high apps) */
.lk-page { padding-block: clamp(16px, 4vw, 40px) clamp(32px, 6vw, 64px); }
.lk-h1 { font: 800 clamp(38px, 7vw, 80px)/0.98 var(--head); letter-spacing: -0.03em; margin: 0 0 12px; text-wrap: balance; }
.lk-lead { font-size: clamp(18px, 2vw, 22px); max-width: 44ch; margin: 0 0 28px; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; margin-top: 24px; }
.lk-door { display: flex; flex-direction: column; gap: 8px; background: var(--c); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shade); padding: 20px 22px 24px; min-width: 0; transition: transform .12s, box-shadow .12s; }
.lk-door:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shade); }
.lk-door:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--shade); }
.lk-door b { font: 800 clamp(26px, 3vw, 32px)/1.05 var(--head); letter-spacing: -0.015em; }
.lk-door p { margin: 0; font-size: 17px; }
.lk-door .lk-jy { align-self: flex-start; margin-top: 6px; font: 700 15px/1.2 var(--head); background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; padding: 5px 9px; box-shadow: 2px 2px 0 var(--ink); }
.lk-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.lk-tabs button { font: 700 16px/1 var(--head); color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 8px; padding: 10px 16px; box-shadow: 3px 3px 0 var(--shade); cursor: pointer; }
.lk-tabs button[aria-selected="true"] { background: var(--lilac); }
.lk-tabs button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.lk-songs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.lk-songs .lk-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--shade); padding: 14px 16px 16px; min-width: 0; position: relative; }
.lk-songs .lk-card:hover { background: color-mix(in srgb, var(--lilac) 35%, var(--sheet)); }
.lk-songs .lk-card a { color: inherit; text-decoration: none; font: 700 19px/1.2 var(--head); }
.lk-songs .lk-card a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; } /* the whole card is the link */
.lk-songs .lk-card p { margin: 0; font-size: 15px; color: var(--ink2); overflow-wrap: anywhere; }
.lk-best { margin-top: auto; font: 700 14px/1 var(--head); border: 2px solid var(--ink); border-radius: 6px; padding: 5px 8px; background: var(--sheet); }
.lk-songs .lk-card.played .lk-best { background: var(--mint); }
.lk-soon { font: 700 20px/1.3 var(--head); border: 2px dashed var(--ink); border-radius: 12px; padding: 28px; margin: 0; background: color-mix(in srgb, var(--lilac) 30%, var(--sheet)); }

/* Lesson pages: the same screen-high plate, with the teacher (face, speech bubble, buttons) under the caption strip,
   then the exercise, then the page's one keyboard (exercises and the maat player borrow it). */
.lk-lesplaat .lk-cap h1 { margin: 0; }
.lk-teach { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-bottom: 2px solid var(--ink); background: color-mix(in srgb, var(--c) 24%, var(--sheet)); }
.lk-teacher { display: flex; align-items: center; gap: 16px; flex: 1 1 360px; min-width: 0; }
.lk-face { flex: none; display: block; width: 56px; height: 56px; }
.lk-face svg { display: block; width: 100%; height: 100%; }
/* The face is also the Verander button (on a landscape phone the only one, with the buttons' border and shadow) */
.lk-face-knop { flex: none; display: block; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.lk-face-knop:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* The sound switch: its words on a laptop, a speaker on a landscape phone (waves while on, struck through while off) */
.lk-klank .lk-luid { display: none; }
.lk-klank[aria-pressed="true"] .lk-streep, .lk-klank[aria-pressed="false"] .lk-golf { display: none; }
.lk-streep-gat { stroke: var(--sheet); }
.lk-bubble { position: relative; flex: 1; min-width: 0; background: var(--sheet); border: 2px solid var(--ink); border-radius: 10px; padding: 9px 14px; box-shadow: 3px 3px 0 var(--shade); }
.lk-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 12px; height: 12px; background: var(--sheet); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-50%) rotate(45deg); }
.lk-bubble p { margin: 0; min-height: 1.35em; font: 600 17px/1.35 var(--head); text-wrap: pretty; }
.lk-bubble[role="button"] { cursor: pointer; transition: transform .12s, box-shadow .12s; } /* a tap plays the talk again */
.lk-bubble[role="button"]:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shade); }
.lk-bubble[role="button"]:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.lk-bubble:focus-visible { outline-color: var(--ink); }
.lk-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
a.lk-btn { display: inline-block; text-decoration: none; }
.lk-acts .lk-btn:focus-visible, .lk-ctl .tog:focus-visible, .lk-acts .tog:focus-visible, .lk-ctl .lk-btn:focus-visible { outline-color: var(--ink); }

.lk-oef { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px; overflow: hidden; border-bottom: 2px solid var(--ink); }
.lk-oef.lk-oef-speler { padding: 0; align-items: stretch; justify-content: stretch; }
.lk-oef > .lk-plate { border: 0; border-radius: 0; box-shadow: none; max-height: none; }
.lk-oef > .lk-plate .lk-cap { background: color-mix(in srgb, var(--c) 45%, var(--sheet)); border-bottom-style: dashed; }
.lk-prompt { margin: 0; display: inline-flex; align-items: center; gap: 12px; font: 800 clamp(26px, 3.4vw, 40px)/1.1 var(--head); letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.lk-prompt:has(+ .lk-balk) { font-size: clamp(17px, 1.8vw, 21px); letter-spacing: 0; } /* lees: the staff is the big thing */
.lk-vinger { display: inline-grid; place-items: center; min-width: 1.2em; height: 1.2em; padding: 0 0.2em; font: 700 0.6em/1 var(--head); font-style: normal; color: var(--sheet); background: var(--ink); border-radius: 5px; }
.lk-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lk-tiles li { display: inline-flex; align-items: center; gap: 7px; min-width: 56px; height: 58px; padding: 0 12px; justify-content: center; background: var(--c); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--shade); font: 800 26px/1 var(--head); transition: background .12s; }
.lk-tiles li .lk-vinger { font-size: 15px; }
.lk-tiles li.now { background: var(--honey); }
.lk-tiles li.ok { background: var(--mint); }
.lk-oef-chip { position: absolute; top: 12px; right: 14px; }
.lk-balk { flex: 0 1 auto; min-height: 0; width: auto; height: 100%; max-height: 190px; max-width: 100%; }
.lk-klaar { padding: 8px 18px; background: var(--mint); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--shade); }
.lk-pct { margin: 0; font: 800 clamp(30px, 4vw, 48px)/1 var(--head); letter-spacing: -0.03em; }
.lk-lesplaat .lk-keys { flex: none; }

/* The teacher picker: over the page, below the turn screen (an upright phone turns first). */
.lk-kies { position: fixed; inset: 0; z-index: 40; display: flex; padding: max(16px, env(safe-area-inset-top)) 16px; background: rgba(29, 26, 21, .45); overflow: auto; }
.lk-kies-doos { margin: auto; width: min(100%, 520px); display: grid; gap: 14px; background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shade); padding: 22px 24px 24px; }
.lk-kies h2 { margin: 0; font: 800 clamp(26px, 4vw, 32px)/1.1 var(--head); letter-spacing: -0.02em; }
.lk-kies p { margin: 0; color: var(--ink2); font-size: 17px; }
.lk-kies fieldset { border: 0; margin: 4px 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lk-kies-kaart { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.lk-kies-kaart label { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px 14px; background: var(--sheet); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--shade); cursor: pointer; font: 800 22px/1 var(--head); transition: transform .12s, box-shadow .12s; }
.lk-kies-kaart label:has(input:checked) { background: var(--lilac); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shade); }
.lk-kies-kaart label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.lk-kies-kaart input { position: absolute; opacity: 0; pointer-events: none; }
.lk-kies-kaart .lk-face { width: 76px; height: 76px; }
.lk-kies [data-gaan] { justify-self: end; }

/* Landscape phones: like the song pages, the title goes out of sight (the head row stays; screen readers keep the
   heading) so the exercise and the piano get the height; the keys keep 41% of the screen. */
@media (max-height: 520px) {
  .lk-lesplaat > .lk-cap { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lk-teach { padding: 6px 10px; gap: 6px 10px; }
  .lk-teacher { flex-basis: 260px; gap: 12px; }
  .lk-face { width: 36px; height: 36px; }
  .lk-bubble { padding: 5px 10px; box-shadow: 2px 2px 0 var(--shade); }
  .lk-bubble::before { left: -7px; width: 10px; height: 10px; }
  .lk-bubble p { font-size: 14px; line-height: 1.3; }
  .lk-acts { gap: 8px; }
  .lk-acts .lk-btn { padding: 7px 12px; font-size: 14px; box-shadow: 2px 2px 0 var(--shade); }
  .lk-lesplaat .lk-keys { height: max(104px, 41vh); }
  .lk-oef > .lk-plate .lk-cap { min-height: 28px; padding: 2px 10px; }
  .lk-oef { gap: 6px; padding: 6px 12px; }
  .lk-prompt { font-size: 22px; gap: 8px; }
  .lk-tiles { gap: 8px; }
  .lk-tiles li { min-width: 40px; height: 38px; padding: 0 9px; font-size: 19px; box-shadow: 2px 2px 0 var(--shade); }
  .lk-tiles li .lk-vinger { font-size: 12px; }
  .lk-oef-chip { top: 6px; right: 10px; }
  .lk-oef .lk-balk ~ .lk-tiles { display: none; } /* the staff gets the room */
  .lk-oef:has(> .lk-balk) { flex-direction: row; gap: 18px; } /* lees: what to do beside the staff, not above it */
  .lk-prompt:has(+ .lk-balk) { flex: 0 1 34%; font-size: 15px; line-height: 1.25; text-align: left; justify-content: flex-start; }
  /* The maat score card fits the short lane: score, heading and tally only (Ek probeer, just above, tries again). It
     stands on the lane's foot rather than the plate's middle, so it never covers the caption strip above the lane. */
  .lk-oef .lk-plate .lk-card { top: auto; bottom: 6px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 10px; width: min(94%, 460px); padding: 4px 12px 5px; box-shadow: 3px 3px 0 var(--shade); }
  .lk-oef .lk-plate .lk-card .lk-big { font-size: 24px; margin: 0; }
  .lk-oef .lk-plate .lk-card h2 { font-size: 16px; margin: 0; }
  .lk-oef .lk-plate .lk-card p:not(.lk-big) { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.3; }
  .lk-oef .lk-plate .lk-card .lk-row { display: none; }
  .lk-klaar { padding: 4px 12px; box-shadow: 3px 3px 0 var(--shade); }
  .lk-pct { font-size: 26px; }
  .lk-kies-doos { padding: 14px 18px 16px; gap: 10px; }
  .lk-kies h2 { font-size: 22px; }
  .lk-kies p { font-size: 15px; }
  .lk-kies-kaart label { flex-direction: row; justify-content: center; padding: 8px 10px; font-size: 19px; }
  .lk-kies-kaart .lk-face { width: 46px; height: 46px; }
  /* The teacher row stays one short line of buttons: the face is the Verander button, the sound switch a speaker. */
  .lk-les [data-verander] { display: none; }
  .lk-face-knop { border: 2px solid var(--ink); background: var(--sheet); box-shadow: 2px 2px 0 var(--shade); }
  .lk-face-knop:active { transform: translate(2px, 2px); box-shadow: none; }
  .lk-face-knop .lk-face { width: 32px; height: 32px; }
  .lk-les .lk-klank { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; }
  .lk-les .lk-klank .lk-luid { display: block; width: 17px; height: 17px; }
  .lk-les .lk-klank .lk-klank-t { display: none; }
}
@media (max-height: 520px) and (max-width: 760px) {
  .lk-teacher { flex-basis: 220px; }
  .lk-acts .lk-btn { padding: 6px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .lk-tiles li, .lk-kies-kaart label, .lk-bubble[role="button"] { transition: none; } }

/* The lesson path (mockup 2): one row per step. Done: a mint number and a tick, or a song's best score. Now: honey,
   lifted. Locked: dimmed, not a link. Rows wrap on phones; nothing scrolls sideways. */
.lk-padbo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 0 0 22px; max-width: 760px; }
.lk-wie { display: inline-flex; align-items: center; gap: 12px; margin: 0 auto 0 0; font: 700 18px/1.25 var(--head); min-width: 0; }
.lk-wie .lk-face { width: 46px; height: 46px; }
.lk-padbo .tog { font-size: 15px; padding: 9px 12px; box-shadow: 3px 3px 0 var(--shade); }
.lk-padbo .tog:focus-visible, .lk-vra .lk-btn:focus-visible, .lk-pad a:focus-visible { outline-color: var(--ink); }
.lk-vra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; max-width: 760px; margin: 0 0 22px; padding: 14px 18px; background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--shade); }
.lk-vra p { flex: 1 1 260px; margin: 0; font: 700 17px/1.35 var(--head); }
.lk-vra .lk-row { margin: 0; justify-content: flex-start; }
.lk-pad { --c: var(--lilac); list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.lk-stap a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 56px; padding: 10px 14px; background: var(--sheet); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); border-radius: 10px; transition: transform .12s, box-shadow .12s; }
.lk-stap a[href]:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shade); }
.lk-stap a[href]:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.lk-nr { flex: none; width: 32px; height: 32px; display: grid; place-items: center; background: var(--sheet); border: 2px solid var(--ink); border-radius: 8px; font: 800 15px/1 var(--head); }
.lk-stap .lk-tag { font-size: 12px; padding: 3px 6px; }
.lk-stap-t { flex: 1 1 0; min-width: 0; font: 700 18px/1.25 var(--head); overflow-wrap: anywhere; } /* the title wraps, not the tick, lock or badge */
.lk-r { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.lk-r svg { display: none; width: 24px; height: 24px; }
.lk-badge { font: 700 14px/1 var(--head); background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; padding: 5px 8px; white-space: nowrap; }
.lk-stap.done .lk-nr { background: var(--mint); }
.lk-stap.done:not(.telling) .lk-ok { display: block; }
.lk-stap.telling .lk-badge { background: var(--mint); }
.lk-stap.now a { background: var(--honey); box-shadow: 4px 4px 0 var(--shade); }
.lk-stap.lock { opacity: .5; }
.lk-stap.lock .lk-slot-ico { display: block; }
@media (prefers-reduced-motion: reduce) { .lk-stap a { transition: none; } }

/* A locked step: the reason and the way to the current step, where the lesson would be. */
.lk-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.lk-slot .lk-slot-ico { width: 56px; height: 56px; }
.lk-slot p { margin: 0; max-width: 32ch; font: 700 clamp(19px, 2.4vw, 26px)/1.3 var(--head); text-wrap: balance; }
.lk-gesluit .lk-ctl, .lk-gesluit .lk-teach, .lk-gesluit [data-oef], .lk-gesluit [data-klawers] { display: none; }
/* Until slot.js has decided: no teacher and no controls to tap (they keep their space, so nothing jumps). */
.lk-laai .lk-teach, .lk-laai .lk-ctl { visibility: hidden; }
/* A locked step has no piano, so an upright phone sees the lock box, not the turn screen. */
.lk-gesluit ~ .lk-turn { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 900px) { html:has(.lk-gesluit) { overflow: auto; } }
.lk-gesluit .lk-lesplaat > .lk-cap { position: static; width: auto; height: auto; min-height: 34px; padding: 7px 14px; border-bottom: 2px solid var(--ink); overflow: visible; clip-path: none; white-space: normal; }

/* A song step: the player's mode, speed and start buttons in the head row, as on a song page, then Volgende. The
   result card sits on the right, over keys Vlak 1 never uses (C5 up), so the bar the teacher marks stays in view. */
.lk-spelerctl { display: contents; }
.lk-oef-lied .lk-plate .lk-card { left: auto; right: 14px; transform: translateY(-50%); }
@media (max-height: 520px) {
  .lk-oef-lied .lk-plate .lk-card { right: 10px; width: min(44%, 360px); transform: none; }
  /* While a song plays on a landscape phone the teacher is quiet (apart from wys-weer): one line of bubble and no
     switches, so the falling notes get the height. */
  html.lk-speel .lk-lied .lk-acts .tog { display: none; }
  html.lk-speel .lk-lied .lk-bubble p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
}
