/* הדוג׳ו המנטלי — v2 look (20.11.2026). Direction: clone-run/design.md */
:root {
  --teal: #082A38;      /* brand deep teal */
  --teal-2: #0C3646;
  --teal-3: #0F4052;
  --cream: #EFE9DC;     /* brand warm cream */
  --gold: #E0C454;
  --aqua: #38E0C4;
  --bg: #EFE9DC;
  --surface: #F8F4EB;
  --sunk: #E5DDCB;
  --ink: #082A38;
  --muted: #5B6B70;
  --line: #D3C8B0;
  --ok: #2E7D5B;
  --bad: #B3261E;
  --r: 10px;
  --font: 'Heebo', 'Arial Hebrew', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061F2A; --surface: #0C3646; --sunk: #0A2D3B; --ink: #EFE9DC; --muted: #9BB4BE; --line: #1D4A5C; color-scheme: dark;
  }
}
:root[data-theme="dark"] { --bg: #061F2A; --surface: #0C3646; --sunk: #0A2D3B; --ink: #EFE9DC; --muted: #9BB4BE; --line: #1D4A5C; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent; min-height: 100dvh;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .3; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2 { font-weight: 800; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 6vw, 38px); }
h2 { font-size: 20px; }
#view { max-width: 960px; margin: 0 auto; padding: 16px 16px 64px; outline: none; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
.note { color: var(--muted); font-size: 15px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--teal); color: var(--cream); padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.top nav { display: flex; gap: 2px; }
.top nav button { padding: 7px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: #B9CBD0; }
.top nav button.on { color: var(--cream); background: var(--teal-3); font-weight: 700; }
.top nav button:hover { color: var(--cream); }

/* ---------- discipline art (made of the discipline's own content) ---------- */
.art { position: relative; display: grid; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.art-images { grid-template-columns: repeat(4, 1fr); gap: 6%; padding: 9% 10%; place-items: center; }
.art-images img { width: 100%; aspect-ratio: 1; }
.art-words { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px 10px; padding: 8%; color: var(--c); font-weight: 800; line-height: 1.1; }
.art-words .w0 { font-size: 1.35em; } .art-words .w1 { font-size: 1em; opacity: .75; } .art-words .w2 { font-size: .8em; opacity: .55; }
.art-names { grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.art-names img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; filter: saturate(.75); }
.art-names img:first-child { outline: 3px solid var(--c); outline-offset: -3px; filter: none; }
.art-names b { position: absolute; top: calc(50% - 1.6em); inset-inline-start: 3px; width: calc((100% - 12px) / 3); text-align: center; font-size: .75em;
  background: var(--c); color: #fff; padding: 1px 0; }
.art-numbers { grid-template-columns: repeat(8, 1fr); align-content: center; padding: 6% 8%; direction: ltr; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; }
.art-numbers span { text-align: center; font-size: 1.3em; line-height: 1.35; opacity: .5; }
.art-numbers span.on { opacity: 1; background: var(--c); color: #fff; }
.art-cards { place-items: center; }
.fanart { display: flex; font-size: 22px; }
.fanart .card + .card { margin-inline-start: -.7em; }
.art-sm .fanart { font-size: 15px; }
.fanart .card { box-shadow: 0 1px 0 rgba(8, 42, 56, .25); }
.fanart .card:nth-child(1) { transform: rotate(-12deg) translate(14%, 6%); }
.fanart .card:nth-child(2) { transform: translateY(-4%); z-index: 1; }
.fanart .card:nth-child(3) { transform: rotate(12deg) translate(-14%, 6%); z-index: 2; }

/* ---------- home ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 4px 0 20px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile {
  text-align: start; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; transition: border-color .15s ease;
}
.tile:hover { border-color: var(--c); }
.tile .art { aspect-ratio: 4 / 3; font-size: 13px; }
.tile-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px 6px; }
.tile-name { font-size: 19px; font-weight: 800; color: var(--c); }
.tile-lv { font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tile .lvbar { padding: 0 12px 12px; }

.lvbar { display: flex; gap: 3px; }
.lvbar i { flex: 1; height: 5px; border-radius: 1px; background: var(--sunk); }
.lvbar i.done { background: var(--c); }
.lvbar i.cur { background: color-mix(in srgb, var(--c) 45%, var(--sunk)); }

.today { background: var(--teal); color: var(--cream); border-radius: var(--r); padding: 16px; }
.today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.today-head h2 { margin: 0; }
.today-count { color: var(--gold); font-weight: 700; font-size: 15px; }
.today p { margin: 4px 0 14px; color: #B9CBD0; font-size: 15px; }
.today-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.today-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 8px;
  background: var(--teal-2); border: 1px solid var(--teal-3); border-inline-start: 4px solid var(--c); text-align: start; }
.today-item span { font-weight: 700; }
.today-item b { font-size: 14px; font-weight: 500; color: #9BB4BE; }
.today-item.did b { color: var(--gold); font-weight: 700; }

/* ---------- discipline page ---------- */
.disc-page { max-width: 560px; margin: 0 auto; }
.disc-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.disc-head h1 { margin: 0; color: var(--c); }
.back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
.back:hover { color: var(--ink); border-color: var(--ink); }
.art-sm { width: 112px; aspect-ratio: 4 / 3; border-radius: 8px; font-size: 8px; }
.tools { display: flex; gap: 8px; margin-bottom: 14px; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; background: var(--sunk); font-weight: 600; font-size: 15px; }
.tool:hover { background: var(--line); }
.seg { display: flex; padding: 3px; border-radius: 10px; background: var(--sunk); margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.lvl-row { display: flex; align-items: center; gap: 16px; }
.lvl-big { font-size: 64px; font-weight: 900; line-height: .9; color: var(--c); min-width: 1.2ch; text-align: center; font-variant-numeric: tabular-nums; }
.lvl-text { display: flex; flex-direction: column; }
.lvl-text b { font-size: 19px; }
.lvl-text span { color: var(--muted); }
.panel .lvbar i { height: 8px; }
.fields { display: grid; gap: 10px; }
.fields label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.fields input { width: 110px; font: inherit; font-weight: 700; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-align: center; }
.go { background: var(--c, var(--teal)); color: #fff; padding: 12px 28px; border-radius: 10px; font-weight: 800; font-size: 18px; }
.go.big { width: 100%; padding: 16px; font-size: 20px; }
.go:hover { filter: brightness(1.08); }
.ghost { padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; }
.danger { color: var(--bad); margin-top: 24px; }
.best-line { color: var(--muted); font-size: 15px; text-align: center; margin: 12px 0 0; }
.best-line b { color: var(--ink); }

/* dialogs (instructions, preferences) */
.sheet { border: 0; border-radius: 14px; padding: 20px 18px; width: min(92vw, 460px); background: var(--surface); color: var(--ink); }
.sheet::backdrop { background: rgba(4, 14, 22, .55); }
.sheet h2 { color: var(--c); }
.sheet ul { padding-inline-start: 20px; margin: 0 0 16px; }
.sheet li { margin-bottom: 6px; }
.sheet form { margin-top: 8px; }
.sheet .go { width: 100%; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.settings select { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); max-width: 58%; }

/* ---------- stage ---------- */
.stage { display: flex; flex-direction: column; gap: 12px; }
.ready { align-items: center; justify-content: center; min-height: 62dvh; text-align: center; }
.ready-what { color: var(--muted); margin: 0; }
.ready-what b { color: var(--c); }
.ready .count { font-size: 140px; font-weight: 900; color: var(--c); line-height: 1; font-variant-numeric: tabular-nums; }
.bar {
  position: sticky; top: 52px; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--bg); padding: 8px 0;
}
.bar-name { font-weight: 800; color: var(--c); display: flex; flex-direction: column; line-height: 1.2; }
.bar-name small { font-weight: 500; color: var(--muted); font-size: 13px; }
.clock { font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 800; min-width: 4ch; text-align: center; }
.clock.low { color: var(--bad); }
.done-btn { justify-self: end; background: var(--ok); color: #fff; padding: 9px 18px; border-radius: 8px; font-weight: 800; }
.recall .done-btn { background: var(--c); }

/* the table: one dark surface in both themes, like a training mat */
.table { background: var(--teal-2); color: var(--cream); border-radius: var(--r); padding: 18px 12px; display: flex; flex-direction: column; gap: 16px; }

/* memorise */
.show { display: flex; justify-content: center; gap: 12px; min-height: 240px; align-items: center; flex-wrap: wrap; }
.show figure { margin: 0; position: relative; background: var(--cream); color: var(--teal); border-radius: 8px; display: grid; place-items: center; }
.show-images figure { display: block; width: min(26vw, 200px); padding: min(3.5vw, 26px); }
.show-images img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.show-words { flex-direction: column; }
.show-words figure { width: min(100%, 420px); padding: 16px; font-size: clamp(30px, 8vw, 44px); font-weight: 800; }
.show-cards figure { padding: 0; background: none; }
.show .pos { position: absolute; top: 5px; inset-inline-start: 9px; font-size: 12px; color: var(--muted); font-weight: 700; }
.show-cards .pos { top: auto; bottom: -20px; inset-inline-start: 0; width: 100%; text-align: center; color: #9BB4BE; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.nav-btn { width: 56px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--teal-3); color: var(--cream); border: 1px solid #1D4A5C; }
.nav-btn svg { width: 26px; height: 26px; }
.pager[dir="ltr"] .nav-btn svg { transform: scaleX(-1); }
.nav-btn.fwd { background: var(--cream); color: var(--teal); border-color: var(--cream); width: 84px; }
.nav-btn:not(:disabled):hover { filter: brightness(1.15); }
.pg { min-width: 4.5ch; text-align: center; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.pg small { font-weight: 500; color: #9BB4BE; font-size: 14px; }

/* playing cards */
.card {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  width: 2.6em; height: 3.6em; border-radius: .3em; background: #FFFDF8; color: #082A38; border: 1px solid #CFC6B3;
  font-family: var(--font); font-weight: 800;
}
.card.red { color: #B3261E; }
.card b { font-size: 1em; }
.card i { font-style: normal; font-size: 1.3em; }
.show-cards .card { font-size: clamp(34px, 11vw, 60px); }
.show-cards.per-3 .card, .show-cards.per-4 .card { font-size: clamp(26px, 8vw, 52px); }
.show-cards.fan { gap: 0; }
.show-cards.fan figure + figure { margin-inline-start: -1.1em; }
.show-cards.fan .card { box-shadow: -2px 2px 0 rgba(4, 14, 22, .35); }
.show-cards.fan .pos { display: none; }
.show.per-4 figure, .show.per-5 figure { transform: scale(.85); }

/* queue under the table */
.queue { text-align: center; color: #9BB4BE; }
.q-count { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.q-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 640px; margin: 0 auto; opacity: .8; }
.q-item { display: inline-flex; }
.q-cards { gap: 0; flex-wrap: nowrap; overflow: hidden; }
.q-cards .q-item + .q-item { margin-inline-start: -10px; }
.q-cards .card { font-size: 10px; }
.q-images img { width: 22px; height: 22px; }
.q-words span { font-size: 12px; padding: 1px 6px; background: var(--teal-3); border-radius: 4px; color: var(--cream); }
.q-names img { width: 26px; height: 26px; border-radius: 3px; }
.q-names span span { display: none; }

/* numbers */
.digits { display: flex; flex-direction: column; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.drow { display: flex; align-items: center; gap: 4px; }
.drow em { font-style: normal; width: 2.2em; text-align: end; color: #9BB4BE; font-size: 12px; padding-inline-end: 6px; }
.memo .drow span { width: 1.25em; text-align: center; font-weight: 800; border-radius: 4px; font-size: min(38px, calc((100vw - 80px) / (var(--row, 8) * 1.45))); }
.memo .drow span.on { background: var(--gold); color: var(--teal); }
.drow .gap { margin-inline-end: 10px !important; }
.dslot { width: min(2.2em, calc((100vw - 80px) / var(--row, 8) - 4px)); height: 2.3em; border-radius: 6px; background: var(--teal-3); color: var(--cream);
  border: 1px solid #1D4A5C; font-size: clamp(16px, 4.6vw, 22px); font-weight: 800; }
.dslot.sel { background: var(--gold); color: var(--teal); border-color: var(--gold); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 340px; margin: 0 auto; }
.keypad button { padding: 14px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 22px; font-weight: 800; }

/* recall slots + picker */
.slots { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.slot { position: relative; min-height: 64px; border-radius: 8px; border: 1px dashed #3D6879; display: grid; place-items: center; padding: 14px 4px 6px; color: var(--teal); }
.slot.full { border: 1px solid var(--cream); background: var(--cream); }
.slot.sel { border: 0; background: var(--gold); }
.slot .pos { position: absolute; top: 2px; inset-inline-start: 6px; font-size: 11px; color: #9BB4BE; font-weight: 700; }
.slot.full .pos, .slot.sel .pos { color: #5B6B70; }
.slot img { width: 38px; height: 38px; }
.slots-cards .card, .deck .card, .review-cards .card { font-size: 16px; }
.slots-cards { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
.slots-cards .slot { border-radius: 6px; aspect-ratio: 2.6 / 3.6; min-height: 0; padding: 12px 2px 4px; }
.slots-cards .slot.full { background: none; border: 0; padding: 12px 0 0; }
.slots-cards .slot.full .card { width: 100%; height: 100%; font-size: 15px; }
.slots-cards .slot.full .pos { color: #9BB4BE; top: -1px; }
.picker { padding-top: 4px; }
.pool { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pick { border-radius: 8px; background: var(--surface); border: 1px solid var(--line); padding: 6px; }
.pick:not(:disabled):hover { border-color: var(--c); }
.pool-images .pick img { width: 46px; height: 46px; display: block; }
.deck { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 0 auto; }
.suit-row { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.deck .pick { padding: 0; background: none; border: 0; }
.deck .pick .card { width: 100%; height: auto; aspect-ratio: 2.6 / 3.6; font-size: clamp(10px, 2.9vw, 17px); }

/* typed recall (words, names) */
.typed { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tslot { display: flex; align-items: center; gap: 8px; background: var(--teal-3); border-radius: 8px; padding: 6px 8px; }
.typed-names .tslot { flex-direction: column; padding: 6px; }
.tslot .pos { position: static; min-width: 1.6em; color: #9BB4BE; font-size: 13px; font-weight: 700; }
.tslot input { width: 100%; min-width: 0; font: inherit; font-size: 17px; font-weight: 600; padding: 8px 10px; border-radius: 6px; border: 0; background: var(--cream); color: var(--teal); text-align: center; }
.tslot input:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.tslot:focus-within { background: var(--gold); }
.tslot:focus-within .pos { color: var(--teal); }
.face { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.show-names figure { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; width: min(40vw, 220px); }
.show-names.per-1 figure { width: min(70vw, 300px); }
.show-names.per-3 figure, .show-names.per-4 figure { width: min(28vw, 170px); }
.show-names .face { border-radius: 0; }
.show-names span:not(.pos) { font-weight: 800; font-size: clamp(20px, 5.5vw, 28px); text-align: center; padding: 6px 4px 8px; }
.show-names .pos { z-index: 1; background: var(--cream); padding: 0 5px; border-radius: 4px; }

/* ---------- result ---------- */
.result-head { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--c); border-radius: var(--r); padding: 18px 16px; }
.kicker { color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.result-head h1 { margin-bottom: 8px; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font-size: 80px; font-weight: 900; color: var(--c); line-height: .95; font-variant-numeric: tabular-nums; }
.score span { font-size: 20px; color: var(--muted); }
.stats { display: flex; gap: 20px; margin: 10px 0 0; color: var(--muted); }
.stats b { color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result h2 { margin: 8px 0 0; }
.review { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.review-words { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.review-numbers { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.rv { position: relative; border-radius: 8px; padding: 16px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); }
.rv.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.rv.bad { border-color: color-mix(in srgb, var(--bad) 70%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.rv .pos { position: absolute; top: 2px; inset-inline-start: 6px; font-size: 11px; color: var(--muted); }
.rv img { width: 36px; height: 36px; }
.rv .got { color: var(--bad); text-decoration: line-through; font-size: 14px; }
.rv .got img { width: 24px; height: 24px; }
.review-names .rv img { width: 56px; height: 56px; border-radius: 6px; display: block; }
.review-names .got img { display: none; }

/* ---------- history / about ---------- */
.page table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.page th, .page td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.page th { color: var(--muted); font-weight: 600; }
.bests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .bests { grid-template-columns: repeat(5, 1fr); } }
.best { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; }
.best span { font-weight: 700; color: var(--c); }
.best b { font-size: 36px; font-weight: 900; line-height: 1.1; }
.best small { color: var(--muted); }
.about p { max-width: 60ch; }

@media (max-width: 420px) {
  .top nav button { padding: 6px 8px; font-size: 14px; }
  .brand span { font-size: 17px; }
  .art-sm { width: 84px; }
  .typed-names, .typed-words { grid-template-columns: repeat(2, 1fr); }
  .nav-btn { width: 50px; } .nav-btn.fwd { width: 76px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* phone: five tiles in two columns, the fifth spans the row */
@media (max-width: 759px) {
  .tile:last-child { grid-column: 1 / -1; }
  .tile:last-child .art { aspect-ratio: 8 / 3; }
}
.tile-foot { flex-wrap: wrap; }
.tile-name { white-space: nowrap; }
@media (max-width: 420px) { .tile-name { font-size: 17px; } }

/* dark: lift discipline colours so names stay readable on deep teal */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.tile-name, .disc-head h1, .bar-name, .best span, .lvl-big, .score b, .ready .count, .ready-what b, .sheet h2, .art-words, .art-numbers) { color: color-mix(in srgb, var(--c) 55%, #EFE9DC); }
  :root:not([data-theme="light"]) .art-numbers span.on { color: #082A38; background: color-mix(in srgb, var(--c) 55%, #EFE9DC); }
}
:root[data-theme="dark"] :is(.tile-name, .disc-head h1, .bar-name, .best span, .lvl-big, .score b, .ready .count, .ready-what b, .sheet h2, .art-words, .art-numbers) { color: color-mix(in srgb, var(--c) 55%, #EFE9DC); }
@media (max-width: 759px) { .best:last-child { grid-column: 1 / -1; } }

/* learning path (v2.1) */
.path { margin-top: 18px; }
.path h2 { font-size: 17px; color: var(--muted); margin-bottom: 8px; }
.path ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.path li { position: relative; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; }
.path li + li::before { content: ''; position: absolute; inset-inline-start: 15px; top: -10px; height: 20px; width: 2px; background: var(--line); }
.dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--sunk); color: var(--muted); border: 2px solid var(--line); position: relative; z-index: 1; }
.stage-done .dot { background: var(--c); border-color: var(--c); color: #fff; }
.stage-now .dot { background: var(--surface); border-color: var(--c); color: var(--c); }
.st-body { display: flex; flex-direction: column; min-width: 0; }
.st-body b { font-size: 17px; }
.stage-next .st-body b { color: var(--muted); font-weight: 600; }
.st-body small { color: var(--muted); font-size: 13px; }
.st-body p { margin: 4px 0 0; font-size: 15px; }
.stage-now { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px !important; margin: 4px -12px; }
.vid { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 14px;
  background: var(--sunk); color: var(--ink); white-space: nowrap; }
.vid svg { fill: currentColor; stroke: none; width: 1em; height: 1em; }
button.vid:hover { background: var(--c); color: #fff; }
.vid.soon { background: none; color: var(--muted); font-weight: 500; font-size: 13px; padding: 7px 0; }
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); }
.nudge span { display: flex; flex-direction: column; font-size: 15px; }
.nudge b { color: var(--ink); }
.nudge .vid { background: var(--c); color: #fff; }
.sheet.video { width: min(94vw, 760px); padding: 12px; }
.frame { aspect-ratio: 16 / 9; background: #040E16; border-radius: 8px; overflow: hidden; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-actions { display: flex; gap: 8px; margin-top: 10px; }
.video-actions .go { flex: 1; width: auto; }
@media (max-width: 520px) { .nudge { flex-direction: column; align-items: stretch; } .nudge .vid { justify-content: center; padding: 10px; } }

/* training log (v2.2) — the course's Karate Kid sheet, filled automatically */
.baseline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.baseline span { display: flex; flex-direction: column; font-size: 15px; color: var(--muted); }
.baseline b { color: var(--ink); font-size: 16px; }
.note-box { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.note-box textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.note-box textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.hint { margin: 0; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 22%, var(--surface)); font-weight: 600; }
.log h2 { margin-top: 22px; font-size: 18px; }
.today-bar { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.today-bar > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; }
.today-bar b { font-size: 34px; font-weight: 900; line-height: 1; }
.today-bar small { color: var(--muted); }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--teal); border-radius: 3px; }
:root[data-theme="dark"] .meter i { background: var(--aqua); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meter i { background: var(--aqua); } }
.bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.base { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; }
.base > span { grid-column: 1 / -1; font-weight: 800; color: var(--c); }
.base b { font-size: 26px; font-weight: 900; }
.base small { color: var(--muted); font-size: 13px; }
.tods { display: flex; flex-direction: column; gap: 6px; }
.tod { display: grid; grid-template-columns: 7.5em 1fr 3.2em 4.5em; align-items: center; gap: 8px; font-size: 15px; }
.tod .meter { margin: 0; height: 10px; }
.tod b { text-align: end; }
.tod small { color: var(--muted); font-size: 13px; }
.tod.sharpest span:first-child { font-weight: 800; }
.tod.sharpest .meter i { background: var(--gold); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; background: var(--surface); }
.chip.on { background: var(--teal); color: var(--cream); border-color: var(--teal); }
.env-add { display: flex; gap: 8px; margin-bottom: 10px; }
.env-add input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--c); border-radius: 8px; padding: 10px 12px;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.row-top { font-size: 14px; color: var(--muted); }
.row-top b { color: var(--c); }
.row-score { grid-row: span 2; text-align: end; font-size: 15px; color: var(--muted); display: flex; flex-direction: column; }
.row-score b { font-size: 24px; font-weight: 900; color: var(--ink); }
.row-score small { font-size: 12px; }
.row-note { margin: 0; font-size: 15px; cursor: pointer; }
.row-note span { color: var(--muted); font-size: 13px; text-decoration: underline dotted; }
.row.env { border-inline-start-color: var(--bad); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); display: block; }
.row.env p { margin: 2px 0 0; color: var(--bad); font-weight: 600; }
@media (max-width: 420px) { .tod { grid-template-columns: 6.5em 1fr 3em; } .tod small { display: none; } .today-bar b { font-size: 28px; } }

/* feedback note button (review period) */
.note-fab { position: fixed; inset-inline-start: 16px; inset-block-end: 16px; z-index: 50; display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 14px/1 Heebo, sans-serif; opacity: .85; }
.note-fab:hover { opacity: 1; border-color: var(--ink); }
.note-sheet textarea { width: 100%; box-sizing: border-box; font: 16px/1.5 Heebo, sans-serif; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
.note-ctx { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.note-actions { display: flex; gap: 8px; margin-top: 10px; }
.note-actions .go { flex: 1; width: auto; }
.note-count { color: var(--muted); font-size: 13px; margin: 10px 0 4px; }
.note-list { margin: 0; padding-inline-start: 20px; font-size: 14px; }
.note-list li { margin-bottom: 6px; }
.note-list small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 600px) { .note-fab span { display: none; } .note-fab { padding: 11px; } }

/* ===== v3 (26.11.2026): Kisi's notes after playing. Overrides the rules above. ===== */

/* home: bigger tiles, like Memory League's discipline cards */
.tiles { grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile:last-child { grid-column: auto; }
.tile { border-radius: 8px; border-bottom: 3px solid var(--c); }
.tile .art, .tile:last-child .art { aspect-ratio: 16 / 7; font-size: 15px; }
.tile-body { display: flex; flex-direction: column; padding: 12px 14px 4px; gap: 2px; }
.tile-name { font-size: 22px; }
.tile-blurb { color: var(--muted); font-size: 15px; }
.tile-foot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 14px 14px; }
.tile .lvbar { padding: 0; }

/* instructions: numbered steps and drawn keys */
.how { width: min(92vw, 520px); }
.steps { margin: 0 0 16px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; }
.steps li::marker { color: var(--c); font-weight: 800; }
.steps .sub { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-size: 15px; }
.keys { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 8px; }
.keyrow { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.key { display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 8px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); border-bottom-width: 3px; font: 700 13px/1 var(--font); color: var(--ink); }
.key svg { width: 18px; height: 18px; }
.key.wide { min-width: 54px; }
.mini-done { display: inline-block; background: var(--ok); color: #fff; font-weight: 800; font-size: 13px; padding: 1px 8px; border-radius: 5px; }

/* preferences: live picture */
.pv-label { margin: 14px 0 6px; font-weight: 700; font-size: 15px; }
.pv-table { background: var(--teal-2); border-radius: 8px; padding: 14px 10px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pv-show { display: flex; gap: 8px; justify-content: center; min-height: 70px; align-items: center; }
.pv-item { background: var(--cream); color: var(--teal); border-radius: 4px; padding: 5px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.pv-images .pv-item img { width: 46px; height: 46px; display: block; }
.pv-show.pv-images:has(.pv-item:only-child) .pv-item img { width: 66px; height: 66px; }
.pv-names .pv-item { padding: 0; overflow: hidden; display: flex; flex-direction: column; width: 56px; font-size: 11px; }
.pv-names .pv-item img { width: 56px; height: 56px; object-fit: cover; }
.pv-cards .pv-item { background: none; padding: 0; }
.pv-cards .card { font-size: 18px; }
.pv-show.fan { gap: 0; } .pv-show.fan .pv-item + .pv-item { margin-inline-start: -14px; }
.pv-strip { display: flex; width: 100%; justify-content: flex-end; height: 22px; overflow: hidden; }
.pv-strip.off { height: 0; }
.pv-strip span { flex: none; width: 10px; overflow: hidden; height: 22px; }
.pv-strip img { width: 22px; height: 22px; object-fit: cover; }
.pv-strip .card { font-size: 7px; } .pv-strip span span { font-size: 9px; color: var(--cream); white-space: nowrap; }
.pv-digits { display: flex; flex-direction: column; gap: 4px; color: var(--cream); font-weight: 800; font-variant-numeric: tabular-nums; }
.pv-digits span { display: inline-block; width: 1.1em; text-align: center; border-radius: 3px; }
.pv-digits span.gap { margin-inline-end: 8px; }
.pv-digits span.on { background: var(--gold); color: var(--teal); }

/* memorise: the Memory League layout. Big framed item, strip of the rest, three square buttons */
.memo .table { padding: 28px 12px 18px; gap: 22px; min-height: 420px; justify-content: space-between; }
.show { min-height: 300px; gap: 16px; }
.show figure { border: 6px solid #fff; border-radius: 2px; background: #fff; }
.show-images figure { width: min(60vw, 320px); padding: 0; }
.show-images.per-2 figure { width: min(40vw, 260px); }
.show-images.per-3 figure { width: min(27vw, 220px); }
.show-images.per-4 figure, .show-images.per-5 figure { width: min(20vw, 170px); transform: none; }
.show-images .pos, .show-names .pos { display: none; }
.show-words figure { border: 0; border-radius: 6px; }
.show-cards figure { border: 0; background: none; }
.strip { display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 56px; }
.strip .seen, .strip .rest { display: flex; min-width: 0; overflow: hidden; height: 100%; align-items: center; }
.strip .rest { justify-content: flex-end; flex: 1; }
.strip .seen { flex: 0 1 auto; max-width: 40%; }
.s-item { flex: none; width: 14px; height: 56px; overflow: hidden; display: block; border: 1px solid rgba(255,255,255,.5); }
.s-item:last-child { width: auto; }
.strip-images img, .strip-names img { width: 56px; height: 56px; object-fit: cover; display: block; }
.strip-names .s-item span { display: none; }
.strip-cards .s-item { border: 0; width: 12px; }
.strip-cards .card { font-size: 15px; }
.strip-words .s-item { width: auto; height: auto; border: 0; }
.strip-words .s-item span { font-size: 12px; padding: 2px 6px; background: var(--teal-3); color: var(--cream); border-radius: 3px; margin-inline-end: 3px; }
.strip-words .rest .s-item:nth-child(n+9), .strip-words .seen .s-item:nth-last-child(n+6) { display: none; }
.pager { gap: 14px; }
.nav-btn, .nav-btn.fwd { width: 64px; height: 54px; border-radius: 4px; background: var(--c); color: #fff; border: 0; }
:root .nav-btn svg { width: 28px; height: 28px; fill: currentColor; }
.nav-btn:disabled { opacity: .35; }
@media (max-width: 520px) { .show-images figure { width: min(70vw, 280px); } .strip { height: 40px; } .s-item { height: 40px; width: 10px; }
  .strip-images img, .strip-names img { width: 40px; height: 40px; } .memo .table { min-height: 0; } .show { min-height: 220px; } }

/* recall: slots on the left, big preview on the right, the pool keeps its holes */
.recall-grid { display: grid; grid-template-columns: 1fr minmax(0, 220px); gap: 14px; align-items: start; }
@media (max-width: 640px) { .recall-grid { grid-template-columns: 1fr; } .preview { display: none; } }
.preview { aspect-ratio: 1; border: 6px solid #fff; background: #fff; border-radius: 2px; }
.preview:empty { background: var(--teal-3); border-color: var(--teal-3); }
.preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.slots-images { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.slots-images .slot { aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 2px; border: 1px solid #3D6879; background: var(--teal-3); }
.slots-images .slot .pos { top: -16px; inset-inline-start: 0; color: #9BB4BE; }
.slots-images { row-gap: 22px; padding-top: 16px; }
.slots-images .slot.full { background: #fff; border-color: #fff; }
.slots-images .slot.full img { width: 100%; height: 100%; object-fit: cover; }
.slots-images .slot.sel { background: var(--gold); border-color: var(--gold); }
.slot.full { cursor: pointer; }
.pool-images { gap: 4px; justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--teal-3); }
.pool-images .pick { padding: 0; border-radius: 2px; border: 2px solid #fff; background: #fff; }
.pool-images .pick img { width: 50px; height: 50px; }
.pick.hole { width: 54px; height: 54px; border: 1px dashed #2A5567; background: none; }
.ghost-fly { position: fixed; z-index: 60; pointer-events: none; margin: 0; }

/* leaving mid round */
.leave p { color: var(--muted); margin: 0 0 6px; }

/* result */
.note-box small { font-weight: 400; color: var(--muted); font-size: 13px; margin-inline-start: 6px; }

/* strip fix (30.11): the newest seen item and the next upcoming one are always the visible ends;
   card slivers show the corner index, like a real fanned deck */
.strip .seen { justify-content: flex-end; flex: 0 1 auto; max-width: 45%; }
.strip .rest { justify-content: flex-start; flex: 0 1 auto; max-width: 45%; margin-left: auto; }
.strip .rest .s-item:last-child { width: 14px; }
.strip .rest .s-item:first-child { width: auto; }
.strip-cards .s-item, .strip-cards .rest .s-item:last-child { width: 18px; }
.strip-cards .seen .s-item:last-child, .strip-cards .rest .s-item:first-child { width: auto; }
.strip-cards .card { font-size: 15px; justify-content: flex-start; align-items: flex-start; padding: .18em 0 0 .16em; gap: .05em; box-shadow: -1px 0 0 rgba(8,42,56,.35); }
.strip-cards .card b { font-size: .8em; } .strip-cards .card i { font-size: .8em; }
@media (max-width: 520px) { .strip-cards .s-item, .strip-cards .rest .s-item:last-child { width: 13px; } .strip-cards .card { font-size: 11px; } }

/* the person-action-object table */
.pao { display: grid; gap: 12px; }
.pao-intro { margin: 0; color: #C9D6DB; line-height: 1.6; }
.pao-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pao-count { flex: 1; } .pao-count b { color: var(--c); font-size: 1.15em; }
.pao-only { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pao-head, .pao-row { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.pao-head { font-size: 13px; color: #9BB4BE; position: sticky; top: 0; background: var(--teal-2, #0E3646); padding: 6px 0; z-index: 1; }
.pao-list { display: grid; gap: 6px; }
.pao-key { font-weight: 800; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.pao-key .card { font-size: 13px; }
.pao-row input { width: 100%; min-width: 0; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: var(--cream); font: inherit; font-size: 15px; }
.pao-row input:focus { outline: 2px solid var(--c); border-color: transparent; }
.pao-row[hidden] { display: none; }
@media (max-width: 520px) { .pao-head, .pao-row { grid-template-columns: 40px repeat(3, minmax(0, 1fr)); gap: 4px; } .pao-row input { padding: 7px 6px; font-size: 14px; } }

/* strip v3 (30.11): fixed places, exactly like a fanned deck. The current item leaves a gap */
.strip.fixed { position: relative; display: block; height: var(--sh); --sh: 56px; --cw: 56px;
  --step: min(22px, max(3px, (100% - 2 * var(--cw) - 32px) / max(1, var(--n) - 2))); }
.strip.fixed .s-item { position: absolute; top: 0; width: var(--cw); height: 100%; overflow: hidden; border: 1px solid rgba(255,255,255,.6); box-shadow: -1px 0 2px rgba(0,0,0,.25); }
.strip.fixed .s-item.seen { left: calc(var(--i) * var(--step)); }
.strip.fixed .s-item.rest { right: calc((var(--n) - 1 - var(--i)) * var(--step)); }
.strip.fixed .s-item.cur { display: none; }
.strip.fixed img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-cards.fixed { --sh: 96px; --cw: 69px; }
.strip-cards.fixed .s-item { border: 0; border-radius: 5px; }
.strip-cards.fixed .card { width: 100%; height: 100%; font-size: 26px; border-radius: 5px; justify-content: flex-start; align-items: flex-start; padding: 4px 0 0 3px; gap: 1px; }
.strip-cards.fixed .card b { font-size: .62em; } .strip-cards.fixed .card i { font-size: .6em; }
@media (max-width: 520px) { .strip.fixed { --sh: 40px; --cw: 40px; } .strip-cards.fixed { --sh: 64px; --cw: 46px; } .strip-cards.fixed .card { font-size: 18px; } }
.pao-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.pao-groups button { flex: 1 1 0; min-width: 64px; display: grid; gap: 2px; padding: 8px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.04); color: var(--cream); font: inherit; cursor: pointer; }
.pao-groups button b { font-size: 22px; line-height: 1; } .pao-groups .cards-dummy {}
.pao-groups button .red { color: #E2574C; }
.pao-groups button small { font-size: 12px; color: #9BB4BE; }
.pao-groups button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.pao-groups button.full small { color: #7FD1A4; }

/* baseline test */
.base-page { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.base-pick, .base-sum { display: grid; gap: 8px; }
.base-opt, .base-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); cursor: pointer; }
.base-opt:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.base-opt input { width: 20px; height: 20px; accent-color: var(--c); flex: none; }
.base-txt { display: grid; gap: 2px; } .base-txt small, .base-row small { color: #9BB4BE; }
.base-row b:first-of-type { flex: 1; }
.base-score b { font-size: 24px; color: var(--c); }
.base-step { text-align: center; color: #9BB4BE; font-size: 14px; }
#base-go:disabled { opacity: .4; }

/* sign-in */
.base-page .art-sm { width: 64px; flex: none; }
body.locked .top nav, body.locked .who { display: none; }
.auth { max-width: 440px; margin: 6vh auto 0; display: grid; gap: 14px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; }
.auth-form input { padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: var(--cream); font: inherit; font-size: 17px; }
.auth-form input:focus { outline: 2px solid var(--gold, #E0C454); border-color: transparent; }
.auth-err { color: #F0A49C; min-height: 1.4em; margin: 0; }
.auth-switch { color: #9BB4BE; }
.link { background: none; border: 0; color: var(--gold, #E0C454); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.who { margin-inline-start: 8px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); color: var(--cream); background: none; font: inherit; font-size: 14px; cursor: pointer; }
.hello { font-size: 22px; font-weight: 800; margin: 0 0 14px; }

/* round 3 (30.11): Memory League layout for words and names, the big item and the list of what's next beside it */
.ml { display: flex; gap: 28px; align-items: stretch; min-height: 420px; }
.ml-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; min-width: 0; }
.side { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), auto); gap: 6px 14px; align-content: start; justify-content: start; direction: ltr; }
.sw { display: flex; align-items: center; gap: 6px; }
.sw em { font-style: normal; color: #9BB4BE; font-size: 13px; min-width: 2.2em; text-align: end; }
.sw b { background: #fff; color: #111; font-weight: 500; font-size: 14px; padding: 3px 8px; border-radius: 4px; min-width: 96px; text-align: center; direction: rtl; }
.sn { display: grid; gap: 2px; width: 62px; }
.sn img { width: 62px; height: 62px; object-fit: cover; display: block; border: 2px solid #fff; }
.sn b { background: #fff; color: #111; font-size: 11px; font-weight: 500; text-align: center; border-radius: 3px; direction: rtl; white-space: nowrap; overflow: hidden; }
.side-names { gap: 8px 12px; }
.ml-words .show { flex-direction: column; }
.ml-words .show figure { width: min(100%, 440px); padding: 22px 16px; font-size: clamp(34px, 5vw, 60px); font-weight: 500; color: #111; border: 0; border-radius: 4px; overflow: visible; }
.ml-words .show .pos { display: block; position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: -1.6em; font-size: .9em; color: #111; font-weight: 500; }
.ml-words .show { padding-left: 1.8em; font-size: clamp(34px, 5vw, 60px); }
.ml-words .show figure { font-size: inherit; }
.ml-names .show figure { width: min(60vw, 300px); border: 6px solid #fff; background: #fff; }
.ml-names .show figure span:not(.pos) { font-size: clamp(26px, 3.6vw, 44px); font-weight: 500; color: #111; background: #fff; border-radius: 12px; margin-top: 18px; }
.ml-names .show.per-1 figure { width: min(60vw, 320px); }
@media (max-width: 760px) { .ml { flex-direction: column; } .side { overflow-x: auto; --rows: 4 !important; } }
/* numbers: the tracking box is an outline, the digit stays readable */
.memo .drow span.on { background: none; color: inherit; box-shadow: 0 0 0 3px var(--gold); }
.pv-digits span.on { background: none; color: inherit; box-shadow: 0 0 0 2px var(--gold); }
.ml-words .show .pos::after { content: '.'; }
.sn { width: 52px; } .sn img { width: 52px; height: 52px; }
/* images strip (his note 30.11): bigger tiles, a white frame and a shadow on each, so the slivers read as separate pictures */
.strip-images.fixed { --sh: 72px; --cw: 72px; --step: min(48px, max(3px, (100% - 2 * var(--cw) - 32px) / max(1, var(--n) - 2))); }
.strip-images.fixed .s-item { border: 2px solid #fff; border-radius: 3px; background: #fff; box-shadow: -3px 0 6px rgba(0,0,0,.45); }
@media (max-width: 520px) { .strip-images.fixed { --sh: 48px; --cw: 48px; } }

/* static side list (30.11): buttons, the current item highlighted */
.side button { font: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.sw.cur b { background: var(--gold); color: var(--teal); font-weight: 800; }
.sn { border-radius: 4px; }
.sn.cur { outline: 3px solid var(--gold); outline-offset: 2px; }
.sn.cur b { background: var(--gold); color: var(--teal); font-weight: 800; }
.side button:hover b { outline: 1px solid var(--gold); }
