* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f6f7fb;
  margin: 0;
  padding: 16px;
  color: #1f2330;
}
.wrap { max-width: 420px; margin: 0 auto; text-align: center; }
.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
#newbtn {
  background: #4f46e5; color: white; border: 0; padding: 8px 14px;
  border-radius: 6px; cursor: pointer;
}
#newbtn:hover { background: #4338ca; }
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #1f2330;
  padding: 6px;
  border-radius: 6px;
  user-select: none;
  touch-action: manipulation;
}
.tile {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  background: #4f46e5;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
}
.tile.empty {
  background: transparent;
  cursor: default;
}
.tile:not(.empty):hover { background: #4338ca; }
.result {
  margin-top: 16px;
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
}
.result.hidden { display: none; }
