* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f6f7fb;
  margin: 0;
  padding: 12px;
  color: #1f2330;
}
.wrap { max-width: 480px; margin: 0 auto; text-align: center; }
.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}
#newbtn {
  background: #4f46e5; color: white; border: 0; padding: 8px 14px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
}
#newbtn:hover { background: #4338ca; }
.meta {
  margin-bottom: 8px; font-size: 14px; color: #475569; font-weight: 600;
}
.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  aspect-ratio: 1;
  user-select: none;
  background: #1f2937;
  border: 3px solid #1f2937;
  border-radius: 6px;
  margin: 0 auto;
}
.cell {
  aspect-ratio: 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.1s ease, color 0.2s ease;
  min-height: 44px;
  color: #1f2330;
}
.cell.done { color: #cbd5e1; background: #f1f5f9; cursor: default; }
.cell.bad  { background: #fecaca; }
.cell:not(.done):active { background: #e0e7ff; }
.cross {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: 700;
  color: rgba(220, 38, 38, 0.6);
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 4px white;
}
.result {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
}
.result.win { background: #d1fae5; color: #065f46; }
.result.hidden { display: none; }
@media (max-width: 380px) {
  .cell { font-size: 18px; }
}
