/* DiarioBitcoin crucigrama, embedded in a page (WordPress). Bitcoin-orange accent, system/inherited fonts only.
   EVERY rule is scoped under `.dbtc-xw-root` (the element the app mounts into) so the host theme cannot restyle
   the game and the game cannot restyle the host. No html/body rules, no viewport-width units, no external fonts.
   Tokens (custom properties) live on `.dbtc-xw-root`; `data-appearance="light"|"dark"` on it selects the scheme
   (the app sets it; PHP sets the initial value). The page can override `--xw-top-offset` (px height of the sticky
   site header, default 64px) and `--xw-max-height` (default 760px): they size the phone layout. */
.dbtc-xw-root {
  --xw-top-offset: 64px;
  --xw-max-height: 760px;
}
.dbtc-xw-root {
  color-scheme: dark;
  --bg: #0b0e17;
  --surface: #131827;
  --surface2: #1b2236;
  --ink: #e9edf6;
  --ink-soft: #cfd6e6;
  --muted: #8b95ad;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #f7931a;
  --accent-ink: #1a1000;
  --accent-text: #f7931a;
  --focus: #ffffff;
  --ring: #ffffff;
  --glow: 0 0 1.2cqw rgba(247, 147, 26, 0.7);
  --board-bg: #080b12;
  --grid-line: rgba(255, 255, 255, 0.16);
  --cell-base: #262e45;
  --tint: 30%;
  --cross-mix: 16%;
  --word-mix: 52%;
  --done-ink: #9fe7b9;
  --wrong-bg: #5b2030;
  --wrong-active: #ff8aa0;
  --wrong-mark: #ff7b93;
  --mm-base: #121726;
  --mm-tint: 12%;
  --key-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  --shadow-card: none;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
  --scrim: rgba(5, 7, 12, 0.74);
  --confetti-s: 90%;
  --confetti-l: 60%;
  --tc: #8b95ad;
  --c-bitcoin: #f08c2a;
  --c-crypto: #3a8fdc;
  --c-criptografia: #8a5fd6;
  --c-ia: #34b565;
  --c-geopolitica: #e0524b;
  --c-latino_america: #c9a21d;
  --c-informatica: #22a3a3;
  --c-videojuegos: #d24a9c;
  --c-destacado: #f3e08a;
}
.dbtc-xw-root[data-appearance="light"] {
  color-scheme: light;
  --bg: #f1f2f5;
  --surface: #ffffff;
  --surface2: #eceef3;
  --ink: #212529;
  --ink-soft: #3b4350;
  --muted: #566070;
  --line: rgba(33, 37, 41, 0.14);
  --accent-text: #a64f00;
  --focus: #212529;
  --ring: #212529;
  --glow: 0 0 1.4cqw rgba(247, 147, 26, 0.9);
  --board-bg: #1d2230;
  --grid-line: rgba(33, 37, 41, 0.2);
  --cell-base: #ffffff;
  --tint: 24%;
  --cross-mix: 9%;
  --word-mix: 46%;
  --done-ink: #0f6b36;
  --wrong-bg: #ffd3da;
  --wrong-active: #ff9db0;
  --wrong-mark: #c3203d;
  --mm-base: #ffffff;
  --mm-tint: 16%;
  --key-shadow: 0 2px 0 rgba(33, 37, 41, 0.16);
  --shadow-card: 0 2px 10px rgba(33, 37, 41, 0.08);
  --shadow-lg: 0 18px 44px rgba(33, 37, 41, 0.22);
  --scrim: rgba(33, 37, 41, 0.45);
  --confetti-s: 85%;
  --confetti-l: 50%;
  --c-bitcoin: #e07600;
  --c-crypto: #1f6fc0;
  --c-criptografia: #7340c0;
  --c-ia: #1b9150;
  --c-geopolitica: #cc3329;
  --c-latino_america: #a98100;
  --c-informatica: #12898a;
  --c-videojuegos: #c0328a;
  --c-destacado: #d6b21e;
}
.dbtc-xw-root [data-xw-theme="bitcoin"] { --tc: var(--c-bitcoin);}
.dbtc-xw-root [data-xw-theme="crypto"] { --tc: var(--c-crypto);}
.dbtc-xw-root [data-xw-theme="criptografia"] { --tc: var(--c-criptografia);}
.dbtc-xw-root [data-xw-theme="ia"] { --tc: var(--c-ia);}
.dbtc-xw-root [data-xw-theme="geopolitica"] { --tc: var(--c-geopolitica);}
.dbtc-xw-root [data-xw-theme="latino_america"] { --tc: var(--c-latino_america);}
.dbtc-xw-root [data-xw-theme="informatica"] { --tc: var(--c-informatica);}
.dbtc-xw-root [data-xw-theme="videojuegos"] { --tc: var(--c-videojuegos);}
.dbtc-xw-root [data-xw-theme="destacado"] { --tc: var(--c-destacado);}

/* ---- root + reset: undo what a Bootstrap-like theme sets on elements inside the game ---- */
.dbtc-xw-root {
  display: block; position: relative; box-sizing: border-box; width: 100%; max-width: 1100px; margin: 0 auto;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  font-family: inherit; font-size: 16px; font-weight: 400; font-style: normal; line-height: 1.25;
  letter-spacing: normal; text-transform: none; text-align: left; text-shadow: none; text-indent: 0;
  -webkit-text-size-adjust: 100%;
}
.dbtc-xw-root *, .dbtc-xw-root *::before, .dbtc-xw-root *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.dbtc-xw-root :is(div, span, b, i, small, header, main, section, aside, h1, h2, p, ul, ol, li) {
  margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-shadow: none; float: none;
  font: inherit; letter-spacing: normal; text-transform: none; text-decoration: none; text-align: inherit;
  color: inherit; list-style: none; max-width: none; width: auto; height: auto; min-height: 0; position: static;
}
.dbtc-xw-root :is(h1, h2) { font-weight: 700; }
.dbtc-xw-root b { font-weight: 700; }
.dbtc-xw-root button {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: normal; text-transform: none; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.dbtc-xw-root button:focus-visible, .dbtc-xw-root .stage:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dbtc-xw-root .stage:focus-visible { outline-offset: -3px; }

/* ---- splash ---- */
.dbtc-xw-root .splash { min-height: min(60dvh, 420px); display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; color: var(--muted); }
.dbtc-xw-root .splash h2 { color: var(--ink); font-size: 22px; }
.dbtc-xw-root .splash.error p { max-width: 36ch; margin: 4px auto; }
.dbtc-xw-root .spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: xw-spin 0.9s linear infinite; }
@keyframes xw-spin { to { transform: rotate(360deg); } }
.dbtc-xw-root .hint { font-size: 13px; color: var(--muted); }

/* ---- shell. Phone (.compact): a container as tall as the screen below the site header, everything inside it.
        Wide: height follows the content. ---- */
.dbtc-xw-root .app { position: relative; display: flex; flex-direction: column; }
.dbtc-xw-root .app.compact {
  --xw-head: 46px;
  --xw-game-h: max(440px, min(calc(100vh - var(--xw-top-offset)), var(--xw-max-height)));
}
@supports (height: 100dvh) {
  .dbtc-xw-root .app.compact { --xw-game-h: max(440px, min(calc(100dvh - var(--xw-top-offset)), var(--xw-max-height))); }
}
/* Phone: header + .play = the "game block" (--xw-game-h, one screen below the site header); the clue lists follow it. */
.dbtc-xw-root .app.compact .layout { display: block; flex: none; }
.dbtc-xw-root .app.compact .play { height: calc(var(--xw-game-h) - var(--xw-head)); }
.dbtc-xw-root { scroll-margin-top: calc(var(--xw-top-offset) + 6px); }
.dbtc-xw-root .top {
  flex: none; height: 46px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dbtc-xw-root .brand { overflow: hidden; flex: 1; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.dbtc-xw-root .brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 18px; letter-spacing: -0.01em; }
.dbtc-xw-root .brand b span { color: var(--accent-text); }
.dbtc-xw-root .brand small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbtc-xw-root .top-r { display: flex; align-items: center; gap: 4px; }
.dbtc-xw-root .timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; min-width: 3.6ch; text-align: right; }
.dbtc-xw-root .icon svg { width: 17px; height: 17px; }
.dbtc-xw-root .icon.off { color: var(--muted); }
.dbtc-xw-root .assist { white-space: nowrap; font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--accent-text); color: var(--accent-text); }
.dbtc-xw-root .icon { display: grid; place-items: center; width: 34px; height: 34px; font-size: 15px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 700; box-shadow: var(--shadow-card); }
.dbtc-xw-root .layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.dbtc-xw-root .play { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dbtc-xw-root .clues { display: none; }

/* ---- full-screen mode: the app becomes a fixed overlay over the whole viewport (works without the Fullscreen API) ---- */
.dbtc-xw-root .exit-full {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 10px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; box-shadow: var(--shadow-card);
}
.dbtc-xw-root .app.full {
  --xw-top-offset: 0px;
  position: fixed; inset: 0; z-index: 99990; box-sizing: border-box; background: var(--bg); color: var(--ink);
  height: 100vh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
@supports (height: 100dvh) { .dbtc-xw-root .app.full { height: 100dvh; } }
.dbtc-xw-root .app.compact.full {
  --xw-game-h: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
@supports (height: 100dvh) {
  .dbtc-xw-root .app.compact.full { --xw-game-h: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
.dbtc-xw-root .app.compact.full .clues { display: none; }
.dbtc-xw-root .app.compact.full .layout { overflow: hidden; }
.dbtc-xw-root .app.full .brand small { display: none; }
.dbtc-xw-root .app.compact.full .brand b { font-size: 16px; }
@media (max-width: 480px) {
  .dbtc-xw-root .app.compact.full .brand { display: none; }
  .dbtc-xw-root .app.compact.full .top { justify-content: flex-end; padding: 0 8px; }
  .dbtc-xw-root .app.compact.full .top-r { width: 100%; justify-content: space-between; }
  .dbtc-xw-root .app.compact.full .icon { width: 34px; height: 34px; }
}
.dbtc-xw-root:fullscreen { background: var(--bg); }

/* ---- clue bar ---- */
.dbtc-xw-root .cluebar {
  flex: none; min-height: 56px; display: flex; align-items: center; gap: 2px; padding: 6px 4px;
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--tc); box-shadow: var(--shadow-card);
}
.dbtc-xw-root .nav { flex: none; width: 44px; height: 44px; border-radius: 10px; font-size: 30px; line-height: 1; color: var(--accent-text); }
.dbtc-xw-root .nav:active { background: var(--surface2); }
.dbtc-xw-root .clue { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.dbtc-xw-root .clue-tag { font-weight: 800; color: var(--accent-text); margin-right: 6px; white-space: nowrap; }
.dbtc-xw-root .clue-len { color: var(--muted); margin-left: 6px; white-space: nowrap; }

/* ---- stage & board. Only the stage captures gestures; the rest of the page scrolls normally. ---- */
.dbtc-xw-root .stagebox { flex: 1; min-height: 0; position: relative; }
.dbtc-xw-root .stage { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dbtc-xw-root .app.compact .stage { touch-action: none; overscroll-behavior: contain; }
.dbtc-xw-root .board-wrap { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1 / 1; transform-origin: 0 0; container-type: inline-size; }
.dbtc-xw-root .board-wrap.animating { transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1); }
.dbtc-xw-root .board { position: absolute; inset: 0; display: grid; grid-template: repeat(21, 1fr) / repeat(21, 1fr); background: var(--board-bg); }
.dbtc-xw-root .row { display: contents; }
.dbtc-xw-root .cell {
  --cellbg: color-mix(in srgb, var(--tc) var(--tint), var(--cell-base));
  position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--cellbg); box-shadow: inset 0 0 0 0.5px var(--grid-line);
  color: var(--ink); min-width: 0; min-height: 0;
}
.dbtc-xw-root .cell.black { background: transparent; box-shadow: none; }
.dbtc-xw-root .cell.s-cross { background: color-mix(in srgb, var(--ink) var(--cross-mix), var(--cellbg)); }
.dbtc-xw-root .cell.s-word { background: color-mix(in srgb, var(--accent) var(--word-mix), var(--cellbg)); }
.dbtc-xw-root .cell.s-active { background: var(--accent); color: var(--accent-ink); z-index: 2; box-shadow: 0 0 0 max(1px, 0.35cqw) var(--ring), var(--glow); }
.dbtc-xw-root .ltr { font-size: calc(100cqw / 21 * 0.62); font-weight: 750; line-height: 1; transform-origin: 50% 60%; }
.dbtc-xw-root .ltr.pop { animation: xw-pop 0.22s cubic-bezier(0.2, 1.6, 0.4, 1); }
.dbtc-xw-root .num { position: absolute; left: 7%; top: 3%; font-size: calc(100cqw / 21 * 0.26); line-height: 1; font-weight: 700; color: color-mix(in srgb, currentColor 62%, transparent); pointer-events: none; }
.dbtc-xw-root .mark { position: absolute; pointer-events: none; }
.dbtc-xw-root .cell.done:not(.s-active) .ltr { color: var(--done-ink); }
.dbtc-xw-root .cell.wrong { background: var(--wrong-bg); }
.dbtc-xw-root .cell.wrong.s-active { background: var(--wrong-active); }
.dbtc-xw-root .cell.wrong .mark { inset: 0; background: linear-gradient(to top right, transparent calc(50% - 0.7px), var(--wrong-mark) calc(50% - 0.7px), var(--wrong-mark) calc(50% + 0.7px), transparent calc(50% + 0.7px)); }
.dbtc-xw-root .cell.revealed .mark { top: 0; right: 0; width: 30%; height: 30%; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.dbtc-xw-root .cell.s-active.revealed .mark { background: var(--accent-ink); }
.dbtc-xw-root .cell.shim { animation: xw-shimmer 0.75s ease-out var(--d, 0ms) both; z-index: 1; }
.dbtc-xw-root[data-appearance="light"] .cell.shim { animation-name: xw-shimmer-light; }
@keyframes xw-pop { 0% { transform: scale(0.55); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes xw-shimmer {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(2.1) saturate(1.2); transform: scale(1.12); }
  100% { filter: brightness(1); transform: scale(1); }
}
@keyframes xw-shimmer-light {
  0% { filter: none; transform: scale(1); }
  35% { filter: saturate(2) brightness(0.93); transform: scale(1.12); box-shadow: 0 0 0 max(1px, 0.3cqw) var(--accent); }
  100% { filter: none; transform: scale(1); }
}

.dbtc-xw-root .frames { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); pointer-events: none; }
.dbtc-xw-root .frame { border: max(1.5px, 0.42cqw) solid var(--tc); border-radius: 0.9cqw; transition: background 0.6s; }
.dbtc-xw-root .frame.done { background: color-mix(in srgb, var(--tc) 20%, transparent); }
.dbtc-xw-root .frame.flash { animation: xw-flash 1s ease-out; }
@keyframes xw-flash {
  0% { background: color-mix(in srgb, var(--tc) 0%, transparent); box-shadow: 0 0 0 0 var(--tc); }
  30% { background: color-mix(in srgb, var(--tc) 65%, transparent); box-shadow: 0 0 3cqw 0.6cqw var(--tc); }
  100% { background: color-mix(in srgb, var(--tc) 20%, transparent); box-shadow: 0 0 0 0 transparent; }
}

/* ---- dock ---- */
.dbtc-xw-root .dock { flex: none; display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.dbtc-xw-root .minimap { flex: none; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 3px; width: 88px; height: 88px; }
.dbtc-xw-root .mm { position: relative; display: block; padding: 0; overflow: hidden; border: 2px solid var(--tc); border-radius: 5px; background: color-mix(in srgb, var(--tc) var(--mm-tint), var(--mm-base)); }
.dbtc-xw-root .mm-fill { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--tc) 55%, transparent); transition: height 0.45s ease; }
.dbtc-xw-root .mm.done .mm-fill { background: var(--tc); }
.dbtc-xw-root .mm-check { position: relative; font-weight: 900; color: #0b0e17; font-size: 15px; }
.dbtc-xw-root .mm.current { outline: 2px solid var(--ring); outline-offset: 1px; z-index: 1; }
.dbtc-xw-root .tools { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dbtc-xw-root .tool { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); font-size: 13px; font-weight: 600; padding: 0 6px; line-height: 1.15; box-shadow: var(--shadow-card); }
.dbtc-xw-root .tool:active { background: color-mix(in srgb, var(--accent) 25%, var(--surface2)); }
.dbtc-xw-root .tool:disabled, .dbtc-xw-root .tool.spent { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--muted); }
.dbtc-xw-root .tool.zoom { display: none; color: var(--accent-text); }
.dbtc-xw-root .app.compact .tool.zoom { display: inline-block; }

/* ---- on-screen keyboard: docked at the bottom of the game container (never position: fixed) ---- */
.dbtc-xw-root .kb { display: none; flex: none; flex-direction: column; gap: 6px; padding: 4px 3px 8px; background: var(--surface); border-top: 1px solid var(--line); }
.dbtc-xw-root .app.compact .kb { display: flex; }
@media (pointer: coarse) { .dbtc-xw-root .kb { display: flex; } }
.dbtc-xw-root .kb-row { display: flex; gap: 4px; justify-content: center; }
.dbtc-xw-root .key { flex: 1 1 0; min-width: 0; height: 48px; padding: 0; border-radius: 7px; background: var(--surface2); font-size: 19px; font-weight: 650; line-height: 1; box-shadow: var(--key-shadow); }
.dbtc-xw-root .key:active { background: var(--accent); color: var(--accent-ink); transform: translateY(1px); }
.dbtc-xw-root .key-back { flex: 1.6 1 0; font-size: 22px; }
@media (max-height: 700px) {
  .dbtc-xw-root .app.compact .key { height: 40px; }
  .dbtc-xw-root .app.compact .kb { gap: 4px; padding-bottom: 6px; }
  .dbtc-xw-root .app.compact .dock { padding-top: 4px; padding-bottom: 4px; }
  .dbtc-xw-root .app.compact .minimap { width: 72px; height: 72px; }
  .dbtc-xw-root .app.compact .tool { min-height: 32px; }
  .dbtc-xw-root .app.compact { --xw-head: 42px; }
  .dbtc-xw-root .app.compact .top { height: 42px; }
  .dbtc-xw-root .app.compact .cluebar { min-height: 52px; }
}

/* ---- toast (inside the game), dialogs and confetti (over the viewport) ---- */
.dbtc-xw-root .toast { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 40; padding: 8px 16px; border-radius: 99px; background: rgba(247, 147, 26, 0.96); color: var(--accent-ink); font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); animation: xw-toast-in 0.25s ease-out; pointer-events: none; }
.dbtc-xw-root .toast:empty { display: none; }
.dbtc-xw-root .scrim { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: var(--scrim); backdrop-filter: blur(3px); animation: xw-fade 0.2s ease-out; }
.dbtc-xw-root .dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 20px; animation: xw-rise 0.28s cubic-bezier(0.2, 1.1, 0.3, 1); box-shadow: var(--shadow-lg); }
.dbtc-xw-root .dialog h2 { margin: 0 0 10px; font-size: 21px; }
.dbtc-xw-root .dialog ul { padding-left: 18px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); list-style: disc; }
.dbtc-xw-root .dialog li { margin-bottom: 6px; list-style: disc; }
.dbtc-xw-root .dialog p { line-height: 1.4; }
.dbtc-xw-root .finish { text-align: center; }
.dbtc-xw-root .big-time { font-size: 52px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.dbtc-xw-root .points { font-weight: 700; font-size: 18px; }
.dbtc-xw-root .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.dbtc-xw-root .finish .actions { justify-content: center; }
.dbtc-xw-root .primary, .dbtc-xw-root .ghost { min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; line-height: 1.15; }
.dbtc-xw-root .primary { background: var(--accent); color: var(--accent-ink); }
.dbtc-xw-root .ghost { background: transparent; border: 1px solid var(--line); }
@keyframes xw-fade { from { opacity: 0; } }
@keyframes xw-rise { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes xw-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
.dbtc-xw-root .confetti { position: fixed; inset: 0; z-index: 100001; pointer-events: none; overflow: hidden; }
.dbtc-xw-root .confetti i { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; background: hsl(var(--h) var(--confetti-s) var(--confetti-l)); animation: xw-fall var(--dur) var(--delay) cubic-bezier(0.3, 0.1, 0.6, 1) forwards; }
@keyframes xw-fall { to { transform: translate(var(--dx), 112dvh) rotate(var(--rot)); } }

/* ---- phone: the same clue lists as desktop, stacked full width below the game (page scrolls past it) ---- */
.dbtc-xw-root .app.compact .clues { display: block; padding: 14px 10px 18px; border-top: 1px solid var(--line); touch-action: pan-y; }
.dbtc-xw-root .app.compact .cluelist + .cluelist { margin-top: 18px; }
.dbtc-xw-root .app.compact .cluelist ol { overflow: visible; }
.dbtc-xw-root .app.compact .ci { padding: 10px 8px; font-size: 15px; }

/* ---- wide layout (container >= 820px): board beside the clue lists ---- */
.dbtc-xw-root .app:not(.compact) .layout {
  grid-template-columns: minmax(0, min(54%, max(420px, calc(100dvh - var(--xw-top-offset) - 230px)))) minmax(0, 1fr);
  grid-template-rows: auto; gap: 24px; padding: 0 20px 20px; align-items: stretch;
}
.dbtc-xw-root .app:not(.compact) .stagebox { flex: none; width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; }
.dbtc-xw-root .app:not(.compact) .cluebar { border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-left: 4px solid var(--tc); }
.dbtc-xw-root .app:not(.compact) .clues { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 20px; min-height: 0; contain: size; }
.dbtc-xw-root .cluelist { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.dbtc-xw-root .cluelist h2 { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dbtc-xw-root .cluelist ol { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.dbtc-xw-root .ci { width: 100%; display: flex; gap: 8px; align-items: baseline; text-align: left; padding: 6px 8px; border-left: 3px solid transparent; border-radius: 6px; font-size: 14px; line-height: 1.3; }
.dbtc-xw-root .ci b { flex: none; min-width: 2ch; color: var(--accent-text); }
.dbtc-xw-root .ci span { flex: 1; }
.dbtc-xw-root .ci:hover { background: var(--surface); }
.dbtc-xw-root .ci.cross { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.dbtc-xw-root .ci.cur { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-left-color: var(--accent); }
.dbtc-xw-root .ci.done span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.dbtc-xw-root .ci .tick { font-style: normal; color: var(--done-ink); flex: none; }
.dbtc-xw-root .app:not(.compact) .dock { padding-left: 0; padding-right: 0; }
.dbtc-xw-root .app:not(.compact) .kb { padding-bottom: 8px; }
.dbtc-xw-root[data-appearance="light"] .app:not(.compact) .stagebox { box-shadow: var(--shadow-card); }

.dbtc-xw-root .clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.dbtc-xw-root .clock .assist { border: 0; padding: 0; font-size: 10.5px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .dbtc-xw-root *, .dbtc-xw-root *::before, .dbtc-xw-root *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .dbtc-xw-root .confetti { display: none; }
}
