/* Layout: one calm column, the puzzle board is the hero; schematic dot-grid, sage ink. */
[hidden] { display: none !important; }
:root {
  --bg: #ECEFEA;
  --surface: #F7F8F5;
  --ink: #1D2523;
  --muted: #5F6A66;
  --line: #2A3D39;
  --grid: #C5CEC8;
  --acc-salie: #3D7A68;
  --acc-inkt: #4A5BB8;
  --acc-zand: #A86F2C;
  --accent: var(--acc-salie);
  --on-accent: #F7F8F5;
  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131816; --surface: #1B2220; --ink: #E3E9E5; --muted: #97A29D;
    --line: #D3E2DB; --grid: #2D3733;
    --acc-salie: #7CC3AC; --acc-inkt: #9AA8F0; --acc-zand: #DDA868;
    --on-accent: #131816; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131816; --surface: #1B2220; --ink: #E3E9E5; --muted: #97A29D;
  --line: #D3E2DB; --grid: #2D3733;
  --acc-salie: #7CC3AC; --acc-inkt: #9AA8F0; --acc-zand: #DDA868;
  --on-accent: #131816; color-scheme: dark;
}

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
.app {
  min-height: 100%;
  box-sizing: border-box;
  max-width: 560px;
  margin: 0 auto;
  padding-block: 28px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.brand span { color: var(--accent); }
.brand-btn { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; font-family: var(--font-display); }
.brand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.back { padding-left: 0; }
.top-right { display: inline-flex; align-items: baseline; gap: 10px; }
.lang-select {
  font: inherit; font-family: var(--font-mono); font-size: 12px; color: var(--muted); background: transparent;
  border: 1px solid var(--grid); border-radius: 6px; padding: 2px 4px; cursor: pointer;
}
.lang-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.screen { display: flex; flex-direction: column; gap: 20px; }
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.lede { margin: 0; color: var(--muted); max-width: 46ch; }
.label {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; text-align: center; padding: 8px 14px; border: 1px solid var(--grid); border-radius: 999px;
  font-family: var(--font-mono); font-size: 14px; cursor: pointer; background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  font: inherit; font-weight: 600; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.quiet { border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.panel {
  background: var(--surface); border: 1px solid var(--grid); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.panel p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat b { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 13px; }
.challenge { border-color: var(--accent); }
.challenge b { color: var(--accent); }

.skins { display: flex; gap: 10px; flex-wrap: wrap; }
.skin {
  font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--grid); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px 6px 8px;
}
.skin i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.skin[aria-pressed="true"] { border-color: var(--ink); }
.skin .lock { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.skin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* play */
.hud { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.clock { font-family: var(--font-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.bar i { transition: transform 1s linear; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1 1 0; height: 4px; border-radius: 4px; background: var(--grid); transition: background .4s; }
.progress i.on { background: var(--accent); }
.modes { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--grid); }
.mode { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.mode[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip small { display: block; font-size: 11px; opacity: .7; margin-top: 1px; }
#mode-note { margin-top: 8px; }
.bar { height: 3px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }
.board { width: 100%; max-width: 100%; aspect-ratio: 1 / 1; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.board svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tile { cursor: pointer; outline: none; }
.tile .hit { fill: transparent; }
.tile:focus-visible .hit { fill: var(--grid); opacity: .5; }
.tile .rot { transition: transform .18s ease-out; transform-box: view-box; }
.tile .ln { stroke: var(--line); stroke-width: 13; stroke-linecap: round; fill: none; transition: stroke .3s; }
.tile .end { fill: var(--surface); stroke: var(--line); stroke-width: 10; transition: stroke .3s; }
.dot { fill: var(--grid); }
.board.solved .ln, .board.solved .end { stroke: var(--accent); }
.hint { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }

/* end */
.big { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.copyfield { display: flex; gap: 8px; flex-wrap: wrap; }
.copyfield input {
  font: inherit; flex: 1 1 160px; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--grid); background: var(--surface); color: var(--ink);
}
.copyfield input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.note { font-size: 13px; color: var(--muted); margin: 0; }

dialog {
  border: 1px solid var(--grid); border-radius: 16px; background: var(--surface); color: var(--ink);
  max-width: min(420px, calc(100% - 32px)); padding: 22px; box-sizing: border-box;
}
dialog::backdrop { background: rgba(10, 14, 12, .45); }
dialog h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 8px; letter-spacing: -0.01em; }
dialog ul { margin: 0 0 16px; padding-left: 18px; color: var(--muted); }
dialog .price { font-family: var(--font-mono); font-size: 28px; margin: 0 0 16px; font-variant-numeric: tabular-nums; }

/* hints en niveaus */
.row.center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.game-txt small.lvl { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 2px; }
.hinted { animation: hinted 1.4s ease-in-out; }
@keyframes hinted { 0%, 100% { filter: none; } 30%, 70% { filter: drop-shadow(0 0 6px var(--accent)) brightness(1.08); } }
.mirror .cell.hinted, .stone.hinted, .num.hinted, .hue .swatch.hinted { box-shadow: 0 0 0 3px var(--accent); }
.card.peek { background: var(--bg); }
.card.peek::before { display: none; }
.card.peek .sym { opacity: 1; }

/* skins */
body[data-skin="inkt"] { --accent: var(--acc-inkt); }
body[data-skin="zand"] { --accent: var(--acc-zand); }
.lock { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .06em; font-weight: 400; }

/* spelkeuze */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.game {
  font: inherit; text-align: left; display: flex; gap: 12px; align-items: center; cursor: pointer;
  padding: 12px; border-radius: 12px; border: 1px solid var(--grid); background: var(--surface); color: var(--ink);
}
.game[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.game:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-txt { display: flex; flex-direction: column; min-width: 0; }
.game-txt b { font-weight: 600; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.game-txt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.game-icon { flex: 0 0 34px; height: 34px; border-radius: 8px; background: var(--bg); position: relative; overflow: hidden; }
.game-icon-lijnen::before { content: ""; position: absolute; left: 8px; top: 16px; width: 18px; height: 3px; background: var(--accent); border-radius: 2px; }
.game-icon-lijnen::after { content: ""; position: absolute; left: 16px; top: 8px; width: 3px; height: 11px; background: var(--accent); border-radius: 2px; }
.game-icon-spiegel { background: linear-gradient(90deg, var(--accent) 0 30%, var(--bg) 30% 48%, var(--grid) 48% 52%, var(--bg) 52% 70%, var(--accent) 70%); }
.game-icon-kleur { background: linear-gradient(135deg, #E9B9A0, #B7C9E8 50%, #6E5E8E); }
.game-icon-paren::before, .game-icon-paren::after { content: ""; position: absolute; top: 9px; width: 9px; height: 15px; border-radius: 3px; background: var(--accent); }
.game-icon-paren::before { left: 7px; } .game-icon-paren::after { left: 18px; opacity: .45; }
.game-icon-schuif { background: conic-gradient(from 90deg at 50% 50%, var(--bg) 0 25%, var(--accent) 0 100%); }
.game-icon-getallen::before { content: "123"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.game-icon-adem::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 3px solid var(--accent); }
@media (max-width: 380px) { .games { grid-template-columns: minmax(0, 1fr); } }

/* spiegelen */
.mirror { display: grid; gap: 4px; width: 100%; height: 100%; }
.mirror .cell { border: 0; padding: 0; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); cursor: pointer; transition: background .15s; }
.mirror .cell.fixed { cursor: default; background: transparent; }
.mirror .cell.on { background: var(--line); box-shadow: none; }
.mirror .cell.fixed.on { background: var(--muted); }
.mirror .cell.axis { margin-left: 6px; }
.mirror .cell.axis-h { margin-top: 6px; }
.mirror .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.board.solved .mirror .cell.on { background: var(--accent); }

/* kleurverloop */
.hue-wrap { display: flex; flex-direction: column; gap: 14px; }
.hue-head { display: flex; gap: 14px; align-items: center; }
.hue-preview { flex: 0 0 72px; display: grid; gap: 1px; border-radius: 6px; overflow: hidden; }
.hue-preview i { display: block; aspect-ratio: 1 / 1; }
.hue-head .note { flex: 1 1 auto; min-width: 0; }
.hue { display: grid; gap: 3px; width: 100%; }
.hue .swatch { border: 0; padding: 0; border-radius: 4px; cursor: pointer; position: relative; transition: transform .15s; }
.hue .swatch.fixed { cursor: default; }
.hue .swatch.fixed::after, .hue .swatch.ok::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(0, 0, 0, .4); }
.hue .swatch.ok::after { background: rgba(255, 255, 255, .85); }
.hue .swatch.sel { transform: scale(.86); box-shadow: 0 0 0 3px var(--ink); }
.hue .swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.board.solved .hue { gap: 0; transition: gap .4s; }

/* paren */
.pairs { display: grid; gap: 8px; width: 100%; height: 100%; }
.card { border: 1px solid var(--grid); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 0; color: var(--line); position: relative; }
.card .sym { opacity: 0; font-size: clamp(22px, 7vw, 34px); transition: opacity .15s; }
.card::before { content: ""; position: absolute; inset: 30%; border-radius: 50%; border: 2px dotted var(--grid); }
.card.up, .card.found { background: var(--bg); }
.card.up::before, .card.found::before { display: none; }
.card.up .sym, .card.found .sym { opacity: 1; }
.card.found { border-color: var(--accent); }
.card.found .sym { color: var(--accent); }
.card .sym-1 { color: var(--muted); }
.card.found .sym-1 { color: var(--accent); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* schuifpuzzel */
.slide { display: grid; gap: 6px; width: 100%; height: 100%; }
.stone { border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); color: var(--ink); font-family: var(--font-mono); font-size: clamp(20px, 6vw, 30px); cursor: pointer; }
.stone.ok { color: var(--accent); }
.stone.gap { background: transparent; box-shadow: none; cursor: default; }
.stone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.board.solved .stone { box-shadow: inset 0 0 0 1px var(--accent); }

/* getallen */
.numbers-wrap { display: flex; flex-direction: column; gap: 12px; }
.numbers-next { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.numbers { display: grid; gap: 6px; width: 100%; aspect-ratio: 1 / 1; }
.num { border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); color: var(--ink); font-family: var(--font-mono); font-size: clamp(18px, 5.5vw, 26px); cursor: pointer; transition: opacity .25s, background .25s; }
.num.done { opacity: .25; background: transparent; cursor: default; }
.num.miss { animation: nudge .25s; }
.num:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: scale(.94); } }

/* woorden */
.words { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.letters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.letter { width: 44px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); font-family: var(--font-mono); font-size: 24px; text-transform: uppercase; transition: opacity .2s; }
.letter.used { opacity: .3; }
.word-input { font-family: var(--font-mono); font-size: 26px; letter-spacing: .25em; text-transform: uppercase; text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--grid); background: var(--surface); color: var(--ink); min-width: 0; }
.word-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.word-input.miss { animation: nudge .25s; }
.word-input.hinted { box-shadow: 0 0 0 3px var(--accent); }
.board.solved .letter { color: var(--accent); }
.game-icon-woorden::before { content: "Aa"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }

/* ademen */
.breath { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; position: relative; }
.breath-circle { width: 70%; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 50%; background: var(--accent); opacity: .22; transition-property: transform; transition-timing-function: ease-in-out; position: absolute; top: 50%; left: 15%; margin-top: -35%; }
.breath-word { position: relative; font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 0; }
.breath-count { position: relative; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .tile .rot, .tile .ln, .tile .end, .breath-circle, .hue .swatch, .mirror .cell, .card .sym, .num { transition: none !important; animation: none !important; }
}

/* ---- Resethify Alles: aanbod ------------------------------------------- */
dialog.pro { max-width: min(520px, calc(100% - 32px)); padding: 24px; }
dialog.pro h2 { margin: 2px 0 14px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 14px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--grid); }
.compare thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.compare tbody th { font-weight: 600; width: 30%; padding-left: 0; }
.compare td { color: var(--muted); }
.compare td.no { color: var(--grid); }
.compare .all { color: var(--ink); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.compare thead .all { color: var(--accent); border-radius: 8px 8px 0 0; }
.compare tbody tr:last-child .all { border-radius: 0 0 8px 8px; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.pro-support { margin: 0 0 16px; line-height: 1.5; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
dialog .price-row .price { margin: 0; font-size: 30px; }
.video-offer { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--grid); }
.video-btn { padding-left: 0; text-align: left; justify-content: flex-start; }
details.code { margin-top: 12px; font-size: 14px; }
details.code summary { cursor: pointer; color: var(--muted); }
details.code summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
details.code .copyfield { margin-top: 10px; }
details.code input { font-family: var(--font-mono); font-size: 14px; }
#code-msg { margin-top: 8px; min-height: 1em; }

/* ---- Video ------------------------------------------------------------- */
dialog.videodlg { width: min(420px, calc(100% - 32px)); }
.video-screen {
  aspect-ratio: 16 / 9; border-radius: 10px; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 15px; margin: 6px 0 12px;
}
.video-screen span:empty { display: none; }
#video-note { margin: 0 0 12px; }

/* ---- Privacy ----------------------------------------------------------- */
dialog.privacy { max-width: min(560px, calc(100% - 32px)); }
dialog.privacy p { color: var(--ink); font-size: 15px; line-height: 1.55; margin: 0 0 12px; }

/* ---- Beginscherm: extensie, statistiek, voettekst -------------------- */
.ext-panel { border-style: dashed; }
.stat .sub { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 2px; }
.stat .sub:empty { display: none; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--grid); font-size: 13px; color: var(--muted); }
.foot > span { font-weight: 600; color: var(--ink); margin-right: auto; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--grid); }
.linkish:hover { color: var(--ink); }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* spelkaarten van Alles: hoe vaak nog gratis */
.game-txt small.trial { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 2px; }
.game-txt small.trial.none { color: var(--muted); }
.game.spent .game-icon { opacity: .5; }

/* ---- Spelen: geluid ----------------------------------------------------- */
.hud-right { display: inline-flex; align-items: baseline; gap: 10px; }
.sound-btn {
  font: inherit; font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: transparent;
  border: 1px solid var(--grid); border-radius: 999px; padding: 2px 9px; cursor: pointer;
}
.sound-btn.on { color: var(--accent); border-color: var(--accent); }
.sound-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Eindscherm: aanbod ------------------------------------------------- */
.offer { border-color: var(--accent); }
.offer p { color: var(--ink); }

@media (max-width: 420px) {
  .compare { font-size: 13px; }
  .compare th, .compare td { padding: 8px 6px; }
  .hud { flex-wrap: wrap; }
}
dialog .price-row .price { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
dialog h2:focus { outline: none; }

/* ---- Nieuwe spellen ------------------------------------------------------ */
.badge-new { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; font-weight: 500; color: var(--on-accent); background: var(--accent); border-radius: 4px; padding: 1px 5px; }
.game.soon { border-style: dashed; background: transparent; }
.game.soon .game-icon { opacity: .55; }
.game.soon .lock { color: var(--accent); }
.light.hinted, .mem.hinted, .tube.hinted { box-shadow: 0 0 0 3px var(--accent); }

/* lichtjes */
.lights { display: grid; gap: 8px; width: 100%; height: 100%; }
.light { border: 0; border-radius: 12px; cursor: pointer; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); transition: background .18s, box-shadow .18s; }
.light.on { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.light:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.board.solved .light { background: var(--bg); }
.lights.path { touch-action: none; user-select: none; -webkit-user-select: none; }
.light.wall { visibility: hidden; }
.light.start { position: relative; }
.light.start::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--line); }
.light.start.on::after { background: var(--on-accent); }
.light.end { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.light.miss { animation: nudge .25s; }
.board.solved .lights.path .light.on { background: var(--accent); opacity: .55; }

/* tien */
.numbers.tien { aspect-ratio: auto; }
.numbers.tien .num { aspect-ratio: 1 / 1; }
.num.sel { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* onthouden */
.memory { display: grid; gap: 8px; width: 100%; aspect-ratio: 1 / 1; }
.mem { border: 0; border-radius: 12px; cursor: pointer; background: var(--surface); box-shadow: inset 0 0 0 1px var(--grid); transition: background .12s; }
.mem.lit { background: var(--accent); box-shadow: none; }
.memory.watch .mem { cursor: default; }
.mem.miss { animation: nudge .25s; }
.mem:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* sorteren */
.tubes { display: grid; gap: 10px; width: 100%; align-items: end; padding-top: 18px; }
.tube {
  display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; padding: 8px 0 10px;
  min-height: 176px; border: 1.5px solid var(--grid); border-top: 0; border-radius: 0 0 22px 22px;
  background: var(--surface); cursor: pointer; transition: transform .15s, border-color .15s;
}
.tube.sel { transform: translateY(-14px); border-color: var(--ink); }
.tube.full { border-color: var(--accent); }
.tube.miss { animation: nudge .25s; }
.tube:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ball { display: block; width: 72%; max-width: 34px; aspect-ratio: 1 / 1; border-radius: 50%; }
.ball.b0 { background: #C8553D; } .ball.b1 { background: #E4B23A; } .ball.b2 { background: #2F7F8A; }
.ball.b3 { background: #3E5C9A; } .ball.b4 { background: #8C5A8E; } .ball.b5 { background: #6E9B4A; } .ball.b6 { background: #2B2B2B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ball.b6 { background: #D9D4C7; } }
:root[data-theme="dark"] .ball.b6 { background: #D9D4C7; }

/* iconen */
.game-icon-lichtjes { background: radial-gradient(circle at 30% 30%, var(--accent) 0 4px, transparent 5px), radial-gradient(circle at 70% 30%, var(--grid) 0 4px, transparent 5px), radial-gradient(circle at 30% 70%, var(--grid) 0 4px, transparent 5px), radial-gradient(circle at 70% 70%, var(--accent) 0 4px, transparent 5px), var(--bg); }
.game-icon-tien::before { content: "10"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.game-icon-onthouden { background: linear-gradient(var(--bg), var(--bg)) padding-box; }
.game-icon-onthouden::before, .game-icon-onthouden::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 3px; }
.game-icon-onthouden::before { left: 7px; top: 7px; background: var(--accent); }
.game-icon-onthouden::after { right: 7px; bottom: 7px; background: var(--grid); }
.game-icon-sorteren::before, .game-icon-sorteren::after { content: ""; position: absolute; bottom: 6px; width: 8px; border-radius: 0 0 5px 5px; border: 1.5px solid var(--grid); border-top: 0; }
.game-icon-sorteren::before { left: 8px; height: 20px; background: linear-gradient(to top, var(--accent) 0 45%, transparent 45%); }
.game-icon-sorteren::after { right: 8px; height: 20px; background: linear-gradient(to top, #E4B23A 0 70%, transparent 70%); }
@media (prefers-reduced-motion: reduce) { .light, .mem, .tube { transition: none !important; animation: none !important; } }
/* na de betaling: alleen bedankje en codeveld */
dialog.pro.thanks .compare, dialog.pro.thanks .pro-support, dialog.pro.thanks .price-row,
dialog.pro.thanks #pro-buy, dialog.pro.thanks #pro-interest, dialog.pro.thanks .video-offer, dialog.pro.thanks details.code summary { display: none; }
dialog.pro.thanks details.code { margin-top: 0; }
dialog.pro.thanks #pro-sell { display: flex; flex-direction: column; }
dialog.pro.thanks #pro-sell > .row { order: 2; margin-top: 12px; }

/* ---- Proefweek ---------------------------------------------------------- */
.trial-banner { border-color: var(--accent); display: grid; gap: 8px; }
.trial-banner .row { margin: 0; }

/* ---- Jouw week ---------------------------------------------------------- */
.week { display: grid; gap: 14px; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.week-head .label { margin: 0; }
.week-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.week-num b { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.week-num small { color: var(--muted); font-size: 13px; }
.week-detail { position: relative; display: grid; gap: 10px; }
.week-detail[hidden] { display: none; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.week-bar { display: grid; gap: 4px; justify-items: center; }
.week-bar-track { display: flex; align-items: flex-end; width: 100%; max-width: 28px; height: 64px; border-bottom: 1px solid var(--grid); }
.week-bar i { display: block; width: 100%; background: var(--grid); border-radius: 3px 3px 0 0; }
.week-bar.today i { background: var(--accent); }
.week-bar small { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.week-bar.today small { color: var(--ink); }
.week-detail.locked { filter: blur(4px); opacity: .55; pointer-events: none; user-select: none; }
.week-lock { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -4px; }
.week-lock[hidden] { display: none; }
.week-lock .note { flex: 1 1 220px; }
#week-daily:empty, #week-saved:empty { display: none; }
.pro-week { margin: 4px 0 14px; padding: 10px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 14px; }

/* ---- Zetten ------------------------------------------------------------- */
.moves { margin: 8px 0 0; text-align: center; min-height: 1.3em; }

/* ---- Voortgang overzetten ---------------------------------------------- */
dialog.sync { max-width: min(460px, calc(100% - 32px)); padding: 24px; }
dialog.sync > * + * { margin-top: 12px; }
.sync-qr { width: min(240px, 100%); aspect-ratio: 1; margin: 4px auto; border-radius: 8px; overflow: hidden; border: 1px solid var(--grid); }
.sync-qr svg { display: block; width: 100%; height: 100%; }
.sync-qr[hidden] { display: none; }
.sync-warn { color: var(--ink); }
#sync-msg:empty { display: none; }
.foot-intern { width: 100%; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
