@font-face { font-family: Minecraft; src: url("assets/fonts/Minecraft-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Minecraft; src: url("assets/fonts/Minecraft-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
:root { --cream: #fff1d3; --copper: #f1a46f; --ink: #272727; }
* { box-sizing: border-box; }
html { min-width: 320px; background: #284937; }
body { margin: 0; color: var(--cream); font: 16px/1.4 Minecraft, monospace; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 3px solid #ffe78f; outline-offset: 4px; }
img { display: block; }
.brand img, .inventory-button img, .loading-ore { image-rendering: pixelated; }
.world, .world-shade { position: fixed; inset: 0; pointer-events: none; }
.world { background: #284937; }
.world img { width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.world-shade { background: linear-gradient(180deg, #0b201d80 0%, #11292125 29%, transparent 60%, #10271e80 100%), radial-gradient(ellipse at 50% 40%, transparent 40%, #0b231e35); }
.site-shell { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding: 16px 28px 14px; overflow: hidden; }
.hud-top { display: flex; align-items: center; justify-content: space-between; min-height: 32px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; text-shadow: 2px 2px #162e1d; }
.network { font-size: 12px; color: #e1eacb; text-shadow: 2px 2px #162e1d; }
.game-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 10px 0 16px; }
.game-title { position: relative; width: fit-content; max-width: calc(100% - 70px); margin: 0 0 2px; z-index: 2; }
h1 { display: flex; align-items: baseline; justify-content: center; gap: 22px; margin: 0; font-weight: 700; line-height: 1.04; letter-spacing: -1px; text-align: center; }
h1 span { display: block; overflow-wrap: anywhere; }
.title-top { font-size: clamp(27px, 2.8vw, 43px); color: #e7e7de; text-shadow: 0 3px #838879, 3px 4px #15271d, 4px 5px #15271d; }
.title-bottom { font-size: clamp(55px, 5.6vw, 86px); color: #fac293; text-shadow: 0 3px #a2603c, 3px 5px #5c3525, 5px 7px #11251b; }
.splash { position: absolute; right: -66px; bottom: -6px; font-size: 20px; color: #ffec66; text-shadow: 2px 2px #514a11; transform: rotate(-10deg); white-space: nowrap; }
.character { margin: 0; height: clamp(325px, 49svh, 555px); width: min(100%, 540px); display: flex; align-items: flex-end; justify-content: center; position: relative; }
.character img { height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(8px 15px 7px #142c1970); }
.control-dock { position: relative; z-index: 3; width: min(570px, 100%); color: var(--ink); background: #c6c6c6; border: 4px solid; border-color: #f4f4f4 #555 #555 #f4f4f4; padding: 10px 12px 5px; box-shadow: 0 0 0 3px #101710, 0 8px 0 #0b201954; }
.dock-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 11px; color: #3d3d3d; margin: 0 1px 8px; line-height: 1.2; }
.dock-caption span:last-child { font-size: 9px; color: #666; text-align: right; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.inventory-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 75px; padding: 7px 8px; border: 3px solid; border-color: #424242 #ededed #ededed #424242; background: linear-gradient(#666666a6, #666666a6), url("assets/blocks/stone.png") 0 0 / 64px 64px; color: white; text-shadow: 2px 2px #3d3d3d; font-size: 13px; line-height: 1.15; image-rendering: pixelated; position: relative; cursor: pointer; transition: filter 90ms; }
.inventory-button:hover, .inventory-button:focus-visible { filter: brightness(1.2); color: #ffffb0; }
.inventory-button:active { border-color: #222 #ddd #ddd #222; transform: translateY(1px); }
.inventory-button[aria-disabled="true"] { cursor: default; }
.pump-button { border-color: #774f32 #edc99d #edc99d #774f32; background-image: linear-gradient(#8d6645c9, #8d6645c9), url("assets/blocks/stone.png"); }
.x-icon { height: 30px; line-height: 30px; font-weight: 700; font-size: 29px; }
.game-button { border: 0; border-image: url("assets/ui/button.png") 3 fill / 5px / 0 stretch; image-rendering: pixelated; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; color: white; text-shadow: 2px 2px #343434; box-shadow: 0 3px #393939; font-size: 13px; cursor: pointer; white-space: nowrap; }
.game-button:hover, .game-button:focus-visible { border-image-source: url("assets/ui/button_highlighted.png"); color: #ffffbd; }
.game-button:active { transform: translateY(2px); box-shadow: none; }
.game-button:disabled { cursor: default; color: #cacaca; }
.contract { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 10px; margin-top: 10px; min-height: 40px; border: 2px solid; border-color: #656565 #f3f3f3 #f3f3f3 #656565; background: #999; }
.contract-label { flex: none; font-size: 11px; color: #333; }
.contract code { flex: 1; min-width: 0; font: 10px/1.2 Minecraft, monospace; color: #202020; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; }
.contract button { flex: none; min-height: 27px; font-size: 9px; padding: 6px 12px; }
.status { color: #4b4b4b; font-size: 10px; min-height: 12px; text-align: center; margin: 6px 0 0; }
.footer { padding-top: 2px; color: #dce5d0; text-shadow: 1px 1px #14261b; text-align: center; font-size: 8px; line-height: 1.3; }
.noscript { position: relative; margin: 0; background: #151d17; color: #fff; padding: 12px; font-size: 12px; text-align: center; }

.loading-screen { display: none; position: fixed; z-index: 100; inset: 0; align-items: center; justify-items: center; grid-template-rows: auto 1fr auto; padding: 36px 24px 34px; color: #fff; background: linear-gradient(#0009, #0009), url("assets/blocks/dirt.png") 0 0 / 64px 64px repeat; image-rendering: pixelated; text-shadow: 2px 2px #17120c; }
.is-loading { overflow: hidden; }
.is-loading .loading-screen { display: grid; }
.is-loading .site-shell { visibility: hidden; }
.loading-screen:focus { outline: none; }
.loading-brand { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(100%, 720px); color: #cac2ae; font-size: 13px; }
.loading-brand [data-ticker] { color: var(--copper); }
.loading-content { text-align: center; width: min(100%, 350px); margin-top: -24px; }
.loading-ore { margin: 0 auto 27px; filter: drop-shadow(4px 5px #1a120ab3); }
.loading-content h2 { font-size: 22px; font-weight: 400; margin: 0 0 12px; }
.loading-stage { font-size: 13px; color: #c4bead; margin: 0 0 24px; min-height: 20px; }
.loading-meter { height: 18px; padding: 3px; border: 2px solid #a39e8f; box-shadow: 2px 2px #15110d; background: #181712; }
.loading-meter > span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, #80c741 0 15px, #659d31 15px 17px); box-shadow: inset 0 2px #b6eb72, inset 0 -2px #42691d; }
.loading-percent { margin: 11px 0 0; font-size: 12px; color: #d4d3c5; }
.skip-loading { min-height: 42px; width: 132px; font-size: 13px; }
.is-ready .game-title, .is-ready .control-dock { animation: arrive .45s ease-out both; }
.is-ready .character { animation: arrive .6s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }


@media (min-width: 1600px) {
  .site-shell { padding-inline: 40px; }
  .game-screen { gap: 15px; }
  .control-dock { width: 610px; }
}
@media (max-width: 760px) {
  .site-shell { padding: 13px 20px 15px; }
  .hud-top { min-height: 28px; }
  .brand { font-size: 12px; gap: 7px; }
  .brand img { width: 25px; height: 25px; }
  .network { font-size: 10px; }
  .world img { object-position: 50% center; }
  .game-screen { padding-top: 15px; gap: 13px; }
  .game-title { max-width: calc(100% - 30px); margin-bottom: 0; }
  h1 { flex-direction: column; align-items: center; gap: 1px; }
  .title-top { font-size: clamp(24px, 5.8vw, 33px); }
  .title-bottom { font-size: clamp(52px, 12.8vw, 72px); }
  .splash { font-size: 15px; right: -35px; bottom: 0; }
  .character { height: clamp(270px, 41svh, 410px); }
  .control-dock { width: min(480px, 100%); padding: 9px 9px 5px; }
  .dock-caption { font-size: 10px; }
  .dock-caption span:last-child { font-size: 8px; }
  .platforms { gap: 7px; }
  .inventory-button { min-height: 72px; font-size: 11px; padding-inline: 4px; }
  .contract { gap: 8px; padding-left: 7px; }
  .contract code { font-size: 9px; }
  .contract button { padding-inline: 9px; }
  .footer { max-width: 280px; align-self: center; font-size: 7px; line-height: 1.5; }
  .loading-brand { font-size: 10px; }
}
@media (max-width: 370px) {
  .site-shell { padding-inline: 14px; }
  .character { height: 300px; }
  .inventory-button { font-size: 10px; }
  .dock-caption span:last-child { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
