html, body {
  margin: 0;
  min-width: 100%;
  min-height: 100%;
  background: #d7d2c4;
  color: #222;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  image-rendering: pixelated;
}

body {
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0) 180px),
    repeating-linear-gradient(0deg, #c9c3b4 0 2px, #d5cfbf 2px 4px);
}

.page-wrap {
  width: min(960px, calc(100% - 24px));
  margin: 18px auto 30px;
}

#siteHeader {
  border: 1px solid #272727;
  background: #3d3d3d;
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
}

.brand-row {
  min-height: 88px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px 8px;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.2)),
    repeating-linear-gradient(45deg, #3b3b3b 0 12px, #414141 12px 24px);
  color: white;
}

.site-logo {
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(44px, 9vw, 82px);
  line-height: .95;
  letter-spacing: 4px;
  color: #e8e8e8;
  text-shadow: 3px 3px 0 #111, -1px -1px 0 #777;
}

.site-tagline {
  padding-bottom: 8px;
  color: #c8c8c8;
  font-size: 12px;
}

.classic-nav {
  display: flex;
  flex-wrap: wrap;
  min-height: 34px;
  border-top: 1px solid #555;
  background: linear-gradient(#292929, #171717);
}

.classic-nav a,
.classic-nav span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 17px;
  border-right: 1px solid #444;
  color: #ddd;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
}

.classic-nav .active,
.classic-nav a:hover {
  background: #4b4b4b;
  color: white;
}

#gameShell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 540px;
  margin-top: 14px;
  overflow: hidden;
  box-sizing: border-box;
  border: 5px solid #202020;
  background: #000;
  box-shadow: 0 3px 9px rgba(0,0,0,.45);
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#menu {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(15,20,10,.2), rgba(0,0,0,.45)),
    repeating-linear-gradient(45deg, #4e7f35 0 24px, #5d9141 24px 48px);
}

.menu-inner {
  width: min(590px, 82%);
  text-align: center;
  color: #fff;
}

.game-logo {
  margin-bottom: 2px;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(52px, 10vw, 96px);
  line-height: .95;
  letter-spacing: 5px;
  color: #efefef;
  text-shadow: 4px 4px 0 #1d1d1d, -2px -2px 0 #8a8a8a;
}

.version-text {
  margin: 4px 0 22px;
  font-family: monospace;
  font-size: 12px;
  color: #f1f1b4;
  text-shadow: 1px 1px 0 #111;
}

.classic-button {
  display: block;
  width: min(360px, 90%);
  min-height: 46px;
  margin: 9px auto;
  border: 2px solid #111;
  outline: 1px solid #c8c8c8;
  background: linear-gradient(#8d8d8d, #626262);
  color: white;
  font: bold 17px Verdana, Arial, sans-serif;
  text-shadow: 1px 1px 0 #222;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #bcbcbc, inset -2px -2px 0 #444;
}

.classic-button:hover {
  background: linear-gradient(#9b9b9b, #707070);
}

.classic-button:active {
  transform: translateY(1px);
}

.classic-button.secondary {
  margin-top: 12px;
}

.help {
  margin: 17px auto 0;
  max-width: 590px;
  color: #ededed;
  font-size: 11px;
  line-height: 1.45;
  text-shadow: 1px 1px 0 #222;
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: none;
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  color: white;
  font-size: 32px;
  font-family: monospace;
  text-shadow: 2px 2px 0 #222;
}

#hotbar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  padding: 4px;
  background: #6a6a6a;
  border: 3px solid #1f1f1f;
  box-shadow: inset 2px 2px 0 #bcbcbc, inset -2px -2px 0 #3b3b3b, 0 2px 0 rgba(0,0,0,.35);
}

.slot {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  position: relative;
  display: grid;
  place-items: center;
  background: #777;
  border-top: 2px solid #3b3b3b;
  border-left: 2px solid #3b3b3b;
  border-right: 2px solid #aaa;
  border-bottom: 2px solid #aaa;
}

.slot.selected {
  z-index: 1;
  outline: 3px solid #eee;
  outline-offset: -1px;
  background: #8a8a8a;
}

.slot b {
  position: absolute;
  right: 3px;
  bottom: 1px;
  color: white;
  font-family: monospace;
  font-size: 11px;
  text-shadow: 1px 1px 0 #111;
}

.block-icon {
  width: 29px;
  height: 29px;
  display: block;
  border: 2px solid rgba(0,0,0,.45);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.12);
}

.grass { background: linear-gradient(#5aa53b 0 32%, #79502f 32% 100%); }
.dirt { background: repeating-linear-gradient(45deg, #7c5334 0 5px, #6b452d 5px 9px); }
.stone { background: repeating-linear-gradient(135deg, #858585 0 6px, #737373 6px 11px); }
.sand { background: repeating-linear-gradient(45deg, #d8c67d 0 7px, #c9b66f 7px 10px); }
.empty::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.05);
}

.old-news {
  margin-top: 14px;
  padding: 12px 15px 14px;
  border: 1px solid #8e887b;
  background: #eeeade;
  box-shadow: inset 0 1px 0 #fff;
}

.old-news h2 {
  margin: 0 0 7px;
  font: bold 17px Georgia, serif;
  color: #333;
}

.old-news p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

footer {
  padding: 12px 2px 0;
  color: #6a655b;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 640px) {
  .page-wrap { width: min(100% - 12px, 960px); margin-top: 6px; }
  .site-tagline { display: none; }
  .classic-nav a, .classic-nav span { padding: 0 10px; font-size: 11px; }
  #gameShell { border-width: 3px; }
  #hotbar { transform: translateX(-50%) scale(.70); transform-origin: bottom center; bottom: 7px; }
  .help { display: none; }
}
