/* System fonts and local assets keep this project completely offline. */
:root {
  color-scheme: light;
  --ink: #253e31;
  --paper: #f8f6e9;
  --green: #34523b;
  --muted: #627164;
  --line: rgba(41, 65, 47, 0.2);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background: #dcebdc;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid #da8b39;
  outline-offset: 5px;
}
button {
  border: 0;
}
button:hover {
  filter: brightness(1.06);
}
[hidden] {
  display: none !important;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: 0;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(238, 242, 219, 0.95) 0%,
    rgba(238, 242, 219, 0.75) 24%,
    rgba(238, 242, 219, 0) 57%
  );
}
body.playing #world {
  cursor: grab;
  touch-action: none;
}
body.playing #world:active {
  cursor: grabbing;
}
body.playing.mouse-captured #world {
  cursor: none;
}
body.playing .vignette {
  background: linear-gradient(180deg, rgba(24, 47, 44, 0.18), transparent 18%, transparent 70%, rgba(24, 47, 44, 0.25));
}
.masthead {
  position: fixed;
  top: 34px;
  left: 42px;
  right: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}
.masthead > * {
  pointer-events: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.7px;
}
.brand img {
  width: 39px;
  height: 43px;
  image-rendering: pixelated;
}
.brand-dot {
  font-size: 9px;
  vertical-align: top;
  margin-left: 3px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.save-state {
  font-size: 11px;
  letter-spacing: 0.04em;
  background: rgba(248, 246, 233, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 10px 15px;
  border-radius: 30px;
}
.round-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 50%;
  font-size: 17px;
}
.menu {
  position: absolute;
  left: 7%;
  top: 50%;
  transform: translateY(-47%);
  width: 450px;
  max-height: calc(100% - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
  z-index: 2;
  padding: 4px 6px 12px;
}
.eyebrow {
  font:
    10px/1.4 "Courier New",
    monospace;
  font-weight: bold;
  letter-spacing: 1.4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sun-mark {
  font-size: 30px;
  color: #bd742b;
  line-height: 1;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: clamp(64px, 7.4vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 24px 0;
}
h1 em {
  font-weight: normal;
  color: #567446;
}
.intro {
  font-size: 15px;
  line-height: 1.75;
  color: #526650;
  margin: 0 0 27px;
}
.menu-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.play-button {
  background: var(--green);
  color: #fbf5dc;
  min-width: 255px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 19px 21px;
  border-radius: 5px;
  box-shadow: 0 4px 0 #1f3827;
  font-size: 14px;
  font-weight: bold;
}
.play-button span {
  font-size: 23px;
  line-height: 0.8;
}
.game-message {
  font-size: 10px;
  line-height: 1.6;
  color: #647463;
  margin: 16px 0 28px;
  min-height: 16px;
}
.menu-bottom {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 340px;
}
.quality-setting label {
  display: block;
  font:
    9px "Courier New",
    monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.quality-setting select {
  border: 0;
  background: transparent;
  font-size: 12px;
  max-width: 165px;
  cursor: pointer;
  padding: 0;
}
.text-button {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 11px;
  padding: 7px 0;
  color: #586d54;
}
.compatibility {
  font:
    9px "Courier New",
    monospace;
  color: #6e7a65;
  margin: 22px 0 0;
}
.postcard {
  position: fixed;
  right: 5%;
  bottom: 16%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(247, 246, 228, 0.9);
  padding: 20px 24px;
  transform: rotate(-3deg);
  box-shadow: 0 8px 18px #2f5c3a12;
  font:
    9px "Courier New",
    monospace;
  letter-spacing: 1px;
}
.postcard small {
  display: block;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  margin-top: 6px;
  color: #63735a;
}
.postcard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4883d;
}
.postcard-stamp {
  font-family: Georgia, serif;
  font-size: 32px;
  padding-left: 18px;
  border-left: 1px solid #a5af9d;
}
.welcome-footer {
  position: fixed;
  bottom: 30px;
  left: 42px;
  right: 42px;
  display: flex;
  justify-content: space-between;
  font:
    9px "Courier New",
    monospace;
  letter-spacing: 1.5px;
  color: #546853;
}
.welcome-footer span span {
  font-size: 19px;
  margin-left: 12px;
}
.reset-confirm {
  max-width: 355px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
}
.reset-confirm p {
  margin: 0 0 8px;
}
.reset-confirm button {
  font-size: 11px;
  padding: 9px 10px;
  margin-right: 5px;
  border-radius: 3px;
  background: #e2e5cf;
}
.reset-confirm button:first-of-type {
  background: #7e4134;
  color: #fff5e6;
}
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 1px #253f40);
}
.crosshair:before,
.crosshair:after {
  content: "";
  position: absolute;
  background: #fff9e7;
  border-radius: 1px;
}
.crosshair:before {
  width: 15px;
  height: 2px;
  left: 1px;
  top: 7px;
}
.crosshair:after {
  height: 15px;
  width: 2px;
  top: 1px;
  left: 7px;
}
.hint {
  position: absolute;
  top: 94px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  background: #f6f3e4de;
  padding: 10px 16px;
  border-radius: 25px;
  color: #41563b;
}
.hint span {
  margin: 0 8px;
  color: #91a080;
}
.inventory {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff9e9;
}
.build-invitation {
  position: absolute;
  top: 154px;
  left: 28px;
  width: 230px;
  padding: 17px 19px;
  background: rgba(248, 246, 233, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-left: 3px solid #85aa96;
  border-radius: 5px;
  box-shadow: 0 5px 16px #254d3920;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}
.build-title {
  font: bold 9px/1.5 "Courier New", monospace;
  letter-spacing: 1.4px;
  color: #657d61;
}
.build-invitation p {
  margin: 12px 0 7px;
}
.build-invitation strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: normal;
  line-height: 1.25;
}
.build-invitation .build-detail {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 700px) {
  .build-invitation {
    left: 16px;
    top: 142px;
    width: 190px;
    padding: 12px 14px;
  }
  .build-invitation strong {
    font-size: 18px;
  }
}
.block-label {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  font-size: 11px;
  text-shadow: 0 1px 4px #213e36;
  padding: 0 6px 12px;
}
.block-label > span:first-child {
  font-weight: bold;
}
#target-label {
  font-size: 10px;
  opacity: 0.85;
}
.hotbar {
  display: flex;
  gap: 5px;
  padding: 7px;
  background: #f6f4e3e8;
  border: 1px solid #fff9e9;
  border-radius: 9px;
  box-shadow: 0 6px 18px #1d3b312e;
  pointer-events: auto;
}
.slot {
  width: 54px;
  height: 56px;
  position: relative;
  background: #dce1ca;
  border: 2px solid transparent;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: transform 0.12s;
}
.slot:hover {
  transform: translateY(-3px);
}
.slot[aria-pressed="true"] {
  border-color: #486c3d;
  background: #f6f5da;
  box-shadow: 0 0 0 1px #486c3d;
}
.slot kbd {
  position: absolute;
  top: 2px;
  left: 4px;
  font:
    9px "Courier New",
    monospace;
  color: #62705a;
}
.block-cube {
  width: 27px;
  height: 29px;
  background: var(--block);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  position: relative;
  display: block;
  margin-top: 5px;
}
.block-cube:before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff4;
  clip-path: polygon(50% 0, 100% 25%, 50% 50%, 0 25%);
}
.block-cube:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0003;
  clip-path: polygon(50% 50%, 100% 25%, 100% 75%, 50% 100%);
}
.build-help {
  font:
    8px "Courier New",
    monospace;
  letter-spacing: 0.5px;
  text-align: center;
  margin: 11px 0 0;
  text-shadow: 0 1px 4px #1a382e;
}
.build-help b {
  font-weight: normal;
  color: #fff;
}
.build-help span {
  margin: 0 9px;
  opacity: 0.5;
}
.toast {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: #2b453bea;
  color: #fff4d5;
  padding: 10px 17px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
}
.stats {
  position: absolute;
  left: 25px;
  bottom: 25px;
  font: 11px/1.7 monospace;
  background: #172d25de;
  color: #eaf1d7;
  padding: 12px;
  white-space: pre;
}
.playing .brand {
  color: #29472f;
}
.error .game-message {
  color: #8c3529;
  font-size: 13px;
}
.error .vignette {
  background: #edf1dc;
}
.error #postcard {
  display: none;
}
noscript {
  position: absolute;
  top: 40%;
  left: 10%;
  background: var(--paper);
  padding: 25px;
  z-index: 10;
}
@media (max-width: 900px) {
  .menu {
    left: 6%;
    width: 370px;
  }
  h1 {
    font-size: 80px;
  }
  .postcard {
    right: 4%;
    bottom: 18%;
    padding: 15px;
    max-width: 270px;
  }
  .postcard-stamp {
    display: none;
  }
  .masthead {
    left: 25px;
    right: 25px;
  }
  .welcome-footer {
    left: 25px;
    right: 25px;
  }
  .vignette {
    background: linear-gradient(90deg, #eef2dbe8, #eef2dbb0 38%, transparent 80%);
  }
}
@media (max-width: 620px) {
  .masthead {
    top: 20px;
    left: 22px;
    right: 22px;
  }
  .brand {
    font-size: 14px;
  }
  .brand img {
    width: 31px;
    height: 35px;
  }
  .save-state {
    display: none;
  }
  .menu {
    left: 7%;
    width: 86%;
    max-height: calc(100% - 140px);
    transform: translateY(-45%);
  }
  h1 {
    font-size: 76px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .intro {
    font-size: 14px;
  }
  .postcard {
    display: none;
  }
  .welcome-footer {
    font-size: 8px;
    bottom: 20px;
  }
  .welcome-footer > span:last-child {
    display: none;
  }
  .vignette {
    background: linear-gradient(90deg, #eef2dbe8, #eef2db9c 68%, #eef2db33);
  }
  .slot {
    width: 35px;
    height: 44px;
  }
  .hotbar {
    gap: 3px;
    padding: 5px;
  }
  .block-cube {
    width: 21px;
    height: 23px;
  }
  .hint {
    white-space: normal;
    width: 80%;
    text-align: center;
    line-height: 1.8;
  }
  .build-help {
    font-size: 7px;
  }
  .build-help span {
    margin: 0 3px;
  }
  #target-label {
    max-width: 170px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
@media (max-height: 680px) and (min-width: 621px) {
  .masthead {
    top: 22px;
  }
  .menu {
    max-height: calc(100% - 110px);
    top: 53%;
  }
  h1 {
    font-size: 66px;
    margin: 14px 0;
  }
  .intro {
    margin-bottom: 17px;
  }
  .game-message {
    margin-bottom: 17px;
  }
  .menu-bottom {
    padding-top: 12px;
  }
  .compatibility {
    margin-top: 14px;
  }
  .welcome-footer {
    bottom: 17px;
  }
  .eyebrow {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
  }
}
