* { 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: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  width: min(90vw, 360px);
  height: min(90vw, 360px);
  margin: 0 auto;
  padding: 14px;
  background: #1f2330;
  border-radius: 50%;
  user-select: none;
}
.pad {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.08s ease-out, opacity 0.08s ease-out;
  opacity: 0.65;
}
.pad-green  { background: #16a34a; border-top-left-radius: 100% 100%; }
.pad-red    { background: #dc2626; border-top-right-radius: 100% 100%; }
.pad-yellow { background: #ca8a04; border-bottom-left-radius: 100% 100%; }
.pad-blue   { background: #2563eb; border-bottom-right-radius: 100% 100%; }
.pad.active { opacity: 1; filter: brightness(1.5); }
.pad:disabled { cursor: not-allowed; }
.hint { color: #6b7280; font-size: 13px; margin-top: 8px; }
.result {
  margin-top: 16px;
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
}
.result.hidden { display: none; }
