.games-compact-grid {
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  align-items: stretch !important;
  margin-bottom: 14px !important;
}

.games-compact-grid .game-card {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  border-radius: 17px !important;
}

.games-compact-grid .game-card::before {
  width: 100px !important;
  height: 100px !important;
  top: -65px !important;
  right: -40px !important;
}

.games-compact-grid .game-icon {
  width: 36px !important;
  height: 36px !important;
  margin-bottom: 7px !important;
  border-radius: 11px !important;
  font-size: 20px !important;
}

.games-compact-grid .game-info h2 {
  min-height: 34px !important;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.18 !important;
  letter-spacing: -.015em !important;
}

.games-compact-grid .game-info p {
  display: none !important;
}

.games-compact-grid .waiting {
  margin: 4px 0 7px !important;
  min-height: 14px !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}

.games-compact-grid .game-card .btn {
  min-height: 34px !important;
  height: 34px !important;
  margin-top: 3px !important;
  padding: 0 5px !important;
  border-radius: 10px !important;
  font-size: 9px !important;
  letter-spacing: .01em !important;
}

.games-compact-grid .game-card .quick-btn,
.games-compact-grid .game-card .private-btn {
  width: calc(50% - 3px) !important;
}

.games-compact-grid .game-card .quick-btn {
  margin-right: 2px !important;
}

.games-compact-grid .online-card {
  grid-column: 1 / -1 !important;
  margin: 3px 0 0 !important;
}

@media (max-width: 350px) {
  .games-compact-grid {
    gap: 7px !important;
  }

  .games-compact-grid .game-card {
    padding: 8px !important;
  }

  .games-compact-grid .game-info h2 {
    font-size: 13px !important;
  }
}

.battleships-game {
  width: min(100%, 460px);
  margin: 0 auto;
  padding-bottom:
    calc(12px + env(safe-area-inset-bottom));
}

.bs-loading {
  padding: 28px 10px;
  text-align: center;
  color: #627177;
}

.bs-panel {
  width: 100%;
  color: #253239;
}

.bs-setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 2px 10px;
}

.bs-setup-head strong {
  display: block;
  font-size: 16px;
}

.bs-setup-head span {
  display: block;
  margin-top: 3px;
  color: #627177;
  font-size: 10px;
  line-height: 1.35;
}

.bs-ready-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #D8E2DE;
  border-radius: 999px;
  background: #FFFFFF;
  color: #477C83;
  font-size: 11px;
  font-weight: 850;
}

.bs-board-wrap {
  width: 100%;
  padding: 8px;
  border: 1px solid #D6E1DE;
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      #FFFFFF,
      #F6FAF8
    );
  box-shadow:
    0 10px 28px
    rgba(37, 50, 57, .07);
}

.bs-grid {
  display: grid;
  grid-template-columns:
    20px repeat(10, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  touch-action: manipulation;
  user-select: none;
}

.bs-axis {
  display: grid;
  place-items: center;
  min-width: 0;
  color: #7B898E;
  font-size: 9px;
  font-weight: 800;
}

.bs-axis.corner {
  opacity: 0;
}

.bs-cell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid #D2E1E1;
  border-radius: 4px;
  appearance: none;
  background:
    linear-gradient(
      145deg,
      #EEF7F7,
      #E2F0F1
    );
  overflow: hidden;
}

.bs-cell.ship {
  border-color: #5E8387;
  background:
    linear-gradient(
      145deg,
      #6F979B,
      #477C83
    );
}

.bs-cell.miss::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7FA7B1;
}

.bs-cell.hit::after,
.bs-cell.sunk::after {
  content: "";
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: #D46B56;
  box-shadow:
    0 0 0 3px
    rgba(212, 107, 86, .15);
}

.bs-cell.sunk {
  border-color: #B95E4E;
  background:
    linear-gradient(
      145deg,
      #C87867,
      #9F5146
    );
}

.bs-cell.sunk::after {
  background: #7E352D;
}

.bs-cell.shootable:active {
  transform: scale(.90);
  background: #D5EBEA;
}

.bs-fleet-row {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.bs-fleet-choice {
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid #D8E2DE;
  border-radius: 12px;
  background: #FFFFFF;
  color: #477C83;
  font-size: 12px;
  font-weight: 800;
}

.bs-fleet-choice span {
  letter-spacing: 1px;
}

.bs-fleet-choice b {
  margin-left: 6px;
  color: #627177;
}

.bs-fleet-choice.active {
  border-color: #477C83;
  box-shadow:
    0 0 0 2px
    rgba(71, 124, 131, .12);
}

.bs-fleet-choice:disabled {
  opacity: .42;
}

.bs-controls {
  display: grid;
  grid-template-columns:
    1.15fr 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.bs-control {
  min-height: 40px;
  padding: 6px 5px;
  border: 1px solid #D8E2DE;
  border-radius: 12px;
  background: #FFFFFF;
  color: #315D63;
  font-size: 11px;
  font-weight: 800;
}

.bs-ready-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 9px;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      #5F8F93,
      #477C83
    );
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
}

.bs-ready-btn:disabled {
  opacity: .42;
}

.bs-local-message {
  min-height: 18px;
  padding-top: 5px;
  color: #B45B4B;
  text-align: center;
  font-size: 10px;
}

.bs-wait-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #D8E5E0;
  border-radius: 14px;
  background: #F4F8F5;
  text-align: center;
}

.bs-wait-box strong,
.bs-wait-box span {
  display: block;
}

.bs-wait-box strong {
  color: #315D63;
  font-size: 13px;
}

.bs-wait-box span {
  margin-top: 3px;
  color: #627177;
  font-size: 11px;
}

.bs-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px;
  border: 1px solid #DCE5E1;
  border-radius: 14px;
  background: #EEF3F0;
}

.bs-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #627177;
  font-size: 11px;
  font-weight: 850;
}

.bs-tabs button.active {
  background: #FFFFFF;
  color: #315D63;
  box-shadow:
    0 2px 8px
    rgba(37,50,57,.08);
}

.bs-scoreline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 3px 8px;
  color: #627177;
  font-size: 11px;
}

.bs-scoreline b {
  color: #315D63;
}

.bs-board-title {
  margin: 0 2px 7px;
  color: #315D63;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}

.bs-last-shot {
  min-height: 22px;
  padding-top: 7px;
  color: #627177;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.bs-result {
  padding: 16px 12px;
  border: 1px solid #D8E2DE;
  border-radius: 18px;
  background: #FFFFFF;
  text-align: center;
}

.bs-result-icon {
  font-size: 34px;
}

.bs-result h2 {
  margin: 6px 0 3px;
  color: #315D63;
  font-size: 18px;
}

.bs-result p {
  margin: 0;
  color: #627177;
  font-size: 12px;
}

.bs-scoreline.final {
  margin-top: 10px;
}

@media (max-width: 360px) {
  .bs-board-wrap {
    padding: 6px;
  }

  .bs-grid {
    grid-template-columns:
      18px repeat(10, minmax(0, 1fr));
    gap: 1px;
  }

  .bs-axis {
    font-size: 8px;
  }

  .bs-cell {
    border-radius: 3px;
  }
}
