main.sudoku-main {
  max-width: 580px;
}

/* ---- Burger toggle ---- */
.burger-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 0;
  line-height: 0;
  color: transparent;
  -webkit-appearance: none;
  padding: 0;
}

.burger-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--dark);
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}

/* ---- Side drawer ---- */
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1200;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1150;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--gray);
  line-height: 1;
}

.side-drawer h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-buttons {
  gap: 8px;
}

.drawer-btn {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.drawer-btn:hover {
  border-color: var(--green-light);
  background: var(--green-bg);
}

.drawer-btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.drawer-btn-primary:hover {
  background: #2d6a4f;
  border-color: #2d6a4f;
}

/* ---- Inline stats (timer + progress) ---- */
.stats-inline {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.sudoku-board-wrap {
  width: 100%;
  background: var(--gray-bg);
  border-radius: 14px;
  padding: 12px;
}

.sudoku-selectors {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sudoku-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sudoku-select span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

.sudoku-select select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0 14px;
}

.board-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.corner,
.clue-cell,
.board-cell {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

.corner {
  background: transparent;
}

.clue-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--orange);
  font-size: 0.92rem;
  font-weight: 800;
}

.clue-cell.is-hidden {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

.clue-cell.is-complete {
  background: var(--green-bg);
  border-color: var(--green-light);
  color: var(--green);
}

.board-cell {
  position: relative;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}

.board-cell:hover {
  border-color: var(--green-light);
}

.board-cell.is-selected {
  border-color: var(--green);
  background: var(--green-bg);
}

.board-cell.is-peer {
  background: #f8faf8;
}

.board-cell.is-fixed {
  background: var(--gray-bg);
}

.board-cell.is-wrong {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

.board-cell.box-top {
  border-top: 3px solid var(--dark);
}

.board-cell.box-left {
  border-left: 3px solid var(--dark);
}

.board-cell.box-right {
  border-right: 3px solid var(--dark);
}

.board-cell.box-bottom {
  border-bottom: 3px solid var(--dark);
}

.cell-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.notes-grid {
  position: absolute;
  inset: 2px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  pointer-events: none;
}

.note {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.58rem;
  font-weight: 700;
}

.board-cell.has-value .notes-grid {
  display: none;
}

.sudoku-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sudoku-secondary {
  background: none;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sudoku-secondary:hover {
  border-color: var(--green-light);
  color: var(--green);
  background: var(--green-bg);
}

.sudoku-secondary.active {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff6ed;
}

.sudoku-keyboard {
  gap: 8px;
}

.sudoku-keyboard .key-row {
  width: 100%;
}

.sudoku-keyboard .key {
  flex: 1;
  min-width: 0;
  height: 52px;
  font-size: 1rem;
}

@media (max-width: 560px) {
  .sudoku-selectors {
    grid-template-columns: 1fr;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-grid {
    gap: 3px;
  }

  .corner,
  .clue-cell,
  .board-cell {
    border-radius: 5px;
  }

  .cell-value {
    font-size: 1.08rem;
  }

  .note {
    font-size: 0.5rem;
  }
}
