/* Solvedle design tokens. Light by default; dark follows the OS unless data-theme says otherwise. */
:root {
  --bg: #f5f2ec; --bg2: #fbf9f5; --card: #ffffff; --ink: #1b1d2b; --muted: #6c7080; --line: #1b1d2b;
  --soft: #1b1d2b0f; --soft2: #1b1d2b1a; --accent: #1b1d2b; --on-accent: #ffffff; --gold: #f5b301;
  --ok: #19a463; --bad: #e0443e; --radius: 20px; --shadow: 0 1px 2px #1b1d2b0d, 0 8px 28px #1b1d2b14;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016; --bg2: #141722; --card: #1a1d29; --ink: #eceef5; --muted: #9ba1b4; --line: #0b0c12;
    --soft: #ffffff0d; --soft2: #ffffff1a; --accent: #f5b301; --on-accent: #17130a; --shadow: 0 1px 2px #0006, 0 10px 30px #0007;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1016; --bg2: #141722; --card: #1a1d29; --ink: #eceef5; --muted: #9ba1b4; --line: #0b0c12;
  --soft: #ffffff0d; --soft2: #ffffff1a; --accent: #f5b301; --on-accent: #17130a; --shadow: 0 1px 2px #0006, 0 10px 30px #0007;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 16px/1.55 var(--font); -webkit-tap-highlight-color: transparent;
  background: radial-gradient(1200px 500px at 50% -120px, var(--bg2), transparent 70%), var(--bg); min-height: 100vh;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / footer ---------- */
.top {
  position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--soft);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.brand svg { filter: drop-shadow(0 2px 4px #0002); }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 7px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.top nav a:hover { color: var(--ink); background: var(--soft); }
.top nav a[aria-current] { color: var(--ink); background: var(--soft2); }
main { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; }
footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }
footer nav { display: flex; gap: 6px 16px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 560px) {
  .top-in { flex-direction: column; align-items: stretch; gap: 6px; padding-bottom: 8px; }
  .top nav { margin: 0 -4px; gap: 2px; }
  .top nav a { padding: 7px 9px; }
}

/* ---------- game card ---------- */
.game { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; }
@media (max-width: 480px) { .game { padding: 16px 12px; border-radius: 18px; } main { padding: 12px 10px 32px; } }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head h1 { margin: 0; font-size: 28px; font-weight: 800; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.chip.hot { background: #ff7a1a22; color: #e8590c; }
.chip[hidden] { display: none; }

.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps button {
  position: relative; width: 100%; padding: 9px 6px 8px; border: 0; border-radius: 14px; background: var(--soft); cursor: pointer;
  display: grid; justify-items: center; gap: 1px; font-weight: 700; font-size: 15px; transition: transform .12s, background .15s, box-shadow .15s;
}
.steps button:hover { background: var(--soft2); }
.steps button:active { transform: scale(.97); }
.steps button small { color: var(--muted); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.steps button small i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.steps button.on { background: var(--card); box-shadow: 0 0 0 2px var(--ink), 0 4px 14px #0001; }
.steps button.done { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.steps button.done::after {
  content: "✓"; position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 2px 6px #19a46366; animation: pop .35s ease;
}
.tier-easy { background: #2fbf71; } .tier-medium { background: #f5b301; } .tier-hard { background: #ef5350; } .tier-expert { background: #8b5cf6; }

.status { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
#label { font-size: 15px; }
#timer { font-variant-numeric: tabular-nums; font-size: 15px; padding: 4px 12px; border-radius: 999px; background: var(--soft); }

/* ---------- board ---------- */
.board {
  --n: 6; width: min(100%, 500px); margin: 0 auto; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  container-type: inline-size; border: 3px solid var(--line); border-radius: 14px; overflow: hidden; touch-action: none;
  user-select: none; -webkit-user-select: none; box-shadow: 0 6px 22px #1b1d2b22; position: relative;
}
.cell {
  position: relative; aspect-ratio: 1; min-width: 0; overflow: hidden; cursor: pointer; display: grid; place-items: center; outline: none;
  border-right: 1px solid #1b1d2b1f; border-bottom: 1px solid #1b1d2b1f;
}
.cell::before { content: ""; position: absolute; inset: 0; pointer-events: none; transition: background .12s; }
.cell.br { border-right: 3px solid var(--line); }
.cell.bb { border-bottom: 3px solid var(--line); }
.cell.hl::before { background: #ffffff38; }
.cell.hl-on::before { background: #ffffff6b; }
.cell:focus-visible::before { box-shadow: inset 0 0 0 3px var(--line); }
.cell::after { content: ""; position: relative; pointer-events: none; }
.cell.dot::after { width: 17%; height: 17%; border-radius: 50%; background: #1b1d2b8c; animation: dot .16s ease-out; }
.cell.star::after {
  width: 66%; height: 66%; animation: pop .26s cubic-bezier(.3, 1.6, .5, 1);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.95 6.2 6.8.82-5 4.7 1.28 6.73L12 17.4l-6.03 3.25 1.28-6.73-5-4.7 6.8-.82z' fill='%231b1d2b' stroke='%231b1d2b' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 2px #0003);
}
.board .cell.bad { background-image: repeating-linear-gradient(45deg, #e0443e40 0 6px, transparent 6px 12px) !important; background-size: auto !important; }
.cell.bad.star::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.95 6.2 6.8.82-5 4.7 1.28 6.73L12 17.4l-6.03 3.25 1.28-6.73-5-4.7 6.8-.82z' fill='%23e0443e' stroke='%23b3261e' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.board.solved .cell { cursor: default; }
.board.solved .cell.dot::after { opacity: .18; }
.board.solved .cell.star::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd54a'/%3E%3Cstop offset='1' stop-color='%23f59e0b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 2.2l2.95 6.2 6.8.82-5 4.7 1.28 6.73L12 17.4l-6.03 3.25 1.28-6.73-5-4.7 6.8-.82z' fill='url(%23g)' stroke='%23b45309' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: win-star .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d, 0s);
}
.board.solved::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, #ffffff8c 50%, transparent 70%); background-size: 250% 100%; animation: sheen 1.1s ease-out .15s both; }
.board.shake { animation: shake .32s ease; }
@keyframes pop { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dot { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes win-star { 0% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1); } }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Colour-blind mode: a distinct texture per region (g0–g9). */
.board.patterns .g0 { background-image: repeating-linear-gradient(45deg, #0003 0 2px, transparent 2px 9px); }
.board.patterns .g1 { background-image: radial-gradient(#0004 1.6px, transparent 2.2px); background-size: 9px 9px; }
.board.patterns .g2 { background-image: repeating-linear-gradient(0deg, #0003 0 2px, transparent 2px 8px); }
.board.patterns .g3 { background-image: repeating-linear-gradient(90deg, #0003 0 2px, transparent 2px 8px); }
.board.patterns .g4 { background-image: repeating-linear-gradient(-45deg, #0003 0 2px, transparent 2px 9px); }
.board.patterns .g5 { background-image: repeating-linear-gradient(45deg, #0002 0 1px, transparent 1px 7px), repeating-linear-gradient(-45deg, #0002 0 1px, transparent 1px 7px); }
.board.patterns .g6 { background-image: none; }
.board.patterns .g7 { background-image: linear-gradient(#0003 1px, transparent 1px), linear-gradient(90deg, #0003 1px, transparent 1px); background-size: 8px 8px; }
.board.patterns .g8 { background-image: conic-gradient(#0002 25%, transparent 0 50%, #0002 0 75%, transparent 0); background-size: 12px 12px; }
.board.patterns .g9 { background-image: radial-gradient(circle, transparent 3px, #0003 3.5px, transparent 4.5px); background-size: 12px 12px; }

/* ---------- tools, buttons ---------- */
.tools { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tools[hidden], .tools button[hidden] { display: none; }
.btn, .tools button {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 0; background: var(--soft);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s, transform .1s; text-decoration: none;
}
.btn:hover, .tools button:hover { background: var(--soft2); }
.btn:active, .tools button:active { transform: scale(.96); }
.tools svg, .btn svg { width: 17px; height: 17px; flex: none; }
.tools button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 440px) {
  .tools { gap: 6px; }
  .tools button { padding: 9px 13px; }
  #patterns .lbl, #sound .lbl { display: none; }
}
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--on-accent); border: 0;
  border-radius: 999px; padding: 13px 28px; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 6px 18px #1b1d2b33;
  transition: transform .1s, box-shadow .15s; text-decoration: none;
}
.primary:hover { box-shadow: 0 8px 24px #1b1d2b44; }
.primary:active { transform: scale(.97); }
.primary svg { width: 18px; height: 18px; }

/* toast after each solve */
#toast {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0; pointer-events: none; z-index: 3;
  background: var(--ink); color: var(--card); padding: 12px 20px; border-radius: 16px; font-weight: 800; font-size: 18px;
  box-shadow: 0 12px 30px #0004; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.puzzle-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; }
.puzzle-previews figure { margin: 0; min-width: 0; }
.puzzle-previews .example { display: block; width: 100%; height: auto; }
.puzzle-previews figcaption { margin-top: 12px; font-size: .85rem; }

/* ---------- results ---------- */
.result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--soft2); text-align: center; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result h2 { margin: 0; font-size: 22px; font-weight: 800; }
.big-time { font-size: 46px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 2px; }
.times { list-style: none; padding: 0; margin: 12px auto 14px; max-width: 340px; display: grid; gap: 6px; }
.times li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-variant-numeric: tabular-nums; }
.times li span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.times li span i { width: 10px; height: 10px; border-radius: 50%; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 340px; margin: 0 auto 10px; }
.stats div { background: var(--soft); border-radius: 14px; padding: 8px 4px; }
.stats b { display: block; font-size: 26px; font-weight: 900; line-height: 1.15; }
.stats small { color: var(--muted); font-size: 12px; font-weight: 600; }
.week { list-style: none; padding: 0; margin: 10px auto; display: flex; gap: 7px; justify-content: center; }
.week li { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); }
.week li.hit { background: linear-gradient(#ffd54a, #f59e0b); color: #3b2500; box-shadow: 0 2px 8px #f59e0b55; }
.week li.today { outline: 2px solid var(--ink); outline-offset: 2px; }
.rank { font-weight: 700; margin: 10px auto; }
.rank:empty { display: none; }
.rank:not(:empty) { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #8b5cf61f; color: #7c3aed; }
.next { color: var(--muted); font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.muted { color: var(--muted); font-size: 14px; }
#share-text { display: block; width: min(100%, 320px); margin: 10px auto 0; font: 14px/1.4 ui-monospace, monospace; padding: 10px; border-radius: 12px; border: 1px solid var(--soft2); background: var(--bg); color: var(--ink); }

/* ---------- practice controls ---------- */
.practice-bar { display: grid; gap: 8px; margin-bottom: 14px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; min-width: 48px; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px #0002; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- content pages ---------- */
.howto, .page { margin-top: 22px; }
.page, .howto { background: var(--card); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .page, .howto { padding: 18px 16px; } }
.page h1 { font-size: 32px; margin: 4px 0 10px; font-weight: 800; }
.page h2, .howto h2 { font-size: 21px; margin: 26px 0 8px; font-weight: 800; }
.howto h2 { margin-top: 0; }
.page h3 { font-size: 17px; margin: 18px 0 4px; }
.lead { font-size: 18px; }
.page ol { padding-left: 0; list-style: none; counter-reset: s; }
.page ol > li { counter-increment: s; position: relative; padding-left: 38px; margin-bottom: 12px; }
.page ol > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.faq > div { background: var(--soft); border-radius: 14px; padding: 12px 16px; margin-top: 8px; }
.faq h3 { margin: 0; font-size: 16px; }
.faq p { margin: 4px 0 0; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.ex { display: flex; gap: 16px; }
.ex figure { margin: 0; flex: 1 1 0; max-width: 260px; }
.ex figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }
.example { width: 100%; height: auto; border-radius: 10px; filter: drop-shadow(0 4px 10px #0002); }
.cta { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--on-accent); padding: 11px 20px; border-radius: 999px; text-decoration: none; font-weight: 800; box-shadow: 0 6px 18px #1b1d2b2a; margin: 4px 6px 4px 0; }
.cta.alt { background: var(--soft2); color: var(--ink); box-shadow: none; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0; }
.crumbs a { text-decoration: none; }
.archive { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.archive a { display: block; padding: 14px; background: var(--soft); border-radius: 14px; text-decoration: none; transition: transform .12s, background .15s; position: relative; }
.archive a:hover { transform: translateY(-2px); background: var(--soft2); }
.archive a b { display: block; font-size: 22px; font-weight: 900; }
.archive a span { color: var(--muted); font-size: 13px; }
.archive a.done::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 12px; font-weight: 900; }
.demo { background: var(--soft); border-radius: 18px; padding: 18px; text-align: center; }
.demo-board { max-width: 300px; margin: 0 auto 10px; }
.demo-caption { font-size: 14px; color: var(--muted); }
.demo-explain { text-align: left; background: #f5b3012b; border-radius: 12px; padding: 12px 14px; font-size: 15px; margin-bottom: 0; animation: rise .3s ease both; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--soft); text-decoration: none; transition: transform .12s, background .15s; }
.cards a:hover { transform: translateY(-2px); background: var(--soft2); }
.cards b { display: block; font-size: 16px; }
.cards span { color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Queens skin: crowns instead of stars. */
.board.crown .cell.star::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5z' fill='%231b1d2b' stroke='%231b1d2b' stroke-width='1.3' stroke-linejoin='round'/%3E%3Ccircle cx='3' cy='7.5' r='1.6' fill='%231b1d2b'/%3E%3Ccircle cx='21' cy='7.5' r='1.6' fill='%231b1d2b'/%3E%3Ccircle cx='12' cy='4.5' r='1.6' fill='%231b1d2b'/%3E%3C/svg%3E"); }
.board.crown .cell.bad.star::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5z' fill='%23e0443e' stroke='%23b3261e' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.board.crown.solved .cell.star::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5z' fill='%23fbbf24' stroke='%23b45309' stroke-width='1.3' stroke-linejoin='round'/%3E%3Ccircle cx='3' cy='7.5' r='1.6' fill='%23f59e0b'/%3E%3Ccircle cx='21' cy='7.5' r='1.6' fill='%23f59e0b'/%3E%3Ccircle cx='12' cy='4.5' r='1.6' fill='%23f59e0b'/%3E%3C/svg%3E"); }
.table { overflow-x: auto; margin: 8px 0; }
.table table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 480px; font-size: 14px; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--soft2); vertical-align: top; }
.table thead th { font-weight: 800; background: var(--soft); }
.table thead th:first-child { border-top-left-radius: 10px; } .table thead th:last-child { border-top-right-radius: 10px; }
.table tbody th { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* Sun & Moon (Tango-style) board. */
.board.binary .cell { background: #f6f1e6; }
.board.binary .cell.given { background: #e7dfcd; cursor: default; }
.board.binary .cell.sun::after, .board.binary .cell.moon::after { width: 64%; height: 64%; animation: pop .24s cubic-bezier(.3, 1.6, .5, 1); background: center / contain no-repeat; filter: drop-shadow(0 2px 2px #0002); }
.board.binary .cell.given::after { animation: none; }
.board.binary .cell.sun::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='%23f08c00' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 1.8v2.6M12 19.6v2.6M1.8 12h2.6M19.6 12h2.6M4.8 4.8l1.8 1.8M17.4 17.4l1.8 1.8M4.8 19.2l1.8-1.8M17.4 6.6l1.8-1.8'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='5.6' fill='%23ffc233' stroke='%23f08c00' stroke-width='1.6'/%3E%3C/svg%3E"); }
.board.binary .cell.moon::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 14.6A8.5 8.5 0 1 1 9.4 4a6.8 6.8 0 0 0 10.6 10.6z' fill='%235b7cfa' stroke='%233b5bdb' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.board.binary.solved .cell.sun::after, .board.binary.solved .cell.moon::after { animation: win-star .55s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d, 0s); }
.board.binary .cell.bad { background-color: #fde2e1; }
.sign {
  position: absolute; z-index: 2; transform: translate(-50%, -50%); width: clamp(15px, 4.2cqw, 22px); height: clamp(15px, 4.2cqw, 22px); border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #1b1d2b; font-weight: 900; font-size: clamp(11px, 3cqw, 15px); line-height: 1;
  box-shadow: 0 0 0 1.5px #1b1d2b55, 0 1px 3px #0002; pointer-events: none;
}
.tip { height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--soft); }
.tip b { display: block; font-size: 16px; }
.tip span { color: var(--muted); font-size: 14px; }
