/* BrickSort app (T006): what the app adds to components.css. Only tokens (rol-tokens), no inline styles. */

#app { min-height: 100dvh; }
[hidden] { display: none !important; }
/* Headings get the focus after a route change (001-navigatie) only for screen readers; no ring on them. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
a { color: var(--color-primary); }

/* ---------- App-balk ---------- */
.app-bar__right { margin-left: auto; padding-right: var(--space-2); }
.app-bar--root .app-bar__title { padding-left: var(--space-2); }
.app-bar .app-bar__titles { min-width: 0; }

/* ---------- States ---------- */
.state__actions { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; max-width: 22rem; }
.state__icon { color: var(--color-text-muted); }
.card.state { padding: var(--space-6) var(--space-4); }

/* ---------- Skeletten in de vorm van de inhoud ---------- */
.skeleton--row { height: 64px; }
.skeleton--list { height: 56px; border-radius: 0; }
.skeleton--card { height: 88px; }
.skeleton--recent { height: 48px; margin: var(--space-1) 0; }
.skeleton--tile { height: 160px; }
.skeleton--swatch { height: 104px; }
.skeleton--summary { height: 56px; }
.skeleton--progress { height: 140px; }
.skeleton--setcard { height: 240px; }
.skeleton--title { height: 36px; width: 70%; }
.skeleton--field { height: 76px; }

/* ---------- Plaatjes en plaatsvervangers ---------- */
.thumb--placeholder, .part__img--placeholder { position: relative; overflow: hidden; }
.recent__img.thumb--placeholder { padding: 0; border-width: 1px; }
.img-pending { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.swatch-svg--trans .checker, .swatch-svg--trans rect:first-child { fill: var(--color-surface-sunken); }
.swatch-svg { flex: none; }

/* ---------- Zoekveld: alleen onze eigen wisknop ---------- */
.search .input::-webkit-search-cancel-button, .search .input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

/* ---------- Zoeker ---------- */
.viewfinder__overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: var(--space-4); }
.viewfinder--covered .viewfinder__overlay { display: flex; background: rgb(12 16 18 / 0.72); }
.viewfinder--covered .viewfinder__hint, .viewfinder--covered .viewfinder__frame { visibility: hidden; }
.viewfinder--off .viewfinder__feed { filter: blur(6px); }
.viewfinder__msg { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: #FFFFFF; text-align: center; max-width: 20rem; }
.viewfinder__overlay .state { padding: var(--space-4); width: 100%; }

/* ---------- Inloggen en enroll ---------- */
.login { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-8); }
.login__logo img { width: 160px; height: auto; }
.login__title { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-black); line-height: var(--leading-tight); }
.login__text { margin: 0; color: var(--color-text-muted); }
.login__msg:empty { display: none; }
details summary { min-height: var(--tap-min); display: flex; align-items: center; cursor: pointer; color: var(--color-primary); font-weight: var(--weight-medium); }
details p { margin: 0 0 var(--space-2); color: var(--color-text-muted); }

/* ---------- Kaarten en lijsten ---------- */
.card--pad { padding: var(--space-4); }
.list > li:not(:last-child) > a.list-row { border-bottom: 1px solid var(--color-border); }
.list-row__main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.list-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.list-row > svg { color: var(--color-text-muted); }
.summary { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.copy-list a.copy-card { color: inherit; text-decoration: none; }
.group-title { display: flex; align-items: center; gap: var(--space-2); }
.copy-progress { padding: var(--space-4); }
.copy-progress__top { display: flex; align-items: center; gap: var(--space-4); }
.copy-progress--done { background: var(--color-success-soft); color: var(--color-on-success-soft); }
.copy-focus .row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- Set toevoegen ---------- */
.setcard { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.setcard__img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--radius-md); background: var(--color-surface-sunken); }
.setcard__img--placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); border: 2px dashed var(--color-border-strong); color: var(--color-text-muted); }
.setcard__name { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-black); }
/* T011: several sets at once (eis 7a): rows with a small picture. */
.setrow__img { flex: none; width: 64px; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--radius-sm); background: var(--color-surface-sunken); }
.setrow__img--placeholder { display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); }

/* ---------- Kleur kiezen ---------- */
.swatch--more { border-style: dashed; }
.swatch__plus { display: flex; align-items: center; justify-content: center; color: var(--color-primary); }

/* ---------- Dialogen: keuzes en selectievakje ---------- */
.dialog .stack + .dialog__actions, .dialog fieldset + * { margin-top: var(--space-4); }
.checkbox input { width: 22px; height: 22px; accent-color: var(--color-primary); flex: none; }
/* T010: .choices / .choice are the D005 ones in components.css (§5.40). */
.checkbox { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--tap-min); font-weight: var(--weight-medium); }
.dialog__msg:empty { display: none; }
.dialog__msg { margin-bottom: var(--space-3); }

/* ---------- Over ---------- */
.about__intro .login__logo img { width: 120px; }
.about__list { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- Toast zonder dock ---------- */
.action-bar { position: sticky; }

/* =====================================================================
 * T006d: de boom, versie 2 (D004, design-system §5.24, §5.26-§5.28, §5.30, §5.32-§5.36; referentie
 * docs/design/prototype/boom/boom.css). Kleuren uit de catalogus via <rect fill> of style.setProperty (CSSOM),
 * nooit een style-attribuut.
 * ===================================================================== */

/* ---------- Kruimelpad .crumbs (§5.24), sticky onder de app-balk ---------- */
.crumbs { position: sticky; top: 56px; z-index: var(--z-sticky); background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.crumbs__list {
  display: flex; align-items: center; gap: var(--space-1);
  min-height: 52px; margin: 0; padding: 0 var(--space-3) var(--space-2);
  list-style: none; overflow-x: auto; scrollbar-width: none;
}
.crumbs__list::-webkit-scrollbar { display: none; }
.crumbs__item { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.crumbs__item + .crumbs__item::before { content: "›"; color: var(--color-text-muted); font-weight: var(--weight-bold); padding-inline: 2px; }
.crumb {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap-min); padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text); text-decoration: none;
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-bold); white-space: nowrap; cursor: pointer;
}
button.crumb:hover { background: var(--color-surface-sunken); }
.crumb__text { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.crumb--auto { border-style: dashed; background: transparent; color: var(--color-text-muted); font-weight: var(--weight-medium); cursor: default; }
.crumb--now { border: 0; border-radius: 0; background: transparent; padding-inline: var(--space-1); box-shadow: inset 0 -3px 0 var(--color-primary); cursor: default; }
.crumb--future { border: 0; background: transparent; color: var(--color-text-muted); font-weight: var(--weight-medium); padding-inline: var(--space-1); cursor: default; }
.crumbs__item--future::before { opacity: 0.6; }
.crumb .tswatch { width: 22px; height: 22px; margin-left: calc(-1 * var(--space-2)); }

/* ---------- Tekeningen: staal (§5.26), vormicoon (§5.27), tekening (§5.28) ---------- */
.tswatch { width: 40px; height: 40px; flex: none; }
.tswatch .ring { fill: none; stroke: var(--color-swatch-ring); stroke-width: 2; }
.tswatch .checker-sq { fill: var(--color-border-strong); }
.ico { width: 40px; height: 40px; color: var(--color-text); flex: none; }
.ico .b { fill: var(--swatch, transparent); }
.ico.is-trans .b { fill-opacity: 0.55; }
.ico .h { fill: var(--color-surface); }
.shape .body { stroke: var(--color-swatch-ring); stroke-width: 1.5; }
.shape .stud-l { fill: rgb(255 255 255 / 0.28); }
.shape .stud-d { fill: rgb(0 0 0 / 0.22); }
/* Vóór de kleurlaag is de kleur nog onbekend: de tekening is neutraal. */
.shape--neutral .body { fill: var(--color-surface-sunken); stroke: var(--color-border-strong); }
.shape--neutral .stud-l, .shape--neutral .stud-d { fill: var(--color-border-strong); }
.piece-img { width: 100%; height: 100%; object-fit: contain; }
.thumb { display: grid; place-items: center; position: relative; overflow: hidden; }
.thumb .shape, .thumb .ico { width: 100%; height: 100%; }

/* ---------- Opbouw: contextvak boven, raster onderaan (telefoon) ---------- */
#app { overflow-x: clip; }
.screen:has(.stage) .screen__body { padding: 0; gap: 0; }
.stage {
  flex: 1;
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  touch-action: pan-y;              /* horizontaal vegen is voor "terug" */
  transform: translateX(var(--drag, 0px));
  transition: transform var(--duration-fast) var(--ease-out);
}
.stage--dragging { transition: none; }
.context { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.context__body { display: flex; flex-direction: column; gap: var(--space-2); }
.context__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-black); line-height: var(--leading-tight); }
.context__hint, .context__page { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-tight); }
.context__page strong { color: var(--color-text); }
.context__note { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-success-soft); color: var(--color-on-success-soft); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.context .element { grid-template-columns: var(--thumb-size) minmax(0, 1fr); }
.context .state { padding: var(--space-4) 0; }
.padwrap { flex: none; }
.legend { display: none; }

/* ---------- Het raster .pad (§5.32) ---------- */
.pad {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--cell-h, 112px);
  gap: var(--space-2);
}
.pad__slot { min-width: 0; }
.pad--in .cell { animation: cell-in var(--duration-fast) var(--ease-out); }
@keyframes cell-in { from { opacity: 0.35; } to { opacity: 1; } }

/* ---------- Het vak .cell (§5.33) ---------- */
.cell {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: var(--space-2) var(--space-1);
  background: var(--color-surface);
  border: 2px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  font: inherit; font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: var(--leading-tight);
  color: var(--color-text); text-align: center; cursor: pointer; overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.cell.skeleton { border: 0; box-shadow: none; cursor: default; }
button.cell:hover { border-color: var(--color-border-strong); }
button.cell:active { transform: translateY(2px); box-shadow: none; }
.cell[aria-disabled="true"] { background: var(--color-surface-sunken); box-shadow: none; color: var(--color-text-muted); cursor: default; }
.cell[aria-disabled="true"] .ico, .cell[aria-disabled="true"] .cell__img { opacity: 0.45; }
.cell__key {
  position: absolute; top: 5px; left: 5px;
  display: none; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  background: var(--color-bg); box-shadow: 0 1px 0 var(--color-border-strong);
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--weight-bold); line-height: 18px; color: var(--color-text-muted);
}
.keys .cell__key { display: block; }
.cell__img { display: grid; place-items: center; height: 40px; min-height: 24px; width: 100%; flex: 0 1 40px; position: relative; }
.cell__img .shape { width: 100%; height: 36px; }
.cell__img .piece-img { height: 40px; width: auto; max-width: 100%; }
.cell__img .ico { width: 40px; height: 40px; }
.cell__head, .cell__name, .cell__count, .cell__meta, .cell__progress { flex: none; }
.cell__name {
  max-width: 100%; overflow-wrap: anywhere; hyphens: manual;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cell__count, .cell__meta { font-weight: var(--weight-regular); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.cell__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-2); font-size: 11px; }
.cell__head { font-size: 11px; font-weight: var(--weight-black); text-transform: uppercase; letter-spacing: 0.06em; }

/* Leeg vak: alleen de rand, zodat de vorm van het raster blijft. Een toets erop laat het knipperen. */
.cell--empty { background: transparent; border: 2px dashed var(--color-border); box-shadow: none; cursor: default; }
.cell--empty .cell__key { opacity: 0.6; }
.cell.is-flash { animation: flash var(--duration-slow) var(--ease-out); }
@keyframes flash { 0%, 60% { border-color: var(--color-focus); background: var(--color-surface-sunken); } 100% { } }

/* Het midden (S): "Dezelfde". Altijd in Kanaal-zacht, zodat je het zonder lezen vindt. */
.cell--mid { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-on-primary-soft); }
.cell--mid .cell__count { color: inherit; font-weight: var(--weight-medium); }
.cell--mid .cell__head { color: var(--color-primary); }
.cell--mid.cell--info { border-style: dashed; box-shadow: none; cursor: default; }
.cell--mid .cell__key { border-color: var(--color-primary); color: var(--color-primary); }
:root[data-theme="dark"] .cell--mid .cell__head { color: var(--color-on-primary-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cell--mid .cell__head { color: var(--color-on-primary-soft); } }

/* Soorten van vakken */
.cell--group .cell__name { font-size: var(--text-sm); }
.cell--part { justify-content: flex-start; padding-top: var(--space-3); }
.cell--part .cell__img { flex-basis: 32px; height: 32px; }
.cell--part .cell__img .piece-img { height: 32px; }
.cell--part .cell__name { -webkit-line-clamp: 3; font-size: 11px; }
.cell--size .cell__name { font-size: var(--text-md); font-weight: var(--weight-black); }
.cell--swatch .tswatch { width: 44px; height: 44px; }
.cell--none { background: var(--color-surface-sunken); box-shadow: none; }
.cell--more { border-style: dashed; border-color: var(--color-border-strong); box-shadow: none; color: var(--color-primary); }
.cell--more .cell__count { color: var(--color-text-muted); }
.cell--set { justify-content: center; gap: 3px; padding-inline: var(--space-2); }
.cell--set .cell__name { font-size: var(--text-sm); }
.cell__progress { display: flex; align-items: center; gap: var(--space-1); width: 100%; font-size: 11px; font-weight: var(--weight-regular); }

/* ---------- De tweede weg .ways (§5.34): foto, zoeken, "Niet gevonden?" ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.way {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-height: var(--tap-min); padding: 0 var(--space-2);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-bold); white-space: nowrap; cursor: pointer;
}
.way:hover { background: var(--color-surface-sunken); }
.way[aria-expanded="true"] { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-on-primary-soft); }
.way__key {
  display: none; margin-left: var(--space-1); padding: 0 4px; min-width: 18px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--color-text-muted);
}
.keys .way__key { display: inline-block; }

/* ---------- Net geplaatst (in het contextvak, in plaats van een toast) ---------- */
.placed {
  display: grid; grid-template-columns: var(--thumb-size) minmax(0, 1fr); grid-template-areas: "thumb text" "thumb undo";
  align-items: center; gap: 0 var(--space-3); padding: var(--space-3);
  border-left: 4px solid var(--color-success);
}
.placed .thumb { grid-area: thumb; }
.placed__text { grid-area: text; min-width: 0; }
.placed__title { margin: 0; font-weight: var(--weight-black); font-size: var(--text-md); }
.placed__sub { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-tight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.placed__undo { grid-area: undo; justify-self: start; margin-left: calc(-1 * var(--space-3)); }

/* ---------- Uitweg in het contextvak (§5.30) ---------- */
.uitweg__panel { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); }
.uitweg__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.uitweg__panel p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.uitweg__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.seealso { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.quick__btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap-min); padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-bold); cursor: pointer;
}

/* ---------- Toetsenlegenda (§5.36, alleen op de laptop) ---------- */
.legend__title { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.legend__pad { display: grid; grid-template-columns: repeat(3, 32px); gap: 4px; margin-bottom: var(--space-3); }
.legend kbd {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  background: var(--color-surface); box-shadow: 0 2px 0 var(--color-border-strong);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold);
}
.legend__pad kbd { width: 32px; height: 32px; }
.legend__pad .legend__mid { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-on-primary-soft); }
.legend__list { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm); }
.legend__list div { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: var(--space-2); }
.legend__list dt { display: flex; gap: 4px; }
.legend__list dd { margin: 0; color: var(--color-text-muted); }

/* ---------- Laptop (≥ 900 × 620): raster links, context en toetsen rechts ---------- */
@media (min-width: 900px) and (min-height: 620px) {
  .screen:has(.stage) { max-width: 1080px; }
  .screen:has(.stage) .app-bar { min-height: 64px; padding-inline: var(--space-6); }
  .screen:has(.stage) .crumbs { top: 64px; }
  .screen:has(.stage) .crumbs__list { padding-inline: var(--space-8); }
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "pad context" "pad legend";
    column-gap: var(--space-8); row-gap: var(--space-6);
    align-content: start;
    padding: var(--space-6) var(--space-8);
  }
  .padwrap { grid-area: pad; }
  .context { grid-area: context; justify-content: flex-start; }
  .legend { grid-area: legend; display: block; align-self: end; }
  .pad { --cell-h: clamp(112px, calc((100dvh - 336px) / 3), 160px); gap: var(--space-3); }
  .cell { font-size: var(--text-sm); gap: var(--space-1); }
  .cell__key { top: 8px; left: 8px; min-width: 24px; height: 24px; line-height: 22px; font-size: var(--text-xs); }
  .cell__img { height: 52px; flex-basis: 52px; }
  .cell__img .shape { height: 48px; }
  .cell__img .piece-img { height: 52px; }
  .cell .ico { width: 48px; height: 48px; }
  .cell--group .cell__name { font-size: var(--text-md); }
  .cell--part .cell__name { font-size: var(--text-xs); }
  .cell--size .cell__name { font-size: var(--text-lg); }
  .cell--swatch .tswatch { width: 52px; height: 52px; }
  .cell__head, .cell__meta, .cell__progress { font-size: var(--text-xs); }
  .ways { grid-template-columns: repeat(3, auto); justify-content: start; }
  .way { padding-inline: var(--space-4); }
  .screen:has(.stage) .dock { max-width: 480px; width: 100%; margin: 0 auto; border-inline: 1px solid var(--color-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stage { transform: none; transition: none; }
  .pad--in .cell, .cell.is-flash { animation: none; }
  .cell.is-flash { outline: var(--focus-width) solid var(--color-focus); }
}
.swatch-chip .tswatch { width: 18px; height: 18px; }

/* =====================================================================
 * T014: de setpagina (D007, screens/001-exemplaar.md, design-system §5.43-§5.45), overgenomen uit
 * docs/design/mockups/mockup.css (sectie D007). Geen nieuwe tokens.
 * ===================================================================== */
.skeleton--manage { height: 96px; }
.copy-progress__img { display: contents; }
.copy-progress .progress { flex: none; width: 100%; }

/* §5.43 Setbeheer: drie gelijke knoppen, elk met een eigen icoon, titel en een regel "wat er gebeurt" */
.manage__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.manage__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  min-height: 92px; padding: var(--space-3) var(--space-1) var(--space-2);
  border: 2px solid var(--color-border-strong); border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-edge-neutral);
  margin-bottom: var(--edge-height);
  font: inherit; text-align: center; cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.manage__btn:active { transform: translateY(calc(var(--edge-height) - 1px)); box-shadow: none; }
.manage__icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: var(--space-1); border-radius: var(--radius-pill); }
.manage__title { font-size: var(--text-sm); font-weight: var(--weight-bold); line-height: var(--leading-tight); }
.manage__meta { font-size: var(--text-xs); color: var(--color-text-muted); line-height: var(--leading-tight); }
.manage__btn--wissen .manage__icon { background: var(--color-warning-soft); color: var(--color-on-warning-soft); }
.manage__btn--compleet .manage__icon { background: var(--color-success-soft); color: var(--color-on-success-soft); }
.manage__btn--weg .manage__icon { background: var(--color-danger-soft); color: var(--color-danger); }
.manage__btn--weg .manage__title { color: var(--color-danger); }
.manage__btn[aria-disabled="true"] { background: var(--color-surface-sunken); border-color: var(--color-border); box-shadow: none; cursor: not-allowed; transform: none; }
.manage__btn[aria-disabled="true"] .manage__icon { background: transparent; color: var(--color-text-muted); }
.manage__btn[aria-disabled="true"] .manage__title { color: var(--color-text-muted); }

/* Filter en sortering */
.items { display: flex; flex-direction: column; gap: var(--space-3); }
.items .section-title { margin-bottom: 0; }
.items__groups { display: flex; flex-direction: column; gap: var(--space-2); }
.segmented__n { font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }
.sortline { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sortline__label { font-size: var(--text-sm); color: var(--color-text-muted); }
.segmented--small { padding: 2px; }
.segmented--small .segmented__item { min-height: 36px; padding-inline: var(--space-3); }
.group-title__n { margin-left: auto; font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.items__list { margin: 0; padding: 0; list-style: none; }
.more, .reserve-toggle { align-self: center; }

/* §5.44 Rij met teller `.item` + `.stepper` */
.item {
  display: grid; grid-template-columns: var(--thumb-size) minmax(0, 1fr) auto; grid-template-areas: "img text step" "hint hint hint";
  gap: 0 var(--space-3); align-items: center;
  padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border);
}
/* T016 (Paul): the image box is exactly the image column; the text starts after the gap, never under the image. */
.item__img { grid-area: img; display: block; width: var(--thumb-size); height: var(--thumb-size); }
.item__img > .thumb { width: 100%; height: 100%; }
.item__text { grid-area: text; min-width: 0; }
.item__name {
  margin: 0; font-size: var(--text-sm); font-weight: var(--weight-bold); line-height: var(--leading-tight); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item__meta { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); align-items: center; font-size: var(--text-xs); color: var(--color-text-muted); }
.item__meta .swatch-chip { font-weight: var(--weight-regular); color: var(--color-text-muted); }
.item__nog { font-weight: var(--weight-bold); color: var(--color-text); }
.item__nog--done { color: var(--color-on-success-soft); }
.item__hint {
  grid-area: hint; margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); background: var(--color-warning-soft); color: var(--color-on-warning-soft);
  font-size: var(--text-sm);
}
.item__hint[hidden] { display: none; }
.stepper {
  grid-area: step; display: grid; grid-template-columns: 44px minmax(3.5rem, auto) 44px; align-items: center;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); background: var(--color-surface);
}
.stepper__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-primary); cursor: pointer;
}
.stepper__btn:hover { background: var(--color-primary-soft); }
.stepper__btn:active { transform: scale(0.94); }
.stepper__btn[aria-disabled="true"] { color: var(--color-text-muted); opacity: 0.45; cursor: default; }
.stepper__btn[aria-disabled="true"]:hover { background: transparent; }
.stepper__value {
  display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  min-height: 36px; padding: 0 var(--space-1); border-radius: var(--radius-md);
  font-variant-numeric: tabular-nums; white-space: nowrap; cursor: default;
}
.stepper__value strong { font-size: var(--text-lg); font-weight: var(--weight-black); }
.stepper__of { font-size: var(--text-sm); color: var(--color-text-muted); }
.stepper__value svg { margin-left: 2px; color: var(--color-success); }
.item--done .stepper { border-color: var(--color-success); background: var(--color-success-soft); }
.item--done .stepper__value strong, .item--done .stepper__of { color: var(--color-on-success-soft); }

/* §5.45 Bevestiging voor setbeheer: icoon, titel, "nu → straks", tekst, waarschuwing, keuze, knoppen */
.dialog--manage { padding-top: var(--space-5); }
.dialog__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--space-3); border-radius: var(--radius-pill); }
.dialog__icon--wissen { background: var(--color-warning-soft); color: var(--color-on-warning-soft); }
.dialog__icon--compleet { background: var(--color-success-soft); color: var(--color-on-success-soft); }
.dialog__icon--weg { background: var(--color-danger-soft); color: var(--color-danger); }
.dialog--manage .dialog__text { margin-bottom: var(--space-3); }
.dialog__text strong { color: var(--color-text); }
.dialog__warn {
  display: grid; grid-template-columns: 20px 1fr; gap: var(--space-2);
  margin: 0 0 var(--space-4); padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--mango-500); border-radius: var(--radius-sm);
  background: var(--color-warning-soft); color: var(--color-on-warning-soft); font-size: var(--text-sm);
}
.dialog__error { margin: 0 0 var(--space-4); }
.dialog__error[hidden] { display: none; }
.before-after {
  display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); align-items: end; gap: var(--space-2);
  margin: 0 0 var(--space-4); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface-sunken);
}
.before-after__col { display: flex; flex-direction: column; gap: var(--space-1); }
.before-after__label { font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.before-after__pct { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-black); line-height: 1; font-variant-numeric: tabular-nums; }
.before-after__col .progress { flex: none; width: 100%; }
.before-after__arrow { display: grid; place-items: center; padding-bottom: var(--space-2); color: var(--color-text-muted); }
.check {
  display: flex; align-items: flex-start; gap: var(--space-3);
  min-height: 56px; margin: 0 0 var(--space-4); padding: var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); cursor: pointer;
}
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--color-primary); }
.check__title { display: block; font-weight: var(--weight-bold); }
.check__meta { display: block; font-size: var(--text-sm); color: var(--color-text-muted); }

/* =====================================================================
 * T014: de 2D-maatkiezer (D007, eis 10c; design-system §5.46), overgenomen uit
 * docs/design/prototype/boom/boom.css. Het aantal kolommen en rijen komt als klasse (sizer--c4 … --c16,
 * sizer--r8 … --r16), zonder style-attribuut.
 * ===================================================================== */
.cell--sizer .cell__img .ico { color: var(--color-primary); }
.stage.is-picker .padwrap { display: none; }
.stage.is-picker .context { flex: none; justify-content: flex-start; }
.stage .sizer { display: none; }
.stage.is-picker .sizer { display: block; position: relative; flex: 1; min-height: 0; }
.legend .legend--picker { display: none; }
.stage.is-picker .legend .legend--tree { display: none; }
.stage.is-picker .legend .legend__pad.legend--picker { display: grid; }
.stage.is-picker .legend .legend__list.legend--picker { display: flex; }
.legend--picker kbd { font-size: 11px; }
.legend__list.legend--picker dt { flex-wrap: wrap; }
/* Op de telefoon wijkt het kruimelpad, zodat de nopjes zo groot mogelijk worden (de titel zegt waar je bent). */
.screen:has(.stage.is-picker) .crumbs { display: none; }

/* De uitlezing (in het contextvak): de maat groot, wat er nodig is, Kies en Sluiten. */
.context--sizer { gap: var(--space-2); }
.sizer-read {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas: "thumb text actions" "extra extra extra";
  align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border-left: 4px solid var(--color-primary);
}
.sizer-read__thumb { grid-area: thumb; width: 56px; height: 56px; }
.sizer-read__text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.sizer-read__head { font-size: 11px; font-weight: var(--weight-black); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-primary); }
.sizer-read__head.is-none { color: var(--color-text-muted); }
.sizer-read__size { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-black); line-height: 1.05; font-variant-numeric: tabular-nums; }
.sizer-read__meta { font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-tight); }
.sizer-read__actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1); }
.sizer-read__go { display: none; min-height: 40px; padding-inline: var(--space-3); }
.keys .sizer-read__go { display: inline-flex; }
.btn--primary .way__key { border-color: currentColor; color: inherit; }
.sizer-read__extra { grid-area: extra; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); border-top: 1px solid var(--color-border); padding-top: var(--space-2); }
.sizer-read__ook { font-size: var(--text-sm); color: var(--color-text-muted); }
.quick__n { color: var(--color-text-muted); font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }
.sizer-read.is-flash { animation: flash-read var(--duration-slow) var(--ease-out); }
@keyframes flash-read { 0%, 60% { border-color: var(--color-focus); box-shadow: 0 0 0 var(--focus-width) var(--color-focus); } 100% { } }
:root[data-theme="dark"] .sizer-read__head:not(.is-none) { color: var(--color-on-primary-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sizer-read__head:not(.is-none) { color: var(--color-on-primary-soft); } }
.sizer-help__keys { display: none; }
.keys .sizer-help__keys { display: inline; }
.keys .sizer-help__touch { display: none; }

/* Het raster van nopjes. De nopjesmaat --c past het raster in de ruimte (containerquery), hoogstens 48 px. */
.sizer__wrap { position: absolute; inset: 0; container-type: size; display: flex; justify-content: center; align-items: flex-start; }
.sizer__board {
  --axis: 22px;
  --c: min(calc((100cqw - var(--axis) - 2px) / var(--cols)), calc((100cqh - var(--axis) - 2px) / var(--rows)), 48px);
  display: grid;
  grid-template-columns: var(--axis) calc(var(--c) * var(--cols) + 2px);
  grid-template-rows: var(--axis) calc(var(--c) * var(--rows) + 2px);
  -webkit-user-select: none; user-select: none;
}
.sizer--c4 { --cols: 4; } .sizer--c5 { --cols: 5; } .sizer--c6 { --cols: 6; } .sizer--c7 { --cols: 7; }
.sizer--c8 { --cols: 8; } .sizer--c9 { --cols: 9; } .sizer--c10 { --cols: 10; } .sizer--c11 { --cols: 11; }
.sizer--c12 { --cols: 12; } .sizer--c13 { --cols: 13; } .sizer--c14 { --cols: 14; } .sizer--c15 { --cols: 15; }
.sizer--c16 { --cols: 16; }
.sizer--r8 { --rows: 8; } .sizer--r9 { --rows: 9; } .sizer--r10 { --rows: 10; } .sizer--r11 { --rows: 11; }
.sizer--r12 { --rows: 12; } .sizer--r13 { --rows: 13; } .sizer--r14 { --rows: 14; } .sizer--r15 { --rows: 15; }
.sizer--r16 { --rows: 16; }
.sizer__corner { display: grid; place-items: center; font-size: 11px; color: var(--color-text-muted); }
.sizer__axis { display: grid; font-size: 11px; font-weight: var(--weight-medium); color: var(--color-text-muted); font-variant-numeric: tabular-nums; line-height: 1; }
.sizer__axis--top { grid-template-columns: repeat(var(--cols), var(--c)); align-items: center; justify-items: center; padding-left: 1px; }
.sizer__axis--left { grid-template-rows: repeat(var(--rows), var(--c)); align-items: center; justify-items: end; padding: 1px 5px 0 0; }
.sizer__axis .is-now { color: var(--color-primary); font-weight: var(--weight-black); }
:root[data-theme="dark"] .sizer__axis .is-now { color: var(--color-on-primary-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sizer__axis .is-now { color: var(--color-on-primary-soft); } }
.sizer__grid {
  display: grid; grid-template-columns: repeat(var(--cols), var(--c)); grid-template-rows: repeat(var(--rows), var(--c));
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
  touch-action: none;               /* slepen is kiezen, niet scrollen of terugvegen */
  cursor: pointer; overflow: hidden;
}
.sizer__row, .sizer__cell { display: contents; }
.nub {
  position: relative; width: var(--c); height: var(--c); margin: 0; padding: 0;
  border: 0; background: transparent; cursor: inherit; font: inherit;
}
/* Niet nodig: een klein, zwak ringetje op een verzonken vlak (gedimd). Nodig: een stip op een licht vlak. */
.nub::before {
  content: ""; position: absolute; inset: 34%; border-radius: 50%;
  border: 1.5px solid var(--color-border-strong); opacity: 0.6;
}
.nub.is-need { background: var(--color-surface); }
.nub.is-need::before { inset: 22%; border: 0; background: var(--color-text-muted); opacity: 1; }
/* De selectie: een plaat in Kanaal-zacht van 1 × 1 tot het nopje onder je vinger; dat nopje zelf is Kanaal. */
.nub.is-in { background: var(--color-primary-soft); }
.nub.is-in::before { border-color: var(--color-primary); }
.nub.is-in.is-need::before { background: var(--color-primary); }
.nub.is-end { background: var(--color-primary); }
.nub.is-end::before { border-color: var(--color-on-primary); opacity: 0.8; }
.nub.is-end.is-need::before { background: var(--color-on-primary); opacity: 1; }
.nub:focus-visible { outline: var(--focus-width) solid var(--color-focus); outline-offset: -3px; z-index: 1; }
.sizer__grid.is-outside .nub.is-in { opacity: 0.45; }

@media (min-width: 900px) and (min-height: 620px) {
  .screen:has(.stage.is-picker) .crumbs { display: block; }
  /* Een vaste hoogte voor de kolom, anders telt het grid de hoogte van de kiezer twee keer (rij 1 + 1fr). */
  .stage.is-picker { height: calc(100dvh - 64px - 53px - 56px); min-height: 520px; }
  .stage.is-picker .sizer { grid-area: pad; min-height: 0; }
  .sizer-read { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .sizer-read__thumb { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .sizer-read.is-flash { animation: none; outline: var(--focus-width) solid var(--color-focus); }
}

/* =====================================================================
 * T017: de collectie per thema en het setplaatje (D008, spec 001 eis 16a/16b; design-system §5.47–5.51), overgenomen
 * uit docs/design/mockups/mockup.css (sectie D008) en docs/design/prototype/boom/boom.css. Geen nieuwe tokens.
 * ===================================================================== */

/* §5.47 Setplaatje: een vaste kolom van 64 × 48, het plaatje past erin (contain); zonder plaatje de plaatsvervanger. */
.set-thumb {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: var(--thumb-size); height: 48px; padding: 2px;
  border-radius: var(--radius-md); background: var(--color-surface-sunken);
}
.set-thumb img:not(.img-pending) { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.set-thumb--none { border: 2px dashed var(--color-border-strong); color: var(--color-text-muted); background: transparent; }
.set-thumb--none svg { width: 28px; height: 28px; }

/* De kaart met plaatje: het plaatje is een eigen kolom over beide rijen, zodat tekst er nooit onder loopt. */
.copy-card--thumb {
  grid-template-columns: var(--thumb-size) minmax(0, 1fr) 20px;
  grid-template-areas: "img head chev" "img prog prog";
  column-gap: var(--space-3); align-items: start;
  padding: var(--space-3);
  min-height: 88px;
}
a.copy-card--thumb { color: inherit; text-decoration: none; }
.copy-card--thumb .set-thumb { grid-area: img; }
.copy-card--thumb .copy-card__chev { align-self: center; }
.copy-card--thumb .copy__name { font-size: var(--text-md); overflow-wrap: anywhere; }
.copy-card--thumb .copy__progress { margin-top: var(--space-2); min-width: 0; }
.copy-card--thumb .copy__progress .progress { flex: 1; min-width: 0; }
.copy-card--thumb .copy__pct { min-width: 0; white-space: nowrap; }
.copy__set .mono { font-size: var(--text-sm); }
.copy__theme { display: block; margin-top: 2px; font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.copy__theme--unknown { font-style: italic; }

/* De samenvatting met rijen (Focusset, Leden) */
.summary--rows { padding: 0; gap: 0; }
.summary__stat { padding: var(--space-4) var(--space-4) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.summary__stat .stat { margin: 0; flex-wrap: wrap; row-gap: 0; }
.summary__stat .progress { flex: none; width: 100%; }
.summary--rows .list { border-top: 1px solid var(--color-border); }

/* De kop "Sets" met Alles inklappen */
.sets { gap: var(--space-3); }
.sets-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sets-head .section-title { margin: 0; }
.sets-head .btn--quiet { min-height: var(--tap-min); font-size: var(--text-sm); }

/* §5.48 Sorteren: een label boven een gesegmenteerde keuze over de volle breedte */
.sorter { display: flex; flex-direction: column; gap: var(--space-1); }
.sorter__label { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-text-muted); }
.sorter .segmented__item { padding-inline: var(--space-1); }

/* §5.49 Themachips: één rij die horizontaal scrolt (niet de pagina), vaste volgorde */
.chips {
  display: flex; gap: var(--space-2); margin: 0 calc(-1 * var(--space-4)); padding: 2px var(--space-4) var(--space-1);
  overflow-x: auto; scroll-padding-inline: var(--space-4); scrollbar-width: none;
  list-style: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: var(--tap-min); padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; cursor: pointer;
}
.chip:hover { background: var(--color-surface-sunken); }
.chip__n { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.chip__check { display: none; }
.chip[aria-pressed="true"] {
  border: 2px solid var(--color-primary); padding-inline: calc(var(--space-3) - 1px);
  background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-weight: var(--weight-bold);
}
.chip[aria-pressed="true"] .chip__check { display: block; }
.chip[aria-pressed="true"] .chip__n { color: inherit; }
.chip--all { font-weight: var(--weight-bold); }
.chip--all .chip__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--color-primary); color: var(--color-on-primary); font-size: var(--text-xs); line-height: 20px; text-align: center;
}
.chip--stale, .chip--stale[aria-pressed="true"] { border-style: dashed; }

/* De regel onder de chips als er gefilterd is */
.filter-note {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin: 0; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-on-primary-soft);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
}
.filter-note .btn--quiet { color: var(--color-on-primary-soft); text-decoration: underline; text-underline-offset: 2px; }

/* §5.50 Themagroep: de kop als uitklapknop (plakt onder de app-balk), daaronder de kaarten */
.theme-groups { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; }
.theme-group { scroll-margin-top: 56px; }
.theme-group__h { position: sticky; top: 56px; z-index: 1; margin: 0; background: var(--color-bg); padding-bottom: var(--space-1); }
.theme-group__head {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "chev name pct" ". meta meta" "bar bar bar";
  column-gap: var(--space-2); row-gap: 2px; align-items: center;
  width: 100%; min-height: 56px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface-sunken); color: var(--color-text);
  font: inherit; text-align: left; cursor: pointer;
}
.theme-group__head:hover { border-color: var(--color-border-strong); }
.theme-group__chev { grid-area: chev; color: var(--color-text-muted); transition: transform var(--duration-fast) var(--ease-out); }
.theme-group__head[aria-expanded="true"] .theme-group__chev { transform: rotate(90deg); }
.theme-group__name { grid-area: name; min-width: 0; font-size: var(--text-md); font-weight: var(--weight-black); line-height: var(--leading-tight); overflow-wrap: anywhere; }
.theme-group__name--unknown { font-style: italic; font-weight: var(--weight-bold); }
.theme-group__pct { grid-area: pct; font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-black); font-variant-numeric: tabular-nums; }
.theme-group__meta { grid-area: meta; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.theme-group__bar { grid-area: bar; width: 100%; height: 6px; margin-top: var(--space-1); }
.theme-group__done { display: inline-flex; align-items: center; gap: 2px; color: var(--color-on-success-soft); }
.theme-group__list { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-1) 0 var(--space-3); padding: 0; list-style: none; }
.flat-list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.flat-list .group-title { margin-top: var(--space-2); }
@media (prefers-reduced-motion: reduce) { .theme-group__chev { transition: none; } }

/* §5.51 Het filterblad: een lijst vinkjes die zelf scrolt, de knoppen blijven staan */
.dialog--themes { max-height: 88dvh; flex-direction: column; padding-top: var(--space-5); }
.dialog--themes[open] { display: flex; }
.dialog--themes .dialog__text { margin-bottom: var(--space-3); }
.theme-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 0 var(--space-4); padding: 0; border: 0; }
.theme-list .check { margin-bottom: var(--space-2); min-height: 56px; align-items: center; }
.theme-list .check input { margin: 0; }
.theme-list .check__title { line-height: var(--leading-tight); }
.theme-list .check:has(input:checked) { border: 2px solid var(--color-primary); background: var(--color-primary-soft); padding: calc(var(--space-3) - 1px); }

/* De setpagina: het thema als regel in de voortgangskaart, een link naar de collectie met dat filter */
.theme-path {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; margin-top: 2px;
  font-size: var(--text-sm); color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.copy-progress__theme { margin: calc(-1 * var(--space-2)) 0 calc(-1 * var(--space-1)); }
.theme-path svg { flex: none; color: var(--color-text-muted); }
.theme-path--unknown { color: var(--color-text-muted); text-decoration: none; font-style: italic; }
.theme-path--plain { color: var(--color-text); text-decoration: none; }

/* De boom: het setplaatje in een setvak. Alleen het plaatje krimpt (32 → 22 px); naam, nummer, "nog n" en de balk
   blijven staan. */
.cell--set .cell__img { flex: 0 1 32px; height: 32px; min-height: 22px; }
.cell__thumb {
  position: relative; display: grid; place-items: center; height: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--color-surface-sunken);
}
.cell__thumb img:not(.img-pending) { width: 100%; height: 100%; object-fit: contain; }
.cell__thumb--none { background: transparent; border: 1.5px dashed var(--color-border-strong); color: var(--color-text-muted); }
.cell__thumb--none svg { width: 60%; height: 60%; }
.cell--mid .cell__thumb--none { border-color: var(--color-primary); color: var(--color-primary); }
@media (min-width: 900px) and (min-height: 620px) {
  .cell--set .cell__img { flex-basis: 44px; height: 44px; }
}

/* Laden */
.skeleton--summary.skeleton--summary-d8 { height: 128px; }
.skeleton--chips { height: 44px; border-radius: var(--radius-pill); }
.skeleton--group { height: 64px; }
.skeleton--copy { height: 96px; }
