/* css/style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f3f4f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
}

header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

header h1 {
  margin-right: auto;
  font-size: 1.5rem;
}

.home-link {
  font-size: 1.3rem;
  text-decoration: none;
  line-height: 1;
}

.board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(95vw, 450px);
  aspect-ratio: 1;
  background: white;
  border: 2px solid #1f2937;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid #d1d5db;
  font-size: clamp(14px, 4vw, 22px);
  font-weight: 400;
  cursor: pointer;
}

.cell.fixed { font-weight: 700; color: #1f2937; }
.cell.user-input { color: #2563eb; }
.cell.selected { background: #93c5fd; }
.cell.same-value { background: #fed7aa; }
.cell.peer { background: #eff6ff; }

.border-left-thick { border-left: 2px solid #1f2937; }
.border-top-thick { border-top: 2px solid #1f2937; }
.border-right-thick { border-right: 2px solid #1f2937; }
.border-bottom-thick { border-bottom: 2px solid #1f2937; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 100%;
}

.notes-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: #6b7280;
}

.controls {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(95vw, 450px);
}

.mode-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.note-mode { background: #f97316; }

.number-pad {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  width: 100%;
}

.number-pad button {
  padding: 12px 0;
  font-size: 1.1rem;
  border: none;
  border-radius: 6px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  cursor: pointer;
}

#erase-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-content {
  background: white;
  padding: 24px 32px;
  border-radius: 12px;
  text-align: center;
}

.modal-content button {
  margin-top: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.number-btn.completed {
    opacity: 0.3;
    pointer-events: none;
    background-color: #ccc;
    color: #666;
}

