.head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.timer { font: 500 15px var(--mono); color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 40px; align-items: start; }
@media (max-width: 640px) { .layout { grid-template-columns: 1fr; gap: 28px; } }

.clue-bar {
  display: flex; gap: 10px; align-items: baseline; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 12px; font-size: 15px;
}
.clue-bar b { font-weight: 600; white-space: nowrap; }

.grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 2px solid var(--fg); border-radius: 4px; overflow: hidden;
  width: 100%; max-width: 340px; aspect-ratio: 1; user-select: none; touch-action: manipulation;
}
.cell {
  position: relative; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
  font-size: clamp(22px, 8vw, 32px); font-weight: 600; text-transform: uppercase;
}
.cell:nth-child(5n) { border-right: 0; }
.cell:nth-last-child(-n+5) { border-bottom: 0; }
.cell.block { background: var(--fg); cursor: default; }
.cell .num { position: absolute; top: 3px; left: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }
.cell.word { background: color-mix(in srgb, var(--c-blue) 35%, var(--surface)); }
.cell.cur { background: var(--c-yellow); color: #111; }
.cell.cur .num { color: #444; }
.cell.wrong .ch { color: var(--bad); }
.cell.wrong::after { content: ""; position: absolute; inset: auto 20% 12% 20%; height: 2px; background: var(--bad); }
.cell.revealed .ch { color: var(--muted); }
.grid.solved .cell:not(.block) { animation: wave .5s ease both; }
@keyframes wave { 50% { transform: scale(1.08); background: var(--c-green); } }

.kb { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; left: -100px; }
.tools { margin-top: 16px; justify-content: flex-start; }

.clues h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.clues section + section { margin-top: 24px; }
.clues ol { list-style: none; margin: 0; padding: 0; }
.clues li {
  display: flex; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; border-left: 3px solid transparent;
}
.clues li b { min-width: 16px; font-weight: 600; }
.clues li.on { background: color-mix(in srgb, var(--c-blue) 35%, var(--surface)); border-left-color: var(--fg); }
.clues li.done { color: var(--muted); }
