/* bidibidi bulmaca motoru (crossword.js) — kit.css üstüne. */
:root { --paper: #fffdf6; --paper-line: #2b3a2a; --cw-sel: #ffe58a; --cw-word: #e3f4d2; --cw-ok: #b9f27c; --cw-bad: #ffb3b3; --cw-given: #ffd84d; }
.cw { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 8px; }
.cw-grid-wrap { flex: none; height: 404px; display: grid; place-items: center; }
.cw-grid { position: relative; width: calc(var(--cols) * var(--cell)); height: calc(var(--rows) * var(--cell)); }
.cw-cell { position: absolute; left: calc(var(--c) * var(--cell)); top: calc(var(--r) * var(--cell)); width: var(--cell); height: var(--cell);
  background: var(--paper); border: 1.5px solid var(--paper-line); margin: -0.75px 0 0 -0.75px; cursor: pointer; display: grid; place-items: center;
  transition: background .15s; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.cw-cell i { position: absolute; left: 2px; top: 0; font-style: normal; font-size: calc(var(--cell) * .27); color: #556b4e; font-weight: 700; line-height: 1.1; }
.cw-cell b { font-size: calc(var(--cell) * .58); color: #1d2918; line-height: 1; font-weight: 800; }
.cw-cell.in-word { background: var(--cw-word); }
.cw-cell.cur { background: var(--cw-sel); }
.cw-cell.locked b { color: #2d7409; }
.cw-cell.given b { color: #9a6a00; }
.cw-cell.locked:not(.in-word) { background: #f0f8e6; }
.cw-cell.ok { animation: cwok .5s ease-out both; }
@keyframes cwok { 40% { background: var(--cw-ok); transform: scale(1.12); } }
.cw-cell.bad { animation: cwbad .45s ease-out; }
@keyframes cwbad { 0% { background: var(--cw-bad); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 100% { background: var(--cw-bad); } }
.cw-side { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cw-clue { display: flex; align-items: stretch; gap: 6px; background: var(--paper); color: #1d2918; border-radius: 10px; min-height: 64px; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.cw-clue button { flex: none; width: 40px; border: 0; background: transparent; color: #2d7409; font-size: 30px; font-weight: 800; cursor: pointer; }
.cw-clue-text { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 4px 0; font-size: 18px; line-height: 1.25; text-align: center; }
.cw-clue-text small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7d62; }
.cw-clue-text b { color: #fff; background: #4fae1d; border-radius: 6px; padding: 0 6px; margin-right: 2px; }
.cw-clue-text em, .cw-item em { font-style: normal; font-size: .8em; color: #7b4fd6; }
.cw-clue-text small:last-child, #cwClue small { font-size: 13px; color: #6b7d62; text-transform: none; letter-spacing: 0; }
.cw-list { display: none; }
.cw-keys { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: auto; }
.cw-key { height: 44px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: var(--ink); font-size: 19px; font-weight: 800;
  cursor: pointer; padding: 0; transition: background .12s, transform .08s; }
.cw-key:hover { background: rgba(255, 255, 255, .2); }
.cw-key:active { transform: scale(.93); }
.cw-back { grid-column: span 2; background: rgba(226, 59, 74, .35); }
/* yatay: ızgara solda, sağda ipucu, liste, klavye */
.board.land .cw { flex-direction: row; gap: 16px; }
.board.land .cw-grid-wrap { width: 484px; height: 484px; }
.board.land .cw-side { width: 380px; }
.board.land .cw-list { display: block; flex: 1; min-height: 0; overflow: auto; background: rgba(0, 0, 0, .18); border-radius: 10px; padding: 4px 6px; }
.cw-list h4 { margin: 6px 4px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cw-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font-size: 13px; padding: 3px 6px; border-radius: 6px; cursor: pointer; line-height: 1.3; }
.cw-item b { display: inline-block; min-width: 20px; color: var(--gold); }
.cw-item.on { background: rgba(255, 229, 138, .2); }
.cw-item.done { opacity: .45; text-decoration: line-through; }
.board.land .cw-key { height: 38px; font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .cw-cell.ok, .cw-cell.bad { animation: none; } }
.cw-item em { color: #c9b3ff; }
