:root {
  color-scheme: dark;
  --ink: #f4eadb;
  --muted: #b8aa96;
  --panel: #17120e;
  --line: #4c4033;
  --accent: #9d2d2d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0d0a08;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

.game-shell {
  display: grid;
  gap: 12px;
  min-height: 100vh;
  padding: 12px;
  grid-template-rows: auto 1fr auto;
}

.hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

.hud-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

a,
button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.viewport {
  position: relative;
  align-self: center;
  width: min(100%, 1440px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

#game {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 80px;
  transform: translateY(-50%);
  border-color: rgba(244, 234, 219, 0.24);
  background: rgba(13, 10, 8, 0.42);
  font-size: 40px;
  line-height: 1;
}

.nav.left {
  left: 8px;
}

.nav.right {
  right: 8px;
}

.lower {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 34%);
  gap: 12px;
}

.message,
.inventory {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.inventory {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.item {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #6a5947;
  border-radius: 7px;
  background: #241d17;
  color: var(--ink);
  font-size: 22px;
}

.item span {
  display: none;
}

@media (max-width: 720px) {
  .hud {
    align-items: stretch;
    flex-direction: column;
  }

  .lower {
    grid-template-columns: 1fr;
  }

  .nav {
    width: 38px;
    height: 66px;
  }
}
