.connect-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  width: min(100%, 390px);
  padding: 10px;
  border-radius: 20px;
  background: #29518f;
  box-shadow: inset 0 5px 16px #08132c80;
}
.connect-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.connect-cell span {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #121a38;
  box-shadow: inset 0 3px 7px #0008;
}
.connect-cell.player span { background: #ffe177; }
.connect-cell.computer span { background: #ff7792; }
.connect-cell:hover:not(:disabled) span { outline: 2px solid #fff8; }
.connect-cell:disabled { cursor: default; }

.mine-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 344px);
  padding: 9px;
  border-radius: 18px;
  background: #12213b;
}
.mine-cell {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #8cfdd066;
  border-radius: 10px;
  background: #2d706f;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}
.mine-cell:hover:not(:disabled) { background: #3d8984; }
.mine-cell.open { background: #273452; border-color: #ffffff28; }
.mine-cell.mine { background: #8d3558; }
.mine-cell.exploded { background: #e45e62; }
.mine-cell[data-count="1"] { color: #91c5ff; }
.mine-cell[data-count="2"] { color: #8cfdc5; }
.mine-cell[data-count="3"] { color: #ffd17b; }
.mine-cell[data-count="4"], .mine-cell[data-count="5"] { color: #ff9baa; }
.mine-cell:disabled { cursor: default; }
.mine-mode[aria-pressed="true"] { background: #8cfdc5; color: #101029; }

.breakout-canvas {
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 6 / 7;
  border: 1px solid #ffffff35;
  border-radius: 15px;
  touch-action: none;
}
.break-controls { display: flex; gap: 12px; }
.break-controls button {
  min-width: 100px;
  padding: 10px 16px;
  border: 1px solid #ffffff30;
  border-radius: 11px;
  background: #32475b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
}
.break-controls button:active { background: #47657d; }

.word-scramble {
  max-width: 100%;
  padding: 20px;
  border: 1px solid #ffffff32;
  border-radius: 16px;
  background: #272746;
  color: #8cfdc5;
  font-size: clamp(1.5rem, 7vw, 2.5rem);
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
  overflow-wrap: anywhere;
}
.word-form { display: flex; gap: 9px; width: min(100%, 390px); }
.word-form[hidden] { display: none; }
.word-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #ffffff4a;
  border-radius: 11px;
  background: #10152e;
  color: #fff;
  font: inherit;
  text-transform: uppercase;
}
.word-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.word-clue { min-height: 22px; margin: 0; color: #cbc8dc; text-align: center; }

@media (max-width: 390px) {
  .connect-board { gap: 3px; padding: 7px; }
  .mine-board { gap: 4px; padding: 7px; }
  .mine-cell { border-radius: 7px; }
  .word-form { flex-wrap: wrap; justify-content: center; }
  .word-form input { flex-basis: 100%; }
}
