:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --text: #2c1d10;
  --muted: #6b4e2e;
  --accent: #ea580c;
  --line: #f1d3b5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #ffe8cc 0%, var(--bg) 55%, #fff3e2 100%);
  color: var(--text);
  min-height: 100vh;
}
.container { max-width: 560px; margin: 0 auto; padding: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.topbar a { color: #2563eb; text-decoration: none; font-weight: 700; }
.topbar h1 { margin: 0; font-size: 2rem; }
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
button {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 2px solid #d97706;
  border-radius: 8px;
  overflow: hidden;
}
.cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
}
.cell:focus { outline: 2px solid #2563eb; z-index: 1; }
.cell.fixed {
  background: #fdeedb;
  color: #78350f;
}
.cell.bad {
  background: #fee2e2;
  color: #b91c1c;
}
.cell.group-right { border-right: 2px solid #d97706; }
.cell.group-bottom { border-bottom: 2px solid #d97706; }
.status { margin-top: 10px; color: var(--muted); }
