:root { --game-red: #ff8191; --game-gold: #f4cf68; }
.connect-board {
  display: grid;
  width: min(100%, 700px);
  aspect-ratio: 7 / 6;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-inline: auto;
  padding: clamp(4px, 1vw, 8px);
  border: 1px solid rgba(148, 174, 240, 0.32);
  border-radius: clamp(16px, 4vw, 26px);
  background:
    linear-gradient(150deg, rgba(74, 89, 160, 0.98), rgba(37, 49, 106, 0.98)),
    #26336f;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.13), 0 18px 42px rgba(0, 0, 0, 0.3);
}
.connect-column {
  display: grid;
  min-width: 0;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.connect-column:not(:disabled):hover .connect-hole { border-color: rgba(255, 255, 255, 0.2); }
.connect-column:disabled { cursor: default; }
.connect-hole {
  display: grid;
  min-width: 0;
  width: 82%;
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  place-items: center;
  border: 1px solid rgba(159, 177, 238, 0.14);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, #161c3a, #10142b 75%);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.58), 0 1px 1px rgba(255, 255, 255, 0.08);
}
.connect-piece {
  display: block;
  width: 79%;
  height: 79%;
  border-radius: 50%;
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, 0.22), inset 0 -5px 8px rgba(0, 0, 0, 0.22), 0 3px 6px rgba(0, 0, 0, 0.32);
  animation: piece-drop 220ms cubic-bezier(.2,.75,.35,1.25) both;
}
.connect-piece.is-red { background: radial-gradient(circle at 32% 26%, #ffb2bd, var(--game-red) 50%, #d84f68); }
.connect-piece.is-gold { background: radial-gradient(circle at 32% 26%, #fff0a9, var(--game-gold) 52%, #d89f32); }
.connect-hole.is-winning .connect-piece {
  outline: 3px solid #fff8d8;
  outline-offset: 1px;
  box-shadow: 0 0 16px rgba(255, 248, 216, 0.62), inset 0 3px 4px rgba(255, 255, 255, 0.28);
}
.connect-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--quick-muted);
  font-weight: 700;
}
.connect-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; }
.legend-dot.is-red { background: var(--game-red); }
.legend-dot.is-gold { background: var(--game-gold); }
@keyframes piece-drop { from { transform: translateY(-9px) scale(.88); opacity: .45; } to { transform: translateY(0) scale(1); opacity: 1; } }
@media (max-width: 360px) {
  .game-panel { padding: 0.55rem; }
  .connect-board { padding: 4px; }
}
