﻿:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --panel: #fffdf8;
  --ink: #22252a;
  --muted: #68707c;
  --line: #d7d0c2;
  --accent: #b44732;
  --accent-2: #2f6b67;
  --light: #eadfc5;
  --dark: #78936f;
  --selected: #f4c542;
  --good: #2f8f5b;
  --bad: #bd3d32;
  font-family: "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.app { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 420px); gap: 24px; padding: 24px; align-items: start; }
.board-area { display: grid; place-items: center; }
.board-shell { width: min(88vmin, 760px); }
.board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; border: 2px solid #242424; box-shadow: 0 18px 44px rgba(0,0,0,.16); }
.square { position: relative; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; }
.square.light { background: var(--light); }
.square.dark { background: var(--dark); }
.square.selected { outline: 4px solid var(--selected); outline-offset: -4px; }
.coord { position: absolute; left: 4px; bottom: 3px; font-size: 11px; color: rgba(0,0,0,.5); font-weight: 700; }
.piece { width: 86%; height: 86%; object-fit: contain; pointer-events: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.15; }
.counter, .source, .solution, .status { color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.counter { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.filters { display: grid; gap: 8px; margin: 14px 0; color: var(--muted); }
.filters input { width: 16px; height: 16px; vertical-align: -3px; }
button { border: 1px solid #c9c0b1; background: #fff; color: var(--ink); border-radius: 6px; padding: 9px 11px; font-weight: 700; cursor: pointer; }
button:hover { border-color: var(--accent); }
.icon-button { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.primary { width: 100%; margin: 12px 0; color: #fff; background: var(--accent); border-color: var(--accent); }
.status.good { color: var(--good); font-weight: 700; }
.status.bad { color: var(--bad); font-weight: 700; }
.solution { background: #f3eee4; border-radius: 6px; padding: 10px; }
.hidden { display: none; }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; padding: 12px; } .board-shell { width: 100%; } }
