:root {
  font:
    16px/1.45 system-ui,
    "Microsoft YaHei",
    sans-serif;
  color: #263128;
  background: #f4f5f2;
  --border: #c9cec7;
  --accent: #426846;
  --panel: rgba(38, 38, 38, 0.8);
}
.detail p {
  overflow-wrap: anywhere;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  background: #f8f9f6;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  color: inherit;
}
button:hover {
  background: #e4ebe0;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid #83ae67;
  outline-offset: 2px;
}
input,
select {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.38rem 0.45rem;
  background: #fff;
  color: #263128;
  min-width: 0;
}
input[type="checkbox"] {
  accent-color: #88ad6b;
  width: 16px;
  height: 16px;
}
a {
  color: #46683b;
}
hr {
  border: 0;
  border-top: 1px solid #ffffff26;
  margin: 0.75rem 0;
}
.toolbar {
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid #b6bcb1;
  z-index: 2;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  white-space: nowrap;
  color: #263128;
}
.brand b {
  font-size: 1.1rem;
}
.brand span {
  font-weight: 500;
  color: #5a685b;
}
.brand small {
  align-self: flex-start;
  font-size: 0.75rem;
  color: #727a6e;
}
.seed-control,
.dimension-control,
.toolbar-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.875rem;
}
.seed-control input {
  width: 14rem;
  font-family: ui-monospace, Consolas, monospace;
}
.seed-control button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.toolbar-actions {
  margin-left: auto;
}
#map {
  position: relative;
  flex: 1;
  min-height: 160px;
  background: #17131f;
  overflow: hidden;
  color: white;
}
#map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#map-canvas:active {
  cursor: grabbing;
}
.map-panel {
  background: var(--panel);
  border-radius: 4px;
  color: #fff;
  padding: 0.65rem 0.8rem;
  box-shadow: 0 1px 4px #0005;
  font-size: 0.875rem;
}
.map-panel button {
  background: #fff1;
  border-color: #fff3;
  color: #fff;
}
.map-panel button:hover {
  background: #fff3;
}
.map-panel .muted {
  color: #c5c7c3;
}
.map-top {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  pointer-events: none;
}
.map-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: min(600px, 65%);
}
.map-heading strong {
  font-size: 1rem;
}
.map-heading span {
  font-size: 0.8125rem;
  color: #d2d2cc;
}
#mode-note[data-biome]::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.45em;
  border: 1px solid #ffffff80;
  border-radius: 2px;
  background: var(--biome-color);
}
#progress {
  margin-left: auto;
}
.layers {
  position: absolute;
  right: 16px;
  top: 100px;
  width: 208px;
  max-height: calc(100% - 180px);
  overflow: auto;
}
.layers summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.65rem;
}
.layers label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  line-height: 1.35;
  margin: 0.5rem 0;
}
.layers .kind-filter {
  font-size: 0.8125rem;
  padding-left: 0.4rem;
}
.layers input[type="search"], .layers input[type="number"], .layers select { min-width: 0; width: 100%; }
#retry-map { pointer-events: auto; }
#color-biome { min-width: 0; max-width: 70%; }
#strongholds { max-width: 220px; }
#ore-height input { width: 48%; display: inline-block; }
#resource-controls label { display: block; font-size: 0.8rem; }
.layers .mode-control { display: block; }
.swatch {
  width: 11px;
  height: 11px;
  display: inline-block;
  flex: none;
  border: 1px solid #fff6;
}
.muted {
  color: #606b5e;
  font-size: 0.8125rem;
}
.detail {
  position: absolute;
  left: 16px;
  top: 112px;
  width: 265px;
}
.detail strong {
  display: block;
  padding-right: 1.5rem;
}
.detail p {
  margin: 0.45rem 0;
}
.close {
  float: right;
  padding: 0 0.35rem !important;
}
.detail button {
  margin-top: 0.4rem;
}
.zoom-controls {
  position: absolute;
  left: 16px;
  bottom: 76px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.zoom-controls button {
  font-size: 1.3rem;
  border: 0;
  border-radius: 0;
  width: 38px;
  height: 38px;
  padding: 0;
}
.map-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}
.coordinates {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  font-variant-numeric: tabular-nums;
}
.coordinates span {
  font-size: 0.8125rem;
  color: #d8dfd1;
}
.scale {
  position: relative;
  border: solid white;
  border-width: 0 2px 2px;
  height: 8px;
  width: 160px;
  filter: drop-shadow(0 1px 1px #000);
}
.scale span {
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 0.8125rem;
}
footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  flex-wrap: wrap;
}
#goto-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
#goto-form input {
  width: 6.5rem;
  padding: 0.2rem 0.4rem;
}
#goto-form label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
footer button {
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
}
.footer-note {
  margin-left: auto;
  color: #697363;
}
dialog {
  border: 1px solid #c8cfc3;
  border-radius: 8px;
  box-shadow: 0 20px 80px #0007;
  width: 560px;
  max-width: calc(100% - 24px);
  max-height: 85dvh;
  padding: 1.25rem;
  color: #263128;
  background: #f7f8f4;
}
dialog::backdrop {
  background: #121b1266;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}
.dialog-heading button {
  font-size: 1.25rem;
  padding: 0 0.5rem;
}
.setting-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0.8rem 0;
}
.setting-row input[type="number"] {
  width: 8rem;
}
#gpu-rendering, #compute-parallelism, #compute-allocation { display: block; width: 100%; margin: .5rem 0; accent-color: var(--accent); }
.setting-ticks { display: flex; justify-content: space-between; font-size: .75rem; opacity: .65; padding: 0 .4rem; }
#gpu-level-label, #parallelism-label { font-size: .85rem; text-align: right; }
.file-control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0;
}
.file-control input {
  max-width: 100%;
  font-size: 0.875rem;
}
.button-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8125rem;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.3rem;
}
#toast {
  position: fixed;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1rem;
  border-radius: 5px;
  background: #263128;
  color: white;
  z-index: 10;
  max-width: 90%;
  box-shadow: 0 3px 16px #0005;
}
button[hidden],
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .toolbar {
    gap: 0.6rem;
  }
  .brand {
    margin-right: auto;
  }
  .toolbar-actions {
    margin-left: 0;
  }
  .seed-control {
    order: 3;
  }
  .dimension-control {
    order: 4;
  }
  .layers {
    width: 184px;
  }
  .footer-note {
    display: none;
  }
}
@media (max-width: 600px) {
  .toolbar {
    padding: 0.45rem 0.6rem;
  }
  .brand b {
    font-size: 0.95rem;
  }
  .brand img {
    width: 24px;
    height: 24px;
  }
  .toolbar-actions {
    gap: 0.25rem;
  }
  .toolbar-actions button {
    padding: 0.3rem 0.4rem;
    font-size: 0.8125rem;
  }
  .seed-control {
    width: 100%;
  }
  .seed-control input {
    flex: 1;
    width: 0;
  }
  .dimension-control {
    width: 100%;
  }
  .dimension-control select {
    flex: 1;
  }
  .map-top {
    left: 10px;
    right: 10px;
    top: 10px;
  }
  .map-heading {
    max-width: 100%;
    width: 100%;
  }
  .map-heading span {
    max-width: 100%;
    font-size: 0.75rem;
  }
  .layers {
    right: 10px;
    top: 95px;
    width: 155px;
    max-height: calc(100% - 170px);
  }
  .detail {
    left: 10px;
    top: 95px;
    width: min(240px, calc(100% - 175px));
    padding: 0.5rem;
    font-size: 0.8125rem;
  }
  .zoom-controls {
    left: 10px;
  }
  .map-bottom {
    left: 10px;
    right: 10px;
  }
  .coordinates {
    min-width: 120px;
    font-size: 0.75rem;
  }
  footer {
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
  }
  #goto-form {
    gap: 0.25rem;
  }
  #goto-form input {
    width: 4.5rem;
  }
  #count {
    margin-left: auto;
  }
}
