:root {
  color-scheme: light;
  --paper: #faf8f5;
  --surface: #fff;
  --ink: #292b26;
  --muted: #63665c;
  --line: #deded4;
  --green: #1f634d;
  --green-light: #e8f0e9;
  --ochre: #b45309;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.5 "Avenir Next",
    "Avenir",
    "Helvetica Neue",
    sans-serif;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
}
button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
button:hover {
  background: #f0efe8;
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
svg:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
}
.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 650;
}
.primary:hover {
  background: #194d3c;
}
.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
header {
  max-width: 1120px;
  margin: auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 750;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.brand span {
  color: var(--green);
}
main {
  max-width: 1120px;
  padding: 24px;
  margin: auto;
  min-height: 65vh;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
h2 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 12px;
}
p {
  margin-bottom: 16px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
#online-entry {
  max-width: 800px;
  margin: 16px auto 32px;
}
#online-entry > p {
  max-width: 580px;
}
.name-label {
  max-width: 360px;
}
.entry-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0;
}
.entry-options > section + section {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.entry-options button {
  width: 100%;
  margin-bottom: 12px;
}
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#online-code {
  text-transform: uppercase;
  letter-spacing: 2px;
}
#online-message,
#online-storage-warning {
  padding: 12px 16px;
  border-left: 3px solid var(--ochre);
  background: #fff2df;
  overflow-wrap: anywhere;
}
#online-connection {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
#online-connection[data-offline="true"] {
  color: #8a3805;
}
#online-lobby {
  max-width: 620px;
}
#online-invite {
  font-weight: 400;
  letter-spacing: 0;
}
#online-copy-status {
  margin-top: 8px;
}
.room-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.room-bar p {
  margin: 0;
}
#online-room-code {
  display: inline-block;
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--green);
  vertical-align: middle;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.round-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.round-head h1 {
  overflow-wrap: anywhere;
}
.round-head .muted {
  margin-bottom: 6px;
}
#online-clock {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  white-space: nowrap;
  padding-top: 4px;
}
#online-clock[data-urgent="true"] {
  color: #983d15;
  font-weight: 700;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}
.map-panel {
  min-width: 0;
}
#online-map {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  aspect-ratio: 2/3;
  border: 1px solid var(--line);
  background: #f1f2ea;
  touch-action: pan-y;
}
#online-map[aria-disabled="false"] {
  cursor: crosshair;
}
#online-base-map path {
  fill: #fffdf7;
  stroke: #a9ada1;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
#online-grid line {
  stroke: #748477;
  stroke-opacity: 0.42;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
#online-map-key {
  margin: 8px 0;
}
.risk-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.risk-options button {
  padding: 8px 2px;
}
.risk-options strong,
.risk-options span {
  display: block;
}
.risk-options strong {
  font-size: 22px;
}
.risk-options span {
  font-size: 12px;
}
.risk-options button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
#online-submit {
  width: 100%;
  margin-bottom: 12px;
}
#online-selection-status {
  min-height: 48px;
}
.score-list,
.result-list,
.plain-list,
.history-list {
  padding: 0;
  list-style: none;
}
.score-list li,
.result-list li {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.score-list li span,
.result-list li span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.score-list strong,
.result-list strong {
  white-space: nowrap;
}
.result-list li span span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
#online-scoreboard {
  margin-top: 24px;
}
.roster {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
#online-players {
  max-width: 680px;
}
#online-players li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
#online-players li > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
#online-players button {
  font-size: 13px;
  padding: 8px;
}
#online-submitted-names {
  font-size: 14px;
  color: var(--muted);
}
#online-finish {
  max-width: 720px;
}
#online-final-scores {
  font-size: 20px;
}
.history-list > li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.history-list p {
  margin: 6px 0;
}
.history-list ul {
  padding-left: 20px;
}
#online-map-notice {
  font-size: 14px;
  margin-top: 16px;
  color: var(--muted);
}
footer {
  max-width: 1120px;
  padding: 20px 24px;
  margin: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer p {
  margin-bottom: 8px;
}
dialog {
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(25, 35, 26, 0.42);
}
@media (max-width: 720px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  #online-map {
    max-height: 55vh;
  }
  .controls {
    max-width: 520px;
    width: 100%;
    margin: auto;
  }
  .entry-options {
    gap: 20px;
  }
  .entry-options > section + section {
    padding-left: 20px;
  }
}
@media (max-width: 480px) {
  header {
    padding: 14px 16px;
  }
  .brand {
    font-size: 17px;
  }
  header .quiet {
    padding: 8px 4px;
    font-size: 13px;
  }
  main {
    padding: 20px 16px;
  }
  h1 {
    font-size: 28px;
  }
  .entry-options {
    display: block;
    margin-top: 20px;
  }
  .entry-options > section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
    margin-top: 12px;
  }
  .name-label {
    max-width: none;
  }
  #online-entry {
    margin-top: 0;
  }
  .room-bar {
    gap: 8px;
  }
  #online-room-code {
    font-size: 24px;
    letter-spacing: 2px;
  }
  .room-bar .quiet {
    padding: 8px;
    font-size: 13px;
  }
  footer {
    padding: 20px 16px;
  }
  .roster {
    margin-top: 20px;
  }
}
