:root {
  color-scheme: dark;
  --ink: #edf9ff;
  --muted: #9cb4c1;
  --cyan: #39d9ff;
  --gold: #dcb565;
  --panel: #06131be8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0, #113342, #02080d 65%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid #ffffff20;
  background: #020a10e8;
  backdrop-filter: blur(12px);
}

h1 {
  margin: 0;
  font:
    700 clamp(20px, 3vw, 32px) / 1 Georgia,
    serif;
  letter-spacing: 0.08em;
}

.site-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

main {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(500px, 900px) minmax(
      220px,
      280px
    );
  gap: 20px;
  align-items: start;
  justify-content: center;
  padding: 24px;
}

.left-rail {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.left-rail .panel {
  position: static;
}

.panel {
  position: sticky;
  top: 100px;
  padding: 18px;
  border: 1px solid #ffffff24;
  background: var(--panel);
  box-shadow: 0 18px 55px #0008;
}

.panel h2 {
  margin: 0 0 6px;
  font:
    400 22px Georgia,
    serif;
}
.panel p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.panel label {
  display: block;
  margin-bottom: 7px;
  color: #bcd2dc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #4d7180;
  background: #020b11;
  color: white;
  font-size: 15px;
}

.game-chat {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffff24;
  background: var(--panel);
  box-shadow: 0 18px 55px #0008;
}

.game-chat header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid #ffffff1c;
}

.game-chat h3 {
  margin: 0;
  font:
    600 17px Georgia,
    serif;
  letter-spacing: 0.04em;
}

.game-chat header span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-messages {
  display: flex;
  height: 230px;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 12px;
}

.chat-message {
  align-self: flex-start;
  width: fit-content;
  max-width: 88%;
  padding: 8px 10px;
  border: 1px solid #ffffff16;
  border-radius: 4px 12px 12px;
  background: #102531;
  overflow-wrap: anywhere;
}

.chat-message.mine {
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
  background: #0c4052;
}

.chat-message div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-message strong {
  color: var(--cyan);
  font-size: 11px;
}

.chat-message time {
  color: #8da6b1;
  font-size: 9px;
}

.chat-message p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #ffffff1c;
}

.chat-form input {
  min-width: 0;
  padding: 10px;
  border: 1px solid #41616f;
  border-radius: 3px;
  outline: none;
  background: #020b11;
  color: white;
}

.chat-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px #39d9ff20;
}

.chat-form button {
  padding: 0 13px;
  border: 1px solid #39d9ff66;
  border-radius: 3px;
  background: #0b5368;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.chat-form button:hover {
  background: #106b85;
}

.chat-form input:disabled,
.chat-form button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.chat-error {
  min-height: 15px;
  margin: -4px 10px 7px;
  color: #ff8b8b;
  font-size: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.swatch {
  display: grid;
  min-height: 62px;
  place-items: center;
  border: 1px solid #ffffff20;
  background: #0008;
}
.swatch img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.swatch small {
  display: none;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #031017;
  box-shadow: 0 24px 80px #000c;
  overflow: hidden;
}

.stage::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  opacity: 0;
  background:
    radial-gradient(ellipse at 35% 45%, #a5f4ff1f 0 2%, transparent 9%),
    radial-gradient(ellipse at 70% 60%, #51dfff1c 0 2%, transparent 10%);
}

.stage.water-in-motion::after {
  animation: water-shimmer 1.1s ease-in-out infinite alternate;
}

.water-wake {
  position: absolute;
  z-index: 7;
  width: 8%;
  height: 4%;
  border: 2px solid #b8f5ffb8;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
  box-shadow:
    0 0 12px #38d8ffcc,
    inset 0 0 8px #b9f5ff99;
  transform: translate(-50%, -50%);
  animation: wake-pulse 0.45s ease-in-out infinite alternate;
}

.water-wake.underwater-current {
  height: 6%;
  border: 0;
  background: radial-gradient(
    ellipse,
    #72e8ff5c 0 20%,
    #1686a32e 45%,
    transparent 72%
  );
  filter: blur(4px);
  box-shadow: none;
}

@keyframes water-shimmer {
  from {
    opacity: 0.2;
    transform: translateX(-1.5%) scale(1.01);
  }
  to {
    opacity: 0.75;
    transform: translateX(1.5%) scale(1.03);
  }
}

@keyframes wake-pulse {
  from {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(0.7);
  }
  to {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.25);
  }
}

.capture-explosion {
  position: absolute;
  z-index: 12;
  display: grid;
  width: 1px;
  height: 1px;
  place-items: center;
  pointer-events: none;
  animation: capture-flash 1.05s ease-out forwards;
}

.capture-explosion b {
  color: #fff8b0;
  font-size: clamp(38px, 7vw, 70px);
  text-shadow:
    0 0 8px #fff,
    0 0 20px #ffb000,
    0 0 38px #f22;
  animation: capture-core 1.05s ease-out forwards;
}

.capture-explosion i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffcf32;
  box-shadow: 0 0 9px #f40;
  animation: capture-particle 1s ease-out forwards;
}

.capture-explosion i:nth-child(1) {
  --burst-x: 62px;
  --burst-y: -46px;
}
.capture-explosion i:nth-child(2) {
  --burst-x: -58px;
  --burst-y: -38px;
}
.capture-explosion i:nth-child(3) {
  --burst-x: 70px;
  --burst-y: 18px;
}
.capture-explosion i:nth-child(4) {
  --burst-x: -72px;
  --burst-y: 22px;
}
.capture-explosion i:nth-child(5) {
  --burst-x: 24px;
  --burst-y: 66px;
}
.capture-explosion i:nth-child(6) {
  --burst-x: -18px;
  --burst-y: 72px;
}

.capture-explosion.admiral-explosion {
  width: 12%;
  height: 12%;
  border: 2px solid #bff8ff;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #e7fcff99,
    #3fdcf04d 35%,
    transparent 70%
  );
  box-shadow:
    0 0 28px #6eeeffcc,
    inset 0 0 22px #eaffff99;
  transform: translate(-50%, -50%);
  animation: admiral-sink-ripple 2.8s ease-out forwards;
}

.capture-explosion.admiral-explosion b {
  color: #d8fbff;
  text-shadow:
    0 0 12px #fff,
    0 0 28px #3ce8ff;
  animation-duration: 2.8s;
}

.capture-explosion.admiral-explosion i {
  background: #c8faff;
  box-shadow: 0 0 10px #34dff5;
  animation-duration: 2.4s;
}

@keyframes capture-flash {
  0%,
  100% {
    filter: none;
  }
  20% {
    filter: brightness(2);
  }
}

@keyframes capture-core {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  18% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes capture-particle {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.2);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--burst-x), var(--burst-y)) scale(0.1);
  }
}

@keyframes admiral-sink-ripple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.85);
  }
  58% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}
.board {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.piece {
  position: absolute;
  width: 6.2%;
  height: 6.2%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px #000) drop-shadow(0 0 4px #000);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}
.piece.admiral {
  width: 7.2%;
  height: 7.2%;
}
.piece.submarine {
  width: 9%;
  height: 9%;
  opacity: 0.84;
  filter: brightness(0.86) saturate(0.88) hue-rotate(8deg) blur(0.2px)
    drop-shadow(0 5px 4px #001d2c) drop-shadow(0 0 9px #5be7f099);
  mix-blend-mode: normal;
}

.piece.captured-piece {
  width: 4.4%;
  height: 4.4%;
  filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 3px #35dfff66);
}

.piece.captured-piece.submarine {
  width: 5.2%;
  height: 5.2%;
  opacity: 1;
  filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 3px #35dfff66);
}
.top-piece {
  transform: translate(-50%, -50%) rotate(180deg);
}

.cell {
  position: absolute;
  width: 5.88%;
  height: 5.88%;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}
.cell.valid {
  border: 2px solid #59f5a5;
  background: #39e68a38;
  box-shadow:
    inset 0 0 12px #34ef91,
    0 0 9px #34ef91;
}
.cell.selected {
  border: 2px solid #ffe070;
  background: #ffe07030;
}

.legend {
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #ffffff1c;
  background: #071620;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

button {
  padding: 10px 15px;
  border: 1px solid #5c8798;
  background: #0b2632;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:hover {
  border-color: var(--cyan);
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.turn {
  color: var(--gold);
  font-weight: 700;
}
.score {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #ffffff20;
  color: var(--muted);
}
.score b {
  color: var(--cyan);
}

@media (max-width: 1050px) {
  main {
    grid-template-columns: 1fr minmax(500px, 780px);
  }
  .panel.bottom {
    grid-row: 2;
    grid-column: 1;
  }
  .left-rail {
    position: static;
    grid-row: 1;
    grid-column: 1;
  }
  .stage-wrap {
    grid-row: 1 / 3;
    grid-column: 2;
  }
  .panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }
  main {
    display: flex;
    flex-direction: column;
    padding: 12px;
  }
  .panel,
  .left-rail,
  .stage-wrap {
    width: 100%;
  }
  .stage-wrap {
    order: -1;
  }
  .stage {
    min-width: 0;
  }
  .piece {
    width: 7%;
    height: 7%;
  }
  .piece.admiral {
    width: 8%;
  }
  .piece.submarine {
    width: 10%;
    height: 10%;
  }
  .swatches {
    grid-template-columns: repeat(4, 1fr);
  }
}

.room-badge {
  padding: 8px 10px;
  border: 1px solid #ffffff30;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.command-deck {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ffffff20;
}
.command-deck h3 {
  margin: 0 0 12px;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.command-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}
.command-buttons button:last-child {
  grid-column: 1 / -1;
}
.command-buttons .quit-button {
  border-color: #ff6b6b80;
  background: #53191f;
  color: #ffdede;
}
.command-buttons .quit-button:hover {
  background: #74242c;
}
.command-deck input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}
.mini-log {
  max-height: 120px;
  margin-top: 14px;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.mini-log div {
  padding: 5px 0;
  border-bottom: 1px solid #ffffff12;
}
.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #020a10e8;
  backdrop-filter: blur(8px);
}
.dialog-layer[hidden],
.fleet-dialog[hidden] {
  display: none;
}
.fleet-dialog {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #d9ad55aa;
  background: linear-gradient(145deg, #0d2632, #06131b 65%);
  box-shadow: 0 30px 100px #000c;
}
.login-dialog {
  width: min(480px, 96vw);
}
.fleet-dialog h2,
.fleet-dialog h3 {
  color: var(--ink);
}
.fleet-dialog label {
  display: block;
  margin: 16px 0 6px;
}
.fleet-dialog input,
.fleet-dialog select {
  width: 100%;
  padding: 11px;
  border: 1px solid #ffffff35;
  background: #020b12;
  color: var(--ink);
}
.fleet-dialog form > button {
  width: 100%;
  margin-top: 18px;
}
.dialog-kicker {
  color: var(--gold);
  letter-spacing: 0.2em;
}
.dialog-link {
  display: block;
  margin-top: 16px;
  color: var(--cyan);
  text-align: center;
}
.dialog-close {
  float: right;
  margin: 0 0 20px 20px;
}
.form-error {
  min-height: 20px;
  color: #ff9b8d;
}
.departure-notice {
  max-width: 520px;
  text-align: center;
}
.departure-notice h2 {
  margin: 8px 0 12px;
  color: #ff8b8b;
  font:
    500 30px Georgia,
    serif;
}
.departure-notice p:not(.dialog-kicker) {
  color: var(--muted);
  line-height: 1.6;
}
.departure-notice button {
  width: 100%;
  margin-top: 18px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  clear: both;
}
.help-card {
  padding: 16px;
  border: 1px solid #ffffff20;
  background: #031019aa;
}
.help-card h3 {
  margin-top: 0;
  color: var(--gold);
}
.full-log {
  clear: both;
  max-height: 62vh;
  overflow: auto;
}
.full-log article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #ffffff18;
}
.full-log time {
  color: var(--cyan);
  font-size: 12px;
}
.manual-header,
.logbook-header {
  max-width: 650px;
  padding-right: 90px;
}
.manual-header h2,
.logbook-header h2 {
  margin: 4px 0 10px;
  font-size: clamp(30px, 5vw, 52px);
}
.manual-nav {
  position: sticky;
  top: -48px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 8px;
  padding: 12px 0;
  background: #0a202bcc;
  backdrop-filter: blur(8px);
}
.manual-nav a {
  padding: 7px 10px;
  border: 1px solid #ffffff20;
  color: var(--cyan);
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
}
.manual-section {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 30px 0;
  border-top: 1px solid #ffffff20;
}
.section-number {
  color: var(--gold);
  font:
    700 14px Arial,
    sans-serif;
  letter-spacing: 0.15em;
}
.manual-section h3 {
  margin-top: 0;
  font-size: 25px;
}
.manual-callout {
  margin-top: 18px;
  padding: 15px;
  border-left: 3px solid var(--gold);
  background: #d5a34a12;
}
.manual-pieces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.manual-piece {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #ffffff20;
  background: #020b1288;
}
.manual-piece img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px #000b);
}
.manual-piece h4,
.manual-piece p {
  margin: 0;
}
.manual-piece p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.manual-table {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.6fr;
  border: 1px solid #ffffff22;
}
.manual-table > * {
  padding: 10px;
  border-right: 1px solid #ffffff16;
  border-bottom: 1px solid #ffffff16;
}
.manual-table b {
  color: var(--gold);
  text-transform: uppercase;
}
.sandwich-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 440px;
  margin: 18px 0;
  text-align: center;
}
.sandwich-diagram > * {
  padding: 13px;
  border: 1px solid #ffffff30;
}
.sandwich-diagram span {
  background: #22d3ee25;
  color: var(--cyan);
}
.sandwich-diagram b {
  background: #ef444425;
  color: #ffafa5;
}
.manual-board-image {
  display: block;
  width: min(100%, 620px);
  margin: 16px auto;
  border: 1px solid #d5a34a66;
  box-shadow: 0 18px 50px #0008;
}
.terrain-key {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.terrain-key span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.terrain-key i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.key-goal {
  border: 3px solid #fff;
}
.key-route {
  background: var(--cyan);
}
.key-block {
  border-radius: 2px !important;
  background: #80572e;
}
.key-mine {
  background: #111;
  box-shadow: 0 0 0 2px #fff;
}
.logbook-timeline {
  position: relative;
  clear: both;
  margin-top: 28px;
  padding-left: 24px;
}
.logbook-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 41px;
  width: 1px;
  background: linear-gradient(var(--cyan), #ffffff18);
}
.log-entry {
  position: relative;
  display: grid;
  grid-template-columns: 42px 90px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
}
.log-index {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  background: #071923;
  color: var(--cyan);
  font-size: 11px;
}
.log-entry time {
  padding-top: 9px;
  color: var(--gold);
  font-size: 12px;
}
.log-entry p {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #ffffff18;
  background: #020b1277;
}
.empty-log {
  padding: 50px;
  border: 1px dashed #ffffff30;
  color: var(--muted);
  text-align: center;
}
.victory-card {
  position: relative;
  overflow: hidden;
  padding: clamp(12px, 3vw, 34px);
  text-align: center;
}
.victory-card > *:not(.victory-rays) {
  position: relative;
  z-index: 1;
}
.victory-rays {
  position: absolute;
  inset: -45%;
  background: repeating-conic-gradient(
    from 0deg,
    #d5a34a18 0deg 9deg,
    transparent 9deg 20deg
  );
  animation: victory-turn 28s linear infinite;
}
.victory-command {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.victory-card h2 {
  margin: 5px 0 18px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.95;
  text-shadow: 0 8px 30px #000;
}
.victory-card.defeat h2,
.victory-card.defeat h3,
.victory-card.defeat .victory-command {
  color: #ff5b5b;
}
.victory-card.defeat .victory-rays {
  background: repeating-conic-gradient(
    from 0deg,
    #d72f3f20 0deg 9deg,
    transparent 9deg 20deg
  );
}
.victory-card.defeat .victory-reason {
  border-color: #ff4a5c88;
  background: #1b050acc;
}
.victory-card.defeat .victory-reason span {
  color: #ff6674;
}
.victory-fleet {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
  margin: 8px auto 24px;
}
.victory-fleet img {
  width: clamp(80px, 15vw, 135px);
  height: 145px;
  margin: 0 -12px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px #000c);
}
.victory-fleet img:first-child {
  transform: scale(1.18);
}
.victory-reason {
  max-width: 560px;
  margin: 0 auto 22px;
  padding: 16px 20px;
  border: 1px solid #d5a34a66;
  background: #020b12bb;
}
.victory-reason span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.victory-reason p {
  margin: 7px 0 0;
  font-size: 17px;
}
.victory-card button {
  min-width: 240px;
}
.victory-score {
  margin: 0 auto 20px;
  color: var(--gold);
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.victory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.victory-actions .secondary {
  border-color: #ffffff3d;
  background: #07131d;
  color: var(--muted);
}
.victory-log {
  max-width: 620px;
  margin: 0 auto 20px;
  border: 1px solid #ffffff24;
  background: #020b12cc;
  text-align: left;
}
.victory-log summary {
  padding: 13px 16px;
  color: var(--gold);
  cursor: pointer;
  font-weight: 700;
}
.victory-log > div {
  max-height: 220px;
  overflow: auto;
  padding: 0 16px 12px;
}
.victory-log p {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid #ffffff14;
  color: var(--muted);
  font-size: 13px;
}
.victory-log time {
  margin-right: 8px;
  color: #fff;
}
@keyframes victory-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 600px) {
  .help-grid {
    grid-template-columns: 1fr;
  }
  .manual-section {
    grid-template-columns: 1fr;
  }
  .manual-pieces,
  .terrain-key {
    grid-template-columns: 1fr;
  }
  .manual-table {
    grid-template-columns: 1fr;
  }
  .log-entry {
    grid-template-columns: 42px 1fr;
  }
  .log-entry time {
    display: none;
  }
}
