/* Game styles — RTL, mobile-first. Everything is scoped under .sd-root so the game can be embedded. */
:root {
  --bg: #0c111d; --bg-glow: #1a2647;
  --surface: #151c2c; --surface-2: #1d2639; --surface-3: #263049;
  --line: #2a3550; --line-2: #36435f;
  --ink: #eef2fb; --ink-2: #a3aec5; --ink-3: #6f7a93;
  --accent: #7b8cff; --accent-2: #5a6cf0; --accent-ink: #fff;
  --exact: #22b37d; --exact-2: #178a5f; --exact-ink: #fff;
  --misplaced: #f4b73b; --misplaced-2: #d9951a; --misplaced-ink: #2b1d00;
  --absent: #3b4560; --absent-2: #313a52; --absent-ink: #b6bfd3;
  --danger: #ff6b7a;
  --gold: #f5c542; --gold-2: #d9921a; --gold-ink: #2b1d00;
  --jk: #d77bff; --jk-2: #9246f0; --jk-ink: #fff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f1ec; --bg-glow: #e4e6fb;
    --surface: #ffffff; --surface-2: #f4f4f8; --surface-3: #e9eaf2;
    --line: #e2e2ea; --line-2: #cfd1de;
    --ink: #161a2b; --ink-2: #5b6278; --ink-3: #8c92a6;
    --accent: #5466f0; --accent-2: #3f4fd6;
    --exact: #1ea672; --exact-2: #158457;
    --misplaced: #f0ad1f; --misplaced-2: #d39010;
    --absent: #8a91a6; --absent-2: #767d93; --absent-ink: #fff;
    --gold: #e0a514; --gold-2: #b97a06;
    --jk: #b043e6; --jk-2: #7a2bd0;
    --shadow: 0 8px 24px rgba(30, 34, 60, .08);
    color-scheme: light;
  }
}

html, body { margin: 0; background: var(--bg); min-height: 100%; }
html { touch-action: manipulation; } /* no double-tap zoom (an app, not a page: zoom only brings a sideways scroll) */
/* Nothing may push the page sideways: long text wraps inside its box instead. */
html { overflow-x: hidden; overflow-x: clip; }
.sd-root { max-width: 100vw; overflow-wrap: break-word; }
body { -webkit-tap-highlight-color: transparent; }

.sd-root {
  direction: rtl;
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', 'Heebo', sans-serif;
  color: var(--ink);
  background: radial-gradient(900px 480px at 50% -120px, var(--bg-glow), transparent 70%), var(--bg);
  min-height: 100vh; min-height: 100dvh;
}
.sd-root *, .sd-root *::before, .sd-root *::after { box-sizing: border-box; }
.sd-root button { font-family: inherit; color: inherit; }
.sd-root svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sd-app { max-width: 540px; margin: 0 auto; padding: 10px 16px 0; padding-top: max(10px, env(safe-area-inset-top)); }

/* ---------- header ---------- */
.sd-header { display: flex; align-items: center; justify-content: space-between; height: 56px; }
/* Sticky (app.js headSync): scrolling down it slides up and away, scrolling up it floats back; the notch strip above it
   (an installed app) gets the page colour too */
.sd-header { position: sticky; top: env(safe-area-inset-top); z-index: 25; margin: 0 -16px; padding: 0 16px; transition: transform .28s ease, box-shadow .2s ease; }
.sd-header.float, .sd-header.hide { background: var(--bg); } /* in its place it's see-through (the page's glow at the top shows) */
.sd-header.float::before, .sd-header.hide::before { content: ''; position: absolute; inset-inline: 0; bottom: 100%; height: env(safe-area-inset-top); background: var(--bg); }
.sd-header.float { box-shadow: 0 1px 0 var(--line), 0 10px 18px -14px rgba(0, 0, 0, .45); }
.sd-header.hide { transform: translateY(calc(-100% - env(safe-area-inset-top) - 2px)); pointer-events: none; }
body.sd-head-on .sd-meter-dock { top: calc(env(safe-area-inset-top) + 64px); }
.sd-header.quiet { position: relative; top: auto; } /* a puzzle being solved: not sticky — scrolls off with the page */
@media (prefers-reduced-motion: reduce) { .sd-header { transition: none; } }
.sd-logo { display: flex; gap: 5px; }
.sd-logo-tile {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: 'Secular One', 'Rubik', sans-serif; font-weight: 400; font-size: 23px; line-height: 1; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
  animation: sd-pop .5s calc(var(--i) * 90ms) both cubic-bezier(.2, 1.4, .4, 1);
}
.sd-logo.still .sd-logo-tile { animation: none; }
/* nikud under the logo letters (brand.js): drawn, so it doesn't depend on the font having Hebrew points */
.sd-logo-tile { position: relative; }
.sd-logo-ch { position: relative; display: inline-block; line-height: 1; }
.sd-logo-tile.pointed .sd-logo-ch { transform: translateY(-2px); }
.sd-nikud { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); display: flex; gap: 2.5px; align-items: flex-start; }
.sd-nikud i { display: block; background: currentColor; border-radius: 1px; }
.sd-nikud.patah i { width: 10px; height: 2px; }
.sd-nikud.kamatz { display: block; width: 10px; height: 5px; }
.sd-nikud.kamatz i:first-child { width: 10px; height: 2px; } .sd-nikud.kamatz i:last-child { width: 2px; height: 3px; margin: 0 auto; border-radius: 0 0 1px 1px; }
.sd-nikud.tsere i { width: 2.6px; height: 2.6px; border-radius: 50%; }
.sd-nikud.segol { display: grid; grid-template-columns: 2.6px 2.6px; column-gap: 3px; row-gap: 1.5px; justify-items: center; }
.sd-nikud.segol i { width: 2.6px; height: 2.6px; border-radius: 50%; } .sd-nikud.segol i:last-child { grid-column: 1 / span 2; }
.sd-dagesh { position: absolute; display: block; width: 3px !important; height: 3px !important; padding: 0; margin: 0; border-radius: 50%; background: currentColor; left: 4%; top: 50%; }
.sd-logo-tile.exact { background: var(--exact); color: var(--exact-ink); }
.sd-logo-tile.misplaced { background: var(--misplaced); color: var(--misplaced-ink); }
.sd-logo-tile.absent { background: var(--absent); color: var(--absent-ink); }
/* tap the logo: it scrambles and sorts itself (app.js scrambleLogo) — grey while out of order */
.sd-logo { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 12px; }
.sd-logo:focus-visible { outline: 2px solid var(--exact); outline-offset: 3px; }
.sd-logo-tile { transition: background-color .22s, color .22s; }
.sd-logo-tile.mx { background: var(--absent); color: var(--absent-ink); }
.sd-hicons { display: flex; gap: 4px; }
.sd-icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.sd-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.sd-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink-2); font-size: 13.5px; margin: 2px 2px 12px; }
.sd-meta-num { color: var(--ink); font-weight: 700; }
.sd-meta-sep { color: var(--ink-3); }
.sd-meta-next { margin-inline-start: auto; white-space: nowrap; color: var(--ink-3); font-size: 12.5px; }
.sd-meta-next b, .sd-meta-next .sd-countdown { color: var(--ink-2); font-weight: 600; font-size: inherit; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sd-meta.practice .sd-meta-num { color: var(--misplaced); }
.sd-devtag { font-size: 11px; font-weight: 700; color: var(--misplaced-ink); background: var(--misplaced); padding: 2px 7px; border-radius: 99px; }
.sd-link { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: auto; background: none; border: 0; color: var(--accent) !important; font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 13.5px; }
.sd-link svg { width: 16px; height: 16px; }
.sd-link.center { display: flex; margin: 10px auto 0; }

/* ---------- question ---------- */
.sd-qcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 12px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.sd-cat { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }
.sd-question { font-size: 19px; line-height: 1.4; font-weight: 700; margin: 0 0 10px; text-wrap: balance; }
.sd-qfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: 13px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sd-dir b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--surface-3); color: var(--ink); font-size: 11.5px; margin: 0 2px; }
.sd-dots { display: flex; gap: 5px; flex-shrink: 0; }
.sd-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.sd-dot.used { background: var(--ink-3); border-color: var(--ink-3); }
.sd-dot.burned { background: transparent; border: 1.5px dashed var(--danger); }
.sd-dot.won { background: var(--exact); border-color: var(--exact); }
.sd-dot.current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- board ---------- */
.sd-board { margin-bottom: 14px; }
.sd-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 5px; }
.sd-rank { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding-bottom: 1px; }
.sd-cell {
  position: relative; min-height: 54px; border-radius: 10px; border: 0; padding: 4px 3px;
  display: grid; place-items: center; text-align: center;
  font-size: 12.5px; font-weight: 600; line-height: 1.15; overflow: hidden; overflow-wrap: anywhere;
  user-select: none; -webkit-user-select: none;
}
.sd-cell.s1 { font-size: 11.5px; }
.sd-cell.s2 { font-size: 10.5px; }
.sd-cell.s3 { font-size: 9.5px; letter-spacing: -.2px; }
.sd-cell-txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Board cells shrink a long single word to fit (down to 8.5px) instead of splitting it mid-word. */
.sd-row .sd-cell { container-type: inline-size; }
.sd-row .sd-cell-txt { font-size: max(8.5px, min(1em, calc(100cqi / (var(--w, 1) * .62)))); }
.sd-cell.exact { background: linear-gradient(165deg, var(--exact), var(--exact-2)); color: var(--exact-ink); }
.sd-cell.misplaced { background: linear-gradient(165deg, var(--misplaced), var(--misplaced-2)); color: var(--misplaced-ink); }
.sd-cell.absent { background: var(--absent); color: var(--absent-ink); }
.sd-cell.burned { background: transparent; border: 1.5px dashed var(--line-2); color: var(--ink-3); font-size: 15px; }
/* shape cue for colour-blind players */
.sd-cell.exact::after, .sd-cell.misplaced::after { position: absolute; top: 2px; inset-inline-start: 4px; font-size: 9px; font-weight: 800; opacity: .75; }
.sd-cell.exact::after { content: '✓'; }
.sd-cell.misplaced::after { content: '⇄'; }
/* orange with a direction (engine directions): the arrow points the way to move — right = toward 1 (the board reads RTL) */
.sd-cell.misplaced.to-start::after, .sd-cell.misplaced.to-end::after { font-size: 12px; opacity: .9; top: 1px; }
.sd-cell.misplaced.to-start::after { content: '→'; }
.sd-cell.misplaced.to-end::after { content: '←'; }

.sd-hist.reveal .sd-cell { animation: sd-flip .52s calc(var(--i) * 120ms) both ease-out; }
.sd-hist.win.reveal .sd-cell { animation: sd-flip .52s calc(var(--i) * 120ms) both ease-out, sd-hop .45s calc(var(--i) * 70ms + 1.4s) ease-out; }

.sd-cell.slot {
  cursor: pointer; background: var(--surface); color: var(--ink);
  border: 2px dashed var(--line-2); transition: border-color .15s, background .15s, transform .1s;
  touch-action: none;
}
.sd-slot-num { color: var(--ink-3); font-size: 15px; font-weight: 700; }
.sd-cell.slot.filled { border: 2px solid var(--accent); background: linear-gradient(165deg, var(--surface-2), var(--surface)); cursor: grab; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); animation: sd-pop .22s ease-out; }
.sd-cell.slot.selected { border: 2px solid var(--misplaced); background: color-mix(in srgb, var(--misplaced) 12%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--misplaced) 25%, transparent); }
.sd-cell.slot.selected .sd-slot-num { color: var(--misplaced); }
.sd-cell.slot.drag-src { opacity: .3; }
.sd-cell.slot.drag-over { border-color: var(--misplaced); border-style: solid; transform: scale(1.05); }
.sd-cell.slot.ghost { position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none; margin: 0; opacity: .95; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); animation: none; }
.sd-current.shake { animation: sd-shake .4s; }

.sd-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-top: 9px; }
.sd-leg { display: inline-flex; align-items: center; gap: 6px; }
.sd-leg-sq { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sd-leg-sq.exact { background: var(--exact); }
.sd-leg-sq.misplaced { background: var(--misplaced); }
.sd-leg-sq.absent { background: var(--absent); }

/* ---------- pool ---------- */
.sd-pool { border-radius: var(--radius); padding: 2px 0 6px; transition: background .15s, box-shadow .15s; }
.sd-pool.drop-out { background: color-mix(in srgb, var(--danger) 10%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 40%, transparent); }
.sd-pool-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 9px; }
.sd-pool-title { font-weight: 700; font-size: 14px; white-space: nowrap; }
.sd-pool-hint { font-size: 12px; color: var(--ink-3); text-align: end; }
.sd-pool-hint.on { color: var(--misplaced); font-weight: 600; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14.5px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 0 var(--line);
  transition: transform .08s, background .15s, opacity .15s, border-color .15s;
}
.sd-chip:hover:not(:disabled) { border-color: var(--accent); }
.sd-chip:active:not(:disabled) { transform: translateY(1px) scale(.97); box-shadow: none; }
.sd-chip { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.sd-chip.lift { transform: scale(1.06); border-color: var(--accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.sd-chip.drag-src { opacity: .35; }
.sd-pool .sd-chip { touch-action: pan-y; } /* sideways moves belong to the game (drag at once), up/down still scroll */
.sd-chip.drag-ghost { position: fixed; top: 0; left: 0; z-index: 60; margin: 0; pointer-events: none; opacity: .95; border-color: var(--accent); box-shadow: 0 14px 30px rgba(0, 0, 0, .45); transition: none; }
.sd-chip.has-sub { padding-block: 5px; }
.sd-chip-sub { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); line-height: 1.2; }
.sd-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.sd-chip.k-exact { border-color: color-mix(in srgb, var(--exact) 70%, transparent); }
.sd-chip.k-exact .sd-chip-dot { background: var(--exact); }
.sd-chip.k-misplaced { border-color: color-mix(in srgb, var(--misplaced) 70%, transparent); }
.sd-chip.k-misplaced .sd-chip-dot { background: var(--misplaced); }
.sd-chip.k-absent { background: var(--surface-2); color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.sd-chip.k-absent .sd-chip-dot { background: transparent; border: 1.5px solid var(--ink-3); }
.sd-chip.k-absent:disabled { cursor: default; opacity: .75; box-shadow: none; transform: none; }
.sd-chip.used { opacity: .28; cursor: default; box-shadow: none; border-style: dashed; }

/* ---------- action bar ---------- */
.sd-bar {
  position: sticky; bottom: 0; z-index: 20; margin: 10px -16px 0; padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.sd-bar-inner { display: flex; align-items: center; gap: 10px; }
.sd-timer { position: relative; width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center; }
.sd-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1) rotate(-90deg); stroke-width: 3.5; }
.sd-timer-bg { stroke: var(--line); }
.sd-timer-arc { stroke: var(--exact); transition: stroke-dashoffset .2s linear, stroke .3s; }
.sd-timer-num { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.sd-timer.idle .sd-timer-arc { stroke: var(--ink-3); }
.sd-timer.idle .sd-timer-num { color: var(--ink-3); }
.sd-timer.low .sd-timer-arc { stroke: var(--danger); }
.sd-timer.low .sd-timer-num { color: var(--danger); animation: sd-pulse 1s infinite; }

.sd-btn {
  border: 0; border-radius: 14px; min-height: 50px; padding: 0 20px; cursor: pointer;
  font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, background .15s, box-shadow .15s, opacity .15s;
}
.sd-btn:active:not(:disabled) { transform: scale(.97); }
.sd-btn.primary { flex: 1; flex-direction: column; gap: 0; line-height: 1.15; background: var(--surface-3); color: var(--ink-2); }
.sd-btn.primary small { font-size: 11.5px; font-weight: 500; opacity: .8; }
.sd-btn.primary.ready { background: linear-gradient(165deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.sd-result-actions .sd-btn.primary, .sd-btn.wide { flex-direction: row; gap: 8px; }
.sd-btn.ghost { background: transparent; border: 1.5px solid var(--line-2); color: var(--ink); }
.sd-btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.sd-btn.icon { width: 50px; padding: 0; flex-shrink: 0; }
.sd-btn:disabled { opacity: .35; cursor: default; }
.sd-btn.wide { width: 100%; margin-top: 16px; }

/* ---------- result ---------- */
.sd-result {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px 16px; text-align: center; margin-bottom: 8px;
}
.sd-result.delayed { animation: sd-rise .5s var(--delay) both ease-out; }
.sd-result.won { border-color: color-mix(in srgb, var(--exact) 45%, var(--line)); }
.sd-result-emoji { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.sd-result h2 { margin: 0 0 2px; font-size: 22px; }
.sd-score { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px auto 14px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); max-width: 300px; }
.sd-score-big { display: flex; align-items: baseline; gap: 6px; }
.sd-score-big b { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.sd-result.won .sd-score-big b { color: var(--exact); }
.sd-score-big span { color: var(--ink-2); font-size: 14px; }
.sd-score-parts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; color: var(--ink-2); font-size: 12.5px; }
.sd-result-sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 12px; }
.sd-truth { list-style: none; padding: 0; margin: 0 0 6px; text-align: start; display: grid; gap: 5px; }
.sd-truth li, .sd-rest li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 14.5px; }
.sd-truth-rank { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--ink-2); }
.sd-truth-rank.hit { background: var(--exact); color: var(--exact-ink); }
.sd-truth-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sd-truth-sub { font-weight: 400; font-size: .88em; color: var(--ink-3); }
.sd-truth-unit { margin: -4px 0 8px; font-size: 12px; color: var(--ink-3); text-align: center; }
.sd-truth-val { margin-inline-start: auto; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: end; min-width: 0; flex-shrink: 1; overflow-wrap: anywhere; }
.sd-rest { text-align: start; margin: 8px 0 4px; font-size: 13.5px; color: var(--ink-2); }
.sd-rest summary { cursor: pointer; padding: 6px 2px; }
.sd-rest ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; }
.sd-rest li { opacity: .75; font-size: 13.5px; padding: 6px 10px; }
.sd-result-actions { display: flex; gap: 10px; margin-top: 14px; }
/* After a puzzle (and after the bonus): its buttons stay at the bottom of the screen while the card runs past it — like the
   "בדיקה" bar — so the next puzzle / the day's summary is always one tap away; at the card's end they settle in place. */
.sd-result > .sd-result-actions, .sd-bonus-card.done > .sd-result-actions {
  position: sticky; bottom: 0; z-index: 5; margin: 14px -18px -16px; padding: 14px 18px max(16px, env(safe-area-inset-bottom));
  border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(to top, var(--surface) 78%, color-mix(in srgb, var(--surface) 0%, transparent)); }
.sd-bonus-card.done > .sd-result-actions { margin-inline: -16px; padding-inline: 16px; }
.sd-result-actions .sd-btn.ghost { flex: 0 0 auto; }
.sd-next { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin-top: 16px; color: var(--ink-2); font-size: 13.5px; }
.sd-countdown { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .5px; direction: ltr; }
.sd-src { color: var(--ink-3); font-size: 12px; margin: 8px 0 0; line-height: 1.5; }
/* a puzzle's / the bonus' source, folded: "מקור ▾" (app.js sourceFold) */
.sd-src-fold { margin: 8px 0 0; text-align: center; }
.sd-src-fold > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.sd-src-fold > summary::-webkit-details-marker { display: none; }
.sd-src-fold > summary i { font-style: normal; font-size: 13px; transition: transform .2s; }
.sd-src-fold[open] > summary i { transform: rotate(180deg); }
.sd-src-fold .sd-src { margin-top: 2px; }
.sd-note { color: var(--ink-2); font-size: 14px; }

.sd-foot { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ink-3); font-size: 11.5px; padding: 18px 0 calc(22px + env(safe-area-inset-bottom)); }
.sd-foot-link { padding: 6px 10px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- modals ---------- */
.sd-overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(5, 8, 16, .55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; animation: sd-fade .18s both;
}
.sd-overlay.closing { animation: sd-fade .18s reverse both; }
.sd-sheet {
  width: 100%; max-width: 540px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); animation: sd-slide .26s both cubic-bezier(.2, .9, .3, 1);
}
.sd-overlay.closing .sd-sheet { animation: sd-slide .18s reverse both; }
@media (min-width: 640px) {
  .sd-overlay { align-items: center; }
  .sd-sheet { border-radius: 22px; border-bottom: 1px solid var(--line); max-width: 480px; }
}
.sd-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px 10px; padding-inline-start: 20px; }
.sd-sheet-head h2 { margin: 0; font-size: 19px; }
.sd-head-link { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; margin-inline-end: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.sd-head-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-head-link:hover { color: var(--accent); border-color: var(--accent); }
.sd-score-rules { display: grid; gap: 8px; margin: 4px 0 12px; }
.sd-score-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-score-cap { font-size: 11.5px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 99px; padding: 1px 8px; }
.sd-score-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.sd-score-chips span { display: grid; text-align: center; background: var(--surface); border-radius: 8px; padding: 3px 8px; line-height: 1.25; }
.sd-score-chips small { font-size: 10.5px; color: var(--ink-3); } .sd-score-chips b { font-size: 12.5px; }
.sd-score-total { margin: 0 0 12px; text-align: center; font-weight: 700; font-size: 13.5px; }
.sd-ex-row { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; margin-top: 8px; }
.sd-ex-lbl { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.sd-ex-cells { display: flex; gap: 2px; direction: rtl; }
.sd-ex-cells i { width: 13px; height: 17px; border-radius: 3px; } .sd-ex-cells i.exact { background: var(--exact); } .sd-ex-cells i.misplaced { background: var(--misplaced); } .sd-ex-cells i.absent { background: var(--absent); }
.sd-ex-notes { display: grid; gap: 1px; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.sd-eq { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sd-ex-time { margin: 8px 0 0 !important; }
.sd-score-rule { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 9px 11px; }
.sd-score-rule b { font-size: 14.5px; } .sd-score-rule p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sd-score-ic { font-size: 20px; line-height: 1.2; flex-shrink: 0; width: 26px; text-align: center; }
.sd-score-ex { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 9px 12px; margin-bottom: 10px; }
.sd-score-ex p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.sd-score-ex .sd-score-sum { font-weight: 800; color: var(--ink); font-size: 14px; }
.sd-sheet-body > .sd-btn.wide:last-child { margin-top: 12px; }
.sd-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px calc(22px + env(safe-area-inset-bottom)); font-size: 14.5px; line-height: 1.6; }
.sd-sub { font-size: 13px; color: var(--ink-2); font-weight: 600; margin: 18px 0 8px; }

.sd-steps { padding-inline-start: 20px; margin: 6px 0; display: grid; gap: 6px; }
.sd-steps li::marker { color: var(--accent); font-weight: 700; }
.sd-example { display: grid; gap: 7px; margin: 8px 0 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.sd-ex-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.sd-ex-row .sd-cell { width: 64px; min-height: 42px; flex-shrink: 0; }
.sd-tips { margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 13.5px; }

.sd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.sd-stats.three { grid-template-columns: repeat(3, 1fr); }
.sd-stat.score b { color: var(--accent); font-size: 21px; }
.sd-stat { background: var(--surface-2); border-radius: 12px; padding: 12px 4px 10px; text-align: center; }
.sd-stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.sd-stat span { font-size: 11.5px; color: var(--ink-2); }
.sd-dist { display: grid; gap: 6px; }
.sd-dist-row { display: flex; align-items: center; gap: 8px; }
.sd-dist-label { width: 14px; text-align: center; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.sd-dist-bar { width: var(--w); min-width: 28px; background: var(--surface-3); border-radius: 6px; padding: 3px 8px; text-align: end; font-size: 12.5px; font-weight: 700; transition: width .5s; }
.sd-dist-bar.today { background: var(--exact); color: var(--exact-ink); }

.sd-arch { display: grid; gap: 7px; }
.sd-arch-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 14px;
  transition: border-color .15s;
}
.sd-arch-item:hover { border-color: var(--accent); }
.sd-arch-txt { display: grid; gap: 1px; font-size: 14px; line-height: 1.4; }
.sd-arch-txt small { color: var(--ink-3); font-size: 11.5px; }
.sd-arch-badge { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.sd-arch-badge.won { color: var(--exact); }
.sd-arch-badge.lost { color: var(--danger); }
.sd-arch-badge.wip { color: var(--misplaced); }

/* ---------- toast, confetti, dev ---------- */
.sd-toast {
  position: fixed; z-index: 70; top: 14px; left: 50%; transform: translate(-50%, -140%);
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); max-width: calc(100% - 32px); text-align: center;
  pointer-events: none;
}
.sd-toast.show { transform: translate(-50%, 0); }
.sd-confetti { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.sd-confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; animation: sd-fall var(--d) var(--delay) ease-in both; }
.sd-devfab { display: block; margin: 8px auto 0; border: 1px dashed var(--misplaced); color: var(--misplaced) !important; background: transparent; border-radius: 8px; font-size: 11px; font-weight: 700; padding: 4px 10px; cursor: pointer; opacity: .8; }
.sd-dev-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sd-dev-row .sd-btn { min-height: 40px; font-size: 13.5px; padding: 0 12px; flex: 1; }
.sd-input { flex: 1; min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--ink); padding: 0 10px; font: inherit; }

/* ---------- motion ---------- */
@keyframes sd-flip { 0% { transform: rotateX(90deg); filter: brightness(1.6); } 60% { transform: rotateX(-12deg); } 100% { transform: rotateX(0); filter: none; } }
@keyframes sd-hop { 40% { transform: translateY(-9px); } 70% { transform: translateY(2px); } }
@keyframes sd-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sd-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes sd-pulse { 50% { opacity: .45; } }
@keyframes sd-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sd-slide { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sd-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .sd-root *, .sd-root *::before, .sd-root *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 370px) {
  .sd-app { padding-inline: 10px; }
  .sd-bar { margin-inline: -10px; padding-inline: 10px; }
  .sd-row { gap: 4px; }
  .sd-cell { min-height: 50px; font-size: 11.5px; }
  .sd-cell.s1 { font-size: 10.5px; } .sd-cell.s2 { font-size: 9.5px; } .sd-cell.s3 { font-size: 8.5px; }
  .sd-question { font-size: 17.5px; }
  .sd-chip { font-size: 13.5px; padding: 7px 12px; min-height: 38px; }
}
@media (max-width: 340px) { /* very small phones: logo + 6 header icons must fit in one row */
  .sd-logo { gap: 3px; }
  .sd-logo-tile { width: 28px; height: 28px; font-size: 18px; border-radius: 8px; }
  .sd-hicons { gap: 0; }
  .sd-icon-btn { width: 34px; height: 40px; }
  .sd-diff-lbl { font-size: 11.5px; }
}

/* =================== v2: tracks, badges, summary, leaderboard =================== */
.sd-loading { display: grid; place-items: center; padding: 60px 0; }
.sd-loading.sd-boot { margin-top: 56px; } /* index.html, before the app (and its header) exists */
/* Loader: seven bars rising one after another (the app icon), "טוען…" below. */
.sd-loader { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; color: var(--ink-3); }
.sd-loader-bars { display: flex; align-items: flex-end; gap: 5px; height: 46px; }
.sd-loader-bars i { width: 9px; height: calc(100% - var(--i) * 10%); border-radius: 3px; background: var(--exact); transform-origin: bottom;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); animation: sd-bar-rise 1.7s calc(var(--i) * 110ms) ease-in-out infinite both; }
.sd-loader-bars i:nth-child(3), .sd-loader-bars i:nth-child(6) { background: var(--misplaced); }
@keyframes sd-bar-rise { 0% { transform: scaleY(.3); opacity: .35; } 22%, 62% { transform: scaleY(1); opacity: 1; } 88%, 100% { transform: scaleY(.3); opacity: .35; } }
.sd-loader-txt { font-size: 14px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .sd-loader-bars i { animation: none; } .sd-loader { animation: sd-pulse 1.4s infinite; } }
.sd-board-wrap { display: flex; flex-direction: column; }
.sd-board-wrap > .sd-loader { margin: auto 0; }
.sd-empty { text-align: center; padding: 30px 10px; }
.sd-empty-art { display: flex; justify-content: center; }
.sd-empty h2 { margin: 6px 0 4px; }
.sd-empty p { color: var(--ink-2); margin: 0 0 18px; }
.sd-empty .sd-btn { min-width: 160px; flex: none; margin: 4px; }

/* track tabs */
.sd-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
/* today's puzzles open in order: the ones still waiting are greyed (a tap says which comes first); the one that just opened
   flashes for a moment */
.sd-tab.locked { opacity: .5; filter: grayscale(.7); cursor: default; }
.sd-tab.locked:active { transform: none; }
.sd-tab.fresh { animation: sd-tab-open 1.1s ease-out 2; }
@keyframes sd-tab-open { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .sd-tab.fresh { animation: none; } }
.sd-tab {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; min-height: 52px; border-radius: 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); text-align: start; transition: border-color .15s, background .15s, transform .08s;
}
.sd-tab:active { transform: scale(.98); }
.sd-tab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 18%, transparent); }
.sd-tab-icon { width: 34px; height: 30px; flex-shrink: 0; display: grid; place-items: center; color: var(--ink-2); }
.sd-tab.on .sd-tab-icon { color: var(--accent); }
.sd-tab-txt { display: grid; line-height: 1.2; min-width: 0; }
.sd-tab-txt b { font-size: 14px; line-height: 1.15; }
.sd-tab-txt small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-tab.done.won .sd-tab-txt small { color: var(--exact); font-weight: 600; }
.sd-tab.done.lost .sd-tab-txt small { color: var(--ink-3); }

.sd-qtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sd-qtop .sd-cat { margin-bottom: 0; }
.sd-diff { display: inline-flex; gap: 3px; }
.sd-diff i { width: 6px; height: 14px; border-radius: 3px; background: var(--line-2); }
.sd-diff i:nth-child(2) { height: 17px; } .sd-diff i:nth-child(3) { height: 20px; }
.sd-diff { align-items: flex-end; }
.sd-diff i.on { background: var(--accent); }
.sd-diff-wrap { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.sd-diff-lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* badges */
.sd-badge { display: block; overflow: visible; flex-shrink: 0; }
.sd-root svg.sd-badge { stroke: none; stroke-width: 0; }
.sd-badge rect { stroke: var(--bg); stroke-width: 2.2; }
.sd-summary .sd-badge rect, .sd-sheet .sd-badge rect, .sd-tab .sd-badge rect, .sd-result .sd-badge rect, .sd-arch .sd-badge rect { stroke: var(--surface); }
.sd-sum-item .sd-badge rect, .sd-rl-item .sd-badge rect, .sd-trackstat .sd-badge rect, .sd-arch-item .sd-badge rect { stroke: var(--surface-2); }
.sd-result-actions .sd-btn { white-space: nowrap; }
.sd-badge .b-exact { fill: var(--exact); }
.sd-badge .b-misplaced { fill: var(--misplaced); }
.sd-badge .b-absent { fill: var(--absent); }
.sd-badge .dot { fill: rgba(10, 14, 28, .78); }
.sd-badge .ink { fill: none; stroke: rgba(10, 14, 28, .78); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sd-badge .ink.faint { stroke: var(--ink-3); stroke-width: 1.6; }
.sd-badge .floor { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; }
.sd-badge .crown { fill: var(--misplaced); stroke: color-mix(in srgb, var(--misplaced) 60%, #000); stroke-width: .8; stroke-linejoin: round; }
.sd-badge .spark { fill: var(--misplaced); }
.sd-badge .sweat { fill: #7fd0ff; }
.sd-badge.anim .bar { animation: sd-bar-in .55s calc(var(--i) * 70ms + var(--delay, 0ms)) both cubic-bezier(.2, 1.5, .4, 1); }
.sd-badge.anim.k-lost .bar { animation-name: sd-bar-drop; animation-timing-function: cubic-bezier(.5, 0, .7, 1.4); }
.sd-badge.anim .crown, .sd-badge.anim .spark, .sd-badge.anim .sweat { animation: sd-pop .4s calc(.75s + var(--delay, 0ms)) both cubic-bezier(.2, 1.6, .4, 1); transform-box: fill-box; transform-origin: center; }
.sd-badge.anim.k-a1 .spark, .sd-badge.anim.k-a2 .spark { animation: sd-pop .4s calc(.75s + var(--delay, 0ms)) both, sd-twinkle 1.8s 1.4s infinite; }
@keyframes sd-bar-in { from { translate: 0 30px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes sd-bar-drop { from { translate: 0 -40px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes sd-twinkle { 50% { opacity: .35; } }

/* result + summary */
.sd-result-art { display: flex; justify-content: center; margin: -4px 0 4px; }
.sd-result-title { font-family: 'Secular One', 'Rubik', sans-serif; font-weight: 400; font-size: 30px !important; margin: 0 !important; letter-spacing: .3px; }
.sd-result.won .sd-result-title { color: var(--exact); }
.sd-result-line { color: var(--ink-2); margin: 2px 0 6px; font-size: 14.5px; }
.sd-crowd { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; min-height: 1px; }
.sd-fact { text-align: start; margin: 12px 0 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 14px; line-height: 1.55; }
.sd-fact b { color: var(--accent); }
.sd-result-actions .sd-btn.primary svg { width: 18px; height: 18px; }
.sd-btn.loading { opacity: .7; pointer-events: none; }
.sd-btn.loading span::after { content: '…'; }

.sd-summary {
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 16px 14px; text-align: center; margin: 12px 0 8px;
}
.sd-summary.delayed { animation: sd-rise .5s var(--delay) both ease-out; }
.sd-summary h2 { margin: 0 0 10px; font-size: 18px; }
.sd-sum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-sum-item { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid transparent; cursor: pointer; }
.sd-sum-item.on { border-color: var(--accent); }
.sd-sum-item b { font-size: 13.5px; }
.sd-sum-item small { font-size: 12px; color: var(--ink-2); }
.sd-sum-total { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: 14px 0 2px; color: var(--ink-2); font-size: 14px; }
.sd-sum-total b { font-size: 34px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sd-sum-pct { margin: 0; color: var(--exact); font-weight: 600; font-size: 14px; }

/* help: results legend */
.sd-lead { margin: 2px 0 8px; }
.sd-results-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-rl-item { display: grid; justify-items: center; gap: 0; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.sd-rl-item b { font-size: 13.5px; }
.sd-rl-item small { font-size: 11.5px; color: var(--ink-3); }

/* stats modal */
.sd-overlay.still, .sd-overlay.still .sd-sheet { animation: none; }
.sd-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); margin: 4px 0 14px; }
.sd-seg.small { width: 290px; max-width: 100%; margin-inline: auto; }
.sd-seg.small .sd-seg-btn { white-space: nowrap; padding-inline: 4px; }
.sd-seg-btn { border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--ink-2) !important; cursor: pointer; }
.sd-seg-btn.on { background: var(--surface); color: var(--ink) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.sd-stats.two { grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
.sd-stats.three { margin-bottom: 12px; }
.sd-trackstat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 7px; }
.sd-ts-art { width: 44px; display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.sd-ts-txt { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.sd-ts-txt b { font-size: 14px; }
.sd-ts-txt small { color: var(--ink-2); font-size: 12px; }
.sd-mini-dist { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.sd-mini-dist i { width: 7px; height: var(--h); border-radius: 2px; background: var(--exact); opacity: .85; }
.sd-mini-dist i.x { background: var(--absent); }
.sd-board-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.sd-board-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--surface-2); font-size: 14.5px; }
.sd-board-list li.me { outline: 1.5px solid var(--accent); }
.sd-bl-rank { min-width: 26px; text-align: center; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-bl-nick { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-board-list b { font-variant-numeric: tabular-nums; }
.sd-board-list li.sd-bl-gap { justify-content: center; padding: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; letter-spacing: 2px; }
.sd-board-total { margin: 0 2px 8px; font-size: 12.5px; color: var(--ink-3); }
.sd-board-mine { margin: 10px 2px 0; text-align: center; font-weight: 600; font-size: 14px; color: var(--accent); }
.sd-board-mine.dim { color: var(--ink-2); font-weight: 500; }
.sd-nick { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sd-nick label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.sd-nick-row { display: flex; gap: 8px; }
.sd-nick-row .sd-btn { min-height: 42px; flex: none; }
.sd-nick-row .sd-input { flex: 1; min-width: 0; }
.sd-nick.prompt { border-top: 0; margin-top: 4px; padding-top: 0; display: grid; gap: 10px; }
.sd-nick.prompt .sd-btn.wide { margin-top: 0; }
.sd-nick-hero { font-size: 21px; font-weight: 800; color: var(--exact); text-align: center; margin: 2px 0 6px; }
.sd-nick-err { color: var(--danger); font-size: 13px; margin: 0; }
.sd-dist-bar.top { background: var(--exact); color: var(--exact-ink); }

/* archive */
.sd-arch-item.on { border-color: var(--accent); }
.sd-arch-marks { display: flex; gap: 4px; flex-shrink: 0; }
.sd-arch-mark { width: 30px; height: 26px; display: grid; place-items: center; color: var(--ink-3); }
.sd-arch-mark svg:not(.sd-badge) { width: 18px; height: 18px; }
/* a day played for real: each puzzle's points under its badge, the day's total under the date */
.sd-arch-cell { display: grid; justify-items: center; gap: 1px; }
.sd-arch-pts { font-size: 10.5px; font-weight: 700; color: var(--ink-2); line-height: 1.1; font-variant-numeric: tabular-nums; }
/* the stats sheet opened from the archive: which day it shows, and the switch to today's (and back) */
.sd-sheet-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px;
  border-radius: 12px; font-size: 13px; color: var(--ink-2); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.sd-sheet-day .sd-sheet-day-go { font-size: 13px; font-weight: 700; white-space: nowrap; }
.sd-arch-res { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.sd-arch-txt .sd-arch-total { font-size: 12.5px; font-weight: 800; color: var(--accent); }
.sd-arch-rank { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.sd-arch-star { font-size: 17px; }
.sd-devwrap { text-align: center; padding-bottom: 20px; }

@media (max-width: 370px) {
  .sd-tab { padding: 6px; gap: 5px; }
  .sd-tab-icon { width: auto; min-width: 22px; }
  .sd-tab-icon svg { width: 18px; height: 18px; }
  .sd-tab-icon .sd-cat-pal { width: 32px; height: 32px; margin: -4px -3px -4px -2px; }
  .sd-tab-txt b { font-size: 13px; }
}

/* feedback */
.sd-link.small { font-size: 12.5px; color: var(--ink-3) !important; font-weight: 500; margin-top: 4px; }
.sd-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.sd-kind { border: 1.5px solid var(--line-2); background: var(--surface-2); border-radius: 99px; padding: 7px 13px; font-size: 13.5px; cursor: pointer; }
.sd-kind.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.sd-textarea { width: 100%; resize: vertical; padding: 10px; min-height: 96px; line-height: 1.5; }

/* sealed pool: today's puzzle before "start" — the items stay hidden until the clock runs */
.sd-gate-box { position: relative; border-radius: var(--radius); overflow: hidden; }
.sd-gate-ghosts { filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; }
.sd-chip.ghost { cursor: default; background: var(--surface-2); box-shadow: none; }
.sd-gate-cta {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; text-align: center; background: color-mix(in srgb, var(--bg) 45%, transparent);
}
.sd-gate-lock { font-size: 26px; line-height: 1; }
.sd-gate-txt { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); max-width: 28ch; text-wrap: balance; }

/* solved slot in the current row: fixed for the rest of the game */
.sd-cell.slot.filled.locked {
  background: linear-gradient(165deg, var(--exact), var(--exact-2)); color: var(--exact-ink);
  border: 0; cursor: default; animation: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--exact-ink) 25%, transparent);
}

/* friend challenge */
.sd-inapp { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'ic t x' '. go go'; align-items: start; gap: 6px 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.sd-inapp-ic { grid-area: ic; font-size: 22px; }
.sd-inapp-t { grid-area: t; display: grid; gap: 2px; line-height: 1.35; min-width: 0; } .sd-inapp-t b { font-size: 14px; } .sd-inapp-t small { font-size: 12.5px; color: var(--ink-2); }
.sd-inapp .sd-btn { grid-area: go; justify-self: start; padding: 8px 16px; font-size: 13.5px; min-height: 0; }
.sd-inapp-x { grid-area: x; width: 30px !important; height: 30px !important; }
.sd-inapp-hero { text-align: center; } .sd-inapp-big { font-size: 40px; display: block; } .sd-inapp-hero p { margin: 6px 0 10px; font-size: 15px; line-height: 1.5; }
.sd-inapp-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; } .sd-inapp-list li { background: var(--surface-2); border-radius: 12px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.sd-sheet-body .sd-btn.wide + .sd-btn.wide { margin-top: 8px; }
.sd-pastday { margin: 0 0 12px; }
.sd-pastday-h { margin: 0 0 8px; text-align: center; font-size: 16px; }
.sd-pastday .sd-sum-item { cursor: default; }
.sd-pastday-show { margin-top: 8px !important; }
.sd-pastday-note { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.sd-pastgame-q { margin: 2px 0 8px; font-weight: 700; font-size: 15px; text-align: center; }
.sd-pastgame { display: grid; gap: 6px; }
.sd-pastgame-row { display: grid; gap: 2px; } .sd-pastgame-row > small { font-size: 11px; color: var(--ink-3); }
.sd-pastgame-sum { margin: 10px 0 4px; text-align: center; font-weight: 700; }
.sd-xrow.solo { grid-template-columns: 1fr; }
.sd-challenge {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--misplaced) 14%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--misplaced) 45%, transparent);
  font-size: 14px; font-weight: 600;
}
.sd-challenge-ic { font-size: 20px; line-height: 1; }
.sd-sum-vs { margin: 4px 0 0; font-weight: 700; font-size: 14.5px; color: var(--misplaced); }
.sd-sum-vs.win { color: var(--exact); }
.sd-dare { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }

/* install as an app */
.sd-icon-btn.hl { color: var(--accent); }
.sd-inst-hero { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.sd-inst-icon { width: 64px; height: 64px; border-radius: 15px; flex-shrink: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.sd-inst-hero b { font-size: 16px; }
.sd-inst-hero p { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }
.sd-inst-steps { margin-bottom: 14px; }
.sd-inst-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; vertical-align: -6px; border-radius: 6px; background: var(--surface-2); }
.sd-inst-ic svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-sheet-body > .sd-btn.wide + .sd-btn.wide { margin-top: 8px; }
/* six header icons (install shown): tighten so the row still fits */
@media (max-width: 420px) {
  .sd-hicons.six { gap: 0; }
  .sd-hicons.six .sd-icon-btn { width: 36px; }
  .sd-header:has(.sd-hicons.six) .sd-logo-tile { width: 32px; height: 32px; font-size: 20px; border-radius: 9px; }
}
@media (max-width: 340px) {
  .sd-hicons.six .sd-icon-btn { width: 32px; }
  .sd-header:has(.sd-hicons.six) .sd-logo-tile { width: 28px; height: 28px; font-size: 18px; border-radius: 8px; }
}

/* daily reminder opt-in */
.sd-push-card { margin: 14px 0 4px; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); text-align: center; }
.sd-push-card b { font-size: 15.5px; }
.sd-push-card p { margin: 4px 0 10px; font-size: 13.5px; color: var(--ink-2); }
.sd-push-actions { display: flex; gap: 8px; }
.sd-push-actions .sd-btn.primary { flex: 1; }
.sd-push-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.sd-push-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sd-push-row small { color: var(--ink-2); font-size: 12.5px; }
.sd-push-row .sd-btn { flex-shrink: 0; min-height: 40px; padding: 0 16px; }
.sd-push-box { margin: 0 0 14px; border-radius: var(--radius); background: var(--surface-2); }
.sd-push-box .sd-push-row { margin: 0; background: none; }
.sd-push-hour { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.sd-push-hour select { min-width: 0; max-width: 62%; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }

/* "coming back tomorrow?" sheet */
.sd-stay-list { display: grid; gap: 8px; margin: 0 0 12px; }
.sd-stay-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.sd-stay-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sd-stay-item b { font-size: 15px; }
.sd-stay-item small { color: var(--ink-2); font-size: 12.5px; }
.sd-stay-item .sd-btn { flex-shrink: 0; min-height: 40px; padding: 0 16px; }
.sd-stay-item.done { opacity: .75; }
.sd-stay-check { color: var(--exact); font-weight: 800; font-size: 18px; }

/* ---------- golden bonus ---------- */
.sd-bonus-tab {
  border: 1.5px solid color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 20%, var(--surface)), var(--surface) 75%); transition: border-color .15s, transform .08s; }
.sd-bonus-tab:active { transform: scale(.99); }
.sd-bonus-star { font-size: 20px; line-height: 1; flex-shrink: 0; }
.sd-bonus-tab-end { flex-shrink: 0; font-size: 13px; }
.sd-bonus-tab-end b { color: var(--gold); font-variant-numeric: tabular-nums; }
.sd-bonus-prog { display: inline-flex; gap: 4px; } .sd-bonus-prog i { width: 9px; height: 9px; border-radius: 99px; background: var(--surface-3); } .sd-bonus-prog i.on { background: var(--gold); }
.sd-bonus-tab.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 22%, var(--surface)); box-shadow: 0 4px 16px color-mix(in srgb, var(--gold) 28%, transparent); }
.sd-bonus-tab:not(.locked):not(.soon):not(.done):not(.on) .sd-bonus-star { animation: sd-bonus-glow 1.6s ease-in-out infinite; }
.sd-bonus-tab.locked, .sd-bonus-tab.soon { border-style: dashed; background: var(--surface); }
.sd-bonus-tab.locked .sd-bonus-star, .sd-bonus-tab.soon .sd-bonus-star { filter: grayscale(.8); opacity: .6; }
@keyframes sd-bonus-glow { 50% { transform: scale(1.18) rotate(-8deg); filter: drop-shadow(0 0 6px var(--gold)); } }

.sd-bonus { margin-bottom: 18px; }
.sd-bonus-card { position: relative; padding: 16px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow);
  background: linear-gradient(170deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface) 70%);
  border: 1.5px solid color-mix(in srgb, var(--gold) 50%, var(--line)); }
.sd-bonus-card.enter { animation: sd-rise .35s both ease-out; }
.sd-bonus-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sd-bonus-kicker { font-size: 12.5px; font-weight: 700; color: var(--gold); letter-spacing: .3px; }
.sd-bonus-type { font-family: 'Secular One', 'Rubik', sans-serif; font-size: 19px; }
.sd-bonus-head .sd-bonus-dots { margin-inline-start: auto; }
.sd-bonus-topic { font-weight: 700; font-size: 17px; margin: 2px 0 10px; }
.sd-bonus-how { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; text-align: start; }
.sd-bonus-how li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 14.5px; line-height: 1.45; }
.sd-bonus-how li::before { content: '⭐'; font-size: 11px; margin-inline-end: 8px; vertical-align: 1px; }
.sd-bonus-note { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.sd-btn.primary.ready.gold, .sd-bonus-card .sd-btn.primary.ready { background: linear-gradient(165deg, var(--gold), var(--gold-2)); color: var(--gold-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 40%, transparent); }
.sd-bonus-go { width: 100%; min-height: 58px; }
.sd-bonus-send { width: 100%; min-height: 52px; margin-top: 12px; flex: none; }
.sd-bonus-dots { display: inline-flex; gap: 4px; }
.sd-bonus-dots i { width: 10px; height: 10px; border-radius: 99px; background: var(--surface-3); }
.sd-bonus-dots i.cur { background: transparent; box-shadow: inset 0 0 0 2px var(--gold); }
.sd-bonus-dots i.full { background: var(--exact); } .sd-bonus-dots i.part { background: var(--gold); } .sd-bonus-dots i.zero { background: var(--absent); }
.sd-bonus-timer { position: relative; height: 26px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 12px; }
.sd-bonus-timer i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transform-origin: right; transition: transform .1s linear; }
.sd-bonus-timer b { position: relative; display: grid; place-items: center; height: 100%; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.sd-bonus-timer.low i { background: var(--danger); }
.sd-bonus-qnum { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.sd-bonus-q { margin: 2px 0 12px; font-size: 20px; line-height: 1.35; }
.sd-bonus-q.small { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); }
.sd-bonus-sub { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }

/* ⚡ order */
.sd-bo-dirline { font-size: 13px; color: var(--ink-2); margin: -6px 0 10px; }
.sd-bo-dirline b { color: var(--gold); }
.sd-bo-slots { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.sd-bo-slot { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--surface-2); cursor: pointer; font-size: 15.5px; font-weight: 600; text-align: start; }
.sd-bo-slot.filled { border-style: solid; border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); background: color-mix(in srgb, var(--gold) 12%, var(--surface-2)); }
.sd-bo-slot.just { animation: sd-pop .25s both; }
.sd-bo-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-size: 13px; font-weight: 800; flex-shrink: 0; }
.sd-bo-slot.filled .sd-bo-n { background: var(--gold); color: var(--gold-ink); }
.sd-bo-chips { justify-content: center; border-radius: 12px; transition: background .15s, box-shadow .15s; }
.sd-bo-chips.drop-out { background: color-mix(in srgb, var(--danger) 10%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 40%, transparent); }
.sd-bo-slot.filled { touch-action: none; }
.sd-bo-slot.drag-src { opacity: .3; }
.sd-bo-slot.drag-over { border-style: solid; border-color: var(--gold); transform: scale(1.03); }
.sd-bo-ghost { position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none; margin: 0; opacity: .95; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); animation: none !important; }
.sd-bo-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin: -4px 0 10px; }
.sd-bo-mine { font-size: 11.5px; color: var(--danger); flex-shrink: 0; }
.sd-bo-truth { margin-top: 4px; }

/* 🎯 estimate */
.sd-be-val { font-family: 'Secular One', 'Rubik', sans-serif; font-size: 32px; margin: 4px 0 8px; font-variant-numeric: tabular-nums; color: var(--gold); min-height: 44px; }
.sd-be-val.idle { font-family: inherit; font-size: 16px; color: var(--ink-3); display: grid; place-items: center; }
.sd-be-fine .sd-btn { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sd-be-range { width: 100%; height: 44px; margin: 0; accent-color: var(--gold); direction: ltr; touch-action: none; }
.sd-be-range::-webkit-slider-thumb { width: 30px; height: 30px; }
.sd-be-ends { display: flex; justify-content: space-between; direction: ltr; font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.sd-be-fine { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.sd-be-fine .sd-btn { min-width: 64px; min-height: 44px; font-size: 22px; flex: none; }
.sd-be-ans { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--exact) 16%, var(--surface-2)); margin-top: 6px; }
.sd-be-ans.mine { background: var(--surface-2); }
.sd-be-ans span { font-size: 13px; color: var(--ink-2); } .sd-be-ans b { font-size: 16px; text-align: end; }
.sd-be-line { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); margin: 14px 6px 6px; direction: ltr; }
.sd-be-line i { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 99px; transform: translate(-50%, -50%); border: 2px solid var(--surface); }
.sd-be-line i.truth { background: var(--exact); z-index: 1; } .sd-be-line i.mine { background: var(--gold); }

/* ⚔️ duel */
.sd-bd { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.sd-bd-vs { align-self: center; font-weight: 800; color: var(--gold); font-size: 14px; }
.sd-bd-card { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; min-height: 120px; padding: 12px 8px; border-radius: 16px;
  background: var(--surface-2); border: 2px solid var(--line-2); font-size: 18px; font-weight: 700; line-height: 1.3; cursor: pointer; transition: transform .08s, border-color .15s; }
button.sd-bd-card:hover { border-color: var(--gold); } button.sd-bd-card:active { transform: scale(.97); }
.sd-bd-card small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.sd-bd-card em { position: absolute; top: -9px; inset-inline-start: 50%; translate: 50% 0; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--ink); color: var(--bg); white-space: nowrap; }
.sd-bd-reveal .sd-bd-card { min-height: 92px; cursor: default; font-size: 16px; }
.sd-bd-card.win { border-color: var(--exact); background: color-mix(in srgb, var(--exact) 18%, var(--surface-2)); }
.sd-bd-card.lose { opacity: .7; }
.sd-bd-card.lose.mine { border-color: var(--danger); opacity: 1; }

/* reveal + recap */
.sd-bonus-reveal { margin: 4px 0 14px; }
.sd-bonus-reveal.fresh { animation: sd-pop .35s both; }
.sd-bonus-pts { font-family: 'Secular One', 'Rubik', sans-serif; font-size: 26px; margin: 2px 0 6px; }
.sd-bonus-pts.full { color: var(--exact); } .sd-bonus-pts.part { color: var(--gold); } .sd-bonus-pts.zero { color: var(--ink-3); font-size: 20px; }
.sd-bonus-list { display: grid; gap: 4px; }
.sd-bonus-list .sd-bonus-reveal { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.sd-bonus-list .sd-bonus-pts { font-size: 18px; }
.sd-bonus-score { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: 0 0 8px; color: var(--ink-2); }
.sd-bonus-score b { font-family: 'Secular One', 'Rubik', sans-serif; font-size: 44px; color: var(--gold); line-height: 1.1; }
.sd-sum-row.four { grid-template-columns: repeat(3, 1fr) .8fr; }
.sd-sum-item.bonus { background: color-mix(in srgb, var(--gold) 14%, var(--surface-2)); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.sd-sum-star { font-size: 30px; line-height: 64px; height: 64px; }
.sd-bonus-cta { display: grid; gap: 2px; width: 100%; margin: 12px 0 0; padding: 12px; border-radius: 14px; cursor: pointer; text-align: center;
  background: linear-gradient(165deg, var(--gold), var(--gold-2)); color: var(--gold-ink); border: 0; box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 40%, transparent); animation: sd-rise .4s .3s both; }
.sd-bonus-cta b { font-size: 16px; } .sd-bonus-cta span { font-size: 13px; opacity: .85; }

/* per-puzzle boards in stats → today */
.sd-trackstat-box { border-radius: 14px; margin-bottom: 8px; background: var(--surface-2); overflow: hidden; }
.sd-trackstat-box .sd-trackstat { margin: 0; width: 100%; border: 0; background: none; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.sd-trackstat-box.open { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.sd-ts-end { display: grid; justify-items: center; line-height: 1.1; flex-shrink: 0; min-width: 52px; margin-inline-start: 4px; }
.sd-ts-end small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; } .sd-ts-end small.dim { font-size: 11px; max-width: 64px; white-space: normal; text-align: center; }
.sd-ts-end b { font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.sd-ts-chev { font-size: 10.5px; color: var(--accent); white-space: nowrap; margin-top: 1px; }
.sd-ts-star { font-size: 26px; display: grid; place-items: center; }
.sd-board-list.small { margin: 0 10px 6px; } .sd-board-list.small li { padding: 7px 10px; font-size: 14px; background: var(--surface); }
.sd-board-mine.small { margin: 2px 0 10px; font-size: 12.5px; }
.sd-board-list.small li.sd-bl-gap.tie { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; justify-content: center; }

/* board category chips: round pills, deliberately unlike the segmented tabs above them */
.sd-cat-chips { display: flex; flex-wrap: nowrap; justify-content: safe center; gap: 4px; margin: -4px 0 12px; overflow-x: auto; scrollbar-width: none; }
.sd-cat-chips::-webkit-scrollbar { display: none; }
.sd-cat-chip { border: 1.5px solid var(--line-2); background: transparent; border-radius: 99px; padding: 5px 8px; font-size: 13.5px; letter-spacing: -.1px; font-weight: 600; color: var(--ink-2) !important; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 370px) { .sd-cat-chip { padding: 5px 6px; font-size: 12.5px; } }
@media (max-width: 340px) { .sd-cat-chip .sd-cat-ic { display: none; } } /* a very narrow phone: the names alone */
.sd-cat-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink) !important; }
.sd-cat-chip.gold.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 18%, transparent); }

/* ---------- joker (streak reward: reveal one slot before the clock starts) ---------- */
.sd-jk-steps { display: inline-flex; align-items: center; gap: 4px; }
.sd-jk-steps i { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); font-style: normal; }
.sd-jk-steps i.on { background: var(--jk); }
.sd-jk-steps i.jk { width: auto; height: auto; background: none; font-size: 13px; line-height: 1; filter: grayscale(1); opacity: .45; }
.sd-jk-count { direction: ltr; min-width: 30px; padding: 2px 7px; border-radius: 99px; text-align: center; font-weight: 800; font-size: 12.5px; color: var(--jk-ink); background: linear-gradient(165deg, var(--jk), var(--jk-2)); }
.sd-jk-check { color: var(--jk); font-weight: 800; }
@keyframes sd-jk-wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-12deg) scale(1.12); } 86% { transform: rotate(10deg) scale(1.12); } 94% { transform: rotate(-4deg); } }

/* gate: use the joker on this puzzle */
.sd-jk-gate { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.sd-btn.jk { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 18px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  color: var(--jk-ink); background: linear-gradient(165deg, var(--jk), var(--jk-2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--jk) 35%, transparent); }
.sd-btn.jk small { font-size: 11.5px; font-weight: 500; opacity: .9; }
.sd-btn.jk.wide { width: 100%; margin-top: 14px; }
.sd-jk-gate .sd-link { margin: 0; align-self: center; }
.sd-jk-mini { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--jk); background: color-mix(in srgb, var(--jk) 8%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--jk) 35%, transparent); box-shadow: none; }
.sd-jk-mini:hover { border-color: var(--jk); }
.sd-jk-mini-ic { font-size: 14px; line-height: 1; }
.sd-jk-mini-n { direction: ltr; unicode-bidi: isolate; font-size: 11.5px; font-weight: 800; color: var(--jk-ink); background: var(--jk); border-radius: 99px; padding: 1px 6px; }
.sd-jk-hint { margin: 0; font-size: 14px; font-weight: 700; color: var(--jk); animation: sd-jk-bob 1.2s ease-in-out infinite; }
@keyframes sd-jk-bob { 50% { transform: translateY(-3px); } }
.sd-jk-used { margin: 4px 0 0; font-size: 13px; color: var(--jk); font-weight: 600; }
/* choosing a slot: the empty slots invite a tap */
.sd-current.jk-pick .sd-cell.slot:not(.filled) { border-color: var(--jk); border-style: dashed; background: color-mix(in srgb, var(--jk) 10%, var(--surface)); animation: sd-jk-pulse 1.3s ease-in-out infinite; }
.sd-current.jk-pick .sd-cell.slot:not(.filled) .sd-slot-num { color: var(--jk); }
.sd-current.jk-pick .sd-cell.slot.selected { border-style: solid; border-color: var(--jk); background: color-mix(in srgb, var(--jk) 28%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jk) 35%, transparent); animation: none; transform: scale(1.06); }
@keyframes sd-jk-pulse { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--jk) 30%, transparent); } }
/* the revealed slot */
.sd-cell.slot.filled.locked.joker { background: linear-gradient(165deg, var(--jk), var(--jk-2)); color: var(--jk-ink); }
.sd-cell.joker::after { content: none; }
.sd-jk-badge { position: absolute; top: 2px; inset-inline-start: 3px; font-size: 10px; font-style: normal; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.sd-cell.joker.fresh { animation: sd-jk-flip .7s ease-out both; }
@keyframes sd-jk-flip { 0% { transform: rotateY(90deg) scale(.8); filter: brightness(2); } 60% { transform: rotateY(-12deg) scale(1.12); } 100% { transform: none; } }
.sd-jk-tag { color: var(--jk); font-weight: 600; }

/* sheet: the joker explained / just won */
.sd-jk-hero { display: flex; justify-content: center; padding: 6px 0 4px; perspective: 600px; }
.sd-jk-cards { display: flex; gap: 0; }
.sd-jk-card { position: relative; width: 78px; height: 108px; border-radius: 12px; display: grid; place-items: center; color: var(--jk-ink);
  background: linear-gradient(160deg, var(--jk), var(--jk-2)); box-shadow: 0 10px 26px color-mix(in srgb, var(--jk) 40%, transparent), inset 0 0 0 3px rgba(255,255,255,.18);
  transform: rotate(calc(-6deg + var(--k) * 12deg)); margin-inline: -8px; }
.sd-jk-face { font-size: 40px; line-height: 1; }
.sd-jk-corner { position: absolute; top: 6px; inset-inline-start: 8px; font-weight: 800; font-size: 14px; opacity: .9; }
.sd-jk-corner.b { top: auto; bottom: 6px; inset-inline-start: auto; inset-inline-end: 8px; transform: rotate(180deg); }
.sd-jk-hero.deal .sd-jk-card { animation: sd-jk-deal .8s calc(var(--k) * 180ms) cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes sd-jk-deal { 0% { transform: translateY(40px) rotateY(180deg) scale(.6); opacity: 0; } 100% { transform: rotate(calc(-6deg + var(--k) * 12deg)); opacity: 1; } }
.sd-jk-h { text-align: center; margin: 10px 0 4px; font-size: 20px; color: var(--jk); }
.sd-jk-p { text-align: center; margin: 0 auto 12px; max-width: 34ch; color: var(--ink-2); line-height: 1.5; font-size: 14.5px; text-wrap: balance; }
.sd-jk-cycle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.sd-jk-day { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); text-align: center; }
.sd-jk-day-ic { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--surface-3); color: var(--ink-2); }
.sd-jk-day b { font-size: 13px; } .sd-jk-day small { font-size: 11.5px; color: var(--ink-3); }
.sd-jk-day.done .sd-jk-day-ic { background: var(--jk); color: var(--jk-ink); }
.sd-jk-day.prize .sd-jk-day-ic { background: none; font-size: 22px; }
.sd-jk-day.now { border-color: var(--jk); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jk) 18%, transparent); }
.sd-jk-day.now small { color: var(--jk); font-weight: 700; }
.sd-jk-rules { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .sd-jk-hero .sd-jk-card, .sd-cell.joker.fresh, .sd-jk-hint, .sd-current.jk-pick .sd-cell.slot { animation: none !important; } }

/* ---------- the row under the tabs: bonus + joker, side by side ---------- */
.sd-xrow { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd-xtile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic t e" "s s s"; align-items: center; column-gap: 6px; row-gap: 1px;
  min-width: 0; min-height: 52px; padding: 6px 10px; border-radius: 14px; cursor: pointer; text-align: start; font: inherit; color: var(--ink); transition: border-color .15s, transform .08s; }
.sd-xtile:active { transform: scale(.98); }
.sd-xtile-ic { grid-area: ic; font-size: 17px; line-height: 1; }
.sd-xtile-t { grid-area: t; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-xtile > :nth-child(3) { grid-area: e; font-size: 12px; }
.sd-xtile-s { grid-area: s; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-bonus-tab .sd-xtile-t { color: var(--gold); }
.sd-bonus-tab.locked .sd-xtile-t, .sd-bonus-tab.soon .sd-xtile-t { color: color-mix(in srgb, var(--gold) 60%, var(--ink-3)); }
/* joker tile */
.sd-jk-tile { border: 1.5px dashed color-mix(in srgb, var(--jk) 40%, var(--line)); background: var(--surface); }
/* the joker tile's title: a small ⓘ by "ג׳וקר / ג׳וקרים" — it opens the explanation */
.sd-xtile-q { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-inline-start: 4px; vertical-align: -2px; color: currentColor; opacity: .75; }
.sd-xtile-q svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sd-jk-tile .sd-xtile-t { color: color-mix(in srgb, var(--jk) 75%, var(--ink)); }
.sd-jk-tile .sd-xtile-ic { filter: grayscale(.5); opacity: .8; }
.sd-jk-tile.near, .sd-jk-tile.gift { border-style: solid; }
.sd-jk-tile.near .sd-xtile-ic, .sd-jk-tile.gift .sd-xtile-ic, .sd-jk-tile.hot .sd-xtile-ic { filter: none; opacity: 1; }
.sd-jk-tile.near .sd-jk-steps i.jk { filter: none; opacity: 1; animation: sd-jk-wiggle 1.8s ease-in-out infinite; }
.sd-jk-tile.hot { border: 1.5px solid var(--jk); background: linear-gradient(100deg, color-mix(in srgb, var(--jk) 24%, var(--surface)), var(--surface) 85%); box-shadow: 0 4px 16px color-mix(in srgb, var(--jk) 25%, transparent); }
.sd-jk-tile.hot .sd-xtile-ic { animation: sd-jk-wiggle 1.6s ease-in-out infinite; }
.sd-jk-tile.hot .sd-xtile-t { color: var(--jk); }
.sd-jk-tile.spent { opacity: .85; }
/* gift sheet */
.sd-jk-card.gift .sd-jk-bow { position: absolute; top: -12px; inset-inline-end: -10px; font-size: 26px; transform: rotate(12deg); filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.sd-jk-how { margin: 4px 0 10px; padding-inline-start: 22px; display: grid; gap: 7px; font-size: 14px; line-height: 1.45; }
.sd-jk-how li::marker { color: var(--jk); font-weight: 800; }
.sd-jk-more { margin: 0 0 4px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--jk) 10%, var(--surface-2)); font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .sd-jk-tile * { animation: none !important; } }

/* ----- prize jokers: the three ways, the "you won" list, board badges, the summary hint ----- */
.sd-jk-sub { margin: 10px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.sd-jk-ways { display: grid; gap: 6px; margin: 4px 0 10px; }
.sd-jk-way { display: grid; grid-template-columns: 30px 1fr; grid-template-areas: "ic t" "ic s"; align-items: center; column-gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.sd-jk-way-ic { grid-area: ic; font-size: 20px; text-align: center; }
.sd-jk-way b { grid-area: t; font-size: 14px; } .sd-jk-way small { grid-area: s; font-size: 12px; color: var(--ink-3); }
.sd-jk-news { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; }
.sd-jk-news li { padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--jk) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--jk) 30%, var(--line)); font-size: 14px; font-weight: 600; line-height: 1.4; }
.sd-board-prize { display: grid; gap: 2px; width: 100%; margin: 2px 0 8px; padding: 8px 11px; border: 1px solid color-mix(in srgb, var(--jk) 30%, var(--line)); border-radius: 11px; text-align: center; font: inherit; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--jk) 80%, var(--ink)); background: color-mix(in srgb, var(--jk) 10%, var(--surface-2)); cursor: pointer; }
.sd-board-prize small { font-size: 12px; font-weight: 600; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.sd-board-prize:active { transform: scale(.98); }
.sd-bl-jk { flex: none; font-size: 13px; line-height: 1; }
/* ▲▼ sit outside the row's card, in their own column on its right (so they line up and aren't read as the place) */
.sd-board-list.moves > li.sd-bl-row, .sd-board-list.moves > li.sd-bl-card { margin-inline-start: 34px; position: relative; overflow: visible; }
.sd-bl-move { position: absolute; right: -36px; top: 50%; transform: translateY(-50%); width: 32px; font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sd-board-list:not(.moves) .sd-bl-move { display: none; }
.sd-bl-move.up { color: var(--exact-2, #16a36b); } .sd-bl-move.down { color: var(--danger); } .sd-bl-move.same { color: var(--ink-3); font-weight: 600; }
.sd-board-legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: -2px 0 8px; font-size: 11.5px; color: var(--ink-3); }
.sd-board-legend .up { color: var(--exact-2, #16a36b); font-weight: 700; } .sd-board-legend .down { color: var(--danger); font-weight: 700; } .sd-board-legend .same { font-weight: 600; }
.sd-board-list li.sd-bl-row { cursor: pointer; transition: background .15s; }
.sd-board-list li.sd-bl-row:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }
.sd-bl-chev { flex: none; width: 16px; height: 16px; color: var(--ink-3); display: grid; place-items: center; transition: transform .2s; margin-inline-start: -4px; }
.sd-bl-chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sd-board-list li.open .sd-bl-chev { transform: rotate(180deg); color: var(--accent); }
.sd-board-list li.open { border-end-start-radius: 0; border-end-end-radius: 0; }
.sd-board-list li.sd-bl-card { display: block; margin-top: -5px; padding: 8px 12px 10px; border-radius: 0 0 11px 11px; background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); animation: sd-pop .2s both; }
.sd-bl-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sd-bl-cat { background: var(--surface); border-radius: 9px; padding: 6px 4px; display: grid; gap: 1px; text-align: center; }
.sd-bl-cat span { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-bl-cat b { font-size: 13.5px; } .sd-bl-cat.gold b { color: var(--gold); }
.sd-bl-meta { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.sd-bl-report { display: block; margin: 6px auto 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sd-bl-report:disabled { text-decoration: none; cursor: default; }
.sd-sum-prize { display: block; width: 100%; margin: 0; padding: 9px 12px; border: 1px dashed color-mix(in srgb, var(--jk) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--jk) 7%, var(--surface)); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-align: center; cursor: pointer; }
.sd-sum-prize.hot { border-style: solid; border-color: var(--jk); color: color-mix(in srgb, var(--jk) 80%, var(--ink)); background: color-mix(in srgb, var(--jk) 14%, var(--surface)); }

/* ----- device transfer (bottom of "personal") ----- */
.sd-transfer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 16px 0 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.sd-transfer-row div { display: grid; gap: 2px; }
.sd-transfer-row b { font-size: 14px; } .sd-transfer-row small { font-size: 12.5px; color: var(--ink-3); }
.sd-tr-box { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.sd-tr-box .sd-sub { margin-top: 0; }
.sd-tr-code { direction: ltr; margin: 4px 0 8px; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums; color: var(--ink); user-select: all; }
.sd-tr-code.small { font-size: 22px; margin-top: 0; }
.sd-tr-warn { margin: 8px 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sd-tr-input { direction: ltr; text-align: center; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; }
.sd-jk-have { display: grid; gap: 6px; margin: 4px 0 10px; }
.sd-jk-have .sd-jk-sub { margin: 4px 0 0; }
.sd-jk-way.hot { border-color: var(--jk); background: color-mix(in srgb, var(--jk) 12%, var(--surface-2)); }
.sd-jk-way.hot small { color: color-mix(in srgb, var(--jk) 75%, var(--ink)); font-weight: 600; }
/* the gift joker's window (day 1): our character cheering by the joker card */
.sd-gift-hero { display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin: 0 0 4px; }
.sd-gift-hero .sd-jk-hero { margin: 0; }
.sd-gift-p { text-align: center; margin: 2px 0 14px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
/* the notice board's "יש ג׳וקר מתחבא" tile: purple, the detective peeking side to side */
.sd-hunt-tile { border: 1.5px dashed color-mix(in srgb, var(--jk) 65%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--jk) 14%, var(--surface)), var(--surface) 85%); }
.sd-hunt-tile .sd-xtile-ic { filter: none; opacity: 1; }
.sd-hunt-tile .sd-xtile-ic .sd-pal, .sd-jk-way.hunt .sd-jk-way-ic .sd-pal { width: 32px; height: 32px; vertical-align: middle; }
.sd-hunt-tile .sd-xtile-ic .sd-pal svg, .sd-jk-way.hunt .sd-jk-way-ic .sd-pal svg { overflow: hidden; }
.sd-hunt-tile .sd-xtile-t { color: var(--jk); }
/* "יש ג׳וקר מתחבא": only while one can be found — a secret-looking row */
.sd-jk-way.hunt { border: 1.5px dashed color-mix(in srgb, var(--jk) 60%, transparent); background: color-mix(in srgb, var(--jk) 7%, var(--surface-2)); }
.sd-jk-way.hunt small { color: color-mix(in srgb, var(--jk) 70%, var(--ink)); font-weight: 600; }
.sd-jk-have-note { text-align: center; font-size: 12px; color: var(--ink-3); }

/* ----- day hero: the day's summary at the top once the 3 puzzles are done (replaces the tabs) ----- */
.sd-hero { margin: 8px 0 14px; }
.sd-hero .sd-sum-total { margin-top: 10px; }
.sd-hero .sd-sum-prize { margin-top: 8px; }
.sd-sum-item .sd-sum-rank { font-size: 11px; font-weight: 700; color: var(--accent); margin-top: -2px; }
.sd-skel { color: transparent !important; border-color: transparent !important; cursor: default; border-radius: 10px; width: 70%; margin-inline: auto !important;
  background: linear-gradient(90deg, var(--surface-3) 0%, color-mix(in srgb, var(--surface-3) 40%, var(--surface)) 50%, var(--surface-3) 100%) 0 0 / 200% 100%; animation: sd-skel 1.2s linear infinite; }
@keyframes sd-skel { to { background-position: -200% 0; } }
.sd-hero .sd-bonus-cta { margin-top: 10px; }
.sd-hero .sd-result-actions { margin-top: 10px; }
.sd-hero .sd-sum-star { line-height: 56px; height: 56px; }
.sd-next.big { margin-top: 14px; font-size: 14px; }
.sd-next.big b { font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .5px; }

.sd-hero-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 8px; }
.sd-hero-head h2 { margin: 0; font-size: 21px; font-family: 'Secular One', 'Rubik', sans-serif; font-weight: 400; letter-spacing: .2px; }
/* the character (mascot.js): .sd-pal anywhere, sized by its container */
.sd-pal-lg { width: 84px; height: 84px; } .sd-pal-md { width: 52px; height: 52px; }
.sd-pal-top { text-align: center; margin: -6px 0 2px; }
.sd-pal-head { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: start; }
.sd-pal-head b { font-size: 16px; } .sd-pal-head.lead { justify-content: flex-start; margin-bottom: 4px; } .sd-pal-head.lead .sd-lead { margin: 0; }
.sd-pal-head.empty { padding: 6px 0; } .sd-pal-head.empty .sd-note { margin: 0; }
.sd-inapp-hero .sd-pal { display: block; margin: 0 auto; }
.sd-pal { display: inline-block; flex-shrink: 0; line-height: 0; }
.sd-pal svg { width: 100%; height: 100%; display: block; overflow: visible; stroke: none; fill: none; }
.sd-hero-pal svg { width: 46px; height: 46px; }
.sd-pal .body { fill: var(--exact); stroke: var(--exact-2); stroke-width: 1.4; }
.sd-pal .arm { fill: none; stroke: var(--exact-2); stroke-width: 4; stroke-linecap: round; }
.sd-pal .fist { fill: var(--exact); stroke: var(--exact-2); stroke-width: 1.4; }
/* the category characters' things (mascot.js clock / mask / clap / ball / globe / star) */
.sd-pal .obj-gold { fill: var(--gold, #f4b73b); stroke: color-mix(in srgb, var(--gold, #f4b73b) 65%, #000); stroke-width: 1.2; }
.sd-pal .obj-face { fill: #fffdf6; stroke: color-mix(in srgb, var(--gold, #f4b73b) 65%, #000); stroke-width: 1.6; }
.sd-pal .obj-hand { fill: none; stroke: #2a2f3d; stroke-width: 1.6; stroke-linecap: round; } .sd-pal .obj-dot { fill: #2a2f3d; }
.sd-pal .obj-ink { fill: #2a2f3d; } .sd-pal .obj-line { fill: none; stroke: #2a2f3d; stroke-width: 1.1; stroke-linecap: round; } .sd-pal .obj-line.light { stroke: rgba(255,255,255,.55); stroke-width: 1; }
.sd-pal .obj-board { fill: #2a2f3d; stroke: #151821; stroke-width: 1; } .sd-pal .obj-stripe { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 1.2; stroke-linecap: round; } .sd-pal .obj-white { fill: #fff; }
.sd-pal .obj-ball { fill: #fff; } .sd-pal .obj-ball-rim { fill: none; stroke: #2a2f3d; stroke-width: 1.3; }
.sd-pal .obj-sea { fill: #3d8bd9; stroke: #2a6cb0; stroke-width: 1.2; } .sd-pal .obj-land { fill: #2fb36c; }
.sd-pal .obj-star { fill: var(--gold, #f4b73b); stroke: color-mix(in srgb, var(--gold, #f4b73b) 65%, #000); stroke-width: 1.2; stroke-linejoin: round; }
.sd-pal .lift { transform-origin: 47px 22px; animation: sd-lift 2.4s ease-in-out infinite; }
.sd-pal .tilt { transform-origin: 47px 32px; animation: sd-tilt 2.6s ease-in-out infinite; }
.sd-pal .snap .clapper { transform-origin: 41px 21px; animation: sd-snap 1.8s ease-in-out infinite; }
.sd-pal .bounce { animation: sd-bounce 1.2s ease-in-out infinite; }
.sd-pal .spin { transform-origin: 49px 25.6px; animation: sd-tilt 3s ease-in-out infinite; }
.sd-pal .twinkle { transform-origin: 49px 11px; animation: sd-twinkle 2.2s ease-in-out infinite; }
@keyframes sd-lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px) rotate(-4deg); } }
@keyframes sd-tilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes sd-snap { 0%, 60%, 100% { transform: rotate(0); } 75% { transform: rotate(-16deg); } }
@keyframes sd-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes sd-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .sd-pal .lift, .sd-pal .tilt, .sd-pal .snap .clapper, .sd-pal .bounce, .sd-pal .spin, .sd-pal .twinkle { animation: none; } }
.sd-pal .body.o, .sd-pal .fist.o { fill: var(--misplaced); stroke: var(--misplaced-2); } .sd-pal .arm.o { stroke: var(--misplaced-2); } /* the orange friend */
.sd-pal-friends { width: 34px; height: 31px; vertical-align: middle; margin-inline-end: 4px; }
.sd-pal .eye, .sd-pal .mouth-line { fill: none; stroke: rgba(10,14,28,.8); stroke-width: 1.8; stroke-linecap: round; }
.sd-pal .pupil, .sd-pal .mouth { fill: rgba(10,14,28,.8); }
.sd-pal .tongue { fill: #ff8a9a; }
.sd-pal .sh { fill: rgba(0,0,0,.18); }
.sd-pal .knuckle { fill: none; stroke: var(--exact-2); stroke-width: 1.2; stroke-linecap: round; }
.sd-pal .spark { fill: var(--gold, #f4b73b); }
.sd-pal .bell { fill: var(--gold, #f4b73b); stroke: color-mix(in srgb, var(--gold, #f4b73b) 70%, #000); stroke-width: 1.2; }
.sd-pal .bell-top { stroke: color-mix(in srgb, var(--gold, #f4b73b) 70%, #000); stroke-width: 2; stroke-linecap: round; }
.sd-pal .motion { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; opacity: .7; }
.sd-pal .q { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; } .sd-pal .q-dot { fill: var(--accent); }
.sd-pal .mg-glass { fill: color-mix(in srgb, #bfe4ff 60%, transparent); }
.sd-pal .mg-ring { fill: none; stroke: color-mix(in srgb, var(--ink) 80%, transparent); stroke-width: 2.2; }
.sd-pal .mg-handle { fill: none; stroke: #9a6434; stroke-width: 3.2; stroke-linecap: round; }
.sd-pal .mg-glint { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; opacity: .9; }
.sd-pal .scan { transform-origin: 46.2px 39.2px; animation: sd-scan 2.8s ease-in-out infinite; }
@keyframes sd-scan { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 65% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .sd-pal .scan { animation: none; } }
.sd-pal .thumb { transform-origin: 41px 40px; animation: sd-thumb 2.8s ease-in-out .4s infinite; }
.sd-pal .wave { transform-origin: 39px 39px; animation: sd-wave 1.6s ease-in-out .3s 3; }
.sd-pal .ring { transform-origin: 50.6px 21px; animation: sd-ring 2.4s ease-in-out .5s infinite; }
.sd-pal .cheer { transform-origin: 30px 38px; animation: sd-cheer 1.2s ease-in-out .2s 3; }
.sd-pal .heart { fill: #ff5c7c; transform-box: fill-box; transform-origin: center; }
.sd-pal .lips { fill: #e04f6c; } .sd-pal .blush { fill: #ff7d98; opacity: .8; }
.sd-pal .kiss .heart { animation: sd-heart 2.6s ease-out infinite both; } .sd-pal .kiss .h2 { animation-delay: .5s; } .sd-pal .kiss .h3 { animation-delay: 1s; }
@keyframes sd-heart { 0% { opacity: 0; translate: -4px 5px; scale: .3; } 18% { opacity: 1; translate: 0 0; scale: 1.1; } 30% { scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; translate: 3px -7px; scale: 1; } }
.sd-pal .think { transform-origin: 50px 12px; animation: sd-think 2.6s ease-in-out .4s infinite; }
@keyframes sd-thumb { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-14deg); } 86% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } }
@keyframes sd-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-10deg); } }
@keyframes sd-ring { 0%, 60%, 100% { transform: rotate(0); } 66% { transform: rotate(16deg); } 74% { transform: rotate(-14deg); } 82% { transform: rotate(9deg); } 90% { transform: rotate(-5deg); } }
@keyframes sd-cheer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.4px); } }
@keyframes sd-think { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-1.6px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .sd-pal .pal-move, .sd-pal .pal-move * { animation: none !important; } }
/* the last result card's way to the bonus: two lines */
.sd-result-actions .sd-btn.two { flex-direction: column; gap: 1px; line-height: 1.2; }
.sd-btn.two small { font-size: 12px; font-weight: 500; opacity: .85; }
/* the hero's half-tiles row (joker + streak) */
.sd-hero-x { margin: 8px 0 0; }
.sd-hero-x + .sd-hero { margin-top: 8px; }
.sd-streak-tile { border: 1.5px solid color-mix(in srgb, #f97316 35%, var(--line)); background: var(--surface); }
.sd-streak-tile .sd-xtile-t { color: color-mix(in srgb, #f97316 80%, var(--ink)); }
.sd-streak-tile.best .sd-xtile-s { color: #f97316; font-weight: 600; }
@media (max-width: 340px) { .sd-xtile { padding: 6px 8px; column-gap: 4px; } .sd-xtile-t { font-size: 12.5px; } .sd-xtile-s { font-size: 11px; } }
/* a sheet's main button pinned to its bottom while the content scrolls (the help sheet) */
.sd-sticky-cta { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); z-index: 2; margin: 14px -20px calc(-22px - env(safe-area-inset-bottom));
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 0%, transparent), var(--surface) 26%); }
.sd-sticky-cta .sd-btn.wide { width: 100%; margin: 0; }
/* joker button in the action bar (right of "check"): the card + how many are left */
.sd-btn.sd-jk-bar { position: relative; display: inline-flex; flex-direction: column; gap: 0; line-height: 1; border-color: color-mix(in srgb, var(--jk) 55%, var(--line-2)); background: color-mix(in srgb, var(--jk) 10%, transparent); }
.sd-jk-bar-ic { font-size: 20px; }
.sd-jk-bar-n { position: absolute; top: -7px; inset-inline-start: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: var(--jk-ink); background: linear-gradient(165deg, var(--jk), var(--jk-2)); box-shadow: 0 2px 6px color-mix(in srgb, var(--jk) 40%, transparent); }
.sd-btn.sd-jk-bar.on { background: linear-gradient(165deg, var(--jk), var(--jk-2)); border-color: transparent; }
.sd-btn.sd-jk-bar.off { filter: grayscale(1); }
.sd-btn.sd-jk-bar.nudge { animation: sd-jk-nudge 1.6s ease-in-out 3; }
@keyframes sd-jk-nudge { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--jk) 0%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--jk) 30%, transparent); transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .sd-btn.sd-jk-bar.nudge { animation: none; } }
.sd-btn.sd-jk-bar.off .sd-jk-bar-n { background: var(--surface-3); color: var(--ink-3); box-shadow: none; }
.sd-btn.jk.sd-jk-go { flex: 1; min-height: 50px; padding: 6px 12px; }
.sd-current.jk-pick .sd-cell.slot:not(.locked) { outline: 2px dashed color-mix(in srgb, var(--jk) 55%, transparent); outline-offset: -2px; }
.sd-btn.jk.sd-jk-go:disabled { opacity: 1; background: color-mix(in srgb, var(--jk) 16%, var(--surface)); color: color-mix(in srgb, var(--jk) 80%, var(--ink)); box-shadow: none; }
.sd-leave-actions { display: grid; gap: 8px; margin-top: 14px; }
.sd-leave-actions .sd-btn.wide { width: 100%; margin: 0; }
/* score meter (v2) under the difficulty, and the "+N" that fly into it */
.sd-qside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
/* v2: the ring floats at the card's left; the topic row and the question's first line wrap beside it */
.sd-qcard.has-meter .sd-qside { flex-direction: row; align-items: center; gap: 9px; }
.sd-qcard.has-meter .sd-qtop { min-height: 28px; }
.sd-qcard.has-meter .sd-qside .sd-meter { width: 44px; height: 44px; margin-block: -8px; }
.sd-meter { position: relative; width: 50px; height: 50px; display: grid; place-items: center; flex-shrink: 0; }
.sd-meter svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sd-meter circle { fill: none; stroke-width: 4.5; }
.sd-meter .trk { stroke: var(--surface-3); }
.sd-meter .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .35s ease; }
.sd-meter-mid { position: relative; display: grid; justify-items: center; line-height: 1; }
.sd-meter-n { direction: ltr; font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.sd-meter-n.k { font-size: 11.5px; }
.sd-meter-mid small { font-size: 8.5px; font-weight: 600; color: var(--ink-3); margin-top: 1px; }
.sd-meter.bump .sd-meter-n { animation: sd-meter-bump .35s ease; }
.sd-meter.bump .val { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)); }
@keyframes sd-meter-bump { 40% { transform: scale(1.25); color: var(--accent); } }
/* the docked copy while the question card is scrolled away — top corner, inside the page's column */
.sd-meter-dock { position: fixed; z-index: 30; top: max(10px, env(safe-area-inset-top)); left: max(10px, calc(50vw - 270px + 10px)); padding: 4px; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(-8px) scale(.9); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.sd-meter-dock.show { opacity: 1; transform: none; }
.sd-meter-dock .sd-meter { width: 44px; height: 44px; }
.sd-float { direction: ltr; position: fixed; z-index: 60; pointer-events: none; font-weight: 800; font-size: 17px; color: var(--exact-2); text-shadow: 0 1px 0 var(--surface), 0 0 10px color-mix(in srgb, var(--exact) 45%, transparent); font-variant-numeric: tabular-nums; }

/* ---------- animated how-to (demo.js) ---------- */
.sd-demo { margin: 0 0 12px; }
.sd-demo-cap { min-height: 82px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-content: start; margin-bottom: 8px; padding: 8px 11px;
  border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); }
.sd-demo-n { grid-row: span 2; align-self: start; font-size: 10.5px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 7px; border-radius: 99px; margin-top: 2px; direction: ltr; }
.sd-demo-cap b { font-size: 16px; font-weight: 800; color: var(--ink); }
.sd-demo-cap p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink); font-weight: 500; }
.sd-demo-legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px; font-size: 12px; color: var(--ink-2); opacity: 0; transition: opacity .3s; }
.sd-demo-legend.on { opacity: 1; }
.sd-demo-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sd-demo-legend i { width: 11px; height: 11px; border-radius: 3px; }
.sd-demo-legend i.exact { background: var(--exact); } .sd-demo-legend i.misplaced { background: var(--misplaced); } .sd-demo-legend i.absent { background: var(--absent); }
.sd-demo-stage { position: relative; overflow: hidden; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.sd-demo-q { display: flex; align-items: baseline; gap: 8px; padding-inline-end: 74px; }
.sd-demo-q small { font-size: 11px; font-weight: 700; color: var(--accent); }
.sd-demo-q b { font-size: 15px; }
.sd-demo-dir { font-size: 12px; color: var(--ink-2); margin: 4px 0 10px; }
.sd-demo-dir i { font-style: normal; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--surface-3); color: var(--ink); font-size: 10.5px; font-weight: 700; }
.sd-demo-board { max-width: 300px; margin: 0 auto 10px; }
.sd-demo-board .sd-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sd-demo-board .sd-cell { min-height: 46px; font-size: 12.5px; }
.sd-demo-hist:empty { display: none; }
.sd-demo-chips { justify-content: center; gap: 6px; }
.sd-demo-chips .sd-chip { min-height: 34px; padding: 5px 11px; font-size: 13.5px; cursor: default; }
.sd-demo-bar { position: relative; display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
/* two jokers: the game's own joker menu, over the button (demo.js) */
.sd-demo-menu { pointer-events: none; width: min(270px, calc(100% - 8px)); inset-inline-start: 4px; }
.sd-demo-menu[hidden] { display: none; }
.sd-demo-menu .sd-jk-opt { padding: 7px 9px; }
.sd-demo-menu .sd-jk-opt-cost { font-size: 11px; padding: 2px 7px; }
.sd-demo-dir-on::after { animation: sd-dir-in .45s ease-out both; }
@keyframes sd-dir-in { from { transform: scale(2.2); opacity: 0; } }
.sd-demo-bar .sd-btn { pointer-events: none; min-height: 42px; }
.sd-demo-bar .sd-btn.primary { min-width: 140px; }
.sd-demo-bar .sd-jk-bar-ic { font-size: 18px; }
.sd-demo-toast { position: absolute; top: 10px; left: 50%; transform: translate(-50%, -10px); opacity: 0; transition: opacity .25s, transform .25s; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.sd-demo-toast.on { opacity: 1; transform: translate(-50%, 0); }
.sd-demo-hand { position: absolute; top: 0; left: 0; font-size: 30px; line-height: 1; pointer-events: none; opacity: 0; z-index: 3;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); transition: transform .55s cubic-bezier(.4, .1, .2, 1), opacity .25s; }
.sd-demo-hand.on { opacity: 1; }
.sd-demo-stage.paused *, .sd-demo-stage.paused *::before, .sd-demo-stage.paused *::after { animation-play-state: paused !important; }
.sd-demo-hand.tap { scale: .82; }
.sd-demo-hand { transition-property: transform, opacity, scale; transition-duration: .85s, .3s, .16s; }
.sd-demo-ctl { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.sd-demo-dots { display: flex; justify-content: center; gap: 6px; }
.sd-demo-pause { position: absolute; top: 9px; left: 9px; z-index: 2; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; cursor: pointer; }
.sd-demo-pause[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.sd-demo-stage { touch-action: pan-y; }
.sd-demo-dot { width: 26px; height: 6px; border: 0; padding: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .2s, width .2s; }
.sd-demo-dot { position: relative; overflow: hidden; }
.sd-demo-dot.on { background: color-mix(in srgb, var(--accent) 28%, var(--line-2)); width: 40px; }
.sd-demo-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: inherit; display: none; }
.sd-demo-dot.on .sd-demo-fill { display: block; }
[dir="rtl"] .sd-demo-fill, .sd-root .sd-demo-fill { inset: 0 0 0 auto; }
.sd-demo-note { text-align: center; font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.sd-help-short { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.sd-help-more { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 12px; background: var(--surface); }
.sd-help-more summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 14.5px; color: var(--accent); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sd-help-more summary::-webkit-details-marker { display: none; }
.sd-help-more summary::after { content: '▾'; transition: transform .2s; }
.sd-help-more[open] summary::after { transform: rotate(180deg); }
.sd-help-full { padding-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .sd-demo-hand { display: none; } }
.sd-help-icons { margin: 0 0 14px; }
.sd-help-icons .sd-sub { margin-top: 22px; }
.sd-help-icon { display: flex; align-items: center; gap: 11px; padding: 5px 0; }
.sd-help-ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.sd-help-ic svg { width: 19px; height: 19px; }
.sd-help-icon > span:last-child { display: grid; line-height: 1.3; }
.sd-help-icon b { font-size: 14px; }
.sd-help-icon small { font-size: 12.5px; color: var(--ink-2); }

/* ---------- guided tour (tour.js) ---------- */
.sd-link.sd-practice { font-size: 13px; text-align: center; margin-bottom: 12px; }
.sd-tour-go { margin-top: 10px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sd-help-tour { display: block; margin: 20px auto 14px; } /* room between the lines above, the tour and "practice" */
.sd-practice-go { display: block; margin: 6px auto 0; color: var(--ink-2); font-weight: 600; }
.sd-tour { position: fixed; inset: 0; z-index: 45; }
.sd-tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8, 12, 24, .62), 0 0 0 3px color-mix(in srgb, var(--accent) 70%, white);
  transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease; pointer-events: none; }
.sd-tour-hand { position: fixed; top: 0; left: 0; font-size: 32px; line-height: 1; pointer-events: none; z-index: 4; opacity: 0; transform-origin: 11px 3px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .4)); }
.sd-tour-ripple { position: fixed; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; pointer-events: none; z-index: 3;
  border: 3px solid color-mix(in srgb, var(--accent) 80%, white); animation: sd-tour-ripple .6s ease-out forwards; }
@keyframes sd-tour-ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.sd-tour-chip { position: fixed; top: 0; left: 0; z-index: 3; pointer-events: none; margin: 0; border-color: var(--accent); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); opacity: 0; }
.sd-tour-rows { display: grid; gap: 6px; margin: -4px 0 10px; }
.sd-tour-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; line-height: 1.3; }
.sd-tour-row-ic { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.sd-tour-row-ic svg { width: 17px; height: 17px; }
.sd-tour-after { margin: 4px 0 0; font-weight: 700; font-size: 14.5px; }
.sd-tour-pop { position: fixed; left: 50%; translate: -50% 0; width: min(380px, calc(100vw - 24px)); display: flex; align-items: flex-end; gap: 6px; z-index: 3; transition: top .35s ease; }
.sd-tour.in .sd-tour-pop { animation: sd-tour-in .3s ease-out; }
@keyframes sd-tour-in { from { opacity: 0; transform: translateY(8px); } }
.sd-tour-pal { width: 62px; height: 62px; flex-shrink: 0; margin-bottom: -4px; }
.sd-tour-pal svg { width: 100% !important; height: 100% !important; }
.sd-tour-bub { position: relative; flex: 1; background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 13px 11px; box-shadow: 0 12px 34px rgba(0, 0, 0, .35); }
.sd-tour-bub::after { content: ''; position: absolute; bottom: 14px; inset-inline-start: -7px; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); border-radius: 2px; }
.sd-tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sd-tour-n { font-size: 11.5px; font-weight: 800; color: var(--accent); direction: ltr; }
.sd-tour-skip { border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink-3); cursor: pointer; padding: 2px 0; }
.sd-tour-txt { margin: 0 0 10px; font-size: 15px; line-height: 1.45; font-weight: 500; }
.sd-tour-nav { display: flex; gap: 8px; justify-content: flex-end; }
.sd-tour-btn { border: 0; border-radius: 10px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--accent); color: #fff; }
.sd-tour-nav .sd-tour-btn { white-space: nowrap; }
.sd-tour-btn.ghost { background: var(--surface-2); color: var(--ink-2); }
.sd-tour-btn:disabled { opacity: .4; cursor: default; }
.sd-tour.out { opacity: 0; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .sd-tour-hand { display: none; } .sd-tour-hole, .sd-tour-pop { transition: none; } }
.sd-sum-pct.week { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.sd-xtile-s.way { display: flex; align-items: center; gap: 7px; }
.sd-xtile-s.way > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sd-xtile-s.way .sd-jk-steps i { width: 6px; height: 6px; }
.sd-xtile-s.way .sd-jk-steps i.jk { font-size: 10px; }
.sd-demo-arrow { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); font: inherit; font-size: 22px; font-weight: 700; line-height: 1; padding: 0 0 3px; cursor: pointer; direction: ltr; unicode-bidi: isolate; }
.sd-demo-arrow:active { transform: scale(.92); }
.sd-demo-board .sd-cell.slot.sd-demo-lift { position: relative; z-index: 2; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); transition: transform .85s cubic-bezier(.4, .1, .2, 1); animation: none; }
.sd-demo-board .sd-cell.slot.filled.misplaced { background: linear-gradient(165deg, var(--misplaced), var(--misplaced-2)); color: var(--misplaced-ink); border-color: transparent; }
.sd-demo-board .sd-cell.slot.filled.absent { background: var(--absent); color: var(--absent-ink); border-color: transparent; }
.sd-demo-board .sd-cell.sd-demo-out { transition: transform .38s ease-in, opacity .38s ease-in; transform: translateY(26px) scale(.6); opacity: 0; }
.sd-demo-chips .sd-chip.sd-demo-back { animation: sd-demo-back .9s ease-out; }
@keyframes sd-demo-back { 0% { transform: translateY(-14px) scale(.8); opacity: 0; } 45% { transform: none; opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--absent) 45%, transparent); } 100% { box-shadow: none; } }
.sd-crowd-rank.jk { color: var(--jk); }
.sd-crowd-rank { display: inline-block; margin-top: 4px; color: var(--accent); font-weight: 700; }
.sd-yboard { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; background: var(--surface); }
.sd-yboard summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sd-yboard summary::-webkit-details-marker { display: none; }
.sd-yboard summary::after { content: '▾'; color: var(--ink-3); transition: transform .2s; }
.sd-yboard[open] summary::after { transform: rotate(180deg); }
.sd-yboard .sd-board-list { margin-bottom: 10px; }
.sd-board-more-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.sd-link.sd-board-more { margin: 0; font-size: 13.5px; } .sd-link.sd-board-more.less { color: var(--ink-3) !important; font-weight: 500; }
.sd-board-list li.sd-bl-gap.open-more { flex-direction: column; gap: 0; padding: 4px 0; cursor: pointer; letter-spacing: 0; }
.sd-board-list li.sd-bl-gap.open-more small { font-size: 12px; color: var(--accent); font-weight: 600; }
.sd-bl-gap-dots { font-size: 18px; line-height: 1; letter-spacing: 2px; color: var(--ink-3); }

/* ---------- top bar: three labelled buttons + the "עוד" sheet ---------- */
.sd-hicons { gap: 2px; }
.sd-hbtn { position: relative; width: 52px; height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer;
  display: grid; justify-items: center; align-content: center; gap: 2px; padding: 0; transition: background .15s, color .15s; }
.sd-hbtn svg { width: 21px; height: 21px; }
.sd-hbtn span { font-size: 11px; font-weight: 600; line-height: 1; }
.sd-hbtn:hover { background: var(--surface-2); color: var(--ink); }
.sd-hbtn.cta { color: var(--accent); }
.sd-hbtn.busy { pointer-events: none; opacity: .75; } .sd-hbtn.busy svg { animation: sd-busy .9s ease-in-out infinite; }
@keyframes sd-busy { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }
.sd-hbtn.cta svg { animation: sd-cta-nudge 2.6s ease-in-out 1.2s 3; }
@keyframes sd-cta-nudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-14deg); } 86% { transform: rotate(12deg); } 93% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .sd-hbtn.cta svg { animation: none; } }
/* 4–5 header buttons: a bit narrower, and a smaller logo, so the row still fits a phone */
@media (max-width: 440px) {
  .sd-hicons.many { gap: 0; } .sd-hicons.many .sd-hbtn { width: 44px; }
  .sd-header:has(.sd-hicons.many) .sd-logo { gap: 3px; }
  .sd-header:has(.sd-hicons.many) .sd-logo-tile { width: 32px; height: 32px; font-size: 20px; border-radius: 9px; }
}
@media (max-width: 345px) {
  .sd-hicons.many .sd-hbtn { width: 40px; } .sd-hicons.many .sd-hbtn span { font-size: 10px; }
  .sd-header:has(.sd-hicons.many) .sd-logo-tile { width: 27px; height: 27px; font-size: 17px; border-radius: 8px; }
}
.sd-hbtn.dot::after { content: ''; position: absolute; top: 6px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.sd-more { display: grid; gap: 6px; }
.sd-more-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.sd-more-row:hover { border-color: var(--accent); }
.sd-more-ic { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); font-size: 18px; }
.sd-more-ic svg { width: 20px; height: 20px; }
.sd-more-t { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.sd-more-t b { font-size: 15px; }
.sd-more-t small { font-size: 12.5px; color: var(--ink-2); }
.sd-more-go { color: var(--ink-3); font-size: 20px; direction: ltr; unicode-bidi: isolate; }
.sd-more-grp { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.sd-more-grp .sd-more-row { border: 0; border-radius: 0; }
.sd-more-grp .sd-push-hour { padding: 8px 12px 10px; }
.sd-more-state { font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.sd-more-state.on { color: var(--exact-2); background: color-mix(in srgb, var(--exact) 14%, transparent); }

/* between attempts (app.js syncWait): the next row and the pool rest while the points fly in, then wake up with the clock */
.sd-current, .sd-pool, .sd-bar-inner > .sd-btn { transition: opacity .3s; }
.sd-app.sd-wait .sd-current, .sd-app.sd-wait .sd-pool, .sd-app.sd-wait .sd-bar-inner > .sd-btn { opacity: .45; pointer-events: none; }

/* the one-time survey (app.js surveyBody) */
.sd-survey-hero { text-align: center; }
.sd-survey-hero .sd-pal { display: block; margin: -4px auto 2px; }
.sd-survey-lead { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.sd-survey-sub { margin: 2px 0 8px; font-size: 13px; color: var(--ink-3); }
.sd-survey-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sd-survey-opt { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; text-align: start; transition: background .15s, border-color .15s; }
.sd-survey-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-weight: 600; }
.sd-survey-opt.on::before { content: '✓ '; color: var(--accent); }
.sd-survey-hero + .sd-survey-sub + .sd-survey-opts + .sd-textarea { margin-bottom: 10px; }
.sd-survey-alt { display: flex; gap: 8px; margin-top: 8px; }
.sd-survey-alt .sd-btn { flex: 1; }
.sd-survey-alt .sd-btn { font-size: 14px; padding-inline: 8px; white-space: nowrap; }

/* ---------- day done: the attempts fold under one line ---------- */
.sd-hist-fold { margin-bottom: 4px; }
.sd-hist-sum { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; list-style: none; user-select: none; }
.sd-hist-sum::-webkit-details-marker { display: none; }
.sd-hist-label { white-space: nowrap; }
.sd-hist-mini { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-start; }
.sd-mini-row { display: inline-grid; grid-template-columns: repeat(7, 7px); gap: 2px; }
.sd-mini-row i { width: 7px; height: 7px; border-radius: 2px; background: var(--absent); }
.sd-mini-row i.exact { background: var(--exact); }
.sd-mini-row i.misplaced { background: var(--misplaced); }
.sd-mini-row i.burned { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.sd-hist-chev { transition: transform .2s; color: var(--ink-3); }
.sd-hist-fold[open] .sd-hist-chev { transform: rotate(180deg); }
.sd-hist-fold[open] .sd-hist-sum { margin-bottom: 8px; }

/* ---------- the two rotating tiles above the day's summary ---------- */
.sd-car { position: relative; overflow: hidden; min-width: 0; border-radius: 14px; touch-action: pan-y; }
.sd-car-track { display: flex; height: 100%; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.sd-car-track > * { flex: 0 0 100%; width: 100%; padding-bottom: 12px; }
.sd-car-copy { pointer-events: none; }
.sd-car-dots { position: absolute; bottom: 4px; inset-inline: 0; display: flex; justify-content: center; gap: 3px; pointer-events: none; }
.sd-car-dots i { width: 4px; height: 4px; border-radius: 2px; background: var(--ink-3); opacity: .35; transition: width .3s, opacity .3s; }
.sd-car-dots i.on { width: 10px; opacity: .8; }
.sd-info-tile.news { border: 1.5px solid var(--line); background: var(--surface); }
.sd-info-tile.news.up .sd-xtile-t { color: var(--exact); }
@media (prefers-reduced-motion: reduce) { .sd-car-track { transition: none; } }

/* ---------- confetti: the bar-characters ---------- */
.sd-confetti.buddies i { width: auto; height: auto; border-radius: 0; background: none; }
.sd-confetti.buddies .sd-buddy { display: block; width: calc(17px * var(--s, 1)); height: auto; overflow: visible; }
.sd-confetti.buddies .sd-buddy rect { stroke: none; }

.sd-tour-link { margin-top: 2px; }

/* the boards' own icons (BIC in app.js) */
.sd-bic { width: 20px; height: 20px; display: block; }
.sd-root svg.sd-bic { stroke: none; }
.sd-bic .e { fill: var(--exact); } .sd-bic .m { fill: var(--misplaced); } .sd-bic .a { fill: var(--absent); }
.sd-bic .g { fill: #f5b301; } .sd-bic .j { fill: var(--jk); } .sd-bic .w { fill: #fff; }
.sd-bic .ink { fill: rgba(10, 14, 28, .78); } .sd-bic .ink-l { fill: none; stroke: rgba(10, 14, 28, .78); stroke-width: 1.1; stroke-linecap: round; }
.sd-xtile-ic:has(.sd-bic) { filter: none !important; opacity: 1 !important; }

/* the nickname at the top of "אישי" (stats) */
.sd-nick.top { margin: 2px 0 16px; padding: 0 0 14px; border-top: 0; border-bottom: 1px dashed var(--line); }

/* a played cell: a tap shows its full name */
.sd-hist .sd-cell.peek { cursor: pointer; }
/* the joker sheet: the details fold under one line */
.sd-jk-more { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sd-jk-more > summary { padding: 10px 12px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); cursor: pointer; list-style: none; }
.sd-jk-more > summary::-webkit-details-marker { display: none; }
.sd-jk-more > summary::after { content: ' ▾'; color: var(--ink-3); }
.sd-jk-more[open] > summary::after { content: ' ▴'; }
.sd-jk-more-body { padding: 0 12px 12px; }

/* the tiles above the day's summary keep one height whether a tile rotates or stands alone (no jump when the news arrive) */
.sd-hero-x > .sd-xtile { padding-bottom: 12px; }

/* ---------- חיצי כיוון: 2 jokers → the arrows on the orange cells for one puzzle ---------- */
/* the card: orange, the two arrows of the orange cells */
.sd-dircard-w { display: inline-flex; flex-shrink: 0; line-height: 0; }
svg.sd-dircard { display: block; width: 15px; height: 19px; overflow: visible; stroke: none; } /* svg.: above the game's .sd-root svg (stroke-drawn icons) */
.sd-dircard .c { fill: var(--misplaced-2); stroke: none; }
.sd-dircard .r { fill: var(--misplaced); stroke: rgba(255,255,255,.55); stroke-width: .9; }
.sd-dircard .a { fill: none; stroke: var(--misplaced-ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.sd-dircard-w.big .sd-dircard { width: 62px; height: 78px; filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--misplaced) 45%, transparent)); }
/* the menu over the joker button */
.sd-jk-menu-shade { position: fixed; inset: 0; z-index: 0; }
.sd-jk-menu { position: absolute; z-index: 1; bottom: calc(100% - 2px); inset-inline-start: 12px; width: min(300px, calc(100% - 24px)); padding: 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.22); animation: sd-jk-menu-in .16s ease-out both; }
.sd-jk-menu::after { content: ''; position: absolute; top: 100%; inset-inline-start: var(--caret, 84px); border: 8px solid transparent; border-top-color: var(--surface); margin-top: -1px; }
@keyframes sd-jk-menu-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .sd-jk-menu { animation: none; } }
.sd-jk-opt { display: grid; grid-template-columns: 30px 1fr auto; grid-template-areas: 'ic t cost' 'ic s s'; align-items: center; column-gap: 10px; row-gap: 1px; width: 100%;
  padding: 9px 10px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--jk) 30%, transparent); background: color-mix(in srgb, var(--jk) 6%, var(--surface));
  font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.sd-jk-opt + .sd-jk-opt { margin-top: 6px; }
.sd-jk-opt.dir { border-color: color-mix(in srgb, var(--misplaced) 55%, transparent); background: color-mix(in srgb, var(--misplaced) 10%, var(--surface)); }
.sd-jk-opt:active { transform: scale(.98); }
.sd-jk-opt-ic { grid-area: ic; justify-self: center; font-size: 22px; line-height: 1; }
.sd-jk-opt-ic .sd-dircard { width: 21px; height: 26px; }
.sd-jk-opt-t { grid-area: t; font-weight: 700; font-size: 14.5px; }
.sd-jk-opt small { grid-area: s; font-size: 11.5px; color: var(--ink-2); line-height: 1.3; }
.sd-jk-opt-cost { grid-area: cost; font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 3px 9px; color: var(--jk-ink); background: var(--jk); }
.sd-jk-opt-cost .sd-jkc { font-size: 13px; }
.sd-jk-menu-note { margin: 7px 2px 1px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
/* the gate: "ג׳וקר - עכשיו או באמצע החידה:" and the two options, the price drawn as cards, a "?" by each */
.sd-jk-ask { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.sd-jk-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.sd-jk-optw { display: inline-flex; align-items: center; gap: 4px; }
.sd-jk-mini.dir { color: var(--ink); background: color-mix(in srgb, var(--misplaced) 10%, var(--surface)); border-color: color-mix(in srgb, var(--misplaced) 55%, transparent); }
.sd-jk-mini.dir:hover { border-color: var(--misplaced); }
.sd-jk-eq { font-weight: 700; color: var(--ink-3); }
.sd-jk-q { width: 20px; height: 20px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 800; line-height: 1;
  color: var(--ink-3); background: transparent; border: 1.5px solid var(--line-2); }
.sd-jk-q:hover { color: var(--ink); border-color: var(--ink-3); }
.sd-jkc { display: inline-flex; align-items: center; font-size: 14px; line-height: 1; }
.sd-jkc i { font-style: normal; display: inline-block; }
.sd-jkc.two i:first-child { transform: rotate(-8deg); }
.sd-jkc.two i + i { margin-inline-start: -0.5em; transform: translateY(-0.2em) rotate(12deg); }
.sd-jkc.big { font-size: 34px; }
.sd-jk-hint.dir { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); animation: none; }
.sd-jk-yes { display: flex; align-items: center; justify-content: center; gap: 14px; }
.sd-jk-yes .sd-btn.dir { padding: 7px 20px; }
.sd-btn.dir.sd-jk-go { flex: 1; min-height: 50px; padding: 6px 12px; }
.sd-dir-go-t { display: inline-flex; align-items: center; gap: 6px; }
.sd-jk-used.dir { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 500; text-align: start; }
.sd-leg.dir .sd-dircard { width: 11px; height: 14px; }
.sd-leg.dir { gap: 4px; }
.sd-jk-tag.dir { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.sd-btn.sd-jk-bar .sd-dircard { width: 19px; height: 24px; }
/* switched on: the arrows pop into the orange cells */
.sd-board.dir-fresh .sd-cell.misplaced.to-start::after, .sd-board.dir-fresh .sd-cell.misplaced.to-end::after { animation: sd-dir-pop .7s calc(var(--i, 0) * 70ms + 150ms) both ease-out; }
@keyframes sd-dir-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.8); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sd-board.dir-fresh .sd-cell::after { animation: none !important; } }
/* the sheet */
.sd-dir-hero { display: flex; justify-content: center; padding: 8px 0 6px; }
.sd-dir-eq { display: inline-flex; align-items: center; gap: 12px; } /* RTL: 2 jokers (right) = the card (left) */
.sd-dir-eq-sign { font-size: 26px; font-weight: 800; color: var(--ink-3); }
.sd-dir-eq.small { gap: 5px; }
.sd-dir-eq.small .sd-jkc { font-size: 16px; }
.sd-dir-eq.small .sd-dir-eq-sign { font-size: 14px; }
.sd-dir-eq.small .sd-dircard { width: 19px; height: 24px; }
.sd-dir-ex { margin: 6px 0 4px; }
.sd-dir-rules { margin-top: 8px; }
.sd-btn.dir { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 18px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  color: var(--misplaced-ink); background: linear-gradient(165deg, var(--misplaced), var(--misplaced-2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--misplaced) 35%, transparent); }
.sd-btn.dir small { font-size: 11.5px; font-weight: 600; opacity: .85; }
.sd-btn.dir.wide { width: 100%; margin-top: 14px; }
/* in the joker sheet: the other way to spend them */
.sd-dir-promo { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 4px; padding: 10px 12px; border-radius: 14px; font: inherit; color: var(--ink); text-align: start; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--misplaced) 50%, transparent); background: color-mix(in srgb, var(--misplaced) 9%, var(--surface)); }
.sd-dir-promo-t { display: flex; flex-direction: column; gap: 2px; }
.sd-dir-promo-t b { font-size: 14.5px; }
.sd-dir-promo-t small { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.sd-dir-promo-go { margin-inline-start: auto; font-size: 22px; color: var(--ink-3); }
/* the notice-board tile */
.sd-xtile.sd-dir-tile { border-color: color-mix(in srgb, var(--misplaced) 50%, transparent); background: color-mix(in srgb, var(--misplaced) 10%, var(--surface)); }
.sd-dir-tile .sd-xtile-ic .sd-dircard { width: 17px; height: 21px; }

/* ---------- the hidden joker: a little card that peeks out of the logo now and then (app.js eggPeek) ---------- */
.sd-logo { position: relative; isolation: isolate; }
.sd-egg { position: absolute; z-index: -1; left: 0; top: 0; width: 22px; height: 30px; opacity: 0; pointer-events: none; }
.sd-egg.up { pointer-events: auto; cursor: pointer; }
.sd-egg.caught { z-index: 3; }
.sd-egg-card { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; color: var(--jk-ink);
  background: linear-gradient(160deg, var(--jk), var(--jk-2)); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--jk) 75%, transparent), 0 3px 8px rgba(0,0,0,.28), inset 0 0 0 1.5px rgba(255,255,255,.35); }
.sd-egg-face { font-size: 1em; line-height: 1; }
.sd-egg-corner { position: absolute; top: 1px; inset-inline-start: 2px; font-size: .38em; font-weight: 800; line-height: 1; opacity: .9; }
.sd-egg-corner.b { top: auto; bottom: 1px; inset-inline-start: auto; inset-inline-end: 2px; transform: rotate(180deg); }
/* stage 2: behind another piece of the game — the card slides out of a clipping window set against the piece's edge
   (app.js egg2Peek); only the card itself takes a tap, with a few px of slack around it */
.sd-egg2-host { position: relative; }
.sd-egg2-win { position: absolute; z-index: 4; overflow: hidden; pointer-events: none; }
.sd-egg2-win.caught { overflow: visible; z-index: 30; }
.sd-egg2 { position: absolute; display: block; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sd-egg2::before { content: ''; position: absolute; inset: -9px; }
.sd-egg2-hint, .sd-egg2-hint .sd-egg2 { pointer-events: none; } /* the hint over "עוד": not catchable — the tap goes to "עוד" */
.sd-egg2-hint .sd-egg-card { border-radius: 3px; }
.sd-egg2 .sd-egg-card { border-radius: 5px; }

/* ---------- the joker sheet: what jokers buy (a banner of two rows, each opens its animation) ---------- */
.sd-jk-uses { margin: 4px 0 14px; padding: 6px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--jk) 35%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--jk) 9%, var(--surface)), color-mix(in srgb, var(--misplaced) 7%, var(--surface))); }
.sd-jk-use { border-radius: 12px; }
.sd-jk-use + .sd-jk-use { margin-top: 6px; }
.sd-jk-use > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--jk) 30%, transparent); }
.sd-jk-use.dir > summary { border-color: color-mix(in srgb, var(--misplaced) 50%, transparent); }
.sd-jk-use > summary::-webkit-details-marker { display: none; }
.sd-jk-use-eq { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.sd-jk-use-eq .sd-jkc { font-size: 20px; }
.sd-jk-use-t { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.sd-jk-use-t b { font-size: 15px; }
.sd-jk-use-t small { flex-basis: 100%; font-size: 12px; color: var(--ink-2); }
/* "להדגמה ▾" / "סגירה ▴": a small pill, so it's clear the row opens */
.sd-jk-use-chev { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; padding: 3px 8px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1;
  color: color-mix(in srgb, var(--jk) 80%, var(--ink)); background: color-mix(in srgb, var(--jk) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--jk) 35%, transparent); }
.sd-jk-use.dir .sd-jk-use-chev { color: color-mix(in srgb, var(--misplaced) 55%, var(--ink)); background: color-mix(in srgb, var(--misplaced) 12%, var(--surface)); border-color: color-mix(in srgb, var(--misplaced) 45%, transparent); }
.sd-jk-use-chev i { font-style: normal; font-size: 15px; transition: transform .2s; }
.sd-jk-use[open] .sd-jk-use-chev i { transform: rotate(180deg); }
.sd-jk-use-close, .sd-jk-use[open] .sd-jk-use-demo { display: none; }
.sd-jk-use[open] .sd-jk-use-close { display: inline; }
.sd-jk-use-body { padding: 10px 4px 4px; }
.sd-jk-use-body .sd-jk-p { margin-bottom: 4px; }
.sd-jk-uses-note { margin: 8px 4px 2px; font-size: 12px; color: var(--ink-2); text-align: center; }
/* the streak: a 6-day round, today marked */
.sd-jk-streak { margin: 4px 0 12px; }
.sd-jk-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sd-jk-step { display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 10px; background: var(--surface-2); border: 1.5px solid var(--line); }
.sd-jk-step-ic { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-3); color: var(--ink-2); }
.sd-jk-step.done .sd-jk-step-ic { background: var(--jk); color: var(--jk-ink); }
.sd-jk-step.prize .sd-jk-step-ic { background: none; }
.sd-jk-step.prize .sd-jkc { font-size: 17px; }
.sd-jk-step.prize.done { background: color-mix(in srgb, var(--jk) 14%, var(--surface)); }
.sd-jk-step small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.sd-jk-step.now { border-color: var(--jk); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jk) 18%, transparent); }
.sd-jk-step.now small { color: var(--jk); font-weight: 800; }
.sd-jk-track-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); text-align: center; }
.sd-jk-track-now { margin: 3px 0 0; font-size: 12.5px; font-weight: 700; color: var(--jk); text-align: center; }
/* the reveal sheet's equation */
.sd-dir-eq-word { font-size: 24px; }
/* the arrows, animated: arrows pop onto two orange cells, they swap the way they point, turn green */
.sd-adm { width: max-content; margin: 6px auto 6px; }
.sd-adm-nums, .sd-adm-row { display: flex; gap: 6px; }
.sd-adm-nums span { width: 58px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); margin-bottom: 3px; }
.sd-adm-row { animation: sd-adm-row 4.6s ease-in-out infinite; }
.sd-adm-c { position: relative; width: 58px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; overflow: hidden; }
.sd-adm-c b { position: relative; z-index: 1; }
.sd-adm-c.g { background: linear-gradient(165deg, var(--exact), var(--exact-2)); color: var(--exact-ink); }
.sd-adm-c.o { background: linear-gradient(165deg, var(--misplaced), var(--misplaced-2)); color: var(--misplaced-ink); overflow: visible; }
.sd-adm-c.o::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(165deg, var(--exact), var(--exact-2)); opacity: 0; animation: sd-adm-green 4.6s infinite; }
.sd-adm-c.o b { animation: sd-adm-ink 4.6s infinite; }
.sd-adm-c i { position: absolute; z-index: 2; top: 2px; inset-inline-start: 5px; font-style: normal; font-size: 13px; font-weight: 800; animation: sd-adm-arrow 4.6s infinite; }
.sd-adm-c.c1 { animation: sd-adm-c1 4.6s infinite; z-index: 2; }
.sd-adm-c.c2 { animation: sd-adm-c2 4.6s infinite; z-index: 1; }
.sd-adm-cap { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); text-align: center; }
@keyframes sd-adm-row { 0% { opacity: 0; } 5%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sd-adm-arrow { 0%, 12% { opacity: 0; transform: scale(0); } 19% { opacity: 1; transform: scale(1.9); } 25%, 56% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; } }
@keyframes sd-adm-c1 { 0%, 36% { transform: none; } 45% { transform: translate(-32px, -9px) rotate(-6deg); } 54%, 100% { transform: translateX(-64px); } }
@keyframes sd-adm-c2 { 0%, 36% { transform: none; } 45% { transform: translate(32px, 9px) rotate(6deg); } 54%, 100% { transform: translateX(64px); } }
@keyframes sd-adm-green { 0%, 56% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes sd-adm-ink { 0%, 56% { color: var(--misplaced-ink); } 66%, 100% { color: var(--exact-ink); } }
@media (prefers-reduced-motion: reduce) { .sd-adm-row, .sd-adm-c, .sd-adm-c i, .sd-adm-c.o::before, .sd-adm-c.o b { animation: none !important; } }

.sd-jk-tease { margin: 8px 6px 2px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--jk); }

/* the character celebrating (mascot.js popper / horn) — where a 🎉 used to be */
.sd-pal .cone { fill: var(--misplaced); stroke: color-mix(in srgb, var(--misplaced) 60%, #000); stroke-width: 1.1; stroke-linejoin: round; }
.sd-pal .cone-band { fill: none; stroke: #ff5c7c; stroke-width: 1.8; stroke-linecap: round; }
.sd-pal .pop { transform-origin: 46px 36px; animation: sd-pop-kick 2.4s ease-out infinite; }
.sd-pal .conf { transform-box: fill-box; transform-origin: center; animation: sd-conf 2.4s ease-out infinite both; }
.sd-pal .conf.g { fill: var(--exact); } .sd-pal .conf.o { fill: var(--misplaced); } .sd-pal .conf.p { fill: var(--jk); }
.sd-pal .conf.b { fill: var(--accent); } .sd-pal .conf.k { fill: #ff5c7c; } .sd-pal .conf.y { fill: #ffd84d; }
.sd-pal .horn-tip { fill: var(--accent); stroke: color-mix(in srgb, var(--accent) 60%, #000); stroke-width: .9; }
.sd-pal .horn { fill: #ff5c7c; stroke: color-mix(in srgb, #ff5c7c 65%, #000); stroke-width: .9; }
.sd-pal .horn-band { fill: none; stroke: #ffd84d; stroke-width: 1.3; }
.sd-pal .blow { transform-origin: 38.4px 34.5px; animation: sd-blow 1.6s ease-in-out infinite; }
.sd-pal svg:has(.blow) .conf { animation-duration: 1.6s; }
@keyframes sd-pop-kick { 0% { transform: rotate(10deg); } 8% { transform: rotate(-6deg) translate(-1px, 1px); } 20%, 100% { transform: none; } }
@keyframes sd-conf { 0% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } 10% { opacity: 1; } 45% { transform: none; opacity: 1; }
  100% { transform: translateY(5px) rotate(120deg); opacity: 0; } }
@keyframes sd-blow { 0%, 12% { transform: scaleX(.18); } 38%, 62% { transform: scaleX(1); } 88%, 100% { transform: scaleX(.18); } }
@media (prefers-reduced-motion: reduce) { .sd-pal .conf { animation: none !important; opacity: 1; } }
/* small, in a line of text (a heading, the streak line, a toast) */
.sd-pal-inline { width: 30px; height: 30px; vertical-align: middle; margin-inline-end: 4px; }
.sd-jk-h .sd-pal-inline { width: 40px; height: 40px; margin-top: -10px; }
.sd-toast .sd-pal-inline { width: 26px; height: 26px; margin: -6px 0 -6px 6px; }
.sd-jk-track-now .sd-pal-inline { width: 40px; height: 40px; margin-top: -8px; }

/* a joker option that can't be afforded yet: there (so it can be saved up for), faded; a tap says why */
.sd-jk-mini.dis, .sd-jk-opt.dis { opacity: .45; filter: grayscale(.7); cursor: not-allowed; box-shadow: none; }
.sd-jk-mini.dis:hover { border-color: inherit; }
.sd-jk-opt.dis:active { transform: none; }
.sd-fbgate-how { margin: 12px 4px 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.sd-fbgate-link { margin-top: 8px; } .sd-fbgate-link .sd-input { width: 100%; font-size: 13px; }
/* An opened board row: each category's points split (solving · greens · speed) under the total, jokers as card icons. */
.sd-bl-cats.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-bl-cats.split .sd-bl-cat { padding: 7px 9px; text-align: start; gap: 2px; }
/* The category's name, the jokers used right next to it (not pushed to the far end); no room left (many jokers, a narrow
   phone) → they go down a line, never out of the card. */
.sd-bl-cats .sd-bl-cat .sd-bl-cat-h { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; column-gap: 6px; row-gap: 2px; white-space: normal; overflow: visible; }
.sd-bl-cats:not(.split) .sd-bl-cat .sd-bl-cat-h { justify-content: center; }
.sd-bl-cat-l { flex-shrink: 0; }
.sd-bl-cjk { font-style: normal; font-size: 15px; line-height: 1; color: var(--ink); white-space: nowrap; }
.sd-bl-split { display: grid; gap: 1px; margin-top: 3px; padding-top: 4px; border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
.sd-bl-pt { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.sd-bl-pt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sd-bl-pt em { font-style: normal; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
/* the card keeps to its half: long rows ("פתרון (10/10)" by "4,975") never push the numbers out of it — on a very narrow
   phone the label goes down a line instead */
.sd-bl-cats .sd-bl-cat { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.sd-bl-cats .sd-bl-pt { align-items: baseline; }
.sd-bl-cats .sd-bl-pt > span { white-space: normal; overflow: visible; text-overflow: clip; min-width: 0; }
.sd-bl-cats .sd-bl-pt > em { flex-shrink: 0; white-space: nowrap; }
.sd-bl-pt.miss em { color: var(--ink-2); font-weight: 600; }
.sd-bl-cjk { display: inline-flex; align-items: center; gap: 5px; }
.sd-bl-cjk-dir { display: inline-flex; align-items: center; gap: 2px; } .sd-bl-cjk-dir svg.sd-dircard { width: 12px; height: 16px; } .sd-bl-cjk small { font-size: 10.5px; color: var(--ink-2); }

/* local only: the categories' icons preview (dev panel) */
.sd-dev-icons { margin-top: 10px; } .sd-dev-icons summary { cursor: pointer; font-weight: 700; }
.sd-dev-icons-grid { display: grid; grid-template-columns: repeat(6, auto); gap: 8px 10px; align-items: center; justify-items: center; margin-top: 8px; font-size: 12px; }
.sd-dev-icons-grid > b { font-size: 11px; color: var(--ink-3); }
.sd-dev-icons-line svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sd-dev-chip { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.sd-dev-chip .sd-pal { vertical-align: middle; }
.sd-pal.crop svg { overflow: hidden; } /* a close-up / the thing alone: cut to its frame */
.sd-pal .obj-line.thin { stroke-width: .8; }
/* the thing alone (small icons): the character's own drawing with the character hidden */
.sd-pal.only-obj :is(.body, .arm, .fist, .eye, .pupil, .mouth, .mouth-line, .tongue, .sh, .spark, .motion, .knuckle, .blush) { display: none; }
.sd-pal.only-obj .pal-move, .sd-pal.only-obj .pal-move * { animation: none; } /* small icons stay still */
/* the categories' icons (app.js catIcon / catPal) */
.sd-cat-lbl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sd-cat-ic { width: 16px; height: 16px; flex-shrink: 0; }
.sd-cat-chip .sd-cat-lbl { gap: 3px; } .sd-cat-chip .sd-cat-ic { width: 15px; height: 15px; }
.sd-bl-cat-l { display: inline-flex; align-items: center; gap: 4px; }
.sd-bl-cat-l .sd-cat-ic { width: 15px; height: 15px; }
.sd-tab-icon .sd-cat-pal { width: 40px; height: 40px; margin: -6px -4px -6px -2px; }
.sd-tab-icon .sd-cat-pal svg { width: 100% !important; height: 100% !important; }
.sd-tab:not(.on) .sd-cat-pal .pal-move, .sd-tab:not(.on) .sd-cat-pal .pal-move * { animation: none; } /* only the chosen one moves */
.sd-tab.locked .sd-cat-pal { filter: grayscale(1); }
.sd-bonus-star .sd-cat-ic { width: 22px; height: 22px; }
.sd-sum-star .sd-cat-ic { width: 34px; height: 34px; vertical-align: middle; }
.sd-ts-art .sd-cat-pal { width: 44px; height: 44px; } .sd-ts-art .sd-cat-pal .pal-move, .sd-ts-art .sd-cat-pal .pal-move * { animation: none; } /* the stats' rows: still */

/* ---------- records ("אישי") and the wins board (app.js recordsCard / winsView) ---------- */
.sd-medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; font-weight: 800; font-size: 14px; line-height: 1;
  color: var(--ink-2); background: var(--surface-2); border: 1.5px solid var(--line-2); font-variant-numeric: tabular-nums; }
.sd-medal.m1 { color: #6b4a00; background: radial-gradient(circle at 35% 30%, #ffe89a, #f2c23a 60%, #d99e12); border-color: #c98f0c; box-shadow: 0 2px 6px rgba(217, 158, 18, .35); }
.sd-medal.m2 { color: #3e4654; background: radial-gradient(circle at 35% 30%, #ffffff, #d5dbe4 60%, #aab3c0); border-color: #9aa4b2; }
.sd-medal.m3 { color: #5a2f10; background: radial-gradient(circle at 35% 30%, #ffd2ad, #e39a63 60%, #c0733a); border-color: #b06a33; }
.sd-medal.none { background: transparent; border-style: dashed; color: var(--ink-3); }
.sd-medal.sm { width: 26px; height: 26px; font-size: 12.5px; }
.sd-recs { margin: 14px 0 4px; }
.sd-recs-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sd-recs-h .sd-sub { margin-bottom: 8px; }
.sd-recs-how { margin: -4px 2px 10px; font-size: 12.5px; color: var(--ink-2); }
.sd-recs-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; } /* the day's and the week's: half each; the categories: a third each */
.sd-rec.wide { grid-column: span 3; } .sd-rec.cat { grid-column: span 2; padding: 9px 8px; }
.sd-rec.cat .sd-rec-place { font-size: 14.5px; gap: 6px; } .sd-rec.cat .sd-medal { width: 26px; height: 26px; font-size: 12.5px; }
.sd-rec { display: grid; align-content: start; gap: 6px; padding: 10px 11px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.sd-rec.top { border-color: color-mix(in srgb, #e0a417 55%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, #f2c23a 16%, var(--surface-2)), var(--surface-2) 70%); }
.sd-rec.empty { opacity: .75; }
.sd-rec-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sd-rec-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; }
.sd-rec-ic svg, .sd-rec-ic .sd-pal { width: 20px; height: 20px; }
.sd-rec-t { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-rec-place { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.sd-rec-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; } /* every card the same: the date, then the wins */
.sd-rec-when { font-size: 11.5px; color: var(--ink-3); }
.sd-rec-w { font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); white-space: nowrap; }
.sd-rec-w.on { color: #6b4a00; background: color-mix(in srgb, #f2c23a 28%, var(--surface)); border-color: color-mix(in srgb, #e0a417 55%, transparent); }
.sd-recs-note { margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.sd-wins-how { margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.sd-wins-list li.sd-bl-row { cursor: default; }
.sd-wins-list .sd-bl-nick { display: grid; line-height: 1.25; min-width: 0; }
.sd-wins-from { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.sd-wins-n { white-space: nowrap; }
.sd-wins-me { margin: 10px 4px 0; font-size: 13px; color: var(--ink-2); text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sd-rec-w.on { color: #ffe08a; } }
:root[data-theme="dark"] .sd-rec-w.on { color: #ffe08a; }

/* the boards' period row (יומי / שבועי / כל הזמנים / זכיות): underlined tabs — a level below the sheet's own tabs */
.sd-subtabs { display: flex; justify-content: center; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--line); }
.sd-subtabs .sd-seg-btn { position: relative; background: none; border-radius: 0; box-shadow: none; padding: 8px 12px 9px; font-size: 14px; font-weight: 600; color: var(--ink-3) !important; white-space: nowrap; transition: color .15s; }
.sd-subtabs .sd-seg-btn.on { background: none; box-shadow: none; color: var(--accent) !important; font-weight: 800; }
.sd-subtabs .sd-seg-btn.on::after { content: ''; position: absolute; inset-inline: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
@media (max-width: 370px) { .sd-subtabs .sd-seg-btn { padding-inline: 8px; font-size: 13.5px; } }
