:root {
  --bg: #1b1516;
  --panel: #251d1f;
  --line: #3d3133;
  --text: #cebbae;
  --muted: #8f7c76;
  --gold: #fff3b2;
  --gold2: #d1b76a;
  --land: #cebbae;
  --water: #483b3d;
  --fort: #fff3b2;
  --bhato: #a6d98c;
  --library: #ffd873;
  --scaal: #c79bff;
  --gurb: #ff9f5a;
  --ihar: #6fd3ff;
  --wilda: #f08fb8;
  /* Translucent panels floating on the map. */
  --glass: rgba(20, 15, 16, .72);
  --glass-solid: rgba(24, 18, 19, .92);
  --glass-edge: rgba(209, 183, 106, .3);
  --glass-blur: blur(10px) saturate(1.2);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
code {
  font-size: 12px;
  background: var(--panel);
  padding: 1px 4px;
  border-radius: 3px;
}
.muted {
  color: var(--muted);
}
h1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  margin: 0 8px 0 0;
  color: var(--gold);
  letter-spacing: .02em;
}
h1 .logo {
  image-rendering: pixelated;
}
h2 {
  font-size: 15px;
  margin: 0;
  color: var(--gold);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.button {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--gold2);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
  background: #2e2426;
}
.button:hover,
.button:focus-within {
  background: #3a2e30;
}
.button.subtle {
  border-color: var(--line);
  color: var(--text);
  background: none;
}
select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
}
#status {
  color: var(--muted);
}
#status.error,
.art-status.error,
.live-status.error {
  color: #ff8a80;
}
.sharing {
  margin: 12px 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.sharing summary {
  cursor: pointer;
  color: var(--gold);
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.library-name,
.join-code,
.share-link {
  flex: 0 1 260px;
  min-width: 0;
  padding: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.join-code {
  flex-basis: 220px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
#join-form {
  margin-top: 8px;
}
@media (pointer: coarse) {
  /* At 16px iOS doesn't zoom into a field when it gets focus. */
  .library-name,
  .join-code {
    font-size: 16px;
  }
}
.pair-code {
  margin: 4px 0;
  font: 600 26px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .12em;
  color: var(--gold);
  user-select: all;
}
.share-link {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.world-list {
  padding-left: 20px;
}
.world-list li {
  margin: 12px 0;
}
.sharing h3 {
  margin: 12px 0 6px;
  font-size: 14px;
  color: var(--gold2);
}
.tag {
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}
/* A letter badge after a world's name, explained by its tooltip and the text beside it. */
.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  text-decoration: none;
  vertical-align: 1px;
  cursor: help;
}
.badge-share {
  background: #7fb8ff;
  color: #10131a;
}
/* Modal questions (src/dialog.ts). The content fills the dialog, so a click on the dialog itself is a click on the backdrop. */
.dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--gold2);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.dialog::backdrop {
  background: rgba(10, 7, 8, .7);
}
.dialog-content {
  padding: 16px 18px;
}
.dialog h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--gold);
}
.dialog p {
  margin: 0 0 10px;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
.dialog .button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* A question with several ways to go: each is a full-width button with a line saying what it does. */
.dialog-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.button.choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  text-align: left;
}
.choice-label {
  font-weight: 600;
}
.choice-detail {
  color: var(--text);
  font-size: 12px;
}
/* A question whose yes deletes or drops something: its button is red, and focus starts on Cancel. */
.dialog.danger {
  border-color: #c96a5f;
}
.button.danger {
  border-color: #e0786b;
  background: color-mix(in srgb, #e0786b 18%, transparent);
  color: #ffc9c0;
}
.button.danger:hover {
  background: color-mix(in srgb, #e0786b 30%, transparent);
}
.viewing {
  padding: 6px 0;
  color: var(--gold);
}
.share-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--gold2);
  border-radius: 4px;
}
.share-card h3 {
  flex-basis: 100%;
  margin: 0;
}
.share-card > div {
  flex: 1 1 240px;
  min-width: 0;
}
.share-card p {
  margin-top: 0;
}
.qr {
  width: 200px;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.warning {
  color: #ffb74d;
}
body.loaded main > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}
.button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.live-status {
  margin: 8px 16px;
  font-size: 12px;
}
.freshness {
  font-size: 12px;
}
.wiki {
  margin-left: 8px;
  font-size: 12px;
}
.inventory-panel,
.journal-panel,
.inspection {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.inventory-panel summary,
.journal-panel summary {
  cursor: pointer;
  color: var(--gold2);
}
.inspection {
  max-width: 78vh;
}
.inspection h3 {
  margin: 0;
  color: var(--gold);
}
.inspect-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inspect-head > div {
  min-width: 0;
}
.inspect-head p {
  margin: 4px 0 0;
}
/* Wiki and game pictures are pixel art: kept crisp, on a soft light ground so dark sprites read on the dark card. */
.portrait {
  flex: none;
  box-sizing: content-box;
  padding: 6px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 8px;
  background: radial-gradient(closest-side, rgba(255, 243, 178, .16), rgba(255, 243, 178, .04));
}
.item-icon {
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
}
.inventory-items {
  padding-left: 18px;
}
.inventory-items li {
  margin: 5px 0;
}
.inventory-items .wiki {
  margin-left: 0;
  font-size: inherit;
}
/* An item's durability, fuel and wetness; what is nearly used up stands out. */
.item-condition .low {
  color: #ffb74d;
}
.inspection details .wiki {
  margin-left: 0;
}

/* Hit-point grids (health.ts): one square per hit point, as the game draws them. */
.hp,
.hp-legend {
  --hp-cell: 18px;
  --hp-flesh: #c9574d;
  --hp-poison: #8fd14f;
  --hp-bleed: #ff6b5e;
}
.hp {
  margin: 8px 0;
}
.hp-grid {
  display: grid;
  gap: 2px;
  width: max-content;
  /* Room for the poison and bleed badges, which stick out past the edge cells' corners. */
  padding: 4px;
}
.hp-cell {
  position: relative;
  display: inline-block;
  width: var(--hp-cell);
  height: var(--hp-cell);
  border-radius: 3px;
  vertical-align: middle;
}
.hp-cell.healthy {
  background: var(--hp-flesh);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.hp-cell.lost {
  border: 1px dashed var(--muted);
}
.hp-cell.burned {
  background: repeating-linear-gradient(135deg, #2b1f1a 0 3px, #5a2d16 3px 5px);
  box-shadow: inset 0 0 0 1px #e07a2f;
}
.hp-cell.none {
  visibility: hidden;
}
.hp-cell.armor1 {
  --hp-shield-size: 67%;
  --hp-shield-fill: #ae7846;
  --hp-shield-edge: #e7b57d;
}
.hp-cell.armor2 {
  --hp-shield-size: 81%;
  --hp-shield-fill: #b8c7d4;
  --hp-shield-edge: #eef6fc;
}
.hp-cell.armor3 {
  --hp-shield-size: 95%;
  --hp-shield-fill: #f7dc75;
  --hp-shield-edge: #fff3b2;
}
.hp-shield {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: var(--hp-shield-size);
  height: var(--hp-shield-size);
  transform: translate(-50%, -50%);
  fill: var(--hp-shield-fill);
  stroke: #120e0f;
  stroke-width: 1;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  pointer-events: none;
}
.hp-shield path {
  vector-effect: non-scaling-stroke;
}
.hp-shield-rim {
  fill: none;
  stroke: var(--hp-shield-edge);
  stroke-width: .75;
  stroke-linecap: round;
}
.hp-cell.poisoned {
  outline: 1px solid var(--hp-poison);
}
.hp-cell.bleeding {
  outline: 1px solid var(--hp-bleed);
}
.hp-poison,
.hp-bleed {
  position: absolute;
  z-index: 1;
  padding: 0 2px;
  border-radius: 3px;
  font: 600 9px/11px system-ui, sans-serif;
  color: #120e0f;
  white-space: nowrap;
}
.hp-poison {
  right: -3px;
  bottom: -3px;
  background: var(--hp-poison);
}
.hp-bleed {
  left: -3px;
  top: -3px;
  display: inline-flex;
  align-items: center;
  background: var(--hp-bleed);
}
/* The way a bleed spreads: a heavy chevron that stays legible at badge size. */
.hp-chevron {
  width: 9px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hp figcaption {
  margin-top: 4px;
  font-size: 12px;
}
.hp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.hp-legend li {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hp-legend .hp-cell {
  --hp-cell: 14px;
  /* Room for the sample badges, which stick out past the swatch's corners. */
  margin: 0 3px;
}

/* Coin amounts (coins.ts). */
.coins {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  font-variant-numeric: tabular-nums;
}
.coin {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.coin-icon {
  image-rendering: pixelated;
}

/* Creature inspections (creature.ts): attack patterns coloured by damage class, the Melee/Ranged toggle and the stats. */
.creature-section {
  margin: 8px 0;
}
.creature-section > summary {
  cursor: pointer;
  color: var(--gold2);
}
.creature-note {
  margin: 2px 0 4px;
  font-size: 12px;
}
.dmg-sharp {
  --dmg: #ff6b5e;
}
.dmg-fire {
  --dmg: #ff9a3c;
}
.dmg-blunt {
  --dmg: #e8cf5a;
}
.dmg-poison {
  --dmg: #8fd14f;
}
.dmg-piercing {
  --dmg: #5fd4e6;
}
.dmg-force {
  --dmg: #b48cff;
}
.dmg-leeching {
  --dmg: #e0569b;
}
.dmg-weak,
.dmg-none {
  --dmg: #b5a7a0;
}
.dmg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px 0 6px;
  border: 1px solid var(--dmg);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: var(--dmg);
  background: color-mix(in srgb, var(--dmg) 14%, transparent);
  cursor: help;
}
.dmg::before,
.dmg-dot {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dmg);
}
.dmg-dot {
  display: inline-block;
  margin-right: 6px;
  vertical-align: 1px;
}
.attack-class {
  margin: 4px 0;
  font-size: 12px;
}
.attack-toggle {
  display: inline-flex;
  margin: 2px 0 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.attack-mode {
  padding: 3px 10px;
  border: 0;
  background: none;
  font-size: 12px;
  cursor: pointer;
}
.attack-mode + .attack-mode {
  border-left: 1px solid var(--line);
}
.attack-mode:hover,
.attack-mode:focus-visible {
  background: rgba(255, 255, 255, .08);
}
.attack-mode[aria-pressed="true"] {
  color: var(--gold);
  background: color-mix(in srgb, var(--dmg) 16%, transparent);
  box-shadow: inset 0 -2px 0 var(--dmg);
}
.attack-mode[aria-pressed="false"] .dmg-dot {
  opacity: .45;
}
.atk {
  --atk-cell: 26px;
  margin: 6px 0;
}
.atk-grid {
  display: grid;
  gap: 2px;
  width: max-content;
}
.atk-cell {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--atk-cell);
  height: var(--atk-cell);
  border: 1px dashed rgba(255, 255, 255, .08);
  border-radius: 3px;
  font: 600 11px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.atk-cell.hit {
  border: 1px solid var(--dmg);
  background: color-mix(in srgb, var(--dmg) 22%, var(--bg));
  color: var(--gold);
}
.atk figcaption {
  margin-top: 4px;
  font-size: 12px;
}
.creature-stats {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 10px;
  margin: 4px 0;
  font-size: 13px;
}
.creature-stats dt {
  color: var(--muted);
}
.creature-stats dd {
  margin: 0;
}
.creature-links .wiki:first-child {
  margin-left: 0;
}

/* A merchant's wares (merchants.ts): icon and name on the left, the price of one on the right. */
.wares {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.wares li {
  display: flex;
  align-items: center;
  gap: 4px 12px;
  padding: 3px 0;
  border-top: 1px solid var(--line);
}
.wares li:first-child {
  border-top: 0;
}
.ware-name {
  flex: 1;
  min-width: 0;
}
.wares .wiki,
.trade-guides .wiki {
  margin-left: 0;
  font-size: inherit;
}
.ware-price {
  flex: none;
  justify-content: flex-end;
  color: var(--gold2);
  white-space: nowrap;
}
.trade-rules {
  margin: 8px 0;
  padding-left: 18px;
}
.trade-rules li {
  margin: 4px 0;
}
.trade-guides {
  margin: 6px 0 0;
}

/* The player inspection (player.ts): wellbeing and its four stats, conditions, level and the coin roll-up. */
.vitals {
  list-style: none;
  margin: 6px 0;
  padding: 0;
}
/* Stat colours follow the game's circle bar (global.c_health, c_focus, c_energy, c_hunger), lightened for the dark card. */
.vital {
  --c: var(--gold2);
  margin: 0 0 8px;
}
.vital.wellbeing {
  --c: #e0457f;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.vital.focus {
  --c: #a6a2c4;
}
.vital.stamina {
  --c: #5fae4f;
}
.vital.satiation {
  --c: #d9a03a;
}
.vital.extra {
  margin-top: -2px;
}
.vital-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.vital-name {
  font-weight: 600;
}
.vital-value {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.vital-change {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vital-bar {
  position: relative;
  display: block;
  height: 6px;
  margin: 3px 0 2px;
  border-radius: 3px;
  background: var(--line);
}
.vital-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--c);
}
/* Thresholds: 20% and 50% for the stats; 33% (dangerously low) and 50% (resting heals hit points) for wellbeing. */
.vital-tick {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: rgba(255, 243, 178, .45);
}
/* Warmth is a scale from freezing (global.c_warmth_low) to overheating (c_warmth_high), comfortable from 40% to 60%. */
.vital-bar.warmth {
  height: 8px;
  background: linear-gradient(90deg, #1fd6e0, #4f7f86 40%, #7d6f66 50%, #a05c45 60%, #ff5020);
}
.vital-band {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 40%;
  width: 20%;
  border: 1px solid rgba(255, 243, 178, .75);
  border-radius: 3px;
}
.vital-needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px #120e0f;
}
.vital-note {
  font-size: 12px;
  color: var(--muted);
}
.vital-note.gain,
.vital-change.gain {
  color: #a6d98c;
}
.vital-note.loss,
.vital-change.loss {
  color: #ff8a80;
}
.vital-rules {
  margin: 4px 0;
  font-size: 12px;
}
.vital-rules summary {
  cursor: pointer;
  color: var(--gold2);
}
.vital-rules ul {
  margin: 4px 0;
  padding-left: 18px;
}
.vital-rules p {
  margin: 4px 0;
}
.new-hp {
  color: var(--gold);
}
.conditions {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  font-size: 13px;
}
.condition {
  position: relative;
  margin: 3px 0;
  padding-left: 14px;
}
.condition::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold2);
}
.condition.good::before {
  background: #a6d98c;
}
.condition.bad::before {
  background: #ff8a80;
}
.condition-effect {
  color: var(--muted);
}
.player-level {
  margin: 6px 0;
  font-size: 13px;
}
/* The journal (journal.ts): its newest entry, then the earlier ones under a collapsible list. */
.journal-latest .journal-entry {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 2px solid var(--gold2);
  background: rgba(255, 243, 178, .04);
}
.journal-entry-head {
  color: var(--gold2);
}
.journal-entry-head strong {
  color: var(--gold);
}
.journal-text {
  margin: 2px 0 0;
}
.journal-note {
  margin: 6px 0;
  font-size: 13px;
}
.journal-earlier {
  margin: 6px 0;
}
.journal-earlier summary {
  cursor: pointer;
  color: var(--gold2);
}
.journal-entries {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  font-size: 13px;
}
.journal-entries .journal-entry {
  margin: 8px 0;
}
.journal-about {
  margin: 6px 0 0;
  font-size: 12px;
}
.journal-about .wiki {
  margin-left: 0;
}
.player-armor {
  margin: 8px 0 4px;
}
.armor-pieces {
  margin: 4px 0;
  padding-left: 18px;
  font-size: 13px;
}
/* An E on worn or held items (player.ts equippedBadge); dashed for the weapon set not in hand. */
.equip-badge {
  display: inline-block;
  min-width: 15px;
  margin-right: 5px;
  padding: 0 2px;
  border: 1px solid var(--gold2);
  border-radius: 3px;
  font: 700 10px/13px system-ui, sans-serif;
  text-align: center;
  color: var(--gold);
  vertical-align: middle;
  cursor: help;
}
.equip-badge.off {
  border-style: dashed;
  color: var(--muted);
}

/* Coin roll-up (player.ts coinRollup): every coin carried, with a True / Minimum coins switch. */
div.coin-rollup {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 243, 178, .03);
}
.coin-rollup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.coin-mode {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.coin-mode button {
  padding: 2px 8px;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.coin-mode button + button {
  border-left: 1px solid var(--line);
}
.coin-mode button:hover {
  color: var(--text);
}
.coin-mode button[aria-pressed="true"] {
  background: var(--gold2);
  color: #1b1516;
  font-weight: 600;
}
.coin-mode button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.coin-rollup-amount {
  margin-top: 6px;
  font-size: 15px;
}
.coin-rollup-note {
  margin: 4px 0 0;
  font-size: 12px;
}
@media (pointer: coarse) {
  .coin-mode button {
    min-height: 34px;
  }
}
@media (max-width: 600px) {
  .coin-mode button {
    min-height: 44px;
  }
}

.intro {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 16px;
}
.drop-hint {
  display: none;
  position: fixed;
  inset: 12px;
  border: 2px dashed var(--gold2);
  border-radius: 12px;
  background: rgba(27, 21, 22, .85);
  color: var(--gold);
  font-size: 20px;
  place-items: center;
  pointer-events: none;
}
body.dragging .drop-hint {
  display: grid;
}

body.loaded main {
  display: grid;
  grid-template-columns: minmax(360px, 540px) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 16px 32px;
  align-items: start;
}
@media (max-width: 980px) {
  body.loaded main {
    grid-template-columns: 1fr;
  }
  @media (max-width: 600px) {
    .top {
      padding: 10px;
    }
    body.loaded main {
      padding: 10px 10px 24px;
      gap: 14px;
    }
    .intro {
      margin: 24px auto;
      overflow-wrap: anywhere;
    }
    .sharing {
      margin: 10px;
    }
    .button,
    select,
    .zoom,
    .chip,
    .where,
    .link,
    .plain,
    summary {
      min-height: 44px;
    }
    .button,
    summary {
      align-content: center;
    }
    .zoom {
      min-width: 44px;
    }
    .label {
      font-size: 9px;
      padding: 8px 2px 2px;
    }
    .pill {
      font-size: 9px;
      line-height: 11px;
      padding: 0 2px;
      white-space: normal;
    }
    body .mapbox {
      width: 100%;
    }
    body .inspection,
    body .legend,
    body .lists {
      max-width: 100%;
    }
    input,
    select {
      font-size: 16px;
    }
  }
}

.summary {
  margin: 0 0 10px;
}

/* Time and weather (skyview.ts) */
.sky {
  margin: -4px 0 10px;
}
.sky-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 3px;
}
.sky-icon {
  flex: none;
  width: 20px;
  height: 20px;
}
.sky-row > .sky-icon {
  margin-top: -.5px;
}
.sky-temp {
  white-space: nowrap;
}
.sky-temp .sky-icon {
  width: 16px;
  height: 16px;
  margin-right: 2px;
  vertical-align: -3px;
}
.sky-note {
  margin: 0 0 0 26px;
  font-size: 12px;
}
/* Rain balance −1…1: dry spell (left) to wet spell (right), the mark showing where it is and which way it moves. */
.balance-meter {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 6px;
  margin: 0 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f5a430, #5b4c4e 50%, #42bfe8);
  vertical-align: middle;
}
.balance-mark {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 12px;
  margin-left: -2px;
  border: 1px solid #120e0f;
  border-radius: 2px;
  background: var(--gold);
}
.balance-mark.up::after,
.balance-mark.down::after {
  position: absolute;
  top: 1px;
  color: var(--gold);
  font-size: 9px;
  line-height: 8px;
}
.balance-mark.up::after {
  content: "▸";
  left: 4px;
}
.balance-mark.down::after {
  content: "◂";
  right: 4px;
}
/* The clock and weather at a glance: only on the full-screen map, where the world summary is out of sight. */
.sky-chip {
  display: none;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
body.map-full .sky-chip {
  display: inline-flex;
}

/* World grid */
.grid {
  display: grid;
  grid-template-columns: 16px repeat(5, minmax(0, 1fr));
  gap: 3px;
}
.axis {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  align-self: center;
}
.cell {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #231b1c;
  cursor: pointer;
  overflow: hidden;
}
.cell:hover {
  border-color: var(--gold2);
}
.cell.sel {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.cell:focus-visible {
  outline: 2px solid var(--gold);
}
.thumb {
  position: absolute;
  inset: 0;
}
.thumb img,
.thumb canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.thumb canvas {
  image-rendering: auto;
}
.mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

/* The version switch (versionview.ts); its buttons are styled with .coin-mode. */
.version-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.version-note.chosen {
  color: var(--gold);
}
.blank {
  position: absolute;
  inset: 0;
  background: #2c2325;
}
.blank .land {
  position: absolute;
  background: #54443f;
  border-radius: 10%;
}
.label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 4px 2px;
  font-size: 11px;
  line-height: 1.15;
  text-align: left;
  background: linear-gradient(transparent, rgba(12, 9, 10, .85) 45%);
}
.label b {
  color: var(--gold);
}
.cell:not(.explored) .label {
  color: #b6a39a;
}
.pills {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.pill {
  font-size: 10px;
  line-height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(12, 9, 10, .8);
  border: 1px solid;
  white-space: nowrap;
}
.pill.zone {
  border-style: dashed;
}
.pill.maybe {
  border-style: dotted;
}
/* Grid thumbnail: the person's torso centre (~72% down the 18-unit viewBox) sits on the player's spot. */
.you-dot {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 19px;
  transform: translate(-50%, -69%);
  pointer-events: auto;
}
.you-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dot {
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #1b1516;
}
.region {
  position: absolute;
  z-index: 2;
  border: 1px dashed;
  border-radius: 2px;
}

.m-fort {
  --c: var(--fort);
}
.m-bhato {
  --c: var(--bhato);
}
.m-library {
  --c: var(--library);
}
.m-scaal {
  --c: var(--scaal);
}
.m-gurb {
  --c: var(--gurb);
}
.m-ihar {
  --c: var(--ihar);
}
.m-wilda {
  --c: var(--wilda);
}
.pill[class*="m-"] {
  border-color: var(--c);
  color: var(--c);
}
.dot[class*="m-"] {
  background: var(--c);
}
.region[class*="m-"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 18%, transparent);
}

/* Landmark list */
.landmarks {
  margin-top: 16px;
}
.landmarks ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}
.landmarks li {
  display: grid;
  grid-template-columns: 12px auto 1fr;
  gap: 0 8px;
  align-items: baseline;
}
.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c, var(--gold));
}
.landmarks .who {
  color: var(--c);
  font-weight: 600;
}
.landmarks .note {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 12px;
}
.landmarks li.zone .sw {
  background: none;
  border: 1px dashed var(--c);
}
.landmarks li.candidates .sw {
  background: none;
  border: 1px dotted var(--c);
}
.where,
.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.where:hover,
.link:hover {
  text-decoration-style: solid;
}
.plain {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.plain:hover {
  color: var(--gold);
}
.warnings {
  margin-top: 16px;
  color: #ffb4a8;
  font-size: 12px;
}

/* Zone panel */
#zone header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 8px;
}
#zone .coord {
  color: var(--muted);
  font-weight: 400;
}
.mapbox {
  position: relative;
  width: min(100%, 78vh);
  aspect-ratio: 1;
  background: #120e0f;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
svg.map {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.terrain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.zoom.fit-world {
  width: auto;
  padding: 0 5px;
  font-size: 11px;
}
svg.map:active {
  cursor: grabbing;
}
/* Markers open their details, or the inside of an entrance; the hand only returns once the map is actually dragged.
   The map captures the pointer while pressed, so it also carries the marker's cursor itself (on-mark). */
svg.map [data-i],
svg.map.on-mark {
  cursor: pointer;
}
svg.map.panning,
svg.map.panning [data-i] {
  cursor: grabbing;
}
.b-map,
.heat,
.overlay {
  image-rendering: pixelated;
}
.b-water {
  fill: #2c2325;
}
.b-land {
  fill: #54443f;
}
.zone-edges,
.zone-focus {
  fill: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.zone-edges {
  stroke: #cebbae88;
  stroke-width: 1px;
}
/* The zone whose details are listed, coloured like the selected grid cell; a survey of several zones fades it out. */
.zone-focus {
  stroke: var(--gold);
  stroke-width: 2px;
  transition: opacity .15s;
}
.zone-focus.survey {
  opacity: 0;
}
.heat {
  opacity: .9;
}
.heat-edge {
  fill: none;
  stroke: var(--c);
  stroke-width: 1px;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}
.zooms {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.zoom {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(27, 21, 22, .85);
  cursor: pointer;
  line-height: 1;
}
.tip {
  position: absolute;
  z-index: 2;
  max-width: 300px;
  padding: 4px 8px;
  font-size: 12px;
  background: rgba(18, 14, 15, .95);
  border: 1px solid var(--gold2);
  border-radius: 4px;
  pointer-events: none;
}
.picker {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  max-width: 300px;
  padding: 4px;
  background: rgba(18, 14, 15, .97);
  border: 1px solid var(--gold2);
  border-radius: 4px;
}
.picker[hidden] {
  display: none;
}
.picker button {
  padding: 6px 8px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.picker button:hover,
.picker button:focus-visible {
  background: rgba(255, 255, 255, .1);
}

/* Full-screen button: corners pointing out, or in while the map is full screen. Locate: a crosshair. */
.zoom.full svg,
.zoom.locate svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.zoom.locate .dot {
  fill: currentColor;
  stroke: none;
}
.zoom.full .leave,
.zoom.full[aria-pressed="true"] .enter {
  display: none;
}
.zoom.full[aria-pressed="true"] .leave {
  display: inline;
}

/* Map legend: floats on a map at least 600px wide, and always in full screen. */
.mapbox {
  container: map / inline-size;
}
.map-legend {
  position: absolute;
  z-index: 1;
  left: 8px;
  bottom: 8px;
  display: none;
  flex-direction: column;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  padding: 3px;
  font-size: 12px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
  touch-action: pan-y;
  user-select: none;
}
@container map (min-width: 600px) {
  .map-legend {
    display: flex;
  }
}
body.map-full .map-legend {
  display: flex;
}
.key-toggle,
.key-title,
.key {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.key-toggle:hover,
.key-title:hover,
.key:hover,
.key-toggle:focus-visible,
.key-title:focus-visible,
.key:focus-visible {
  background: rgba(255, 255, 255, .08);
}
.key-toggle {
  padding: 4px 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}
.key-toggle .sym-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3px;
  stroke-linejoin: round;
}
.key-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 2px 0 auto;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(1px) rotate(-135deg);
  opacity: .7;
}
.map-legend.open .key-toggle::after {
  transform: translateY(-2px) rotate(45deg);
}
.map-legend:not(.open) .key-body {
  display: none;
}
.key-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 2px 2px;
}
.key-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2px;
}
.key-title {
  grid-column: 1 / -1;
  padding: 6px 6px 1px;
  color: var(--gold2);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.key {
  padding: 3px 8px 3px 5px;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}
.map-legend .sym-icon {
  flex: none;
  width: 15px;
  height: 15px;
  overflow: visible;
}
.key[aria-pressed="false"] {
  color: var(--muted);
}
.key[aria-pressed="false"] .sym-icon {
  opacity: .35;
  filter: grayscale(1);
}
.key-group.settings {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.key .switch {
  position: relative;
  flex: none;
  width: 24px;
  height: 14px;
  border-radius: 7px;
  background: var(--line);
  transition: background .15s;
}
.key .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .15s, background .15s;
}
.key[aria-pressed="true"] .switch {
  background: var(--gold2);
}
.key[aria-pressed="true"] .switch::after {
  transform: translateX(10px);
  background: #1b1516;
}

/*
 * Full screen: the zone panel covers the window. The map fills it and the panel's own header, way back, shading note and
 * inspection float on it as translucent cards (the inspection beside its mark, placed by MapView); the chips and lists
 * below the map give way to the legend.
 */
:root:has(body.map-full),
body.map-full {
  overflow: hidden;
}
body.map-full #zone {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: max(8px, env(safe-area-inset-top)) calc(max(8px, env(safe-area-inset-right)) + 56px) 8px
    max(8px, env(safe-area-inset-left));
  background: #120e0f;
  pointer-events: none;
}
body.map-full #zone > * {
  position: relative;
  z-index: 1;
  max-width: min(460px, 100%);
  margin: 0;
  pointer-events: auto;
  touch-action: pan-y;
}
body.map-full #zone > .mapbox {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  max-width: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
body.map-full #zone > :is(.layers, .lists, .warnings) {
  display: none;
}
body.map-full #zone > :is(header, .link, .legend, .loading),
body.map-full .zoom {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
body.map-full #zone > :is(header, .link, .legend, .loading) {
  padding: 6px 10px;
  border-radius: 8px;
}
body.map-full #zone > header {
  align-items: center;
  gap: 2px 10px;
}
body.map-full #zone > .link {
  text-decoration: none;
}
body.map-full #zone > .legend {
  max-height: 6.4em;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--text);
}
body.map-full .zooms {
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
}
body.map-full .map-legend {
  left: max(8px, env(safe-area-inset-left));
  bottom: max(8px, env(safe-area-inset-bottom));
  max-height: calc(100% - 128px);
}
body.map-full #zone > .inspection {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: min(380px, calc(100% - 16px));
  max-width: none;
  /* MapView sets the height beside the card's mark; this keeps any card on screen, and scrollable, whatever happens. */
  max-height: calc(100% - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  /* An explicit colour keeps the scrollbar drawn (not an overlay that hides until used) and readable on the dark glass. */
  scrollbar-color: rgba(209, 183, 106, .7) rgba(255, 255, 255, .06);
  padding: 10px 12px;
  background: var(--glass-solid);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(209, 183, 106, .55);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
body.map-full #zone > .inspection.off {
  visibility: hidden;
}
.inspection > .close {
  display: none;
}
body.map-full .inspection > .close {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  float: right;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
body.map-full .inspection > .close:hover {
  background: rgba(255, 255, 255, .16);
}
/* Points from the popup card to its mark (flipped when the card is below it). */
.popup-tail {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 9px;
  pointer-events: none;
}
.popup-tail svg {
  display: block;
  width: 16px;
  height: 9px;
  overflow: visible;
  fill: var(--glass-solid);
  stroke: rgba(209, 183, 106, .55);
  stroke-width: 1px;
}
.popup-tail.below {
  transform: scaleY(-1);
}
/*
 * On a narrow full-screen map the card is a bottom sheet instead (MapView docks it and sets its height): half the map, or
 * nearly all of it when pulled up by its grabber, which also drags it down to close.
 */
.inspection > .grabber {
  display: none;
}
body.map-full #zone > .inspection.sheet {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  padding: 0 14px max(12px, env(safe-area-inset-bottom));
  border-width: 1px 0 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .5);
}
body.map-full #zone > .inspection.sheet-in {
  animation: sheet-in .2s ease-out;
}
@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}
/* Stays at the top as the sheet scrolls, its background hiding what scrolls beneath. */
body.map-full #zone > .inspection.sheet > .grabber {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  width: calc(100% + 28px);
  height: 26px;
  margin: 0 -14px;
  padding: 0;
  border: 0;
  background: var(--glass-solid);
  cursor: grab;
  touch-action: none;
}
body.map-full #zone > .inspection.sheet > .grabber::before {
  content: "";
  display: block;
  width: 40px;
  height: 5px;
  margin: auto;
  border-radius: 3px;
  background: rgba(255, 255, 255, .3);
}
body.map-full #zone > .inspection.sheet > .close {
  top: 26px;
  margin-top: 0;
}
@media (prefers-reduced-motion: reduce) {
  body.map-full #zone > .inspection.sheet-in {
    animation: none;
  }
}
@media (pointer: coarse) {
  body.map-full .zoom {
    min-width: 44px;
    min-height: 44px;
  }
  body.map-full .inspection > .close {
    width: 36px;
    height: 36px;
  }
  .key,
  .key-toggle {
    min-height: 34px;
  }
  /* The choice between markers sharing a footprint. */
  .picker button {
    min-height: 44px;
    font-size: 14px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .map-legend,
  body.map-full .zoom,
  body.map-full #zone > :is(header, .link, .legend, .loading, .inspection) {
    background: #1f1819;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.layers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
}
.layer-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-basis: 100%;
}
.chip.group {
  font-weight: 600;
  min-width: 70px;
}
.chip.reset {
  background: none;
  color: inherit;
  padding: 1px 8px;
}
.chip input {
  margin: 0;
  accent-color: var(--gold2);
}
.legend {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0;
  max-width: 78vh;
}
.legend .sw {
  vertical-align: -1px;
  margin-right: 3px;
}
.lists {
  margin-top: 8px;
  max-width: 78vh;
}
.lists details {
  margin: 6px 0;
}
.lists summary {
  cursor: pointer;
  color: var(--gold2);
}
.lists ul {
  list-style: none;
  margin: 4px 0;
  padding: 0 0 0 4px;
  columns: 2 220px;
  column-gap: 16px;
}
.lists li {
  break-inside: avoid;
  padding: 1px 0;
  font-size: 13px;
}
.lists .sym {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--muted);
}
.lists .sym.landmark {
  background: var(--gold);
  transform: rotate(45deg);
}
.lists .sym.entrance {
  background: none;
  border: 1.5px solid var(--gold);
}
.lists .sym.explored {
  background: var(--gold);
}
.lists .sym.npc {
  background: var(--gold);
  border-radius: 50%;
}
.lists .sym.rift {
  background: var(--scaal);
  transform: rotate(45deg);
}
.lists .sym.loot,
.lists .sym.shelf {
  background: #f0b44c;
}
.lists .sym.carcass {
  background: #e06060;
}
.lists .sym.drop {
  background: #d9c3a5;
  border-radius: 50%;
}
.lists .sym.storage {
  background: var(--ihar);
}
.lists .sym.camp {
  background: var(--gurb);
}
.lists .sym.exit {
  background: #fff;
}

/* Map markers (point symbols are drawn in screen pixels) */
.marks text {
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--gold);
  stroke: #120e0f;
  stroke-width: 3px;
  paint-order: stroke;
  pointer-events: none;
}
.pt > :not(text) {
  stroke: #120e0f;
  stroke-width: 1.5px;
}
.pt.landmark > :not(text) {
  fill: var(--gold);
}
.pt.entrance > :not(text) {
  fill: rgba(18, 14, 15, .6);
  stroke: var(--gold);
  stroke-width: 2px;
}
.pt.entrance.explored > :not(text) {
  fill: var(--gold);
  stroke: #120e0f;
  stroke-width: 1.5px;
}
.pt.exit > :not(text) {
  fill: #fff;
}
.pt.npc > :not(text) {
  fill: var(--gold);
}
.pt.creature > :not(text) {
  stroke-width: .9px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
/* Every creature icon is the same red, so the layer reads at a glance; the silhouette tells the kind. */
.creature .creature-body {
  fill: #e06060;
}
.pt.creature > .creature-detail {
  fill: none;
  stroke-width: .65px;
  stroke-opacity: .7;
}
.pt.creature > .creature-eye {
  fill: #ffe27a;
  stroke-width: 0;
}
.pt.loot > :not(text) {
  fill: #f0b44c;
}
.pt.carcass > :not(text) {
  stroke: #e06060;
  stroke-width: 2px;
}
.pt.drop > :not(text) {
  fill: #d9c3a5;
}
.pt.storage > :not(text) {
  fill: var(--ihar);
}
/* Treasure chests found in the world, apart from your own stashes. */
.pt.storage.chest > :not(text) {
  stroke: #fff;
}
.pt.camp > :not(text) {
  fill: var(--gurb);
}
.pt.raft > :not(text) {
  stroke-width: .8px;
  stroke-linejoin: round;
  stroke-linecap: round;
  paint-order: stroke;
}
.raft .raft-deck {
  fill: #75605b;
}
.raft .raft-bars {
  fill: #a28a75;
}
.pt.raft .raft-rope {
  fill: none;
  stroke: #c7c16b;
  stroke-width: 1.3px;
}
.raft .raft-paddle {
  fill: #ebbf88;
}
/* Screen-pixel offset, not a different saved tile: the deck peeks out below the player's shoulders. */
.marks .pt.raft.yours > :not(text) {
  transform: translateY(10px);
}
.pt.rift > :not(text) {
  fill: var(--scaal);
}
.pt.tree > :not(text),
.lists .sym-icon path {
  stroke: #120e0f;
  stroke-width: .9px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.tree .tree-crown {
  fill: var(--life, #7fae6a);
}
.tree .tree-wood {
  fill: #b39b7b;
}
.pt.tree > .tree-detail,
.lists .sym-icon .tree-detail {
  fill: none;
  stroke-width: .65px;
  stroke-opacity: .65;
}
/* Trunk freshness, Very Fresh (f0) to Dead (f4); the drier, the cheaper to chop. */
.tree.f0 {
  --life: #5fae4f;
}
.tree.f1 {
  --life: #a3c25a;
}
.tree.f2 {
  --life: #e0c048;
}
.tree.f3 {
  --life: #e58a3c;
}
.tree.f4 {
  --life: #d9533e;
}
.lists .sym.tree {
  background: var(--life, #7fae6a);
  border-radius: 50%;
}
.lists .sym-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -1px;
}
.pt.bramble > :not(text) {
  fill: none;
  stroke: #a06e3c;
  stroke-width: 2px;
}
.pt.bramble.vine > :not(text) {
  stroke: #eb6eaa;
}
.lists .sym.bramble {
  background: #a06e3c;
}
.lists .sym.bramble.vine {
  background: #eb6eaa;
}
/* Gatherables: each part is coloured by its role, each kind by --leaf, --fruit and --root. */
.pt.gather > :not(text) {
  stroke: #120e0f;
  stroke-width: .9px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.gather .g-leaf {
  fill: var(--leaf);
}
.gather .g-fruit {
  fill: var(--fruit);
}
.gather .g-root {
  fill: var(--root);
}
.pt.gather > .g-detail {
  fill: none;
  stroke: var(--detail, #120e0f);
  stroke-width: .65px;
  stroke-opacity: .65;
}
/* Young cranberries have no berries yet, and searched nests no eggs. */
.gather.unripe .g-fruit,
.gather.empty .g-fruit {
  display: none;
}
/* Colours picked by Astra with the icons. */
.gather.calmia {
  --leaf: #71885e;
  --fruit: #d992cf;
  --root: #bb793e;
}
.gather.turnip {
  --leaf: #a3ae61;
  --fruit: #ead9c2;
  --root: #bd8ba9;
}
.gather.cranberry {
  --leaf: #578a76;
  --fruit: #e36359;
}
.gather.cress {
  --leaf: #a4af62;
  --root: #9caf75;
}
.gather.lily {
  --leaf: #8fa65a;
  --fruit: #df90c6;
  --root: #ebc56e;
}
.gather.bulb {
  --leaf: #8ca384;
  --fruit: #dce0c6;
}
.gather.nest {
  --leaf: #af764c;
  --fruit: #f1dfb8;
  --root: #574031;
  --detail: #eed0a0;
}
.freshness-tag {
  color: var(--life);
  font-weight: 600;
}
.life-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  margin-left: 8px;
  vertical-align: 1px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.life-bar > span {
  display: block;
  height: 100%;
  background: var(--life);
}
.tool-costs {
  margin: 4px 0;
  padding-left: 18px;
  font-size: 12px;
}
.tool-costs .current {
  color: var(--gold);
}
.chip select {
  font-size: 12px;
  max-width: 14em;
}
.marks .filtered {
  display: none;
}
.you .you-halo,
.you .you-fill {
  stroke-linejoin: round;
  stroke-linecap: round;
}
.you .you-halo {
  fill: none;
  stroke: var(--you-halo, #120e0f);
  stroke-width: 2px;
  stroke-opacity: .4;
}
.you .you-fill {
  fill: var(--hair, #3a353d);
  stroke: var(--you-line, #f4efe6);
  stroke-width: .8px;
}
/* Outranks `.marks .pt.sel.sel > :not(text)`: the selected player keeps a gold halo and their own outline. */
.marks .pt.you.sel.sel > .you-halo {
  stroke: #ffd34d;
  stroke-width: 4px;
  stroke-opacity: 1;
}
.marks .pt.you.sel.sel > .you-fill {
  stroke: var(--you-line, #f4efe6);
}
/* Located: the halo rings out in gold twice (PING_MS in mapview.ts), or just glows without motion. */
.marks .pt.you.ping > .you-halo {
  animation: you-ping .75s ease-out 2;
}
@keyframes you-ping {
  from {
    stroke: #ffd34d;
    stroke-width: 3px;
    stroke-opacity: 1;
  }
  to {
    stroke: #ffd34d;
    stroke-width: 22px;
    stroke-opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marks .pt.you.ping > .you-halo {
    animation: none;
    stroke: #ffd34d;
    stroke-width: 4px;
    stroke-opacity: 1;
  }
  .zone-focus {
    transition: none;
  }
}
.pt.you text {
  fill: #fff;
}
.pt.hl > :not(text) {
  stroke: #fff;
  stroke-width: 3px;
}
/* Keep the thin logs, lashings and paddle readable rather than bleaching the whole raft on hover/selection. */
.pt.raft.hl > :not(text) {
  stroke-width: 1.4px;
}
.pt.raft.hl > .raft-rope,
.marks .pt.raft.sel.sel > .raft-rope {
  stroke: #c7c16b;
  stroke-width: 1.3px;
}
.pt.raft.hl > .raft-paddle,
.marks .pt.raft.sel.sel > .raft-paddle {
  stroke: #120e0f;
  stroke-width: .8px;
}
/* A creature's silhouette is too small to lose to the highlight, so it becomes a halo behind the fill. */
.pt.creature.hl > .creature-body {
  paint-order: stroke;
}
.pt.creature.hl > .creature-detail,
.marks .pt.creature.sel.sel > .creature-detail {
  stroke: #120e0f;
}
.marks .pt.sel.sel > :not(text) {
  stroke: #fff;
}
.fp {
  vector-effect: non-scaling-stroke;
  stroke-width: 1px;
  fill: none;
}
.fp.landmark {
  fill: rgba(255, 243, 178, .22);
  stroke: var(--gold);
  stroke-width: 1.5px;
}
.fp.entrance {
  fill: rgba(255, 243, 178, .08);
  stroke: rgba(255, 243, 178, .55);
}
.fp.boat {
  fill: rgba(255, 243, 178, .15);
  stroke: var(--gold2);
}
.fp.boulder {
  fill: rgba(109, 91, 89, .35);
  stroke: #6d5b59;
}
.fp.boulder.big {
  fill: rgba(80, 64, 62, .55);
  stroke: #3a2d2e;
  stroke-width: 1.5px;
}
.fp.ruin {
  fill: rgba(165, 139, 131, .25);
  stroke: #a58b83;
  stroke-dasharray: 3 2;
}
.fp.rock {
  fill: rgba(136, 110, 106, .6);
  stroke: none;
}
.fp.shelf {
  fill: rgba(240, 180, 76, .3);
  stroke: #f0b44c;
}
.fp.area {
  pointer-events: none;
}
.fp.rift {
  fill: color-mix(in srgb, var(--scaal) 12%, transparent);
  stroke: var(--scaal);
  stroke-dasharray: 4 3;
}
.fp.hl:not(.area),
.fp.sel:not(.area) {
  stroke: #fff;
  stroke-width: 2px;
}
/* Legend swatches for the water, sharp-ground and fern overlays (see waterUrl, thornsUrl and fernsUrl). */
.fp.water {
  fill: rgb(110, 180, 235);
  stroke: rgb(40, 110, 200);
}
.fp.sharp {
  fill: rgb(220, 220, 210);
  stroke: none;
}
.fp.fern {
  fill: rgb(150, 205, 60);
  stroke: none;
}

svg.hide-you .L-you,
svg.hide-places .L-places,
svg.hide-caves .L-caves,
svg.hide-ruins .L-ruins,
svg.hide-rifts .L-rifts,
svg.hide-npcs .L-npcs,
svg.hide-creatures .L-creatures,
svg.hide-loot .L-loot,
svg.hide-drops .L-drops,
svg.hide-camp .L-camp,
svg.hide-storage .L-storage,
svg.hide-rafts .L-rafts,
svg.hide-boulders .L-boulders,
svg.hide-rubble .L-rubble,
svg.hide-rocks .L-rocks,
svg.hide-trees .L-trees,
svg.hide-brambles .L-brambles,
svg.hide-vines .L-vines,
svg.hide-calmia .L-calmia,
svg.hide-turnips .L-turnips,
svg.hide-cranberries .L-cranberries,
svg.hide-watercress .L-watercress,
svg.hide-lilies .L-lilies,
svg.hide-bulbs .L-bulbs,
svg.hide-nests .L-nests {
  display: none;
}
.hide-you .you-dot {
  display: none;
}

/* The Cheated mark (src/cheated.ts): a world changed with the save editor. */
.badge-cheated {
  background: #ff8a80;
  color: #1b1516;
}
