/* Crossword — Step Up look, big touch targets, calm feedback. */
.cw-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 20px 40px; }
.cw-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.cw-level {
  display: grid; gap: 6px; text-align: left; padding: 20px; cursor: pointer; font: inherit; color: var(--text);
  background: #fff; border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.cw-level strong { font-size: 22px; color: var(--accent); }
.cw-level:hover, .cw-level.last { border-color: var(--accent); }
.cw-level-stars { font-size: 22px; }

.cw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cw-head h1 { margin: 0; font-size: 26px; }
.cw-head-actions { display: flex; gap: 8px; }

/* The current clue, big and clear */
.cw-clue {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); border-left: 6px solid var(--accent); padding: 12px 16px; margin-bottom: 16px; min-height: 64px;
}
.cw-clue-head { font-weight: 800; color: var(--accent); font-size: 16px; }
.cw-clue-bigpic { font-size: 46px; line-height: 1; }
.cw-clue-sentence { font-size: 20px; font-weight: 700; color: var(--ink); }
.cw-clue-len { color: var(--muted); font-size: 15px; }
.cw-clue .cw-say { margin-left: auto; }
.cw-clue-ok { color: var(--good); font-weight: 800; }

.cw-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.cw-board { display: grid; justify-items: center; gap: 12px; }

/* Grid */
.cw-grid { --cols: 7; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; width: min(100%, calc(var(--cols) * 58px)); }
.cw-cell {
  position: relative; aspect-ratio: 1; border: 2px solid #4a5568; border-radius: 6px; background: #fff;
  display: grid; place-items: center; cursor: pointer; font: inherit; padding: 0; color: var(--ink);
}
.cw-cell.empty { border: 0; background: transparent; cursor: default; }
.cw-cell.inword { background: #eef0fb; }
.cw-cell.active { background: #fff3c4; border-color: #d69e2e; box-shadow: 0 0 0 3px rgba(214, 158, 46, .35); }
.cw-cell.solved { background: #e6f4f1; border-color: var(--good); }
.cw-cell.revealed .cw-letter { color: var(--accent); }
.cw-cell.wrong { border-color: #e53e3e; background: #fdecec; }
.cw-num { position: absolute; top: 2px; left: 4px; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1; }
.cw-letter { font-size: clamp(18px, 4.2vw, 30px); font-weight: 800; text-transform: uppercase; }

/* Hints */
.cw-hints { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
#hint-btn.glow { border-color: #d69e2e; background: #fff8de; animation: cw-glow 1.6s ease-in-out infinite; }
@keyframes cw-glow { 50% { box-shadow: 0 0 0 6px rgba(214, 158, 46, .3); } }
.cw-nudge { color: #975a16; font-weight: 700; }
.cw-hint-menu { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.cw-message { min-height: 26px; font-weight: 700; color: var(--ink); text-align: center; }

/* On-screen letters */
.cw-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: min(100%, 520px); }
.cw-key {
  min-height: 48px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit;
  font-size: 20px; font-weight: 800; color: var(--ink); cursor: pointer; box-shadow: 0 2px 0 #e2e8f0;
}
.cw-key:active { transform: translateY(1px); background: #eef0fb; }
.cw-key.wide { grid-column: span 2; font-size: 17px; }

/* Clue lists */
.cw-clues { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.cw-clues h2 { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--accent); margin: 6px 0 6px; }
.cw-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.cw-clue-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.cw-clue-item:hover { background: #f7fafc; }
.cw-clue-item.on { background: #eef0fb; box-shadow: inset 3px 0 0 var(--accent); }
.cw-clue-item.solved .cw-clue-text { color: var(--muted); }
.cw-clue-num { font-weight: 800; color: var(--accent); min-width: 18px; }
.cw-clue-pic { font-size: 26px; line-height: 1; }
.cw-clue-text { font-size: 15px; }
.cw-clue-item .cw-clue-ok { margin-left: auto; font-size: 13px; }

.cw-done { text-align: center; }
.cw-done-emoji { font-size: 72px; }
.cw-done .btn.primary { margin-top: 6px; }

@media (max-width: 860px) {
  .cw-main { grid-template-columns: 1fr; }
  .cw-wrap { padding: 14px 12px 30px; }
  .cw-clue-sentence { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { #hint-btn.glow { animation: none; } }
