html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f2df00;
  display: flex;
  justify-content: center;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  color: #111;
}

#app {
  width: min(92vw, 560px);
  padding: 16px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

header {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
}

.card {
  background: #fff;
  border-radius: 6px;
  padding: 12px 18px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}

#pad {
  width: 100%;
  aspect-ratio: 1/1;
  touch-action: none;
  background: #fff;
  border: 6px solid #111;
  border-radius: 8px;
  cursor: crosshair;
}

.row {
  display: flex;
  gap: 12px;
}

button {
  flex: 1;
  padding: 12px;
  font-size: 18px;
  font-weight: 700;
  border: 3px solid #111;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

button.primary {
  background: #111;
  color: #ffe600;
}

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

.box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 340px;
}

.box h2 {
  margin: 0;
  font-size: 28px;
}

.box p {
  margin: 0;
  font-size: 18px;
}

.mini {
  width: 160px;
  height: 160px;
  background: #fff;
  border: 4px solid #111;
  border-radius: 8px;
}

.hidden {
  display: none;
}