:root {
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    sans-serif;
  color: #ede6d5;
  background: #152724;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 0, #41534a, #162722 70%);
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: #e4d8b8;
  color: #25372f;
  border: 1px solid #baad8b;
  border-radius: 5px;
  padding: 9px 13px;
  font-weight: 650;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: #d9ac52;
  color: #262418;
  border-color: #f2cb7e;
}
.muted {
  color: #b8c2b6;
  font-size: 13px;
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
a {
  color: #edce8b;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #8d957452;
  gap: 12px;
}
header strong {
  letter-spacing: 0.05em;
}
.eyebrow {
  letter-spacing: 0.2em;
  color: #dcc889;
  font-size: 12px;
}
.lobby {
  max-width: 1100px;
  margin: 5vh auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding: 25px;
}
.lobby h1 {
  font-size: 40px;
  margin: 12px 0;
}
.cover {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px #0006);
}
.entry {
  align-self: center;
  background: #243d35;
  border: 1px solid #65735c;
  padding: 24px;
  border-radius: 10px;
}
.entry label {
  display: block;
  margin: 14px 0;
}
.entry input,
.entry select {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #7d876e;
  background: #f5edd9;
  border-radius: 4px;
  color: #24332d;
  margin-top: 6px;
}
.row,
.seats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.seat {
  padding: 10px;
  border: 1px solid #687d67;
  flex: 1;
}
.seat b {
  display: block;
}
.match {
  max-width: 1600px;
  margin: auto;
  padding: 12px 18px;
}
.scorebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.score {
  padding: 8px 14px;
  border-left: 4px solid #83ad67;
}
.score.axis {
  border-color: #90a4b3;
}
.score.active {
  background: #e5d4a41f;
}
.score b {
  font-size: 21px;
}
.score small {
  display: block;
  color: #bcc4b6;
}
.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 14px;
  align-items: start;
}
.board-layout > div {
  min-width: 0;
}
.map-scroll {
  overflow: auto;
  background: #544c38;
  border: 8px solid #4e4936;
  border-radius: 5px;
  box-shadow: 0 12px 30px #0005;
}
.map {
  display: block;
  width: 100%;
  min-width: 560px;
  background: #9aab73;
}
.map .hex {
  fill: #b1bc88;
  stroke: #6f805b;
  stroke-width: 1;
}
.map .beach {
  fill: #dfcd9a;
}
.map .ocean {
  fill: #69a3b4;
}
.map .hex-target {
  fill: #e8c45555;
  stroke: #ffe089;
  stroke-width: 3;
  cursor: pointer;
}
.map .hex-selected {
  fill: #ffe58b44;
  stroke: #f9d777;
  stroke-width: 4;
}
.map .coord {
  font-size: 9px;
  fill: #23352a;
  opacity: 0.55;
  pointer-events: none;
}
.map image {
  pointer-events: none;
}
.map .unit {
  cursor: pointer;
  outline: none;
}
.map .unit-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 3;
}
.map .unit.selected .unit-hit {
  stroke: #ffe186;
  fill: #f5d57022;
}
.map .unit.ordered .unit-hit {
  stroke: #eef8d7;
  stroke-dasharray: 3 3;
}
.map .unit.target .unit-hit {
  stroke: #e76648;
  fill: #e7664822;
}
.map .figure {
  pointer-events: none;
  transition: transform 0.15s ease;
}
.map .miniature {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.map .miniature img {
  position: absolute;
  max-width: none;
}
.map .figure-shadow {
  fill: #152010;
  opacity: 0.3;
  filter: blur(1.1px);
}
.map .unit:focus-visible .unit-hit {
  stroke: #ffe186;
  fill: #f5d57022;
}
@media (hover: hover) {
  .map .unit:hover .figure {
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .map .figure {
    transition: none;
  }
}
.map .strength {
  pointer-events: none;
}
.map .strength circle {
  fill: #34452b;
  stroke: #e8e1c2;
  stroke-width: 1.2;
}
.map .strength.axis circle {
  fill: #424d5c;
}
.map .figures {
  font-size: 11px;
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
}
.map .special {
  font-size: 12px;
  fill: #ffe18b;
  stroke: #233b28;
  stroke-width: 1;
  paint-order: stroke;
}
.map .impassable {
  fill: #542826bb;
  font-size: 22px;
  pointer-events: none;
}
.map .section {
  stroke: #a7463c;
  stroke-width: 2;
  stroke-dasharray: 7 5;
  opacity: 0.55;
  pointer-events: none;
}
.map .objective {
  fill: #e9c65c;
  stroke: #8a6b29;
  stroke-width: 2;
}
.action-panel {
  padding: 16px;
  background: #223b32;
  border: 1px solid #657561;
  border-radius: 7px;
  display: grid;
  gap: 10px;
}
.action-panel h2 {
  font-size: 19px;
}
.action-panel p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}
.action-panel button {
  width: 100%;
}
.action-panel select,
.action-panel input {
  max-width: 100%;
  padding: 7px;
}
.action-panel .row button {
  width: auto;
}
.selection {
  padding: 10px;
  background: #10281e;
  border-left: 3px solid #dab761;
  font-size: 13px;
}
.hand {
  margin-top: 14px;
}
.hand h3 {
  font-size: 14px;
  color: #d8d0b8;
}
.cards {
  display: flex;
  gap: 9px;
  overflow: auto;
  padding: 4px 2px 12px;
}
.card {
  flex: 0 0 126px;
  background: #efe5cc;
  color: #26342c;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 7px #0004;
}
.card img {
  width: 100%;
  height: 152px;
  object-fit: cover;
  object-position: top;
}
.card button {
  padding: 6px;
  width: 100%;
  border-radius: 0;
  border: 0;
  background: #ddd0a9;
  font-size: 12px;
}
.card strong {
  display: block;
  padding: 6px;
  font-size: 12px;
}
.card.selected {
  outline: 3px solid #f8d783;
}
.card-help {
  font-size: 13px;
  line-height: 1.7;
  min-height: 22px;
  color: #dccfae;
}
.journal {
  margin: 14px 0;
  border-top: 1px solid #546552;
  padding-top: 12px;
  font-size: 12px;
  color: #bbc6b7;
}
.journal ol {
  padding-left: 22px;
  max-height: 130px;
  overflow: auto;
}
.dice {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.die {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #ece4d0;
  color: #23382c;
  border: 2px solid #a6ac8e;
  border-radius: 6px;
  font-size: 19px;
}
.steps {
  font-size: 12px;
  color: #aabdac;
  line-height: 1.6;
  margin-bottom: 8px;
}
.turn-label {
  color: #f0d383;
}
.counter-note {
  font-size: 11px;
  color: #bac3ac;
  margin-top: 7px;
}
#toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #182c24;
  color: #fff;
  padding: 12px 18px;
  border: 1px solid #d9c589;
  border-radius: 7px;
  z-index: 50;
  max-width: 90%;
  display: none;
}
#toast.show {
  display: block;
}
dialog {
  background: #f3ead4;
  color: #28352d;
  border: 1px solid #9d976f;
  border-radius: 9px;
  max-width: min(650px, 94vw);
  max-height: 90vh;
  padding: 24px;
  overflow: auto;
}
dialog::backdrop {
  background: #000a;
}
dialog img {
  max-width: 100%;
  max-height: 62vh;
  display: block;
  margin: auto;
}
dialog a {
  color: #375b3d;
}
dialog p {
  line-height: 1.7;
}
dialog .close {
  float: right;
}
details p {
  margin-top: 12px;
}
.preview-banner {
  background: #d7b975;
  color: #283326;
  padding: 7px;
  text-align: center;
  font-size: 13px;
}
.drop-list {
  display: grid;
  gap: 8px;
}
.drop-list label {
  font-size: 12px;
}
.drop-list input {
  width: 100%;
  display: block;
}
.no-action {
  color: #bdc8b7;
}
.mobile-short {
  display: none;
}
@media (max-width: 850px) {
  .lobby {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 auto;
    max-width: 650px;
  }
  .lobby .cover {
    max-height: 270px;
  }
  .lobby h1 {
    font-size: 30px;
  }
  .board-layout {
    grid-template-columns: 1fr;
  }
  .action-panel {
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -8px 20px #0005;
    gap: 6px;
    max-height: 42vh;
    overflow: auto;
  }
  .action-panel h2 {
    font-size: 16px;
  }
  .action-panel p {
    font-size: 12px;
  }
  .action-panel .primary {
    padding: 10px;
  }
  .action-panel .row {
    display: flex;
  }
  .match {
    padding: 9px;
  }
  .scorebar {
    gap: 5px;
  }
  .score {
    padding: 5px 8px;
    font-size: 12px;
  }
  .score b {
    font-size: 17px;
  }
  .map-scroll {
    border-width: 4px;
  }
  .map {
    min-width: 590px;
  }
  .mobile-short {
    display: inline;
  }
  .desktop-long {
    display: none;
  }
  header {
    padding: 10px;
  }
  .hand {
    margin: 12px 0;
  }
  .card {
    flex-basis: 108px;
  }
  .card img {
    height: 128px;
  }
  .counter-note {
    font-size: 10px;
  }
}

@media (max-width: 850px) {
  .action-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 36vh;
  }
  .match {
    padding-bottom: 290px;
  }
  .action-panel .steps {
    display: none;
  }
  .action-panel .dice {
    position: absolute;
    right: 12px;
    top: 12px;
  }
  .action-panel .die {
    width: 23px;
    height: 23px;
    font-size: 14px;
  }
  .action-panel h2 {
    padding-right: 125px;
  }
}
