/* Page furniture: the stage, overlay cards, buttons, the theme's plaques (stats, actions, the round menu button and
   the logo sign) and the lesson line. Colours come from the theme (js/themes.js sets the --skin-*
   variables); the moods (cartoon, chalk, parchment, ledger, steel) are small style presets. Carried over from the
   Nick Challenge library's shared css/game.css and css/plaques.css, without the library's header, votes and kit switch. */
:root { --bg: #0d0e12; --panel: #16181f; --text: #f5f5f7; --muted: #a3a8b5; --accent: #f5a623; --cyan: #38e4ff; --good: #7dffb0; --bad: #ff3d81; --alert: #ff3b3b; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
:root { --skin-panel: #16181f; --skin-frame: rgba(255,255,255,.14); --skin-text: #f5f5f7; --skin-accent: var(--skin-tint, #f5a623); --skin-font: var(--font); --skin-radius: 14px; }
html[data-mood="cartoon"] { --skin-radius: 20px; }
html[data-mood="steel"], html[data-mood="stone"] { --skin-radius: 8px; }
html[data-mood="parchment"] { --skin-radius: 10px; }
* { box-sizing: border-box; }
/* a label read by screen readers (and the i18n checks) but not drawn: the round action buttons carry icons */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--script-font, var(--font)); height: 100vh; height: 100dvh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; overscroll-behavior: none; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* the theme's backdrop behind everything: the wide picture on wide screens, the tall one on phones */
html.has-skin-bg body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(rgba(8,9,14,.42), rgba(8,9,14,.66)), var(--skin-bg-wide) center / cover no-repeat; }
@media (max-width: 900px) { html.has-skin-bg body::before { background-image: linear-gradient(rgba(8,9,14,.3), rgba(8,9,14,.6)), var(--skin-bg-portrait); } }
html.has-skin-bg body { background: transparent; }
html.has-skin-bg .panel { background: rgba(14,16,22,.94); }

.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; padding: 12px; overflow: hidden; }
/* the status strip under the action row: a fixed place beside the board where the game talks (the selected card's
   name, the found pair with its fact, a refused pair, a cut pipe), so a message never covers a button and never
   relies on colour alone (each kind carries its icon). Two lines are reserved; js/game.js trims a line that would
   not fit, so nothing ever spills out of the plaque. */
.statusbar { display: flex; align-items: center; gap: 8px; padding: 5px 12px; min-height: 48px; border-radius: 12px; background: var(--skin-panel); border: 2px solid var(--skin-frame); color: var(--skin-text); box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); }
.statusbar__icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; font-style: normal; background: rgba(255,255,255,.12); color: #fff; }
.statusbar__icon[hidden] { display: none; }
.statusbar__icon.good { background: rgba(70,211,105,.25); color: var(--good); }
.statusbar__icon.bad { background: rgba(255,61,129,.22); color: var(--bad); }
.statusbar__icon.cut, .statusbar__icon.hint { background: rgba(255,210,102,.2); color: #ffd166; }
/* padding-block keeps a display font's tall ascenders (Kalam) inside the box the layout check measures */
.msg { flex: 1; min-width: 0; max-height: 42px; overflow: hidden; padding-block: 3px; font-size: 12.5px; line-height: 1.35; font-weight: 700; color: #e8ebf2; }
.msg.good { color: var(--good); } .msg.bad { color: var(--bad); } .msg.cut { color: #ffd166; }

/* overlay cards: they never scroll, js/ui.js zooms a card down until it fits */
.overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,9,14,.72); backdrop-filter: blur(6px); overflow: hidden; }
.overlay[hidden] { display: none; }
/* the fill dialog (every pair connected, tiles left empty): a light scrim and no blur, so the red tiles on the board
   stay in view around it; its red edge ties it to them (--alert is the game's warning red, not a theme colour) */
#ov-fill { background: rgba(8,9,14,.4); backdrop-filter: none; }
#ov-fill .panel { width: min(440px, 100%); padding: 20px 22px 18px; border: 2px solid var(--alert); }
#ov-fill h2 { font-size: clamp(1.35rem, 5.6vw, 1.8rem); }
#ov-fill p { font-size: 14.5px; margin-bottom: 10px; }
.fill-icon { display: flex; justify-content: center; margin: 0 0 10px; }
.fill-icon svg { width: 64px; height: 64px; display: block; }
.fill-icon .cell { fill: rgba(255,255,255,.26); }
.fill-icon .gap { fill: var(--alert); }
.fill-icon .pipe { fill: none; stroke: var(--skin-accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.panel { width: min(520px, 100%); margin: auto; text-align: center; background: rgba(22,24,31,.94); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 28px 28px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.panel__label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.panel h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 6px; letter-spacing: -.03em; font-weight: 900; }
.panel h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 6px; letter-spacing: -.02em; font-weight: 900; }
.panel h1, .panel h2 { font-family: var(--script-font, var(--skin-font)); }
.panel p { color: #d8dbe3; margin: 0 0 14px; line-height: 1.5; font-size: 15px; }
.panel .muted { color: var(--muted); font-size: 13px; }
.panel .score { margin: 4px 0 10px; font-size: 18px; font-weight: 900; color: var(--skin-accent); font-variant-numeric: tabular-nums; }
.panel .score[hidden] { display: none; }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; text-align: start; }
.howto div { background: rgba(255,255,255,.04); border-radius: 8px; padding: 12px; font-size: 12.5px; line-height: 1.4; color: #d8dbe3; }
.howto b { display: block; color: #fff; margin-bottom: 4px; font-size: 13px; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.btn { border: 0; border-radius: 6px; padding: 12px 24px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.btn--primary { background: #fff; color: #000; }
.btn--primary:hover { background: rgba(255,255,255,.85); }
.btn--accent { background: var(--accent); color: #1a1100; }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.18); }
.btn[hidden] { display: none; }
.keys { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ---------- a drawn title scene (theme art.title, a 2:3 plate with a blank board): the game's own text sits on the
   board, sized in cqw so every language scales with the plate; the name plate carries the theme's (translated) name.
   Only the title card changes, and only for a theme that ships the plate. */
html.has-skin-title #ov-title { padding: 0; }
html.has-skin-title #ov-title .title-scene { position: relative; aspect-ratio: 2 / 3; height: min(100%, 150vw); max-width: 100%; container-type: size; background: var(--skin-title) center / cover no-repeat; }
html.has-skin-title #ov-title .title-scene::before { content: attr(data-name); position: absolute; top: 17.1%; left: 50%; transform: translateX(-50%); width: 42%; text-align: center; font-size: 2.3cqw; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; color: #41464e; white-space: nowrap; }
html.has-skin-title #ov-title .panel { position: absolute; inset: 23% 16.5% auto 19%; height: 52%; width: auto; background: none; border: 0; box-shadow: none; border-radius: 0; padding: 1.5cqw; margin: 0; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; }
html.has-skin-title #ov-title .panel__label { display: none; }
html.has-skin-title #ov-title h1 { font-size: 12cqw; line-height: 1.05; margin: 0; color: #ffc62e; -webkit-text-stroke: 0.5cqw #1c2c4e; letter-spacing: .01em; text-shadow: 0 0.7cqw 0 rgba(10,18,36,.55), 0 1.5cqw 2.8cqw rgba(0,0,0,.4); }
html.has-skin-title #ov-title #title-intro { font-size: 3.1cqw; line-height: 1.5; color: #e4edff; margin: 0; max-width: 94%; }
html.has-skin-title #ov-title .howto { display: none; }
html.has-skin-title #ov-title .actions { margin: 0; gap: 2cqw; }
html.has-skin-title #ov-title .btn { font-size: 3.6cqw; padding: 2.2cqw 6cqw; border-radius: 5cqw; }
html.has-skin-title #ov-title #btn-start { background: linear-gradient(180deg, #ffd766, #f5a623); color: #1a1100; border: 0.4cqw solid #ffe9a8; box-shadow: 0 0.9cqw 0 rgba(110,60,0,.5), 0 1.8cqw 3cqw rgba(0,0,0,.45); }
html.has-skin-title #ov-title .keys { margin: 0; font-size: 2.5cqw; color: #9fb6de; }
/* the landscape companion plate (art.titleWide): desktops, and tablets on their side. Its board sits off-centre
   and its name plate is part of the drawing, so the overlay name goes and the type sizes follow the height. */
@media (orientation: landscape) {
  html.has-skin-title-wide #ov-title .title-scene { aspect-ratio: 16 / 9; height: min(100%, 56.25vw); background-image: var(--skin-title-wide); }
  html.has-skin-title-wide #ov-title .title-scene::before { content: none; }
  html.has-skin-title-wide #ov-title .panel { inset: 22.5% 36.5% auto 37.8%; height: 50.5%; padding: 1cqh; }
  html.has-skin-title-wide #ov-title h1 { font-size: 7.5cqh; -webkit-text-stroke: 0.3cqh #1c2c4e; text-shadow: 0 0.45cqh 0 rgba(10,18,36,.55), 0 0.9cqh 1.8cqh rgba(0,0,0,.4); }
  html.has-skin-title-wide #ov-title #title-intro { font-size: 2.2cqh; line-height: 1.5; }
  html.has-skin-title-wide #ov-title .actions { gap: 1.5cqh; }
  html.has-skin-title-wide #ov-title .btn { font-size: 2.5cqh; padding: 1.5cqh 4.5cqh; border-radius: 4cqh; }
  html.has-skin-title-wide #ov-title #btn-start { border-width: 0.3cqh; box-shadow: 0 0.6cqh 0 rgba(110,60,0,.5), 0 1.2cqh 2cqh rgba(0,0,0,.45); }
  html.has-skin-title-wide #ov-title .keys { font-size: 1.8cqh; }
}
/* a phone on its side has no height for the tall plate: the plain card returns */
@media (orientation: landscape) and (max-height: 520px) {
  html.has-skin-title #ov-title { padding: 20px; }
  html.has-skin-title #ov-title .title-scene { aspect-ratio: auto; height: auto; width: min(520px, 100%); background: none; container-type: normal; }
  html.has-skin-title #ov-title .title-scene::before { content: none; }
  html.has-skin-title #ov-title .panel { position: static; height: auto; display: block; background: rgba(22,24,31,.94); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 14px 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
  html.has-skin-title #ov-title .panel__label { display: block; }
  html.has-skin-title #ov-title h1 { font-size: 1.7rem; color: inherit; -webkit-text-stroke: 0; text-shadow: none; }
  html.has-skin-title #ov-title #title-intro { font-size: 13.5px; color: #d8dbe3; max-width: none; margin-bottom: 10px; }
  html.has-skin-title #ov-title .actions { gap: 10px; margin-top: 8px; }
  html.has-skin-title #ov-title .btn { font-size: 15px; padding: 12px 24px; border-radius: 6px; }
  html.has-skin-title #ov-title #btn-start { background: #fff; color: #000; border: 0; box-shadow: none; }
  html.has-skin-title #ov-title .keys { margin-top: 8px; font-size: 12px; color: var(--muted); }
}

/* the lesson line: what the theme is about */
#lesson-host { width: 100%; max-width: 100%; flex: none; }
.lesson { width: 100%; max-width: 100%; text-align: center; font-size: 13px; color: var(--muted); padding: 6px 12px 0; }
.lesson b { color: var(--skin-tint, var(--accent)); }
.lesson__text { color: #d8dbe3; }
.lesson__text::before { content: ': '; color: var(--muted); }
html.has-skin-bg .lesson { background: rgba(8,9,14,.62); border-radius: 10px; padding: 6px 12px; }
html.has-skin-bg .lesson__text { color: #fff; }

/* facts on the clear card: two columns where there is room. Every pair's fact is on the card on every screen size
   (audit: phones used to hide all but three); the list is the one place on a game screen that may scroll. */
.asset { width: 100%; height: 100%; object-fit: contain; display: block; }
.asset--text { display: grid; place-items: center; font-size: 11px; font-weight: 700; text-align: center; color: #fff; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px; margin: 10px 0; text-align: start; max-height: min(44vh, 340px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-inline-end: 2px; }
.fact { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.05); font-size: 13px; line-height: 1.3; }
.fact img, .fact .asset--text { width: 36px; height: 36px; flex: none; border-radius: 8px; }
.fact b { color: #fff; }

/* the stars card (the desktop star button): the best result per level, in the app's own bands, shown only */
.stars { display: grid; gap: 6px; margin: 10px 0; text-align: start; max-height: min(44vh, 320px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-inline-end: 2px; }
.star-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-radius: 10px; background: rgba(0,0,0,.25); font-weight: 800; font-size: 14px; }
.star-row--locked { opacity: .45; }
.star-row i { display: inline-flex; gap: 4px; font-style: normal; }
.star-row svg { width: 20px; height: 20px; display: block; }
.star-row .on { color: var(--skin-accent); filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.star-row .off { color: rgba(255,255,255,.25); }

@media (max-width: 900px) {
  .howto { grid-template-columns: 1fr; gap: 4px; margin: 10px 0; }
  .howto div { padding: 6px 8px; font-size: 11.5px; line-height: 1.3; } .howto b { display: inline; margin: 0; margin-inline-end: 4px; font-size: 12px; }
  .panel { padding: 16px 14px 14px; } .panel h1 { font-size: 1.7rem; } .panel h2 { font-size: 1.4rem; } .panel p { font-size: 13.5px; margin-bottom: 10px; }
  .keys { margin-top: 8px; }
  .facts { grid-template-columns: 1fr; max-height: min(42vh, 300px); }
  .stage { padding: 8px; }
}
/* short viewports (phones, small laptops): the how-to cards go, the intro line carries the instructions */
@media (max-height: 700px) { .howto { display: none; } .panel { padding-top: 16px; padding-bottom: 14px; } .panel h1 { margin-bottom: 4px; } }
/* phones and short screens: the theme's name and subject only (on two lines at most), never a sentence cut short */
@media (max-width: 900px), (max-height: 700px) { .lesson { font-size: 12px; line-height: 1.3; padding-top: 4px; } .lesson__text { display: none; } }

/* ---------- plaques: a top row with the round buttons and the game's sign, stat plaques, chunky action buttons */
.column { width: min(100%, 560px); height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topbar__btns { display: flex; align-items: center; gap: 8px; flex: none; }
.round-btn { width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--skin-frame); background: var(--skin-panel); color: var(--skin-text); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.2); flex: none; padding: 0; }
.round-btn[hidden] { display: none; }
.round-btn svg { width: 24px; height: 24px; }
/* a theme's mascot vignette (art.mascot) between the menu button and the sign: decor, never in the way */
.topbar__mascot { height: 78px; max-width: min(42vw, 230px); object-fit: contain; align-self: flex-end; margin-bottom: -10px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); pointer-events: none; }
.topbar__mascot[hidden] { display: none; }
.plaque-logo { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.plaque-logo img { height: 66px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.plaque-logo img[hidden] { display: none; } .plaque-logo img:not([hidden]) + b { display: none; }
.plaque-logo b { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 900; line-height: 1.1; color: var(--skin-accent); -webkit-text-stroke: 1.5px rgba(0,0,0,.45); text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.5); font-family: var(--script-font, var(--skin-font)); }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.splaque { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 12px; background: var(--skin-panel); border: 2px solid var(--skin-frame); color: var(--skin-text); box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); min-width: 0; }
.splaque__icon { flex: none; width: 34px; height: 34px; border-radius: 9px; background: rgba(0,0,0,.35); color: var(--skin-accent); display: grid; place-items: center; }
.splaque__icon svg { width: 22px; height: 22px; }
.splaque div { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.splaque span { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .8; white-space: nowrap; }
.splaque b { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; unicode-bidi: isolate; align-self: flex-start; }
.splaque__bar { display: block; align-self: stretch; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(0,0,0,.45); overflow: hidden; }
.splaque__bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--skin-accent), #ffd98a); border-radius: 2px; }
/* the action row: round icon buttons (their words stay for screen readers), the hint lamp biggest in the middle */
.actions-row { display: grid; grid-template-columns: 44px 1fr 1fr 1fr 44px; gap: 8px; align-items: center; justify-items: center; }
.abtn { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; padding: 0; border-radius: 50%; border: 2px solid var(--skin-frame); background: var(--skin-panel); color: var(--skin-text); font: inherit; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.abtn--hint { width: 64px; height: 64px; }
.abtn svg { width: 24px; height: 24px; }
.abtn--hint svg { width: 28px; height: 28px; }
/* dark action buttons in the theme's own navy (the kit's look): a lit top edge over a deepened panel colour */
.abtn--dark { background: linear-gradient(180deg, color-mix(in srgb, var(--skin-panel) 82%, #fff), color-mix(in srgb, var(--skin-panel) 72%, #000)); border-color: var(--skin-frame); color: #fff; }
.abtn--hint { background: linear-gradient(180deg, #ffd766, #f5a623); color: #1a1100; border-color: #ffe9a8; }
.abtn--round { width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 22px; background: color-mix(in srgb, var(--skin-panel) 74%, #000); border-color: var(--skin-frame); }
/* home, settings and stars exist only on the open desktop layout (css/game.css shows them) */
.abtn--desk { display: none; }
.abtn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.abtn[disabled] { opacity: .35; cursor: default; }
html[data-mood="cartoon"] .splaque, html[data-mood="cartoon"] .statusbar, html[data-mood="cartoon"] .round-btn { border-width: 3px; }
html[data-mood="steel"] .splaque, html[data-mood="steel"] .statusbar, html[data-mood="steel"] .abtn, html[data-mood="steel"] .round-btn { border-radius: 0; }
html[data-mood="chalk"] .splaque, html[data-mood="chalk"] .statusbar { border-style: dashed; }
@media (min-width: 900px) { .column { width: min(100%, 600px); } }
@media (max-height: 760px) { .column { gap: 6px; } .plaque-logo img { height: 54px; } .topbar__mascot { height: 60px; margin-bottom: -8px; } .round-btn { width: 42px; height: 42px; } .splaque { padding: 5px 7px; gap: 6px; } .splaque__icon { width: 28px; height: 28px; } .splaque__icon svg { width: 18px; height: 18px; } .splaque span { font-size: 8.5px; } .splaque b { font-size: .95rem; } .abtn { width: 46px; height: 46px; } .abtn--hint { width: 54px; height: 54px; } .abtn svg { width: 21px; height: 21px; } .abtn--hint svg { width: 24px; height: 24px; } .abtn--round { width: 38px; height: 38px; } }
@media (max-width: 420px) { .statrow { gap: 4px; } .splaque { padding: 5px 5px; gap: 4px; border-radius: 10px; } .splaque__icon { width: 24px; height: 24px; border-radius: 7px; } .splaque__icon svg { width: 16px; height: 16px; } .splaque span { font-size: 8px; letter-spacing: .08em; } .splaque b { font-size: .9rem; } .abtn { width: 44px; height: 44px; } .abtn--hint { width: 52px; height: 52px; } .abtn svg { width: 19px; height: 19px; } .abtn--hint svg { width: 22px; height: 22px; } }
/* a phone held upright: four plaques share 370px, so the labels get the width the icons took (CONNECTED, LIBERADAS) */
@media (max-width: 420px) and (orientation: portrait) { .splaque__icon { display: none; } .splaque { padding: 5px 7px; } .splaque span { letter-spacing: .04em; } }

/* ---------- the sound button (the only control beside the way out: there is no menu) */
#btn-mute:not(.is-muted) .slash { display: none; }
#btn-mute.is-muted .wave { display: none; }
#btn-mute.is-muted { opacity: .82; }
#btn-mute svg { width: 24px; height: 24px; }

/* ---------- languages (js/i18n.js sets <html lang dir> from ?lang=)
   Hebrew and Arabic are set in Rubik, one family for every script on the page (Bible rule 1, §5.5.4): switched here on
   the page's language, never by a per-glyph fallback chain. Latin keeps the theme's font. */
:root:lang(he), :root:lang(ar) { --script-font: 'Rubik', system-ui, sans-serif; }
/* letter-spacing breaks Arabic joining and does nothing for Hebrew */
html:is(:lang(he), :lang(ar)) :is(.panel__label, .panel h1, .panel h2, .splaque span, .abtn, .msg, .plaque-logo b) { letter-spacing: 0; }
/* RTL flips text and reading order only (Bible §5.5.5, rule 25). The board, the layout around it (the board stays on
   the left of a phone on its side), the action row (level arrows, Clear, Hint, Undo), the round buttons and the logo
   stay where they are; the stat plaques, the lesson, the cards and the toasts read
   right to left. Numbers that are one unit (1 / 10, 5 × 5) stay left to right inside them. */
html[dir="rtl"] .column, html[dir="rtl"] .topbar, html[dir="rtl"] .actions-row { direction: ltr; }
html[dir="rtl"] .statrow, html[dir="rtl"] #lesson-host, html[dir="rtl"] .actions-row .abtn:not(.abtn--round) { direction: rtl; }
