/* The four pads in a 2×2 ring around a dark hub that shows the score. Dim
   by default; .is-lit (board.js) lights one. Colours also used by the start
   logo through [data-color]. */
[data-color="green"] {
  --pad-dim: #12603a;
  --pad-lit: #39e48c;
  --pad-glow: rgba(57, 228, 140, 0.75);
}

[data-color="red"] {
  --pad-dim: #7a1d22;
  --pad-lit: #ff5a5f;
  --pad-glow: rgba(255, 90, 95, 0.75);
}

[data-color="yellow"] {
  --pad-dim: #7d6512;
  --pad-lit: #ffe04a;
  --pad-glow: rgba(255, 224, 74, 0.75);
}

[data-color="blue"] {
  --pad-dim: #173f7c;
  --pad-lit: #4fa3ff;
  --pad-glow: rgba(79, 163, 255, 0.75);
}

.si-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4%;
  padding: 4%;
  box-sizing: border-box;
  border-radius: 50%;
  background: #0d1018;
  box-shadow: 0 1.5em 3em rgba(0, 0, 0, 0.45);
  touch-action: manipulation;
  overscroll-behavior: none;
}

.si-pad {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: none;
  background: var(--pad-dim);
  box-shadow: inset 0 -0.4em 0 rgba(0, 0, 0, 0.25);
  cursor: default;
  touch-action: manipulation;
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.si-pad:nth-child(1) {
  border-radius: 100% 8% 8% 8%;
}

.si-pad:nth-child(2) {
  border-radius: 8% 100% 8% 8%;
}

.si-pad:nth-child(3) {
  border-radius: 8% 8% 8% 100%;
}

.si-pad:nth-child(4) {
  border-radius: 8% 8% 100% 8%;
}

.si-board.is-waiting .si-pad {
  cursor: pointer;
}

.si-board.is-waiting .si-pad:active {
  filter: brightness(1.25);
}

.si-pad.is-lit {
  background: var(--pad-lit);
  box-shadow:
    0 0 2.2em var(--pad-glow),
    inset 0 0 1.2em rgba(255, 255, 255, 0.55);
  transition: none;
}

/* Keyboard / remote focus: a white ring inside the pad so the gaps stay
   readable. */
.si-pad:focus-visible,
html.tv .si-pad:focus {
  outline: 0.3rem solid #ffffff !important;
  outline-offset: -0.6rem !important;
  box-shadow: inset 0 0 0 1rem rgba(255, 255, 255, 0.18);
}

.si-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  border: 0.35em solid #0d1018;
  border-radius: 50%;
  background: #1f2433;
  color: #e8ecf4;
  font-size: clamp(1.2em, 6cqmin, 6em);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .si-pad {
    transition: none;
  }
}
