.ludo-board {
  position: relative;
  background: #fffdf8;
  border: 1px solid #2b2118;
  border-radius: 8px;
  overflow: hidden;
}

.ludo-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
}

.ludo-grid i {
  display: grid;
  place-items: center;
  font-size: clamp(8px, 2.1cqw, 16px);
  font-weight: 800;
  color: #243044;
}

.ludo-grid i.path { background: #fff; box-shadow: inset 0 0 0 1px #e4e4e4; }
.ludo-grid i.home.green,
.ludo-grid i.start.green { background: #1db954; color: #fff; }
.ludo-grid i.home.yellow,
.ludo-grid i.start.yellow { background: #ffd000; color: #6a4a00; }
.ludo-grid i.home.blue,
.ludo-grid i.start.blue { background: #2f6bff; color: #fff; }
.ludo-grid i.home.red,
.ludo-grid i.start.red { background: #ff3b30; color: #fff; }

.yard {
  position: absolute;
  width: 40%;
  height: 40%;
  z-index: 1;
}

.yard.green { left: 0; top: 0; background: #18a84a; }
.yard.yellow { right: 0; top: 0; background: #ffd000; }
.yard.red { left: 0; bottom: 0; background: #ff3b30; }
.yard.blue { right: 0; bottom: 0; background: #2f6bff; }
.yard.off { filter: grayscale(0.7) brightness(0.7); }
.yard.turn { animation: yard-blink 0.85s ease-in-out infinite; }

@keyframes yard-blink {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.55); }
}

@media (prefers-reduced-motion: reduce) {
  .yard.turn { animation: none; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9); }
}

.yard::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 12%;
  width: 76%;
  height: 76%;
  background: #fff;
  border-radius: 18%;
}

.yard i {
  position: absolute;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  z-index: 1;
}

.yard.green i { background: #18a84a; }
.yard.yellow i { background: #e0ac00; }
.yard.red i { background: #ff3b30; }
.yard.blue i { background: #2f6bff; }

.yard i:nth-child(1) { left: 16%; top: 16%; }
.yard i:nth-child(2) { right: 16%; top: 16%; }
.yard i:nth-child(3) { left: 16%; bottom: 16%; }
.yard i:nth-child(4) { right: 16%; bottom: 16%; }

.hub {
  position: absolute;
  z-index: 2;
  left: 40%;
  top: 40%;
  width: 20%;
  height: 20%;
  background: conic-gradient(from 45deg, #2f6bff 0 90deg, #ff3b30 90deg 180deg, #18a84a 180deg 270deg, #ffd000 270deg 360deg);
}

.gotis { position: absolute; inset: 0; z-index: 4; }

.goti {
  position: absolute;
  width: 4.8%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  background-color: #eee;
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.goti.green { box-shadow: 0 0 0 2px #18a84a; }
.goti.yellow { box-shadow: 0 0 0 2px #e6b800; }
.goti.red { box-shadow: 0 0 0 2px #ff3b30; }
.goti.blue { box-shadow: 0 0 0 2px #2f6bff; }
.goti.can { outline: 3px solid #fff; animation: pick 0.8s ease infinite; }

@keyframes pick {
  50% { transform: translate(-50%, -62%) scale(1.08); }
}

.who .swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.swatch.green { background: #18a84a; }
.swatch.yellow { background: #ffd000; }
.swatch.red { background: #ff3b30; }
.swatch.blue { background: #2f6bff; }

.invite-box {
  width: min(100%, 420px);
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.invite-box input { font-size: 0.82rem; padding: 8px; }

@media (min-width: 980px),
       (max-height: 520px) and (min-width: 680px) {
  .ludo-app .players {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .ludo-app .side { overflow: auto; }
}

@media (max-width: 800px) {
  .ludo-app .players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    gap: 4px;
  }

  .ludo-app .who { min-width: 0; }
  .ludo-app .who strong { font-size: 0.86rem; }
}
