:root {
  --cream: #f4f1e7;
  --ink: #24392e;
  --muted: #8c9c88;
  --gold: #e8be75;
  --line: rgba(240, 243, 218, 0.22);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--cream);
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #618777;
}
body {
  user-select: none;
  -webkit-user-select: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
}
button:disabled {
  cursor: progress;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s,
    opacity 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
input,
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.055);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  outline: none;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--gold);
  height: 39px;
}
select option {
  background: #24392e;
}
kbd {
  font:
    10px "Segoe UI",
    Arial,
    sans-serif;
  display: inline-block;
  line-height: 1.5;
  padding: 2px 5px;
  border: 1px solid rgba(240, 243, 218, 0.25);
  border-radius: 3px;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
.hidden {
  display: none !important;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 32, 24, 0.3),
    transparent 22%,
    transparent 72%,
    rgba(12, 27, 20, 0.35)
  );
  z-index: 1;
}
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  padding: 26px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  z-index: 20;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  line-height: 1.08;
  letter-spacing: 2px;
  font-weight: 800;
  text-shadow: 0 2px 10px #24392e55;
}
.brand svg {
  width: 38px;
  height: 42px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.7;
}
.brand-second {
  display: block;
  font-size: 10px;
  letter-spacing: 2.15px;
  margin-top: 5px;
}
.alpha-tag {
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 500;
  border: 1px solid var(--line);
  padding: 5px 7px;
  border-radius: 3px;
  margin: 2px 0 0 6px;
  align-self: flex-start;
}
.world-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 600;
  color: #eef0dcdd;
  padding: 10px 16px;
  border: 1px solid #f1eddb22;
  border-radius: 30px;
  background: #21382d22;
  backdrop-filter: blur(10px);
  max-width: 350px;
  white-space: nowrap;
  overflow: hidden;
}
.world-label #world-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: #cfdbac;
  border-radius: 50%;
  box-shadow: 0 0 9px #d4e99a44;
  flex-shrink: 0;
}
.divider {
  opacity: 0.35;
  margin: 0 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: #21382d33;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 23px;
  line-height: 1;
}
.icon-button:hover,
.menu-button:hover {
  background: #f0eddd22;
}
.menu-button {
  display: flex;
  gap: 15px;
  align-items: center;
  height: 35px;
  padding: 0 12px;
  background: #21382d33;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}
.menu-button kbd {
  font-size: 9px;
  padding: 0 4px;
}
.welcome {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: linear-gradient(
    90deg,
    rgba(19, 41, 29, 0.8),
    rgba(18, 36, 27, 0.48) 42%,
    rgba(18, 36, 27, 0.04) 73%
  );
  display: flex;
  align-items: center;
}
.hero {
  padding: 80px 0 60px 7.3vw;
  max-width: 750px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 9px;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: #e1e8ce;
}
.eyebrow > span {
  width: 28px;
  height: 1px;
  background: var(--gold);
}
h1 {
  font-size: clamp(55px, 6.6vw, 94px);
  letter-spacing: -4.5px;
  line-height: 1.025;
  font-weight: 500;
  margin: 29px 0 24px;
}
h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: -3px;
}
.hero-copy {
  font-size: 14px;
  line-height: 1.9;
  color: #e0e8d5ba;
  margin-bottom: 30px;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--cream);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  padding: 17px 23px;
  min-height: 52px;
  min-width: 198px;
  border-radius: 5px;
  box-shadow: 0 4px 20px #14251c20;
}
.primary-button:hover {
  background: #ffefcb;
}
.button-arrow {
  font-size: 22px;
  line-height: 14px;
  font-weight: 400;
}
.text-button {
  font-size: 11px;
  background: none;
  padding: 8px 0;
  color: #e7eadad9;
}
.text-button:hover {
  color: var(--gold);
}
.text-button > span {
  margin-left: 7px;
}
.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: #e0e8d580;
  margin-top: 20px;
  letter-spacing: 0.25px;
  min-height: 14px;
}
#loading-track {
  width: 55px;
  height: 2px;
  background: #cdd6b722;
  display: block;
}
#loading-bar {
  width: 0;
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 0.2s;
}
.hero-footnote {
  margin-top: 42px;
  font-size: 10px;
  color: #e2e8d499;
  letter-spacing: 0.3px;
}
.tiny-cube {
  font-size: 18px;
  vertical-align: middle;
  margin-right: 8px;
  color: var(--gold);
}
.world-stamp {
  position: absolute;
  right: 38px;
  bottom: 109px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: 1.2px;
  color: #eff1daaa;
}
.world-stamp strong {
  font-weight: 500;
  color: var(--cream);
}
.stamp-plus {
  font-size: 24px;
  font-weight: 200;
}
.stamp-line {
  display: block;
  width: 50px;
  height: 1px;
  background: var(--line);
}
.welcome-footer {
  position: absolute;
  bottom: 0;
  left: 36px;
  right: 36px;
  border-top: 1px solid var(--line);
  padding: 21px 0;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.75px;
  color: #e2e8d49c;
}
.hud {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 1px #152a17);
}
.crosshair:before,
.crosshair:after {
  content: "";
  position: absolute;
  background: #fcf4dcdd;
}
.crosshair:before {
  width: 13px;
  height: 2px;
  left: 2px;
  top: 7px;
}
.crosshair:after {
  height: 13px;
  width: 2px;
  top: 2px;
  left: 7px;
}
.target-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 28px);
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 5px #000;
  opacity: 0.8;
}
.compass {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 8px;
  letter-spacing: 1px;
  opacity: 0.7;
}
.compass i {
  height: 6px;
  width: 1px;
  background: #f1eddb88;
}
.compass #heading {
  font-size: 11px;
  color: var(--gold);
  min-width: 23px;
  text-align: center;
}
.bottom-left {
  position: absolute;
  bottom: 37px;
  left: 36px;
  text-shadow: 0 2px 6px #14251c55;
}
.location-caption {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #e2e8d499;
}
.coordinates {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  margin: 10px 0 9px;
}
.mode-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 9px;
  color: #e2e8d4bb;
}
.mode-line #day-label {
  margin-left: 9px;
  opacity: 0.6;
}
.inventory-bar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  pointer-events: auto;
}
.selected-name {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  text-shadow: 0 2px 7px #18321f;
}
.hotbar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #182d24b3;
  backdrop-filter: blur(16px);
  border: 1px solid #d8e0c533;
  border-radius: 9px;
  box-shadow: 0 5px 25px #192d2033;
}
.slot {
  position: relative;
  width: 51px;
  height: 54px;
  border: 1px solid #d8e0c51a;
  border-radius: 5px;
  background: #eeefd90b;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    background 0.15s,
    border 0.15s;
}
.slot:hover {
  background: #eeefd922;
}
.slot.selected {
  background: #e8be7524;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px #e8be7533;
}
.slot.selected:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 21px;
  height: 2px;
  width: 8px;
  background: var(--gold);
}
.slot canvas {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  margin-top: 5px;
}
.slot-number {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 8px;
  color: #e6ead27a;
}
.slot.selected .slot-number {
  color: var(--gold);
}
.hotbar-help {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 8px;
  margin-top: 11px;
  color: #e4e9d589;
}
.hotbar-help b {
  color: #f1efdfdd;
  font-weight: 500;
  margin-right: 3px;
}
.bottom-right {
  position: absolute;
  right: 36px;
  bottom: 38px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 9px;
  color: #e2e8d4aa;
  text-align: right;
}
.bottom-right kbd {
  font-size: 8px;
  letter-spacing: 0.4px;
  margin-right: 3px;
}
.bottom-right i {
  font-style: normal;
  margin: 0 3px;
}
.debug {
  position: absolute;
  left: 36px;
  top: 100px;
  font:
    11px/1.7 ui-monospace,
    Consolas,
    monospace;
  background: #162a20c9;
  padding: 12px 16px;
  border-radius: 5px;
  white-space: pre;
}
.toast {
  position: fixed;
  z-index: 60;
  bottom: 165px;
  left: 50%;
  transform: translateX(-50%);
  background: #f4f1e7;
  color: var(--ink);
  box-shadow: 0 5px 30px #15291c33;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 12px;
  max-width: 90vw;
  text-align: center;
}
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #12241bcc;
  backdrop-filter: blur(12px);
  padding: 20px;
}
.panel {
  width: 580px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: linear-gradient(130deg, #293e32, #1d3027);
  border: 1px solid #d9dfc333;
  border-radius: 12px;
  box-shadow: 0 20px 100px #07150e77;
  padding: 32px;
}
.panel-eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--gold);
  font-weight: 500;
}
.panel h2 {
  font-size: 29px;
  font-weight: 450;
  letter-spacing: -0.9px;
  margin: 13px 0;
}
.muted {
  font-size: 11px;
  color: #cdd8c8a6;
  line-height: 1.8;
  margin: 0 0 23px;
}
.panel-primary {
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px 18px;
  margin-top: 25px;
}
.settings-grid label,
.new-world-row > label {
  display: block;
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #d1dcc4b3;
}
.settings-grid input,
.settings-grid select {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0;
}
.section-rule {
  height: 1px;
  background: var(--line);
  margin: 23px 0;
}
.button-row {
  display: flex;
  gap: 8px;
}
.secondary-button {
  padding: 11px 13px;
  background: #e7ead811;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  white-space: nowrap;
}
.secondary-button:hover {
  background: #e7ead822;
}
.button-row > * {
  flex: 1;
}
.new-world-row {
  margin-top: 22px;
}
.new-world-row > div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.new-world-row input {
  font-size: 11px;
}
.panel-footer {
  margin-top: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #cdd8c888;
  gap: 12px;
}
.panel-footer kbd {
  font-size: 8px;
}
.panel-footer .text-button {
  font-size: 10px;
}
.small-print {
  font-size: 9px;
  line-height: 1.7;
  color: #cdd8c858;
  margin: 19px 0 0;
  border-top: 1px solid #d9dfc317;
  padding-top: 16px;
}
.materials-panel {
  width: 650px;
}
.materials-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.materials-heading .icon-button {
  border: 0;
  background: none;
  font-size: 28px;
}
.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.material {
  min-height: 105px;
  border: 1px solid #d9dfc31a;
  border-radius: 7px;
  background: #eff1dd08;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: #dde5d3;
}
.material:hover {
  border-color: var(--gold);
  background: #e8be751a;
}
.material canvas {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
}
.material.chosen {
  border-color: #e8be7588;
}
.fatal {
  position: fixed;
  inset: 0;
  background: #1d3027;
  color: var(--cream);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  text-align: center;
}
.fatal p {
  max-width: 550px;
  line-height: 1.7;
  color: #cdd8c8;
}
.touch-controls {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.joystick {
  position: absolute;
  left: 28px;
  bottom: 95px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 1px solid #e5edcf55;
  background: #20362a44;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#joystick-knob {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: #e5edcf66;
  border: 1px solid #e5edcf55;
  pointer-events: none;
}
.touch-actions {
  position: absolute;
  right: 18px;
  bottom: 100px;
  display: grid;
  grid-template-columns: repeat(3, 49px);
  gap: 6px;
}
.touch-actions button {
  min-height: 43px;
  border-radius: 7px;
  border: 1px solid #e5edcf55;
  background: #20362a88;
  color: var(--cream);
  pointer-events: auto;
  touch-action: none;
  font-size: 11px;
}
.photo-mode .topbar,
.photo-mode .hud,
.photo-mode .vignette,
.photo-mode .touch-controls {
  display: none !important;
}
@media (max-width: 1150px) {
  .bottom-right {
    display: none;
  }
  .bottom-left {
    bottom: 35px;
    left: 22px;
  }
  .topbar {
    padding: 22px;
  }
  .welcome-footer {
    left: 22px;
    right: 22px;
  }
  .hero {
    padding-left: 7vw;
  }
  .slot {
    width: 46px;
    height: 50px;
  }
  .slot canvas {
    width: 40px;
    height: 40px;
  }
  .slot.selected:after {
    left: 18px;
  }
  .world-stamp {
    right: 24px;
  }
  .world-label {
    max-width: 240px;
  }
}
@media (max-width: 800px) {
  .world-label,
  .alpha-tag {
    display: none;
  }
  .topbar {
    padding: 18px;
  }
  .brand {
    font-size: 13px;
    gap: 8px;
  }
  .brand-second {
    font-size: 8px;
  }
  .brand svg {
    width: 30px;
    height: 34px;
  }
  .hero {
    padding-left: 7vw;
    padding-top: 70px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  h1 {
    font-size: 66px;
  }
  .hero-copy {
    font-size: 12px;
  }
  .world-stamp {
    display: none;
  }
  .welcome-footer {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .welcome-footer span:nth-child(2) {
    display: none;
  }
  .hero-footnote {
    margin-top: 26px;
  }
  .hotbar-help {
    display: none;
  }
  .inventory-bar {
    bottom: 16px;
  }
  .slot {
    width: 39px;
    height: 43px;
  }
  .slot canvas {
    width: 36px;
    height: 36px;
  }
  .slot.selected:after {
    left: 14px;
  }
  .hotbar {
    gap: 3px;
    padding: 5px;
  }
  .bottom-left {
    bottom: 93px;
    left: 20px;
  }
  .location-caption {
    display: none;
  }
  .coordinates {
    font-size: 11px;
  }
  .mode-line {
    font-size: 8px;
  }
  .compass {
    top: 74px;
  }
  .selected-name {
    font-size: 10px;
    margin-bottom: 8px;
  }
  .panel {
    padding: 25px;
  }
  .panel h2 {
    font-size: 26px;
  }
  .materials-grid {
    gap: 7px;
  }
  .material {
    min-height: 92px;
    font-size: 9px;
  }
  .panel-footer {
    font-size: 8px;
  }
  .toast {
    bottom: 210px;
  }
  .touch-device .bottom-left {
    top: 88px;
    bottom: auto;
  }
  .touch-device .hotbar-help {
    display: none;
  }
  .touch-device .slot-number {
    display: none;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 58px;
    letter-spacing: -3px;
  }
  .hero {
    padding-left: 25px;
  }
  .hero-actions {
    gap: 17px;
  }
  .primary-button {
    min-width: 168px;
    padding: 15px 17px;
    font-size: 11px;
  }
  .text-button {
    font-size: 10px;
  }
  .hero-copy br {
    display: none;
  }
  .hero-copy {
    max-width: 310px;
  }
  .hero-footnote {
    font-size: 8px;
  }
  .welcome-footer {
    left: 19px;
    right: 19px;
  }
  .menu-button {
    gap: 7px;
    padding: 0 9px;
  }
  .top-actions {
    gap: 5px;
  }
  .icon-button {
    width: 31px;
  }
  .slot {
    width: 33px;
    height: 39px;
  }
  .slot canvas {
    width: 32px;
    height: 32px;
  }
  .slot.selected:after {
    left: 11px;
  }
  .materials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .panel {
    padding: 22px 18px;
  }
  .settings-grid {
    gap: 17px 10px;
  }
  .panel-footer {
    gap: 7px;
  }
  .button-row {
    gap: 5px;
  }
  .secondary-button {
    padding: 10px 9px;
    font-size: 9px;
  }
  .world-label {
    display: none;
  }
}
@media (max-height: 600px) {
  .hero {
    padding-top: 75px;
    padding-bottom: 55px;
  }
  h1 {
    font-size: 52px;
    margin: 15px 0;
  }
  .hero-copy {
    margin-bottom: 18px;
  }
  .hero-footnote,
  .world-stamp,
  .loading-row {
    display: none;
  }
  .welcome-footer {
    padding: 13px 0;
  }
  .panel {
    max-height: calc(100dvh - 20px);
  }
  .topbar {
    padding-top: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
