/* ===== BullCraft — Minecraft-style theme ===== */
:root {
  --sky-top: #6fa8ff;
  --sky-bottom: #b9dcff;
  --grass: #5d9e3b;
  --grass-dark: #3f7a2a;
  --dirt: #79553d;
  --dirt-dark: #4e3627;
  --stone: #7f7f7f;
  --stone-dark: #4a4a4a;
  --gold: #f5c842;
  --gold-dark: #b8861b;
  --text: #ffffff;
  --text-dark: #2b2b2b;
  --panel: #c6c6c6;
  --panel-light: #ffffff;
  --panel-dark: #555555;
  --btn: #6f6f6f;
  --btn-hover: #7a8ae9;
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
  background: var(--stone-dark);
  overflow-x: hidden;
}
img.pixel, .pixel { image-rendering: pixelated; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-pixel); margin: 0 0 .6em; line-height: 1.5; }
h2 { font-size: clamp(18px, 3vw, 30px); text-shadow: 3px 3px 0 #000; }
h3 { font-size: 15px; }
h4 { font-size: 11px; margin-bottom: .8em; }
p { margin: 0 0 1em; }
.center { text-align: center; }
.center .mc-btn { margin: 6px; }
.hidden { display: none !important; }

/* ===== Minecraft button ===== */
.mc-btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1;
  padding: 14px 22px;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 #3b3b3b;
  background: linear-gradient(#8a8a8a, #6f6f6f 40%, #5c5c5c);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #3f3f3f, 0 4px 0 #1b1b1b;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform .05s;
  image-rendering: pixelated;
}
.mc-btn:hover { background: linear-gradient(#95a5ff, var(--btn-hover) 40%, #5e6fd1); box-shadow: inset 2px 2px 0 #c4ccff, inset -2px -2px 0 #3e4b9c, 0 4px 0 #1b1b1b; }
.mc-btn:active { transform: translateY(3px); box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #3f3f3f, 0 1px 0 #1b1b1b; }
.mc-btn:disabled { opacity: .5; cursor: default; }
.mc-btn-green { background: linear-gradient(#7fc85c, var(--grass) 40%, var(--grass-dark)); box-shadow: inset 2px 2px 0 #a8e68a, inset -2px -2px 0 #2d5a1e, 0 4px 0 #1b1b1b; }
.mc-btn-green:hover { background: linear-gradient(#9be074, #6fb64a 40%, #4c8e34); }
.mc-btn-small { font-size: 9px; padding: 9px 12px; box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #3f3f3f, 0 3px 0 #1b1b1b; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  background: rgba(20, 20, 20, .85);
  border-bottom: 3px solid #000;
  backdrop-filter: blur(4px);
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-pixel); font-size: 14px; text-decoration: none; text-shadow: 2px 2px 0 #000; }
.nav-brand img { image-rendering: pixelated; border: 2px solid #000; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 22px; }
.nav-links a { text-decoration: none; text-shadow: 2px 2px 0 #000; }
.nav-links a:hover { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 2px solid #fff; color: #fff; font-size: 22px; padding: 4px 10px; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 20px 160px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 900px; }
.hero-logo-wrap { position: relative; display: inline-block; margin-bottom: 18px; }
.hero-logo {
  width: clamp(180px, 32vw, 320px); height: auto;
  border: 4px solid #000;
  box-shadow: 0 0 0 4px var(--gold), 0 12px 0 rgba(0,0,0,.35);
  image-rendering: pixelated;
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash {
  position: absolute; right: -40px; top: 10px;
  font-family: var(--font-pixel); font-size: 12px; color: #ffff00;
  text-shadow: 2px 2px 0 #3f3f00;
  transform: rotate(-20deg);
  animation: splash .5s ease-in-out infinite alternate;
  white-space: nowrap;
}
@keyframes splash { from { transform: rotate(-20deg) scale(1); } to { transform: rotate(-20deg) scale(1.12); } }
.hero-title {
  font-size: clamp(34px, 8vw, 84px);
  margin: 0;
  color: #d8d8d8;
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 #3b3b3b, 8px 8px 0 rgba(0,0,0,.35);
  -webkit-text-stroke: 1px #000;
}
.hero-title span { color: var(--gold); text-shadow: 4px 4px 0 var(--gold-dark), 8px 8px 0 rgba(0,0,0,.35); }
.hero-ticker { font-family: var(--font-pixel); font-size: clamp(11px, 2vw, 16px); color: #fff; text-shadow: 2px 2px 0 #000; margin: 14px 0; }
.hero-sub { font-size: clamp(20px, 2.4vw, 28px); color: #1f2a44; max-width: 640px; margin: 0 auto 22px; }
.ca-box {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: rgba(0,0,0,.65); border: 2px solid #000; box-shadow: inset 0 0 0 2px #555;
  padding: 10px 14px; margin-bottom: 24px; max-width: 100%;
}
.ca-label { font-family: var(--font-pixel); font-size: 10px; color: var(--gold); }
.ca-box code { font-family: var(--font-body); font-size: 20px; word-break: break-all; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; width: 120px; height: 24px; background: #fff; opacity: .9; box-shadow: 24px -12px 0 #fff, 48px 0 0 #fff, -24px 0 0 #fff, 72px -12px 0 #fff; animation: drift linear infinite; }
.c1 { top: 15%; left: -200px; animation-duration: 60s; }
.c2 { top: 28%; left: -300px; animation-duration: 85s; animation-delay: -30s; transform: scale(1.4); }
.c3 { top: 8%; left: -250px; animation-duration: 70s; animation-delay: -50s; transform: scale(.8); }
.c4 { top: 40%; left: -200px; animation-duration: 95s; animation-delay: -15s; transform: scale(1.1); }
@keyframes drift { from { transform: translateX(0) scale(var(--s, 1)); } to { transform: translateX(calc(100vw + 400px)); } }

.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background-color: var(--dirt);
  background-image: var(--dirt-tex);
  background-size: 64px 64px;
  image-rendering: pixelated;
  border-top: 4px solid #000;
}
.grass-line { height: 28px; background-color: var(--grass); background-image: var(--grass-tex); background-size: 64px 64px; image-rendering: pixelated; border-bottom: 4px solid var(--grass-dark); }

/* ===== Sections ===== */
.section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { font-size: 24px; opacity: .9; }
.section-dirt, .section-stone, .section-game { max-width: none; }
.section-dirt { background-color: var(--dirt); background-image: var(--dirt-tex); background-size: 96px 96px; image-rendering: pixelated; border-top: 4px solid #000; border-bottom: 4px solid #000; }
.section-stone { background-color: var(--stone); background-image: var(--stone-tex); background-size: 96px 96px; image-rendering: pixelated; }
.section-game { background: #1b1b1b; }
.section-dirt > *, .section-stone > *, .section-game > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-dirt .section-head, .section-stone .section-head, .section-game .section-head { margin-bottom: 40px; }

/* Cards (inventory-panel style) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card, .stat, .detail, .phase, .step, .feature {
  background: var(--panel);
  color: var(--text-dark);
  border: 3px solid #000;
  box-shadow: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark);
  padding: 26px 22px;
}
.card h3 { color: #3b3b3b; }
.card p { font-size: 22px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat { text-align: center; }
.stat-value { font-family: var(--font-pixel); font-size: 28px; color: var(--gold-dark); text-shadow: 2px 2px 0 #fff; }
.stat-label { font-size: 20px; margin-top: 10px; }
.token-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.detail { display: flex; justify-content: space-between; padding: 14px 18px; }
.detail b { font-family: var(--font-pixel); font-size: 10px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-family: var(--font-pixel); font-size: 16px; color: #fff; background: var(--grass); border: 3px solid #000; box-shadow: inset 2px 2px 0 #8fd66a, inset -2px -2px 0 #2d5a1e; }
.step b { font-family: var(--font-pixel); font-size: 11px; display: block; margin-bottom: 6px; }
.step p { margin: 0; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.phase-title { font-family: var(--font-pixel); font-size: 11px; margin-bottom: 14px; color: #3b3b3b; }
.phase ul { list-style: none; padding: 0; margin: 0; }
.phase li { padding: 6px 0; border-bottom: 2px dashed #9a9a9a; }
.phase li:last-child { border-bottom: 0; }

.socials .mc-btn { min-width: 200px; }

/* Footer */
.footer { padding: 40px 20px 60px; text-align: center; background: #0f0f0f; font-size: 18px; color: #aaa; border-top: 4px solid #000; }
.footer p { max-width: 820px; margin: 0 auto 10px; }

/* ===== GAME ===== */
.game-frame { border: 4px solid #000; box-shadow: 0 0 0 4px var(--panel), 0 0 0 8px #000; background: #000; }
.game-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; overflow: hidden; background: #6fa8ff; }
.game-wrap:fullscreen { aspect-ratio: auto; max-height: none; width: 100vw; height: 100vh; }
#gameCanvas { display: block; width: 100%; height: 100%; outline: none; cursor: crosshair; }

.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-body); }
.crosshair { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); mix-blend-mode: difference; }
.crosshair::before, .crosshair::after { content: ''; position: absolute; background: #fff; }
.crosshair::before { left: 8px; top: 0; width: 2px; height: 18px; }
.crosshair::after { top: 8px; left: 0; width: 18px; height: 2px; }
.hud-top-left { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.hud-top-right { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; pointer-events: auto; flex-wrap: wrap; justify-content: flex-end; }
.hud-pill { background: rgba(0,0,0,.5); padding: 3px 8px; font-size: 18px; text-shadow: 1px 1px 0 #000; }
.hud-pill:empty { display: none; }
.hud-hint { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); font-size: 16px; color: #fff; text-shadow: 1px 1px 0 #000; background: rgba(0,0,0,.35); padding: 2px 8px; white-space: nowrap; max-width: 95%; overflow: hidden; text-overflow: ellipsis; }

.hotbar { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 0; background: rgba(0,0,0,.55); border: 3px solid #000; box-shadow: inset 0 0 0 2px #8b8b8b; pointer-events: auto; }
.slot { width: 52px; height: 52px; position: relative; border: 2px solid #3a3a3a; box-shadow: inset 2px 2px 0 #1e1e1e, inset -2px -2px 0 #8b8b8b; background: #8b8b8b55; display: grid; place-items: center; cursor: pointer; }
.slot.selected { outline: 4px solid #fff; outline-offset: -2px; z-index: 1; }
.slot canvas { width: 36px; height: 36px; image-rendering: pixelated; }
.slot .count { position: absolute; right: 3px; bottom: 1px; font-size: 18px; color: #fff; text-shadow: 1px 1px 0 #000; font-family: var(--font-body); }
.toast { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 6px 14px; font-size: 20px; opacity: 0; transition: opacity .3s; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.toast.show { opacity: 1; }

/* Overlay */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); z-index: 5; }
.overlay-box { text-align: center; background: var(--panel); color: var(--text-dark); border: 3px solid #000; box-shadow: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark); padding: 24px 28px; max-width: 520px; width: 92%; }
.overlay-box img { border: 2px solid #000; }
.overlay-box h3 { margin: 10px 0 6px; color: #3b3b3b; }
.overlay-box p { font-size: 20px; }
.overlay-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.overlay-settings { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: 20px; margin-bottom: 8px; }
.overlay-settings select { font-family: var(--font-body); font-size: 18px; padding: 2px 6px; }
.overlay-controls { font-size: 16px; color: #555; margin: 0; }

/* Inventory panel */
.panel-overlay { position: absolute; inset: 0; display: flex; background: rgba(0,0,0,.5); z-index: 6; overflow: auto; padding: 10px; }
.mc-panel { margin: auto; background: var(--panel); color: var(--text-dark); border: 3px solid #000; box-shadow: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark); padding: 18px; width: min(760px, 100%); }
.mc-panel-title { font-family: var(--font-pixel); font-size: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: #3b3b3b; }
.inv-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, 52px); gap: 4px; }
.inv-grid .slot { background: #8b8b8b; }
.inv-grid .slot:hover { background: #a8a8a8; }
.recipes { display: grid; gap: 8px; }
.recipe { display: flex; align-items: center; gap: 8px; background: #8b8b8b; border: 2px solid #373737; padding: 6px; font-size: 18px; }
.recipe canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.recipe .arrow { font-family: var(--font-pixel); font-size: 10px; }
.recipe .mc-btn { margin-left: auto; }
.recipe.disabled { opacity: .5; }

/* Touch UI */
.touch-ui { display: none; position: absolute; inset: 0; pointer-events: none; }
body.touch .touch-ui { display: block; }
body.touch .hud-hint { display: none; }
body.touch .hud-top-left { top: 52px; }
.joystick { position: absolute; left: 20px; bottom: 90px; width: 120px; height: 120px; border-radius: 50%; background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.5); pointer-events: auto; touch-action: none; }
.joy-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.7); }
.touch-buttons { position: absolute; right: 16px; bottom: 90px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; pointer-events: auto; }
.touch-btn { width: 60px; height: 60px; font-size: 26px; background: rgba(0,0,0,.45); color: #fff; border: 2px solid rgba(255,255,255,.6); touch-action: none; user-select: none; }
.touch-btn:active { background: rgba(255,255,255,.4); }

/* Game features */
.game-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 30px; }
.feature { display: flex; gap: 14px; align-items: center; padding: 16px; font-size: 20px; }
.feature-icon { flex: none; width: 48px; height: 48px; border: 3px solid #000; image-rendering: pixelated; background-size: 48px 48px; }
.feature-icon.grass { background-color: var(--grass); background-image: var(--grass-tex); }
.feature-icon.gold { background-color: var(--gold); background-image: var(--gold-tex); }
.feature-icon.save { background-color: var(--stone); background-image: var(--stone-tex); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav { gap: 12px; padding: 8px 14px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(20,20,20,.97); border-bottom: 3px solid #000; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid #333; }
  .nav-buy { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .hero { padding: 100px 16px 150px; }
  .splash { right: -10px; top: -10px; font-size: 10px; }
  .inv-columns { grid-template-columns: 1fr; }
  .game-wrap { aspect-ratio: auto; height: 78vh; }
  .overlay { overflow: auto; }
  .overlay-box { padding: 14px 12px; }
  .overlay-box img { width: 56px; height: 56px; }
  .overlay-box p { font-size: 18px; }
  .overlay-controls { display: none; }
  .hud-hint { font-size: 13px; }
  .hud-top-right .mc-btn-small { font-size: 8px; padding: 7px 8px; }
  .slot { width: 40px; height: 40px; }
  .slot canvas { width: 28px; height: 28px; }
  .section { padding: 60px 16px; }
}

/* ===== Survival HUD ===== */
.hud-bottom { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.item-name { font-size: 20px; color: #fff; text-shadow: 1px 1px 0 #000; opacity: 0; transition: opacity .3s; height: 22px; }
.item-name.show { opacity: 1; }
.status-bars { width: 486px; max-width: 95vw; }
.bar-row { display: flex; justify-content: space-between; min-height: 18px; }
.hearts, .hunger, .air { display: flex; gap: 1px; }
.hunger, .air { flex-direction: row-reverse; margin-left: auto; }
.hearts i, .hunger i, .air i { width: 18px; height: 18px; display: block; background-size: contain; background-repeat: no-repeat; image-rendering: pixelated; }
.hearts i.full { background-image: var(--ic-heart-full); } .hearts i.half { background-image: var(--ic-heart-half); } .hearts i.empty { background-image: var(--ic-heart-empty); }
.hunger i.full { background-image: var(--ic-food-full); } .hunger i.half { background-image: var(--ic-food-half); } .hunger i.empty { background-image: var(--ic-food-empty); }
.air i.full { background-image: var(--ic-bubble); } .air i.empty { background-image: none; }
.hearts i.blink { animation: blink .5s steps(1) infinite alternate; }
@keyframes blink { from { transform: translateY(0); } to { transform: translateY(-2px); } }
.xp-row { position: relative; height: 10px; margin: 2px 0 2px; }
.xp-bar { height: 10px; border: 2px solid #000; background: #2a2a2a; box-shadow: inset 0 0 0 1px #555; }
.xp-bar div { height: 100%; background: #7fe61c; }
.xp-level { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); color: #7fe61c; font-family: var(--font-pixel); font-size: 12px; text-shadow: 1px 1px 0 #000; }
.hotbar { position: static; transform: none; pointer-events: auto; }
.slot .dur { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 3px; background: #222; }
.slot .dur div { height: 100%; }
.hud-hint { bottom: 128px; }
.debug { position: absolute; top: 76px; left: 10px; font: 14px/1.3 monospace; color: #fff; text-shadow: 1px 1px 0 #000; background: rgba(0,0,0,.35); margin: 0; padding: 4px 6px; white-space: pre; }
.debug:empty { display: none; }
.adv-toast { position: absolute; top: 56px; right: 12px; display: flex; gap: 10px; align-items: center; background: var(--panel); color: #222; border: 3px solid #000; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; padding: 8px 14px; transform: translateX(130%); transition: transform .4s; font-size: 18px; line-height: 1.2; }
.adv-toast.show { transform: none; }
.adv-toast b { color: #c9a100; font-family: var(--font-pixel); font-size: 9px; }
.adv-toast canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.game-wrap.hurt::after { content: ''; position: absolute; inset: 0; background: rgba(255,0,0,.28); pointer-events: none; z-index: 4; }

/* ===== Container GUI ===== */
.gui { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; z-index: 7; overflow: auto; padding: 10px; }
.gui-panel { margin: auto; position: relative; width: auto; max-width: 100%; padding: 14px 16px 16px; }
.gui-title { font-family: var(--font-pixel); font-size: 11px; color: #3b3b3b; margin-bottom: 8px; }
.gui-sub { font-size: 18px; color: #3b3b3b; margin: 8px 0 4px; }
.gui-grid { display: grid; gap: 2px; }
.gui-hotbar { margin-top: 6px; }
.gslot { width: 52px; height: 52px; position: relative; background: #8b8b8b; border: 2px solid #373737; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; display: grid; place-items: center; cursor: pointer; user-select: none; }
.gslot:hover { background: #a8a8a8; }
.gslot.selected { outline: 3px solid #fff; outline-offset: -3px; }
.gslot.result { width: 60px; height: 60px; }
.gslot canvas { width: 36px; height: 36px; image-rendering: pixelated; pointer-events: none; }
.gslot .count, .cursor-stack .count { position: absolute; right: 3px; bottom: 0; font-size: 20px; color: #fff; text-shadow: 1px 1px 0 #000; font-family: var(--font-body); pointer-events: none; }
.gslot .dur { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 3px; background: #222; }
.gslot .dur div { height: 100%; }
.craft-wrap { display: flex; align-items: center; gap: 14px; }
.gui-arrow { font-family: var(--font-pixel); font-size: 18px; color: #3b3b3b; }
.gui-hint { font-size: 16px; color: #555; margin-top: 8px; max-width: 480px; line-height: 1.2; }
.gui-close { position: absolute; top: 10px; right: 10px; }
.gui-tooltip { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); background: rgba(16,0,16,.92); color: #fff; border: 2px solid #4a2a7a; padding: 4px 10px; font-size: 18px; white-space: nowrap; pointer-events: none; z-index: 2; }
.cursor-stack { position: fixed; width: 52px; height: 52px; pointer-events: none; z-index: 100; transform: translate(-26px, -26px); display: grid; place-items: center; }
.cursor-stack canvas { width: 36px; height: 36px; image-rendering: pixelated; }
.creative-grid { grid-template-columns: repeat(9, 52px); max-height: 224px; overflow: auto; }
.recipe-book { margin-top: 10px; }
.recipe-list { display: flex; flex-wrap: wrap; gap: 3px; max-width: 480px; }
.recipe-entry { width: 36px; height: 36px; display: grid; place-items: center; background: #8b8b8b; border: 2px solid #373737; cursor: pointer; }
.recipe-entry canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.recipe-entry.disabled { opacity: .35; cursor: default; }
.recipe-entry:hover { background: #a8a8a8; }
.furnace-wrap { display: flex; align-items: center; gap: 14px; }
.furnace-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.furnace-fire { width: 18px; height: 18px; background: #444; border: 2px solid #222; display: flex; align-items: flex-end; }
.furnace-fire div { width: 100%; background: #f80; }
.furnace-prog { width: 52px; height: 12px; background: #444; border: 2px solid #222; }
.furnace-prog div { height: 100%; background: #fff; }

/* ===== Quests / death ===== */
.quest-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.quest { display: flex; align-items: center; gap: 12px; background: #8b8b8b; border: 2px solid #373737; padding: 6px 10px; font-size: 18px; line-height: 1.15; }
.quest.done { background: #8fc86a; }
.quest b { font-family: var(--font-pixel); font-size: 10px; }
.quest span { color: #333; }
.quest .mark { margin-left: auto; font-size: 24px; }
.quest canvas { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.death { position: absolute; inset: 0; background: rgba(120,0,0,.6); display: grid; place-content: center; text-align: center; z-index: 8; }
.death h3 { font-size: 28px; color: #fff; text-shadow: 3px 3px 0 #000; }
.death p { font-size: 22px; color: #fff; text-shadow: 1px 1px 0 #000; }
.touch-buttons { grid-template-columns: 1fr 1fr 1fr; }
.touch-btn.on { background: rgba(255,255,255,.5); color: #000; }
@media (max-width: 860px) {
  .status-bars { width: 360px; }
  .hearts i, .hunger i, .air i { width: 14px; height: 14px; }
  .gslot { width: 40px; height: 40px; } .gslot canvas { width: 28px; height: 28px; }
  .gui-grid { gap: 1px; }
  .gui-panel .gui-grid[style] { grid-template-columns: repeat(9, 40px) !important; }
  .creative-grid { grid-template-columns: repeat(9, 40px) !important; }
}

/* lock page scrolling while playing */
body.playing { overflow: hidden; overscroll-behavior: none; }
body.playing .nav { pointer-events: none; opacity: .35; }
