:root {
  --ink: #17202a;
  --muted: #617080;
  --panel: #f7faf8;
  --panel-strong: #eef4f0;
  --line: #c7d6d2;
  --ocean-a: #16697a;
  --ocean-b: #489fb5;
  --ocean-c: #82c0cc;
  --ship: #48515a;
  --ship-edge: #252b31;
  --hit: #d1495b;
  --miss: #f2cc8f;
  --sonar: #f4d35e;
  --power: #7b2cbf;
  --ok: #2a9d8f;
  --warn: #e76f51;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.12);
  --water-image: url("assets/gfx/water_bg.png");
  --hit-burst: url("assets/gfx/explosion hit.png");
  --miss-splash: url("assets/gfx/miss_water_splash.png");
  --hit-marker: url("assets/gfx/red_hit_marker.png");
  --miss-marker: url("assets/gfx/white_miss_marker.png");
  --sight-image: url("assets/gfx/sight.png");
  --metal-a: #d8e0df;
  --metal-b: #839199;
  --metal-c: #2d3840;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(247, 250, 248, 0.9), rgba(18, 56, 64, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.72)),
    var(--water-image);
  background-size: auto, auto, cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 26px;
  position: relative;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 10px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px rgba(45, 56, 64, 0.14),
    inset 0 0 28px rgba(45, 56, 64, 0.16);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(45, 56, 64, 0.28);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(226, 235, 234, 0.84)),
    linear-gradient(90deg, rgba(131, 145, 153, 0.18), transparent 32%, rgba(22, 105, 122, 0.12));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  position: relative;
  background: linear-gradient(145deg, var(--ocean-c), var(--ocean-a));
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.08);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  height: 6px;
  border-radius: 99px;
  background: #ffffff;
  opacity: 0.9;
}

.brand-mark::before {
  top: 13px;
}

.brand-mark::after {
  bottom: 12px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.room-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 700;
}

.chip strong {
  margin-left: 6px;
  letter-spacing: 0.08em;
}

.chip.is-live {
  border-color: rgba(42, 157, 143, 0.42);
  color: #12685e;
  background: rgba(42, 157, 143, 0.1);
}

.chip.is-turn {
  border-color: rgba(209, 73, 91, 0.36);
  color: #9d2131;
  background: rgba(209, 73, 91, 0.1);
}

.screen {
  display: grid;
  gap: 16px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch;
}

.panel {
  border: 1px solid rgba(45, 56, 64, 0.3);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 244, 240, 0.88)),
    linear-gradient(135deg, rgba(216, 224, 223, 0.38), rgba(131, 145, 153, 0.12));
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(45, 56, 64, 0.08);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 5px;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.2;
}

.home-actions {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-select {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-option {
  min-width: 0;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option strong,
.mode-option span {
  display: block;
  overflow-wrap: anywhere;
}

.mode-option strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.mode-option span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mode-option.is-active,
.mode-option:has(input:checked) {
  border-color: var(--ocean-a);
  box-shadow: inset 4px 0 0 var(--ocean-a);
  background: rgba(72, 159, 181, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 0 14px;
  font-weight: 800;
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.btn.primary {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.16);
}

.btn.accent {
  color: #ffffff;
  background: var(--ocean-a);
  border-color: var(--ocean-a);
}

.btn.danger {
  color: #ffffff;
  background: var(--warn);
  border-color: var(--warn);
}

.btn.ghost {
  background: transparent;
}

.audio-toggle {
  min-width: 88px;
}

.hero-board {
  min-height: 410px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(7, 50, 61, 0.18)),
    var(--water-image);
  background-size: auto, cover;
  box-shadow: var(--shadow);
}

.hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 10% 10%;
}

.title-board {
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  isolation: isolate;
}

.title-board::before {
  z-index: 0;
}

.title-logo {
  position: relative;
  z-index: 2;
  width: min(94%, 780px);
  max-height: 86%;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28))
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.38));
}

.title-waterline {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 34%;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(5, 44, 54, 0.32)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 22%, rgba(255, 255, 255, 0.12) 55%, transparent);
}

.hero-ship {
  position: absolute;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: center / contain no-repeat url("assets/gfx/ship_5_squares.png");
  box-shadow: none;
  filter: drop-shadow(0 16px 16px rgba(0, 0, 0, 0.24));
}

.hero-ship::before {
  content: none;
}

.hero-ship.one {
  width: 260px;
  left: 9%;
  top: 24%;
}

.hero-ship.two {
  width: 190px;
  right: 16%;
  bottom: 25%;
  transform: rotate(-2deg);
  background-image: url("assets/gfx/ship_3_squares_v2.png");
}

.hero-hit {
  position: absolute;
  width: 104px;
  height: 84px;
  border-radius: 0;
  right: 28%;
  top: 32%;
  background: center / contain no-repeat var(--hit-burst);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.title-board .hero-hit {
  z-index: 3;
  right: 10%;
  top: 14%;
  opacity: 0.76;
}

.status-grid,
.game-grid {
  display: grid;
  gap: 16px;
}

.status-grid {
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 0.62fr);
}

.game-grid {
  grid-template-columns: minmax(330px, 0.9fr) minmax(330px, 1.1fr) minmax(260px, 0.45fr);
  align-items: start;
}

.board-wrap {
  display: grid;
  gap: 10px;
}

.board-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 34px;
}

.board-title h2 {
  margin: 0;
  font-size: 1rem;
}

.board-shell {
  width: min(100%, 592px);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 24px auto;
  gap: 4px;
  align-items: stretch;
}

.axis-corner {
  grid-column: 1;
  grid-row: 1;
}

.axis-labels {
  display: grid;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.axis-cols {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.axis-rows {
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: repeat(10, minmax(0, 1fr));
}

.axis-label {
  display: grid;
  place-items: center;
}

.board {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  gap: 3px;
  padding: 8px;
  border: 2px solid rgba(45, 56, 64, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(5, 44, 54, 0.14)),
    var(--water-image);
  background-size: 10% 10%, 10% 10%, auto, cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    inset 0 0 22px rgba(5, 44, 54, 0.24),
    var(--shadow);
  position: relative;
  overflow: hidden;
}

.cell {
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 5px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  touch-action: manipulation;
  isolation: isolate;
}

button.cell {
  min-height: 0;
  padding: 0;
}

button.cell:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.2);
}

.cell.is-target-cell:not(:disabled):not(.is-hit):not(.is-miss):hover::before {
  content: "";
  position: absolute;
  inset: 11%;
  z-index: 1;
  background: center / contain no-repeat var(--sight-image);
  opacity: 0.86;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.26));
}

.cell.is-ship {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(17, 24, 31, 0.8);
}

.cell.is-ship::before {
  content: "";
  position: absolute;
  inset: 31% 18%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
}

.board.has-ship-overlays .cell.is-ship::before {
  content: none;
}

.ship-overlay {
  z-index: 1;
  pointer-events: none;
  position: relative;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  filter:
    drop-shadow(0 8px 8px rgba(0, 0, 0, 0.24))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
}

.ship-sprite {
  position: absolute;
  inset: 4% 1%;
  background-image: var(--ship-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.ship-dir-horizontal .ship-sprite {
  inset: 2% 1%;
}

.ship-dir-vertical .ship-sprite {
  left: 50%;
  top: 50%;
  width: calc(100% * var(--ship-length));
  height: calc(100% / var(--ship-length));
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

.cell.is-preview {
  background: rgba(244, 211, 94, 0.44);
  border-color: rgba(23, 32, 42, 0.72);
}

.cell.is-bad-preview {
  background: rgba(209, 73, 91, 0.58);
}

.cell.is-hit {
  background:
    center / cover no-repeat var(--hit-burst),
    rgba(209, 73, 91, 0.72);
  border-color: rgba(112, 18, 31, 0.92);
}

.cell.is-hit::after {
  content: "";
  width: 78%;
  height: 86%;
  background: center / contain no-repeat var(--hit-marker);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.38));
}

.cell.is-miss {
  background:
    center / cover no-repeat var(--miss-splash),
    rgba(242, 204, 143, 0.42);
  border-color: rgba(255, 255, 255, 0.72);
}

.cell.is-miss::after {
  content: "";
  width: 70%;
  height: 78%;
  background: center / contain no-repeat var(--miss-marker);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

.cell.is-sunk {
  box-shadow: inset 0 0 0 3px rgba(23, 32, 42, 0.62);
}

.cell.is-sonar {
  outline: 2px solid rgba(244, 211, 94, 0.8);
  outline-offset: -4px;
}

.cell .scan-count {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ink);
  background: var(--sonar);
  font-weight: 900;
  font-size: clamp(0.72rem, 2vw, 1rem);
}

.fleet-list,
.toolbox,
.log-list,
.players-list {
  display: grid;
  gap: 8px;
}

.ship-button,
.ability-button,
.player-row,
.log-item {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.ship-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.ship-button.is-active {
  border-color: var(--ocean-a);
  box-shadow: inset 4px 0 0 var(--ocean-a);
}

.ship-button.is-placed {
  color: #12685e;
  border-color: rgba(42, 157, 143, 0.4);
  background: rgba(42, 157, 143, 0.1);
}

.ship-pips {
  display: flex;
  gap: 3px;
}

.ship-pips span {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--ship);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.segmented button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  font-weight: 800;
}

.segmented button.is-active {
  color: #ffffff;
  background: var(--ink);
}

.ability-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  text-align: left;
  color: var(--ink);
}

.ability-button.is-active {
  border-color: var(--power);
  box-shadow: inset 4px 0 0 var(--power);
}

.ability-button strong {
  display: block;
  font-size: 0.95rem;
}

.ability-button span {
  color: var(--muted);
  font-size: 0.82rem;
}

.energy {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.energy-bar {
  height: 16px;
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(23, 32, 42, 0.08);
}

.energy-bar span {
  display: block;
  height: 100%;
  width: var(--energy-width, 0%);
  background: linear-gradient(90deg, var(--ok), var(--sonar), var(--hit));
}

.player-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.player-row strong,
.log-item {
  overflow-wrap: anywhere;
}

.player-state {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.log-item {
  min-height: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.log-item[data-type="hit"] {
  border-color: rgba(209, 73, 91, 0.32);
}

.log-item[data-type="power"] {
  border-color: rgba(123, 44, 191, 0.28);
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-row,
.score-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.score-row strong {
  overflow-wrap: anywhere;
}

.score-row span,
.score-summary {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.stat-tile strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1;
}

.stat-tile span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stat-tile.muted {
  background: rgba(238, 244, 240, 0.9);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
  padding: 16px;
}

.empty-state.compact {
  min-height: 72px;
  padding: 10px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 32px));
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: var(--ink);
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.code-value {
  user-select: all;
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  font-weight: 950;
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: 1fr 1fr;
  }

  .side-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 18px, 680px);
    padding-top: 10px;
  }

  .topbar,
  .home-grid,
  .status-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .room-strip {
    justify-content: flex-start;
  }

  .join-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 12px;
  }

  .board-shell {
    width: 100%;
  }

  .board {
    gap: 2px;
    padding: 6px;
  }

  .hero-board {
    min-height: 280px;
  }

  .title-board {
    padding: 16px;
  }

  .hero-ship.one {
    width: 160px;
  }

  .hero-ship.two {
    width: 120px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: calc(100% - 12px);
    padding-bottom: 14px;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand h1 {
    font-size: 1.22rem;
  }

  .brand p {
    font-size: 0.82rem;
  }

  .room-strip,
  .toolbar {
    width: 100%;
  }

  .chip {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .panel {
    padding: 10px;
    box-shadow: 0 12px 28px rgba(23, 32, 42, 0.1);
  }

  .board-title {
    min-height: 30px;
  }

  .board-shell {
    max-width: calc(100vw - 32px);
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-rows: 20px auto;
    gap: 3px;
  }

  .axis-labels {
    font-size: 0.66rem;
  }

  .board {
    gap: 1px;
    padding: 5px;
    border-width: 1px;
  }

  .cell {
    border-radius: 3px;
  }

  .toolbar > .btn,
  .toolbar > .segmented {
    flex: 1 1 128px;
  }

  .segmented {
    min-width: 100%;
  }

  .ship-button,
  .ability-button,
  .player-row,
  .score-row {
    min-height: 44px;
    padding: 9px;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ship-pips span {
    width: 11px;
    height: 11px;
  }

  .empty-state {
    min-height: 150px;
  }

  .empty-state.compact {
    min-height: 72px;
  }

  .hero-board {
    min-height: 220px;
  }

  .title-logo {
    width: 98%;
    max-height: 82%;
  }

  .title-board .hero-hit {
    width: 74px;
    height: 60px;
    right: 4%;
    top: 12%;
  }

  .toast {
    right: 8px;
    bottom: 8px;
    max-width: calc(100vw - 16px);
  }
}
