/* crossword: styles for this game only (loaded after /css/core.css). */
:root { --cw-black: #14213A; }
:root[data-theme="dark"] { --cw-black: #04070D; }
.cw-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cw-left { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cw-current { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--select) 14%, var(--surface)); min-height: 52px; font-size: 16px; }
.cw-current strong { white-space: nowrap; color: var(--select); }
.cw-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 1; border: 3px solid var(--cw-black); border-radius: 8px; overflow: hidden; background: var(--cw-black); gap: 1px; }
.cw-cell { position: relative; background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
.cw-cell.black { background: var(--cw-black); cursor: default; }
.cw-num { position: absolute; top: 2px; left: 3px; font-size: clamp(8px, 1.8vw, 11px); font-weight: 700; color: var(--muted); line-height: 1; }
.cw-letter { font-family: var(--display); font-weight: 800; font-size: calc(min(480px, 100vw - 40px) / var(--n) * .52); text-transform: uppercase; }
.cw-cell.word { background: color-mix(in srgb, var(--select) 16%, var(--surface)); }
.cw-cell.sel { background: var(--accent); }
.cw-cell.sel .cw-letter, .cw-cell.sel .cw-num { color: var(--accent-ink); }
.cw-cell.wrong .cw-letter { color: var(--warn); }
.cw-cell.wrong::after { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--warn); transform: rotate(-35deg); }
.cw-cell.revealed::before { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--select) transparent transparent; }
.cw-cell.wave { animation: wave .5s ease; }
.cw-tools { justify-content: center; }
.cw-tools .btn { min-height: 44px; padding: 0 14px; }
.cw-kb { margin-top: 4px; }
.cw-clues { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 16px; max-height: 640px; overflow-y: auto; }
.cw-clues h2 { font-family: var(--body); font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.cw-clues ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-clue { all: unset; display: flex; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; cursor: pointer; line-height: 1.4; }
.cw-clue strong { min-width: 20px; }
.cw-clue:hover { background: var(--surface-2); }
.cw-clue:focus-visible { outline: 3px solid var(--select); }
.cw-clue.active { background: color-mix(in srgb, var(--select) 16%, var(--surface)); }
.cw-clue.done span { color: var(--muted); }
@media (pointer: fine) and (min-width: 900px) {
  .cw-kb { display: none; }
}
@media (max-width: 720px) {
  .cw-clues { max-height: none; }
}
.cw-grid { gap: 3px; padding: 6px; border: 0; background: var(--cw-black); border-radius: 14px; box-shadow: 0 8px 0 #050A14, 0 20px 36px rgba(20, 33, 58, .3); overflow: visible; }
.cw-cell { background: var(--tile-top); border-radius: 5px; box-shadow: 0 2px 0 var(--tile-edge); color: var(--tile-ink); }
.cw-cell.black { background: transparent; box-shadow: none; }
.cw-cell.word { background: color-mix(in srgb, var(--select) 22%, #F4F6FB); }
.cw-cell.sel { background: var(--accent); box-shadow: 0 3px 0 #C99A14; transform: translateY(-2px); }
.cw-letter { color: var(--tile-ink); }
