/* WorldZero — Minecraft-inspired stone / dirt UI */

:root {
  --stone: #c6c6c6;
  --stone-mid: #8b8b8b;
  --stone-dark: #373737;
  --stone-deep: #2b2b2b;
  --panel: #c6c6c6;
  --panel-inner: #8b8b8b;
  --text: #f0f0f0;
  --text-dark: #3f3f3f;
  --text-shadow: #3f3f3f;
  --muted: #a0a0a0;
  --accent: #5d9c3a;
  --accent-bright: #7ec850;
  --accent-dark: #3c6e28;
  --dirt: #6b4f2a;
  --dirt-dark: #3e2c14;
  --grass: #5d9c3a;
  --danger: #a33a3a;
  --danger-bright: #d05050;
  --overlay: rgba(16, 16, 16, 0.72);
  --font-ui: "VT323", "Courier New", monospace;
  --font-display: "Press Start 2P", "VT323", monospace;
  --bevel-light: #ffffff;
  --bevel-dark: #373737;
  --bevel-mid: #555555;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #1a1410;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 20px;
  overflow: hidden;
  image-rendering: pixelated;
}

/* ---------------- screens ---------------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  /* Dirt + grass band — chunky, not smooth dashboard gradients */
  background-color: #2a1e12;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      90deg,
      #3d5c28 0 16px,
      #4a6e30 16px 32px,
      #355424 32px 48px,
      #4a6e30 48px 64px
    ),
    repeating-linear-gradient(
      0deg,
      #5a3d1e 0 16px,
      #6b4a24 16px 32px,
      #4e3518 32px 48px
    );
  background-size: auto, 100% 42%, 100% 100%;
  background-position: 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat;
  animation: screen-drift 28s linear infinite;
}
.screen.active { display: flex; }

@keyframes screen-drift {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, -64px 0, 0 0; }
}

/* Stone panel with classic MC beveled edge */
.panel {
  background: var(--panel);
  color: var(--text-dark);
  border: 3px solid var(--stone-dark);
  border-radius: 0;
  padding: 28px 32px;
  min-width: 380px;
  max-width: 92vw;
  text-align: center;
  box-shadow:
    inset 3px 3px 0 var(--bevel-light),
    inset -3px -3px 0 var(--bevel-mid),
    6px 6px 0 rgba(0, 0, 0, 0.45);
  animation: panel-pop 0.18s steps(3, end);
}
.panel.wide { min-width: 560px; }

@keyframes panel-pop {
  from { transform: scale(0.96); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

h1 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: 1px;
  color: #2a2a2a;
  text-shadow: 3px 3px 0 #8f8f8f;
  line-height: 1.35;
}
h1 span { color: var(--accent-dark); text-shadow: 3px 3px 0 #a8d48a; }
h2 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 12px;
  color: #2a2a2a;
  text-shadow: 2px 2px 0 #9a9a9a;
  line-height: 1.4;
}
.subtitle {
  color: #4a4a4a;
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
}
.hint {
  color: #555;
  font-size: 18px;
  line-height: 1.25;
}
.hint code {
  background: var(--stone-mid);
  color: #1a1a1a;
  padding: 1px 6px;
  border: 2px solid var(--stone-dark);
  box-shadow: inset 1px 1px 0 #666, inset -1px -1px 0 #bbb;
  font-family: var(--font-ui);
  font-size: 16px;
}
.error {
  color: #8b1e1e;
  font-size: 20px;
  text-shadow: 1px 1px 0 #e8a0a0;
  margin-top: 12px;
}
.hidden { display: none !important; }

label {
  display: block;
  text-align: left;
  margin: 10px 0 4px;
  color: #3a3a3a;
  font-size: 20px;
}

input[type=password],
input[type=text],
input:not([type]),
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 0;
  border: 2px solid var(--stone-dark);
  background: #000;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 22px;
  box-shadow: inset 2px 2px 0 #222, inset -1px -1px 0 #555;
  outline: none;
}
input[type=password]:focus,
input[type=text]:focus,
select:focus {
  border-color: var(--accent);
}

input[type=color] {
  width: 48px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--stone-dark);
  border-radius: 0;
  background: var(--stone-mid);
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #bbb, inset -1px -1px 0 #444;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  background: #000;
  border: 2px solid var(--stone-dark);
  box-shadow: inset 1px 1px 0 #222;
  border-radius: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 22px;
  background: var(--stone);
  border: 2px solid var(--stone-dark);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #555;
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 14px;
  height: 22px;
  background: var(--stone);
  border: 2px solid var(--stone-dark);
  border-radius: 0;
  cursor: pointer;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* MC-style chunky buttons */
button {
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 22px;
  color: var(--text);
  text-shadow: 2px 2px 0 var(--text-shadow);
  background: linear-gradient(#8b8b8b, #6f6f6f);
  border: 2px solid #000;
  border-radius: 0;
  padding: 8px 16px;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.35),
    inset -2px -2px 0 rgba(0, 0, 0, 0.35);
  transition: none;
}
button:hover {
  background: linear-gradient(#a8a8a8, #808080);
  filter: brightness(1.08);
}
button:active {
  box-shadow:
    inset -2px -2px 0 rgba(255, 255, 255, 0.2),
    inset 2px 2px 0 rgba(0, 0, 0, 0.45);
  transform: translate(1px, 1px);
}
button.primary {
  background: linear-gradient(var(--accent-bright), var(--accent-dark));
  border-color: #1e3a12;
  color: #fff;
  text-shadow: 2px 2px 0 #2a4a18;
  font-weight: normal;
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  font-size: 24px;
}
button.primary:hover {
  background: linear-gradient(#95e060, #4a8a30);
  filter: none;
}
button.danger {
  background: linear-gradient(#c05050, #7a2828);
  border-color: #3a1010;
  text-shadow: 2px 2px 0 #4a1515;
}
button.danger:hover {
  background: linear-gradient(#e06060, #903030);
  filter: none;
}

/* ---------------- world list ---------------- */
.world-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.world-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-inner);
  border: 2px solid var(--stone-dark);
  border-radius: 0;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.25),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
  text-align: left;
  color: var(--text);
  text-shadow: 1px 1px 0 #222;
}
.world-card:hover {
  background: #9a9a9a;
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}
.world-card .name {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.4;
}
.world-card .meta {
  color: #d8d8d8;
  font-size: 18px;
  text-shadow: 1px 1px 0 #333;
}
.world-card button {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

/* ---------------- customization ---------------- */
.customize-grid {
  display: flex;
  gap: 22px;
  align-items: stretch;
  text-align: left;
}
.customize-controls { flex: 1; }
.customize-controls label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  color: #2a2a2a;
  text-shadow: none;
  font-size: 20px;
}
.customize-controls input[type=range] { width: 150px; }
.customize-controls select {
  width: auto;
  min-width: 120px;
}
#avatar-preview {
  background:
    repeating-conic-gradient(#5a5a5a 0% 25%, #6e6e6e 0% 50%) 0 0 / 16px 16px;
  border: 3px solid var(--stone-dark);
  border-radius: 0;
  box-shadow:
    inset 2px 2px 0 #222,
    inset -2px -2px 0 #888,
    3px 3px 0 rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

/* ---------------- game HUD ---------------- */
#screen-game {
  background: #000;
  background-image: none;
  animation: none;
}
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#hud { position: absolute; inset: 0; pointer-events: none; }

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

#break-progress {
  position: absolute;
  left: 50%;
  top: calc(50% + 26px);
  transform: translateX(-50%);
  width: 120px;
  height: 10px;
  background: #000;
  border: 2px solid #000;
  border-radius: 0;
  overflow: hidden;
  box-shadow: inset 1px 1px 0 #333;
}
#break-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(#b8e05a, #5d9c3a);
}

#hotbar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  padding: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(0, 0, 0, 0.65);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.08);
}
.hotbar-slot {
  width: 48px;
  height: 48px;
  background: rgba(139, 139, 139, 0.55);
  border: 2px solid;
  border-color: #373737 #fff #fff #373737;
  border-radius: 0;
  position: relative;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35);
}
.hotbar-slot.selected {
  border-color: #fff #fff #fff #fff;
  outline: 2px solid #fff;
  outline-offset: -2px;
  background: rgba(180, 180, 180, 0.65);
  z-index: 1;
}
.slot-icon {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  border-radius: 0;
  padding: 4px;
  object-fit: contain;
}
.slot-count {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-family: var(--font-ui);
  font-size: 18px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

/* Minecraft-style chat: history fades when closed; full log while open. */
#chat-panel {
  position: absolute;
  left: 12px;
  bottom: 56px;
  width: min(560px, 92vw);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
#chat-panel.open {
  pointer-events: auto;
}
#messages {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 28vh;
  overflow: hidden;
  font-size: 20px;
  font-family: var(--font-ui);
}
#chat-panel.open #messages {
  max-height: 45vh;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #222;
  padding: 6px 8px;
}
#messages .msg {
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 0;
  text-shadow: 2px 2px 0 #000;
  color: #fff;
  opacity: 1;
  transition: opacity 0.6s ease;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
#chat-panel.open #messages .msg {
  background: transparent;
  padding: 1px 2px;
}
#messages .msg.transient {
  animation: chat-fadeout 10s forwards;
}
#messages .msg.faded {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  overflow: hidden;
  animation: none;
}
#chat-panel.open #messages .msg.faded,
#chat-panel.open #messages .msg.transient {
  opacity: 1;
  height: auto;
  padding: 1px 2px;
  overflow: visible;
  animation: none;
}
#messages .msg b { color: var(--accent-bright); }
#messages .msg-system {
  color: #ffd86b;
  font-style: italic;
}
@keyframes chat-fadeout {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

#toasts {
  position: absolute;
  right: 14px;
  bottom: 90px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}
#toasts .toast {
  background: rgba(40, 55, 30, 0.88);
  border: 2px solid var(--accent);
  border-radius: 0;
  padding: 4px 12px;
  font-size: 20px;
  text-shadow: 1px 1px 0 #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.15);
  animation: fadeout 4s forwards;
}

#debug {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.6);
  font: 16px/1.4 var(--font-ui);
  padding: 6px 10px;
  border-radius: 0;
  border: 2px solid #000;
  white-space: pre;
  text-shadow: 1px 1px 0 #000;
}

#hint-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 0;
  border: 2px solid rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 0 #000;
  max-width: 92vw;
  text-align: center;
}

/* ---------------- inventory ---------------- */
#inventory-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.inv-panel {
  background: var(--panel);
  color: var(--text-dark);
  border: 3px solid #000;
  border-radius: 0;
  padding: 18px 20px;
  box-shadow:
    inset 3px 3px 0 var(--bevel-light),
    inset -3px -3px 0 var(--bevel-mid),
    6px 6px 0 rgba(0, 0, 0, 0.45);
  animation: panel-pop 0.15s steps(2, end);
}
.inv-panel h3 {
  margin: 8px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  color: #2a2a2a;
  text-shadow: 2px 2px 0 #9a9a9a;
  line-height: 1.4;
}
.inv-panel h3 button {
  width: auto;
  font-size: 18px;
  padding: 4px 12px;
  margin: 0;
}
.inv-panel .hint {
  margin: 10px 0 0;
  color: #4a4a4a;
}
.inv-grid {
  display: grid;
  grid-template-columns: repeat(9, 48px);
  gap: 2px;
  padding: 4px;
  background: var(--panel-inner);
  border: 2px solid var(--stone-dark);
  box-shadow: inset 2px 2px 0 #555, inset -1px -1px 0 #bbb;
}
.inv-slot {
  width: 48px;
  height: 48px;
  background: #8b8b8b;
  border: 2px solid;
  border-color: #373737 #fff #fff #373737;
  border-radius: 0;
  position: relative;
  cursor: grab;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.25);
}
.inv-slot:hover {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
  z-index: 1;
}
.inv-slot.drag-source { opacity: 0.4; }

#drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  width: 44px;
  height: 44px;
  opacity: 0.9;
  image-rendering: pixelated;
}

/* ---------------- chat input ---------------- */
#chat-entry {
  width: 100%;
}
#chat-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #000;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: 22px;
  text-shadow: 1px 1px 0 #000;
  box-shadow: inset 2px 2px 0 #222;
  outline: none;
}
#chat-input:focus {
  border-color: var(--accent);
}

/* ---------------- pause / settings modals ---------------- */
.modal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  z-index: 40;
}
.modal-panel {
  background: var(--panel);
  color: var(--text-dark);
  border: 3px solid #000;
  border-radius: 0;
  padding: 24px 28px;
  min-width: 300px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  box-shadow:
    inset 3px 3px 0 var(--bevel-light),
    inset -3px -3px 0 var(--bevel-mid),
    6px 6px 0 rgba(0, 0, 0, 0.5);
  animation: panel-pop 0.15s steps(2, end);
}
.modal-panel.wide {
  min-width: 440px;
  max-width: min(560px, 94vw);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  text-align: left;
}
#lighting-fields label { font-size: 18px; }
.modal-panel h2 {
  margin: 0 0 10px;
  text-align: center;
  color: #2a2a2a;
}
.modal-panel button { width: 100%; padding: 10px 14px; }
.modal-panel button.primary { margin-top: 0; }
.modal-panel button.danger { margin-top: 6px; }
.modal-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #2a2a2a;
  margin: 4px 0;
  font-size: 20px;
}
.modal-panel label.check { justify-content: flex-start; }
.modal-panel label span {
  min-width: 48px;
  color: #3a3a3a;
  font-variant-numeric: tabular-nums;
}
.modal-panel input[type=range] { flex: 1; min-width: 120px; }
.modal-panel fieldset {
  border: 2px solid var(--stone-dark);
  border-radius: 0;
  padding: 10px 12px;
  margin: 6px 0 0;
  background: var(--panel-inner);
  box-shadow: inset 1px 1px 0 #666, inset -1px -1px 0 #bbb;
  color: #2a2a2a;
}
.modal-panel fieldset legend {
  font-family: var(--font-display);
  font-size: 10px;
  padding: 0 6px;
  color: #2a2a2a;
}
.modal-panel fieldset:disabled { opacity: 0.45; }
.modal-panel .hint { color: #4a4a4a; }
.modal-panel .graphics-hint { margin: 0 0 6px; }
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.modal-actions button { flex: 1; }
.modal-actions button.primary { margin-top: 0; }

#whoami {
  color: var(--accent-dark);
  font-weight: bold;
}

#hotbar, #chat-panel, #toasts, #hint-bar, #debug, #crosshair, #break-progress,
.inv-panel, .modal-panel {
  zoom: var(--ui-scale, 1);
}
/* Map panel avoids CSS zoom — it makes range sliders jump erratically. */

/* ---------------- create mode / world select ---------------- */
.create-mode-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #1e3a12;
  font-size: 18px;
  cursor: pointer;
  text-shadow: none;
}
.create-mode-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-dark);
}

/* ---------------- creative inventory tabs ---------------- */
.inv-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.inv-tabs button {
  width: auto;
  flex: 1;
  font-size: 18px;
  padding: 6px 10px;
}
.inv-tabs button.active {
  background: linear-gradient(var(--accent-bright), var(--accent-dark));
  border-color: #1e3a12;
}
.inv-creative {
  display: grid;
  grid-template-columns: repeat(8, 56px);
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  margin-bottom: 10px;
  background: var(--panel-inner);
  border: 2px solid var(--stone-dark);
  box-shadow: inset 2px 2px 0 #555, inset -1px -1px 0 #bbb;
}
.creative-slot {
  width: 56px;
  height: 56px;
  cursor: pointer;
}
.creative-label {
  display: none;
}

/* ---------------- admin world map ---------------- */
#admin-map-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 45;
}
.map-panel {
  background: var(--panel);
  color: var(--text-dark);
  border: 3px solid #000;
  width: min(960px, 96vw);
  height: min(720px, 92vh);
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 3px 3px 0 var(--bevel-light),
    inset -3px -3px 0 var(--bevel-mid),
    6px 6px 0 rgba(0, 0, 0, 0.5);
  animation: panel-pop 0.15s steps(2, end);
}
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--stone-dark);
}
.map-toolbar h2 {
  margin: 0;
  font-size: 14px;
}
.map-toolbar #map-status {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-toolbar button { width: auto; padding: 6px 14px; flex: 0 0 auto; }
/* Fixed-size depth control so the value label never shifts the range track. */
.map-depth-control {
  position: relative;
  flex: 0 0 260px;
  width: 260px;
  height: 32px;
  margin: 0;
  color: #2a2a2a;
  font-size: 18px;
}
.map-depth-caption {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
}
.map-depth-control input[type=range] {
  position: absolute;
  left: 52px;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
  accent-color: var(--accent-dark);
}
.map-depth-val {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-ui);
}
#map-canvas-wrap {
  flex: 1;
  min-height: 0;
  background: #1a1410;
  border: 2px solid var(--stone-dark);
  margin: 8px 12px 0;
  overflow: hidden;
}
#admin-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  image-rendering: pixelated;
}
.map-help {
  margin: 6px 12px 10px;
  color: #4a4a4a;
}
.map-context-menu {
  position: fixed;
  z-index: 60;
  background: var(--panel);
  border: 3px solid #000;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  box-shadow:
    inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-mid),
    4px 4px 0 rgba(0, 0, 0, 0.45);
}
.map-context-menu button {
  width: 100%;
  text-align: left;
  font-size: 18px;
  padding: 6px 10px;
}
.map-context-menu button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 640px) {
  .panel, .panel.wide { min-width: 0; width: 94vw; padding: 20px 16px; }
  .customize-grid { flex-direction: column; align-items: center; }
  .inv-grid { grid-template-columns: repeat(9, 36px); }
  .inv-slot, .hotbar-slot { width: 36px; height: 36px; }
  h1 { font-size: 20px; }
  h2 { font-size: 13px; }
  .modal-panel.wide { min-width: 0; width: 94vw; }
}
