/* Naval artwork stays beneath the exact, authoritative 10-by-10 grid. */
.bs-table {
  color: var(--ink);
  min-width: 0;
}
.bs-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.bs-heading > .bs-ship-art {
  width: 72px;
  height: 80px;
}
.bs-heading h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.bs-heading p,
.bs-placement p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.bs-ship-art {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.bs-ship-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.bs-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 16px 0;
  font-size: 13px;
}
.bs-scores > span {
  display: grid;
  gap: 4px;
}
.bs-scores strong {
  font-size: 14px;
}
.bs-manifest {
  display: flex;
  list-style: none;
  gap: 8px;
  overflow: auto;
  padding: 4px 0 8px;
  margin: 16px 0;
  scrollbar-color: var(--club-blue) var(--paper);
}
.bs-manifest li {
  flex: 1 0 128px;
  padding: 8px;
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.bs-manifest li.current {
  border: 2px solid var(--club-blue);
  background: var(--club-light-blue);
  padding: 7px;
}
.bs-manifest .bs-ship-art {
  width: 112px;
  height: 44px;
}
.bs-manifest strong {
  font-size: 13px;
}
.bs-manifest li > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
.bs-manifest .sunk .bs-ship-art {
  filter: grayscale(1);
}
.bs-manifest .sunk strong {
  color: var(--danger);
}
.bs-table .ship-placement {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  padding: 16px;
  background: var(--club-light-blue);
  border-radius: 8px;
  margin: 12px 0 20px;
}
.bs-placement > div:first-child {
  flex: 1 1 240px;
}
.bs-placement strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.bs-placement .extra-actions {
  margin: 0;
}
.bs-placement .btn {
  min-height: 44px;
}
.bs-table .sea-fleets,
.bs-table .sea-public {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.bs-table .sea-fleets > section:only-child {
  max-width: none;
  margin: 0;
}
.bs-table .bs-board-section {
  min-width: 0;
}
.bs-table .bs-board-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.bs-board-section h3 > span {
  font-size: 13px;
  color: var(--muted);
  margin-inline-start: 8px;
}
.bs-target-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.bs-target-heading > span {
  font-size: 13px;
  color: var(--muted);
}
.bs-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
  scrollbar-color: var(--club-blue) var(--paper);
  padding: 4px;
}
.bs-chart-scroll:focus-visible {
  outline: 3px solid var(--club-blue);
  outline-offset: -3px;
}
.bs-chart {
  display: grid;
  grid-template-columns: 24px minmax(440px, 1fr);
  grid-template-rows: 24px auto;
  gap: 4px;
  width: min(100%, 560px);
  min-width: 496px;
  margin-inline: auto;
  padding: 10px;
  border: 1px solid #52627b;
  border-radius: 8px;
  background: #143f5e url("/images/battleship/ocean.webp") center / cover;
}
.bs-axis {
  display: grid;
  color: white;
  font-size: 13px;
  font-weight: 750;
  text-shadow: 0 1px 2px #14213b;
}
.bs-columns {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}
.bs-rows {
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: repeat(10, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}
.bs-table .sea-board {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  grid-template-columns: repeat(10, minmax(44px, 1fr));
  border: 1px solid #cad7ed;
  border-radius: 0;
  background: #14213b66;
  isolation: isolate;
  overflow: visible;
}
.bs-table .sea-cell {
  min-width: 44px;
  min-height: 44px;
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  border-inline-end: 1px solid #cad7ed66;
  border-bottom: 1px solid #cad7ed66;
  color: white;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.bs-table button.sea-cell {
  cursor: crosshair;
}
.bs-table button.sea-cell:disabled {
  cursor: default;
  opacity: 1;
}
.bs-table .sea-cell.ship {
  background: #cad7ed33;
}
.bs-table .sea-cell > .bs-cell-coordinate {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 10px;
  color: #fff;
  line-height: 1.4;
  z-index: 4;
  text-shadow: 0 1px 2px #14213b;
}
.bs-table .sea-cell.hit {
  background: #8f341c80;
}
.bs-table .sea-cell.miss {
  background: #14213b55;
}
.bs-table .bs-shot-mark {
  width: 72%;
  height: 72%;
  position: relative;
  z-index: 4;
}
.bs-table .hit .bs-shot-mark {
  fill: #f5a14a;
  stroke: #fff1d9;
  stroke-width: 1.5;
}
.bs-table .hit .bs-shot-mark > path:last-child {
  stroke: #8f341c;
  stroke-width: 2.5;
}
.bs-table .miss .bs-shot-mark {
  fill: none;
  stroke: #eaf0f8;
  stroke-width: 2;
}
.bs-table .sea-cell.bs-latest {
  box-shadow: inset 0 0 0 3px #ffdaa4;
}
.bs-table .sea-cell:not(:disabled):hover {
  background: #cad7ed44;
  box-shadow: inset 0 0 0 2px white;
}
.bs-table .sea-cell:focus-visible {
  outline: 3px solid #ffdaa4;
  outline-offset: -3px;
  z-index: 5;
}
.bs-vessels,
.bs-placement-ghost {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.bs-vessel {
  display: block;
  position: absolute;
  left: calc(var(--col) * 10%);
  top: calc(var(--row) * 10%);
  width: calc(var(--length) * 10%);
  height: 10%;
  pointer-events: none;
}
.bs-vessel > .bs-ship-art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
}
.bs-vessel.vertical {
  width: 10%;
  height: calc(var(--length) * 10%);
}
.bs-vessel.vertical > .bs-ship-art {
  width: calc(var(--length) * 100%);
  height: calc(100% / var(--length));
  transform: translate(-50%, -50%) rotate(90deg);
}
.bs-vessel.sunk {
  filter: grayscale(1);
  opacity: 0.65;
}
.bs-vessel.preview {
  opacity: 0.65;
}
.bs-vessel.invalid {
  opacity: 0.3;
  filter: grayscale(1);
}
.bs-table .sea-cell.bs-placement-valid {
  background: #cad7ed55;
  box-shadow: inset 0 0 0 2px #ffdaa4;
}
.bs-table .sea-cell.bs-placement-invalid {
  background: #b12d4388;
  box-shadow: inset 0 0 0 2px #ffb4ad;
}
.bs-table .bs-own-disclosure {
  min-width: 0;
  padding: 0;
  border-block: 1px solid var(--line);
}
.bs-own-disclosure summary {
  min-height: 48px;
  cursor: pointer;
  align-content: center;
  font-size: 14px;
  color: var(--green);
}
.bs-own-disclosure[open] > section {
  padding-block: 12px;
}
.bs-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.bs-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bs-table .bs-legend .bs-shot-mark {
  width: 24px;
  height: 24px;
  position: static;
  stroke: #52627b;
  stroke-width: 2;
  fill: none;
}
.bs-table .bs-legend > span:first-child .bs-shot-mark {
  fill: #f5a14a;
  stroke: #ad4c13;
}
.bs-scroll-hint {
  display: none;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}
.bs-notice {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 14px;
}
.bs-library-preview {
  width: 240px;
  height: 170px;
  position: relative;
  background: #143f5e url("/images/battleship/ocean.webp") center / cover;
  border: 1px solid #52627b;
  border-radius: 8px;
}
.bs-library-preview > .bs-ship-art:first-child {
  position: absolute;
  width: 80px;
  height: 90px;
  top: 6px;
  right: 4px;
}
.bs-library-preview > .bs-ship-art:last-child {
  position: absolute;
  width: 190px;
  height: 80px;
  bottom: 4px;
  left: 4px;
}
@media (max-width: 600px) {
  .bs-heading {
    gap: 12px;
  }
  .bs-heading h2 {
    font-size: 18px;
  }
  .bs-heading > .bs-ship-art {
    width: 56px;
    height: 64px;
    flex: none;
  }
  .bs-scroll-hint {
    display: block;
  }
  .bs-table .ship-placement {
    padding: 12px;
  }
  .bs-target-heading > span {
    margin-bottom: 8px;
  }
}
