.fleet-chart {
  --chart-ink: #103e48;
  --chart-paper: #f2eedc;
  --chart-ocean: #0b4552;
  --chart-line: #58aaac52;
  box-sizing: border-box; width: min(100%, 900px); margin: auto;
  font-family: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
}
.fleet-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem .7rem; margin: .3rem auto .9rem; }
.fleet-vessel { color: inherit; font-size: .94rem; }
.fleet-directions { display: inline-flex; gap: .2rem; }
.fleet-tools button {
  appearance: none; min-height: 40px; width: auto; margin: 0; padding: .35rem .65rem;
  font-family: inherit; font-size: .88rem; line-height: 1.2; font-weight: 700; color: #d9f7ed;
  background: #174a54; border: 1px solid #5b989c; border-radius: 6px; cursor: pointer;
}
.fleet-tools button[aria-pressed=true], .fleet-tools .fleet-confirm { color: #173639; background: #a1ddd0; }
.fleet-tools button:disabled { opacity: .55; cursor: default; }
.fleet-tools button:focus-visible, .fleet-cell:focus-visible { outline: 3px solid #ffe694; outline-offset: -3px; z-index: 2; }
.fleet-seas { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(.5rem,2vw,1.15rem); }
.fleet-seas.fleet-deployment { grid-template-columns: minmax(0,1fr); max-width: 450px; margin: auto; }
.fleet-secondary { min-width: 0; }
.fleet-fold { display: none; }
.fleet-water {
  min-width: 0; box-sizing: border-box; padding: clamp(6px, 1.4vw, 15px);
  color: var(--chart-ink); background: var(--chart-paper);
  border: 1px solid #d4cbaa; border-radius: 5px; box-shadow: 0 3px 0 #afaa94, 0 .4rem 1rem #06181d30;
}
.fleet-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .1rem .3rem; padding: 0 .15rem .35rem; }
.fleet-head .fleet-title { font: 750 clamp(1rem,2.3vw,1.45rem)/1.2 'Barlow Condensed', system-ui, sans-serif; color: var(--chart-ink); margin: 0; }
.fleet-readout, .fleet-axis, .fleet-legend { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.fleet-readout { color: #365a60; font-size: clamp(.65rem,1.3vw,.78rem); }
.fleet-field {
  display: grid; grid-template-columns: 1.15em repeat(8,minmax(0,1fr));
  padding: .2rem; border: 1px solid #2c6e76; border-radius: 3px;
  background-color: var(--chart-ocean);
  background-image: repeating-radial-gradient(ellipse at 115% 105%, transparent 0 14%, #67c1ac12 14.4% 14.7%, transparent 15% 18%), linear-gradient(135deg,#104c58,#0a3847);
}
.fleet-axis, .fleet-compass { display: grid; place-items: center; color: #c9e7dd; font-size: .72rem; line-height: 1.5; }
.fleet-compass { color: #f0bd78; }
.fleet-field .fleet-cell {
  box-sizing: border-box; appearance: none; font: inherit; border-radius: 0; margin: 0; padding: 0;
  display: grid; place-items: center; position: relative; aspect-ratio: 1; width: 100%; min-width: 0; min-height: 0;
  box-shadow: none; color: #d9f6ec; background: transparent; border: 0;
  border-top: 1px solid var(--chart-line); border-left: 1px solid var(--chart-line);
}
.fleet-cell[aria-disabled=false] { cursor: crosshair; }
.fleet-cell[aria-disabled=false]:hover { background: #8dcfbd50; }
.fleet-hull::before {
  content: ''; position: absolute; background: linear-gradient(#d0dac5, #88b5aa 48%, #5d8f88 52%, #7aa098);
  border: 1px solid #d0e1cd; border-left: 0; border-right: 0; inset: 22% -1px;
}
.fleet-hull.fleet-bow::before { border-radius: 65% 0 0 65%; left: 9%; }
.fleet-hull.fleet-stern::before { border-radius: 0 25% 25% 0; right: 8%; }
.fleet-vertical::before { inset: -1px 22%; border: 1px solid #d0e1cd; border-top: 0; border-bottom: 0; background: linear-gradient(90deg,#cadbc6,#8eb6a8 46%,#658e81 50%,#83a99b); }
.fleet-vertical.fleet-bow::before { inset: 9% 22% -1px; border-radius: 65% 65% 0 0; }
.fleet-vertical.fleet-stern::before { inset: -1px 22% 8%; border-radius: 0 0 25% 25%; }
.fleet-field .fleet-preview { background: #d6b36761; box-shadow: inset 0 0 0 2px #f4d482; }
.fleet-mark { position: relative; font: 800 clamp(1rem, 2.7vw, 1.65rem)/1 system-ui,sans-serif; }
.fleet-cell[data-mark="1"] .fleet-mark { color: #b5d6d3; }
.fleet-cell[data-mark="2"] .fleet-mark, .fleet-cell[data-mark="3"] .fleet-mark { color: #ffb379; text-shadow: 1px 1px #522f26, -1px -1px #522f26; }
.fleet-field .fleet-last { box-shadow: inset 0 0 0 2px #f5d992; }
.fleet-legend { text-align: center; font-size: .8rem; white-space: pre-wrap; margin: .8rem 0 0; }
@media (max-width: 680px) and (orientation: portrait) {
  .fleet-seas { grid-template-columns: minmax(0, 1fr); max-width: 440px; margin: auto; }
  .fleet-water { padding: .5rem; }
  .fleet-secondary[data-expanded=false] .fleet-water { display: none; }
  .fleet-fold { display: block; width: 100%; min-height: 40px; font: inherit; background: #174a54; color: #e6f6ea; border: 1px solid #589197; border-radius: 5px; cursor: pointer; }
}
