:root {
  --ink: #f1f5eb;
  --muted: #ccdbc3;
  --bg-a: #1b2518;
  --bg-b: #283627;
  --panel: #30432f;
  --panel-deep: #243523;
  --edge-dark: #182118;
  --edge-light: #4a6848;
  --accent: #7fc462;
  --warn: #d6b060;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 20, 12, 0.34), rgba(15, 20, 12, 0.7)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.02) 3px,
      rgba(0, 0, 0, 0.03) 3px,
      rgba(0, 0, 0, 0.03) 6px
    ),
    linear-gradient(150deg, var(--bg-a), var(--bg-b));
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 3px solid var(--edge-dark);
  border-top: 2px solid var(--edge-light);
  background: linear-gradient(180deg, #385436, #2f472d);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.brand {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 0.8rem;
  color: #e9f6dd;
}

.nav-links {
  display: flex;
  gap: 0.65rem;
}

.nav-links a {
  text-decoration: none;
  color: #f0f6e8;
  border: 2px solid var(--edge-dark);
  border-top-color: var(--edge-light);
  border-left-color: var(--edge-light);
  background: #3e5d3c;
  padding: 0.4rem 0.6rem;
  font-size: 0.76rem;
}

.app {
  width: min(1400px, calc(100% - 1rem));
  margin: 0.9rem auto 1rem;
  display: grid;
  gap: 0.6rem;
}

.hero {
  text-align: center;
  border: 3px solid var(--edge-dark);
  border-top-color: var(--edge-light);
  border-left-color: var(--edge-light);
  background: linear-gradient(180deg, #405f3d, #2f472d);
  padding: 0.9rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.65rem;
  color: #d0e5c1;
}

h1 {
  margin: 0.3rem 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2.4vw, 1.8rem);
  line-height: 1.4;
}

.sub {
  margin: 0;
  color: #e3edd7;
  font-size: 0.88rem;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.45rem;
}

.panel {
  border: 3px solid var(--edge-dark);
  border-top-color: var(--edge-light);
  border-left-color: var(--edge-light);
  background: linear-gradient(180deg, var(--panel), var(--panel-deep));
  padding: 0.65rem 0.75rem;
}

.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  color: var(--muted);
}

.value {
  margin: 0.32rem 0 0;
  font-weight: 700;
  color: #f4fde8;
}

.world-wrap {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 0.55rem;
}

#world {
  width: 100%;
  height: auto;
  display: block;
  border: 4px solid #161d15;
  border-top-color: #5b7f59;
  border-left-color: #5b7f59;
  background: #2b3f2a;
  image-rendering: pixelated;
}

.sidebar {
  display: grid;
  gap: 0.5rem;
}

.list {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.24rem;
  font-size: 0.8rem;
}

.journal {
  max-height: 150px;
  overflow: auto;
}

.small {
  margin: 0.35rem 0 0;
  color: #e6efd9;
  font-size: 0.75rem;
}

.controls p {
  margin: 0;
  text-align: center;
  color: #f4f9ec;
  font-size: 0.82rem;
}

@media (max-width: 1100px) {
  .world-wrap {
    grid-template-columns: 1fr;
  }

  .hud-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  .hud-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 0.65rem;
  }

  .nav-links {
    gap: 0.35rem;
  }

  .nav-links a {
    font-size: 0.7rem;
    padding: 0.32rem 0.45rem;
  }
}
