@font-face {
    font-family: 'NCAT Pixel';
    src: url('/assets/fonts/ncat-pixel.woff2') format('woff2');
    font-display: swap;
}

:root {
    color-scheme: dark;
    --pixel: 'NCAT Pixel', Consolas, 'Courier New', monospace;
    --sans: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    --ink: #f4f8ee;
    --muted: #c9d6c5;
    --green: #a9ee73;
    --green-mid: #5fa83d;
    --green-dark: #264a1c;
    --yellow: #ffff55;
    --stone: #717171;
    --gui: #c6c6c6;
    --shadow-white: #3f3f3f;
    --shadow-green: #2a3b1c;
    --gutter: clamp(16px, 5.5vw, 96px);
    --slot: clamp(28px, calc((100vw - 32px) / 10), 50px);
    --magenta: #cf63c6;
    --cursor: url('/assets/images/ncat-minecraft/ui/cursor.png') 0 0, auto;
    --cursor-hand: url('/assets/images/ncat-minecraft/ui/cursor-hand.png') 11 1, pointer;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    cursor: var(--cursor);
    background: #0b1510;
}

@supports not selector(::-webkit-scrollbar) {
    html { scrollbar-color: #8b8b8b #1c1c1c; }
}

::-webkit-scrollbar { width: 16px; height: 16px; background: #1c1c1c; }
::-webkit-scrollbar-track { background: #1f1f1f; box-shadow: inset 2px 0 0 #000, inset 4px 0 0 #2b2b2b; }
::-webkit-scrollbar-thumb {
    min-height: 48px;
    background: #8b8b8b;
    border: 2px solid #000;
    box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555;
}
::-webkit-scrollbar-thumb:hover { background: #6fb04f; box-shadow: inset 2px 2px 0 #b8f08e, inset -2px -2px 0 #2f6b1f; }
::-webkit-scrollbar-thumb:active { background: var(--green); }
::-webkit-scrollbar-corner { background: #1c1c1c; }

::selection { background: var(--green); color: #10220e; }

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: #0b1510;
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a, button, [role="menuitem"], .slot { cursor: var(--cursor-hand); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #000; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 8px; left: 8px;
    z-index: 200;
    padding: 10px 14px;
    background: #000;
    color: #fff;
    font: 16px/1 var(--pixel);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }





#ncat-world {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.world-shade {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(4, 10, 8, .5), rgba(4, 10, 8, .18) 38%, transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 16%, transparent 80%, rgba(0, 0, 0, .35));
    transition: opacity .4s ease;
}

.no-webgl #ncat-world { display: none; }
.no-webgl .world-shade {
    background:
        linear-gradient(180deg, #78a7ff 0, #c3dbff 58%, #6da843 58%, #6da843 61%, #7a5638 61%, #5a3f28 100%);
}
.no-webgl .crosshair { display: none; }





.loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    animation: loader-failsafe .01s 14s forwards;
}
.loader::before, .loader::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 50.5%;
    background: #1b120b url('/assets/images/ncat-minecraft/ui/dirt.png') 0 0 / 64px 64px;
    image-rendering: pixelated;
    transition: transform 1s cubic-bezier(.75, 0, .2, 1) .25s;
}
.loader::before { top: 0; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }
.loader::after { bottom: 0; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .35); }

.loader__inner { position: relative; z-index: 1; width: min(92vw, 620px); text-align: center; transition: opacity .45s ease, transform .6s cubic-bezier(.3, 0, .2, 1); }
.loader__logo { position: relative; margin: 0 auto 26px; animation: logo-float 3.2s ease-in-out 1.4s infinite; }
.loader__logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 22px rgba(110, 255, 80, .35)) drop-shadow(0 8px 0 rgba(0, 0, 0, .45));
    animation: logo-build 1.3s steps(14) both;
}
.loader__scan {
    position: absolute;
    top: -6%;
    bottom: -6%;
    left: 0;
    width: 6px;
    background: #c6ff9a;
    box-shadow: 0 0 18px 6px rgba(140, 255, 90, .75);
    opacity: 0;
    animation: logo-scan 1.3s steps(14) both;
}
@keyframes logo-build {
    from { clip-path: inset(0 100% 0 0); filter: brightness(2.4) drop-shadow(0 0 22px rgba(110, 255, 80, .8)); }
    to { clip-path: inset(0 0 0 0); }
}
@keyframes logo-scan {
    0% { left: 0; opacity: 1; }
    92% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
@keyframes logo-float { 50% { transform: translateY(-6px); } }

.loader__title { margin: 0 0 8px; font: 24px/1.2 var(--pixel); text-shadow: 3px 3px 0 var(--shadow-white); }
.loader__step { margin: 0 0 18px; color: #a8a8a8; font: 16px/1.2 var(--pixel); text-shadow: 2px 2px 0 #2a2a2a; }
.loader__bar {
    width: min(100%, 420px);
    height: 12px;
    margin: 0 auto;
    border: 2px solid #000;
    background: #2e2e2e;
    box-shadow: inset 0 0 0 2px #555;
}
.loader__bar span {
    display: block;
    height: 100%;
    background: #80ff20;
    box-shadow: inset 0 -3px 0 #4fae14;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}


.is-ready .loader { visibility: hidden; pointer-events: none; transition: visibility 0s 1.35s; }
.is-ready .loader::before { transform: translateY(-101%); }
.is-ready .loader::after { transform: translateY(101%); }
.is-ready .loader__inner { opacity: 0; transform: scale(1.14); }

@keyframes loader-failsafe { to { visibility: hidden; } }





.mc-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 18px;
    border: 2px solid #000;
    background: #727272;
    color: #fff;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .38), inset -2px -4px 0 rgba(0, 0, 0, .38);
    font: 16px/1 var(--pixel);
    text-shadow: 2px 2px 0 var(--shadow-white);
    white-space: nowrap;
    transition: background .12s ease, transform .12s ease;
}
.mc-button::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    pointer-events: none;
}
.mc-button:hover { background: #858585; }
.mc-button:hover::after { border-color: #fff; }
.mc-button:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .3); }
.mc-button > span[aria-hidden="true"] { color: var(--yellow); }
.mc-button .icon { width: 20px; height: 20px; flex: 0 0 auto; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .35)); }
.mc-button--small .icon { width: 18px; height: 18px; }
.mc-button--curse { background: #5a2a17; box-shadow: inset 2px 2px 0 rgba(255, 170, 120, .35), inset -2px -4px 0 rgba(0, 0, 0, .4); }
.mc-button--curse:hover { background: #7a3a1f; }
.mc-button--curse em {
    padding: 2px 5px 3px;
    background: #f16436;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    text-shadow: 1px 1px 0 #7a2a12;
    animation: blink 1.6s steps(2) infinite;
}
.mc-button--github { background: #24292f; box-shadow: inset 2px 2px 0 rgba(240, 246, 252, .22), inset -2px -4px 0 rgba(0, 0, 0, .45); }
.mc-button--github:hover { background: #32383f; }
.mc-button--lang { gap: 8px; background: #4b2a52; box-shadow: inset 2px 2px 0 rgba(255, 190, 250, .3), inset -2px -4px 0 rgba(0, 0, 0, .4); }
.mc-button--lang:hover { background: #643870; }
.lang-badge {
    padding: 2px 4px 3px;
    border: 2px solid #000;
    background: var(--magenta);
    color: #fff;
    font-size: 11px;
    text-shadow: 1px 1px 0 #5a1f55;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; shape-rendering: crispEdges; vertical-align: -.15em; }

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 36px;
    padding: 0;
    border: 2px solid #000;
    background: #555;
    color: #e8e8e8;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .3), inset -2px -3px 0 rgba(0, 0, 0, .38);
}
.icon-button .icon { width: 20px; height: 20px; }
.icon-button:hover { background: #6a6a6a; outline: 2px solid #fff; outline-offset: -2px; }
.icon-button .icon--on, .icon-button.is-on .icon--off { display: none; }
.icon-button.is-on .icon--on { display: inline-block; }
.icon-button.is-on { background: #3d8a2a; color: #fff; }
.mc-button--primary { background: #3d8a2a; text-shadow: 2px 2px 0 #1a3a12; }
.mc-button--primary:hover { background: #4ba536; }
.mc-button--small { min-height: 36px; padding: 0 12px; font-size: 14px; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--green);
    font: 16px/1.2 var(--pixel);
    text-shadow: 2px 2px 0 var(--shadow-green);
}
.eyebrow__num {
    padding: 2px 6px 4px;
    background: var(--green);
    color: #10220e;
    box-shadow: 2px 2px 0 #1a3a12;
    text-shadow: none;
}
.eyebrow__new {
    padding: 3px 6px 4px;
    border: 2px solid #000;
    background: var(--magenta);
    color: #fff;
    font-size: 12px;
    text-shadow: 1px 1px 0 #5a1f55;
    text-transform: uppercase;
    animation: blink 1.6s steps(2) infinite;
}

.chapter--proxy h2 span { color: #f08ae8; text-shadow: .125em .125em 0 #4a1d46; }
.chapter--proxy .eyebrow { color: #f3a6ec; text-shadow: 2px 2px 0 #3a1636; }
.chapter--proxy .eyebrow__num { background: var(--magenta); color: #fff; box-shadow: 2px 2px 0 #4a1d46; }
.chapter--proxy .tooltip-list { border-image: linear-gradient(#e27cd9, #6a2466) 1; }
.chapter--proxy .tooltip-list li::before { color: var(--magenta); }

.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.modes li {
    display: grid;
    gap: 4px;
    padding: 8px 10px 7px;
    border: 2px solid #000;
    background: rgba(18, 15, 24, .9);
    box-shadow: inset 0 0 0 2px #3a2a44;
}
.modes strong { color: #fff; font: 400 15px/1 var(--pixel); text-shadow: 2px 2px 0 #1e1e1e; }
.modes span { color: #b9a9c4; font-size: 13px; line-height: 1.3; }
.modes__hot { background: linear-gradient(180deg, #3a1f12, rgba(18, 15, 24, .9)) !important; box-shadow: inset 0 0 0 2px #9a5410 !important; }
.modes__hot strong { color: #ffd08a; }
.modes__hot strong::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; background: #e7a044; box-shadow: 0 0 6px #e7a044; vertical-align: 1px; animation: blink 1.2s steps(2) infinite; }

.chapter h2 {
    margin: 0;
    color: var(--ink);
    font: 400 clamp(40px, 5vw, 72px)/1.05 var(--pixel);
    letter-spacing: 0;
    text-shadow: .125em .125em 0 #232323;
}
.chapter h2 span { color: var(--green); text-shadow: .125em .125em 0 var(--shadow-green); }
.chapter h1 { margin: 0; }

.lead {
    max-width: 34em;
    margin: 18px 0 0;
    color: #e0e9dc;
    font-size: clamp(16px, 1.25vw, 18px);
    line-height: 1.6;
    text-wrap: pretty;
}

.tooltip-list {
    display: grid;
    gap: 6px;
    margin: 20px 0 0;
    padding: 12px 14px;
    list-style: none;
    border: 2px solid transparent;
    border-image: linear-gradient(#7fdc4a, #2c6620) 1;
    background: rgba(12, 16, 10, .92);
    box-shadow: 0 0 0 2px #0c100a;
    color: #b9c2b4;
    font: 16px/1.45 var(--pixel);
}
.tooltip-list strong { color: #fff; font-weight: 400; }
.tooltip-list li::before { content: '▶'; margin-right: 8px; color: var(--green); font-size: 12px; vertical-align: 2px; }

kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 2px 6px 0;
    border: 2px solid #000;
    background: #4a4a4a;
    color: #fff;
    box-shadow: inset 2px 2px 0 #7a7a7a, inset -2px -3px 0 #262626;
    font: 14px/1.4 var(--pixel);
    text-align: center;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.chips li {
    padding: 5px 9px;
    border: 2px solid rgba(169, 238, 115, .4);
    background: rgba(0, 0, 0, .45);
    color: #d6f5bf;
    font: 14px/1.2 var(--pixel);
}

.steps { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: none; }
.steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border: 2px solid #000;
    background: rgba(12, 16, 10, .88);
    box-shadow: inset 0 0 0 2px rgba(127, 220, 74, .25);
    color: #cdd6c9;
    font-size: 15px;
    line-height: 1.45;
}
.steps strong { display: block; margin-bottom: 2px; color: #fff; font: 400 16px/1.2 var(--pixel); text-shadow: 2px 2px 0 #1e1e1e; }
.steps__n {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid #000;
    background: var(--green);
    color: #10220e;
    box-shadow: inset -2px -2px 0 #5fa83d, inset 2px 2px 0 #d8ffc0;
    font: 16px/1 var(--pixel);
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 0; color: #dfe8da; font: 14px/1.2 var(--pixel); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tip { margin: 10px 0 0; color: #9fb09a; font-size: 14px; }
.led { display: inline-block; width: 10px; height: 10px; margin: 0 2px; box-shadow: 0 0 6px currentColor; vertical-align: 0; }
.led--red { background: #da323c; color: #da323c; }
.led--amber { background: #e7a044; color: #e7a044; }
.led--green { background: #5ff695; color: #5ff695; }





.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(12px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    transition: opacity .3s ease;
}

.topbar__brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; text-shadow: 2px 2px 0 var(--shadow-white); }
.topbar__logo {
    width: 44px;
    height: 44px;
    border: 2px solid #000;
    box-shadow: 0 0 0 2px rgba(110, 255, 80, .45), 0 0 18px rgba(110, 255, 80, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.topbar__brand:hover .topbar__logo { transform: rotate(-4deg) scale(1.06); box-shadow: 0 0 0 2px var(--green), 0 0 26px rgba(110, 255, 80, .6); }
.topbar__title { display: grid; gap: 4px; }
.topbar__title strong { font: 400 18px/1 var(--pixel); white-space: nowrap; }
.topbar__title small { color: var(--green); font: 12px/1 var(--pixel); text-shadow: 2px 2px 0 var(--shadow-green); }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

@keyframes blink { 50% { opacity: .35; } }





main { position: relative; z-index: 2; }

.chapter {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 104px var(--gutter) 150px;
}

.panel {
    position: relative;
    width: 100%;
    max-width: 580px;
    padding: 28px 30px 30px;
    border: 2px solid rgba(0, 0, 0, .7);
    background: linear-gradient(180deg, rgba(10, 14, 12, .8), rgba(10, 14, 12, .66));
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .07), inset -2px -2px 0 rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .3);
    backdrop-filter: blur(4px) saturate(1.15);
    -webkit-backdrop-filter: blur(4px) saturate(1.15);
    clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
    transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}

.is-ready .chapter:not(.is-active) .panel { opacity: .12; transform: translateY(26px); }

.panel--hero { background: linear-gradient(180deg, rgba(8, 14, 10, .62), rgba(8, 14, 10, .4)); }
.panel--wide { max-width: 640px; }

.hero-logo { display: block; width: min(100%, 540px); height: auto; margin: 0 0 14px -6px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .4)); }

.tagline {
    margin: 10px 0 0;
    font: clamp(20px, 2.1vw, 28px)/1.3 var(--pixel);
    text-shadow: .125em .125em 0 #232323;
}
.tagline span { color: var(--green); text-shadow: .125em .125em 0 var(--shadow-green); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.scroll-cue {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    color: #cfdcca;
    font: 13px/1.3 var(--pixel);
    text-shadow: 2px 2px 0 #1e1e1e;
}
.scroll-cue__mouse {
    position: relative;
    width: 18px;
    height: 26px;
    border: 2px solid #fff;
    box-shadow: 2px 2px 0 #1e1e1e;
}
.scroll-cue__mouse::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 4px;
    width: 4px;
    height: 6px;
    background: var(--green);
    animation: wheel 1.6s steps(4) infinite;
}
@keyframes wheel { to { transform: translateY(8px); opacity: 0; } }

.is-entering .topbar { animation: enter-drop .7s cubic-bezier(.2, .8, .2, 1) .9s both; }
.is-entering .hotbar { animation: enter-hotbar .7s cubic-bezier(.2, .8, .2, 1) 1.1s both; }
.is-entering .panel--hero { animation: enter-panel .7s cubic-bezier(.2, .8, .2, 1) .75s both; }
.is-entering .panel--hero > * { animation: enter-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.is-entering .panel--hero > :nth-child(1) { animation: enter-logo .8s cubic-bezier(.2, .9, .25, 1.2) .95s both; }
.is-entering .panel--hero > :nth-child(2) { animation-delay: 1.15s; }
.is-entering .panel--hero > :nth-child(3) { animation-delay: 1.25s; }
.is-entering .panel--hero > :nth-child(4) { animation-delay: 1.35s; }
.is-entering .panel--hero > :nth-child(5) { animation-delay: 1.45s; }
.is-entering .panel--hero > :nth-child(6) { animation-delay: 1.55s; }
@keyframes enter-drop { from { opacity: 0; transform: translateY(-100%); } }
@keyframes enter-hotbar { from { opacity: 0; transform: translate(-50%, 140%); } }
@keyframes enter-panel { from { opacity: 0; transform: translateX(-40px); } }
@keyframes enter-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes enter-logo {
    0% { opacity: 0; transform: scale(1.25); filter: brightness(2.2); clip-path: inset(0 100% 0 0); }
    60% { opacity: 1; clip-path: inset(0 0 0 0); }
    100% { transform: none; filter: none; }
}



.inventory { --islot: clamp(28px, calc((min(100vw, 640px) - 92px) / 9), 44px); margin-top: 20px; }

.inventory__tabs { display: flex; flex-wrap: wrap; gap: 2px; padding-left: 4px; }
.inventory__tabs button {
    position: relative;
    top: 2px;
    padding: 7px 10px 5px;
    border: 2px solid #000;
    border-bottom: 0;
    background: #8b8b8b;
    color: #3f3f3f;
    box-shadow: inset 2px 2px 0 #b5b5b5;
    font: 14px/1 var(--pixel);
}
.inventory__tabs button:hover { background: #9d9d9d; }
.inventory__tabs button[aria-pressed="true"] { z-index: 1; padding-bottom: 7px; background: var(--gui); box-shadow: inset 2px 2px 0 #fff; color: #222; }

.inventory__window {
    padding: 10px 12px 12px;
    border: 2px solid #000;
    background: var(--gui);
    box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555;
    width: max-content;
    max-width: 100%;
}
.inventory__title { margin: 0 0 8px; color: #3f3f3f; font: 14px/1 var(--pixel); }
.inventory__grid { display: grid; grid-template-columns: repeat(9, var(--islot)); margin: 0; padding: 0; list-style: none; }
.inventory__grid li[hidden] { display: none; }

.slot--inventory {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--islot);
    height: var(--islot);
    padding: 0;
    border: 0;
    background: #8b8b8b;
    box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
}
.slot-empty .slot--inventory { cursor: var(--cursor); }
.slot--inventory:hover::after, .slot--inventory:focus-visible::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(255, 255, 255, .45);
    pointer-events: none;
}
.slot--inventory:focus-visible { outline: 2px solid #000; outline-offset: -2px; box-shadow: inset 0 0 0 2px #fff; }
.slot--inventory[aria-pressed="true"] { background: #7fbf57; box-shadow: inset 2px 2px 0 #2f6b1f, inset -2px -2px 0 #d8ffc0; }
.slot--inventory .slot__icon { display: grid; place-items: center; width: 84%; height: 84%; pointer-events: none; }
.slot--inventory.is-new::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 1;
    width: 6px;
    height: 6px;
    background: var(--magenta);
    box-shadow: 0 0 0 1px #000, 0 0 6px var(--magenta);
    pointer-events: none;
}
.slot--inventory:not(.has-icon) .slot__icon::before { content: ''; width: 45%; height: 45%; background: #6f6f6f; box-shadow: inset -2px -2px 0 #555; }

.slot__icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slot__icon img[src$=".png"] { image-rendering: pixelated; }

.inventory__detail {
    display: grid;
    gap: 4px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 2px solid #000;
    background: rgba(16, 0, 16, .9);
    box-shadow: inset 0 0 0 2px #3a1a6e;
    font: 16px/1.35 var(--pixel);
}
.inventory__detail span { color: #b0b0b0; }



.chips__curse { display: inline-flex; align-items: center; gap: 6px; border-color: rgba(241, 100, 54, .6) !important; color: #ffc3a8 !important; }
.chips__curse .icon, .chips__github .icon { width: 16px; height: 16px; }
.chips li.chips__github { padding: 0; border-color: rgba(240, 246, 252, .45); }
.chips__github a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; color: #f0f6fc; transition: background .12s ease; }
.chips__github a:hover, .chips__github a:focus-visible { background: rgba(240, 246, 252, .14); }

.project-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    margin-top: 22px;
    padding: 14px;
    border: 2px solid #000;
    background: linear-gradient(135deg, #1f1612, #151515 60%);
    box-shadow: inset 0 0 0 2px #4b2a1c, 0 10px 24px rgba(0, 0, 0, .3);
}
.project-card__logo { width: 88px; height: 88px; border: 2px solid #000; box-shadow: 0 0 0 2px #2f6b1f, 0 0 20px rgba(110, 255, 80, .3); }
.project-card__body { display: grid; gap: 6px; min-width: 0; }
.project-card__name { margin: 0; font: 20px/1.1 var(--pixel); text-shadow: 2px 2px 0 #2b2b2b; }
.project-card__name span { display: block; margin-top: 4px; color: #f79a73; font-size: 13px; }
.project-card__summary { margin: 0; color: #cfcfcf; font-size: 14px; line-height: 1.45; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.project-card__tags li { padding: 3px 6px 1px; background: #2b2b2b; color: #e6e6e6; font: 12px/1.2 var(--pixel); box-shadow: inset 0 0 0 1px #444; }
.project-card__status {
    position: absolute;
    top: -12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 3px 8px 4px;
    border: 2px solid #000;
    background: #f16436;
    color: #fff;
    font: 13px/1 var(--pixel);
    text-shadow: 1px 1px 0 #7a2a12;
}
.project-card__status .icon { width: 14px; height: 14px; }
.project-card__status--live { background: #3d8a2a; text-shadow: 1px 1px 0 #1a3a12; }

.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.platforms__featured { grid-column: 1 / -1; }
.platform {
    --brand: #6f6f6f;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 10px 12px;
    border: 2px solid #000;
    background: #2a2a2a;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .1), inset -2px -3px 0 rgba(0, 0, 0, .45);
    transition: background .15s ease, transform .15s ease;
}
button.platform { width: 100%; margin: 0; color: inherit; font: inherit; text-align: left; }
a.platform:hover, a.platform:focus-visible, button.platform:hover, button.platform:focus-visible { background: color-mix(in srgb, var(--brand) 28%, #2a2a2a); transform: translateY(-2px); }
a.platform:hover::after, button.platform:hover::after { content: ''; position: absolute; inset: -2px; border: 2px solid #fff; pointer-events: none; }
.platform.is-denied { animation: denied .4s steps(6); }
@keyframes denied { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.platform__icon { width: 36px; height: 36px; flex: 0 0 auto; shape-rendering: crispEdges; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45)); }
.platform__text { display: grid; gap: 4px; min-width: 0; }
.platform__text strong { font: 400 16px/1 var(--pixel); text-shadow: 2px 2px 0 #1e1e1e; }
.platform__text > span { color: #bdbdbd; font-size: 13px; line-height: 1.3; }
.platform__go { margin-left: auto; color: var(--yellow); font: 16px/1 var(--pixel); }
.platform__badge {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
    padding: 4px 8px 5px;
    border: 2px solid #000;
    background: #f16436;
    color: #fff;
    font: 12px/1 var(--pixel);
    text-shadow: 1px 1px 0 #7a2a12;
    animation: blink 1.6s steps(2) infinite;
}
.platform__badge--live { background: #3d8a2a; text-shadow: 1px 1px 0 #1a3a12; animation: none; }
.platform__badge--live + .platform__go { margin-left: 8px; }
.platforms__featured .platform { padding: 14px; }
.platforms__featured .platform__icon { width: 48px; height: 48px; }
.platforms__featured .platform__text strong { font-size: 20px; }
.platform--curseforge { --brand: #f16436; background: linear-gradient(90deg, #4a2012, #2a2a2a 80%); box-shadow: inset 0 0 0 2px #7a3a1f; }
.platform--github { --brand: #8b949e; }
.platforms__featured .platform--github { --brand: #5fa83d; background: linear-gradient(90deg, #1f3a18, #24292f 72%); box-shadow: inset 0 0 0 2px #2f6b1f, 0 0 18px rgba(110, 255, 80, .12); }
.platform--youtube { --brand: #ff1f3d; }
.platform--linkedin { --brand: #0a66c2; }
.platform--netcat { --brand: #a9ee73; }

.credits {
    position: absolute;
    right: var(--gutter);
    bottom: 110px;
    display: grid;
    justify-items: end;
    gap: 6px;
    max-width: 360px;
    color: rgba(236, 240, 232, .78);
    font: 12px/1.45 var(--pixel);
    text-align: right;
    text-shadow: 1px 1px 0 #000;
}
.credits img { width: 150px; height: auto; margin-bottom: 4px; }
.credits p { margin: 0; }





.hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; }

.crosshair {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    opacity: .75;
    transition: opacity .3s ease;
}
.crosshair::before, .crosshair::after { content: ''; position: absolute; background: #fff; }
.crosshair::before { left: 8px; top: 0; width: 2px; height: 18px; }
.crosshair::after { left: 0; top: 8px; width: 18px; height: 2px; }
.is-loading .crosshair, .menu-open .crosshair { opacity: 0; }

.debug { position: fixed; z-index: 2; top: 68px; left: 8px; display: grid; justify-items: start; gap: 2px; font: 16px/1.25 var(--pixel); }
.debug p { margin: 0; padding: 1px 4px 0; background: rgba(24, 24, 24, .82); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.debug span { color: #e8e8a0; }

.toasts { position: fixed; top: 70px; right: 12px; display: grid; gap: 8px; }
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 300px;
    padding: 10px 14px 10px 10px;
    border: 2px solid #000;
    background: #202020;
    box-shadow: inset 0 0 0 2px #5b5b5b, inset 0 0 0 4px #202020, 0 8px 18px rgba(0, 0, 0, .35);
    animation: toast-in .45s cubic-bezier(.2, .8, .2, 1);
    transition: transform .5s ease, opacity .5s ease;
}
.toast.is-leaving { transform: translateX(120%); opacity: 0; }
.toast__icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; }
.toast__icon img { width: 36px; height: 36px; object-fit: contain; }
.toast__copy { display: grid; gap: 4px; font: 16px/1.1 var(--pixel); text-shadow: 2px 2px 0 #3f3f3f; }
.toast__copy strong { color: var(--yellow); font-weight: 400; text-shadow: 2px 2px 0 #3f3f15; }
.toast--challenge { box-shadow: inset 0 0 0 2px #8a4a86, inset 0 0 0 4px #202020, 0 0 22px rgba(255, 85, 255, .35), 0 8px 18px rgba(0, 0, 0, .35); }
.toast--challenge .toast__copy strong { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }
@keyframes toast-in { from { transform: translateX(120%); } }

.chat {
    position: fixed;
    right: 8px;
    bottom: 12px;
    display: grid;
    justify-items: end;
    gap: 2px;
    max-width: calc(50vw - var(--slot) * 5 - 28px);
    margin: 0;
    padding: 0;
    list-style: none;
    font: 14px/1.3 var(--pixel);
}
.chat li { padding: 2px 6px 0; background: rgba(0, 0, 0, .5); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; transition: opacity 1.2s ease; }
.chat li.is-fading { opacity: 0; }
.chat .chat--join { color: var(--yellow); text-shadow: 2px 2px 0 #3f3f15; }
.chat .chat--system { color: #d0d0d0; }
.chat .chat--hint { color: var(--green); text-shadow: 2px 2px 0 var(--shadow-green); }

.held-item {
    position: fixed;
    left: 50%;
    bottom: calc(var(--slot) + 44px);
    margin: 0;
    color: #fff;
    font: 16px/1 var(--pixel);
    text-shadow: 2px 2px 0 #3f3f3f;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity .6s ease;
}
.held-item.is-visible { opacity: 1; transition-duration: .1s; }

.hud-hint {
    position: fixed;
    left: 50%;
    top: 16px;
    margin: 0;
    padding: 6px 10px 4px;
    background: rgba(0, 0, 0, .6);
    font: 14px/1 var(--pixel);
    opacity: 0;
    transform: translateX(-50%);
}
.hud-hidden .hud-hint { animation: hint 3.4s ease forwards; }
@keyframes hint { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }



.hotbar {
    position: fixed;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 25;
    transform: translateX(-50%);
    transition: opacity .3s ease;
}

.xp { position: relative; display: block; margin: 0 4px 6px; }
.xp__bar { position: relative; display: block; height: 12px; border: 2px solid #000; background: #1f1f1f; overflow: hidden; }
.xp__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 18 - 2px), rgba(0, 0, 0, .7) calc(100% / 18 - 2px) calc(100% / 18));
}
#xp-fill {
    display: block;
    height: 100%;
    background: linear-gradient(#c6ff6a 0 30%, #80ff20 30% 70%, #4fae14 70%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s linear;
}
.xp__level {
    position: absolute;
    left: 50%;
    top: -18px;
    color: #80ff20;
    font: 18px/1 var(--pixel);
    text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000;
    transform: translateX(-50%);
}

.hotbar__slots {
    display: flex;
    margin: 0;
    padding: 2px;
    list-style: none;
    border: 2px solid #000;
    background: rgba(18, 18, 18, .72);
    box-shadow: inset 0 0 0 2px rgba(150, 150, 150, .5);
}

.hotbar .slot {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--slot);
    height: var(--slot);
    border: 2px solid rgba(120, 120, 120, .35);
}
.hotbar .slot:hover { background: rgba(255, 255, 255, .12); }
.hotbar .slot::after {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: 2;
    border: 4px solid transparent;
    pointer-events: none;
    transition: border-color .12s ease;
}
.hotbar .slot.is-active::after { border-color: #fff; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000; }
.hotbar .slot:focus-visible { outline-offset: 4px; }
.hotbar .slot__icon { width: 78%; height: 78%; }
.hotbar .slot__icon:empty::before { content: ''; display: block; width: 50%; height: 50%; margin: 25%; background: #5f5f5f; box-shadow: inset -2px -2px 0 #3a3a3a; }
.slot__key {
    position: absolute;
    right: 3px;
    bottom: 1px;
    color: #fff;
    font: 12px/1 var(--pixel);
    text-shadow: 2px 2px 0 #3f3f3f;
}



.context-menu {
    position: fixed;
    z-index: 60;
    display: grid;
    width: 320px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    border: 2px solid #000;
    background: rgba(18, 18, 18, .97);
    box-shadow: inset 0 0 0 2px #5b5b5b, 0 16px 34px rgba(0, 0, 0, .5);
    font: 16px/1 var(--pixel);
    animation: menu-in .12s ease;
}
.context-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96); } }
.context-menu__title { display: flex; justify-content: space-between; gap: 12px; margin: 4px 8px 8px; color: var(--yellow); text-shadow: 2px 2px 0 #3f3f15; }
.context-menu__title span { overflow: hidden; color: #9a9a9a; font-size: 12px; text-overflow: ellipsis; text-shadow: none; white-space: nowrap; }
.context-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px 6px;
    border: 0;
    background: none;
    color: #fff;
    text-align: left;
    text-shadow: 2px 2px 0 #3f3f3f;
}
.context-menu button:hover, .context-menu button:focus-visible { outline: none; box-shadow: none; background: rgba(169, 238, 115, .16); color: var(--green); }
.context-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
.context-menu button[aria-disabled="true"] { color: #6d6d6d; background: none; cursor: var(--cursor); text-shadow: none; }
.context-menu button[aria-disabled="true"] .icon { color: #4d4d4d; }
.context-menu button .icon { width: 16px; height: 16px; color: #9a9a9a; filter: drop-shadow(1px 1px 0 #000); }
.context-menu button:not([aria-disabled="true"]):hover .icon, .context-menu button:focus-visible .icon { color: var(--green); }
.menu__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__value { color: var(--yellow); font-size: 13px; font-style: normal; white-space: nowrap; }
.context-menu button[aria-disabled="true"] .menu__value { color: #6d6d6d; }
.menu__switch {
    position: relative;
    flex: 0 0 34px;
    height: 18px;
    border: 2px solid #000;
    background: #3a3a3a;
    box-shadow: inset 2px 2px 0 #222;
    transition: background .15s ease;
}
.menu__switch span {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    background: #9a9a9a;
    box-shadow: inset -2px -2px 0 #5d5d5d, inset 2px 2px 0 #c6c6c6;
    transition: transform .15s steps(3);
}
[aria-checked="true"] > .menu__switch { background: #3d8a2a; box-shadow: inset 2px 2px 0 #25541a; }
[aria-checked="true"] > .menu__switch span { background: #f4f8ee; box-shadow: inset -2px -2px 0 #9bbf8a, inset 2px 2px 0 #fff; transform: translateX(16px); }
.context-menu kbd { flex: 0 0 auto; min-width: 30px; font-size: 12px; }
.context-menu hr { width: 100%; height: 2px; margin: 4px 0; border: 0; background: #333; }
.context-menu__hint { margin: 6px 8px 4px; color: #8a8a8a; font-size: 12px; line-height: 1.35; }
.context-menu__target {
    display: grid;
    gap: 4px;
    margin: 0 4px 6px;
    padding: 7px 9px 6px;
    border: 2px solid transparent;
    border-image: linear-gradient(#5000ff, #28007f) 1;
    background: rgba(16, 0, 16, .92);
}
.context-menu__target strong { color: #fff; font-weight: 400; text-shadow: 2px 2px 0 #3f3f3f; }
.context-menu__target span { color: #a8a8a8; font-size: 12px; line-height: 1.35; text-shadow: none; }

.tooltip {
    position: fixed;
    z-index: 70;
    display: grid;
    gap: 4px;
    max-width: 300px;
    padding: 8px 10px 6px;
    border: 2px solid transparent;
    border-image: linear-gradient(#5000ff, #28007f) 1;
    background: rgba(16, 0, 16, .95);
    box-shadow: 0 0 0 2px rgba(16, 0, 16, .95);
    color: #fff;
    font: 16px/1.3 var(--pixel);
    text-shadow: 2px 2px 0 #3f3f3f;
    pointer-events: none;
}
.tooltip[hidden] { display: none; }
.tooltip span { color: #a8a8a8; text-shadow: 2px 2px 0 #2a2a2a; }



.hud-hidden .topbar, .hud-hidden .hotbar, .hud-hidden .panel, .hud-hidden .chat, .hud-hidden .toasts,
.hud-hidden .held-item, .hud-hidden .scroll-cue, .hud-hidden .world-shade, .hud-hidden .credits, .hud-hidden .crosshair, .hud-hidden .debug {
    opacity: 0 !important;
    pointer-events: none;
}





@media (max-width: 1100px) {
    .mc-button--curse em, .mc-button--lang .topbar__label { display: none; }
}

@media (max-width: 920px) {
    .topbar__actions .topbar__label { display: none; }
    .topbar__actions .mc-button { padding: 0 10px; gap: 6px; }
}

@media (max-width: 1100px) {
    .credits { position: static; justify-items: start; margin-top: 24px; text-align: left; }
    .chapter--release { flex-direction: column; justify-content: center; align-items: flex-start; }
}

@media (max-width: 760px) {
    .topbar { padding: max(10px, env(safe-area-inset-top)) 16px 10px; }
    .topbar__logo { width: 36px; height: 36px; }
    .topbar__title strong { font-size: 15px; }
    .topbar__title small { font-size: 10px; }
    .topbar__label, .mc-button--curse em { display: none; }
    .topbar__actions { gap: 6px; }
    .topbar__actions .mc-button { width: 38px; min-height: 36px; padding: 0; }
    .topbar__actions .mc-button--home > span[aria-hidden="true"] { display: none; }
    .icon-button { width: 36px; }
    .project-card { grid-template-columns: 64px 1fr; padding: 12px; }
    .project-card__logo { width: 64px; height: 64px; }
    .project-card__summary { display: none; }
    .platforms { grid-template-columns: 1fr; }
    .platform__text > span { font-size: 12px; }
    .chapter { align-items: flex-start; padding: 72px 16px calc(var(--slot) + 88px); }
    .panel { padding: 20px 18px 22px; background: linear-gradient(180deg, rgba(10, 14, 12, .86), rgba(10, 14, 12, .74)); }
    .panel--hero { background: linear-gradient(180deg, rgba(8, 14, 10, .72), rgba(8, 14, 10, .5)); }
    .chapter h2 { font-size: clamp(32px, 9.5vw, 44px); }
    .lead { font-size: 16px; }
    .tooltip-list { font-size: 14px; }
    .tagline { font-size: 18px; }
    .mc-button { min-height: 42px; padding: 0 14px; font-size: 14px; }
    .mc-button--small { min-height: 34px; padding: 0 10px; font-size: 12px; }
    .scroll-cue { display: none; }
    .crosshair { display: none; }
    .world-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 75%, rgba(0, 0, 0, .35)); }
    .chat { left: 8px; right: auto; justify-items: start; max-width: calc(100vw - 16px); font-size: 13px; bottom: calc(var(--slot) + 56px); }
    .toasts { top: 58px; right: 8px; }
    .toast { width: 240px; }
    .toast__copy { font-size: 13px; }
    .debug { font-size: 12px; top: 56px; }
    .xp__level { font-size: 14px; top: -15px; }
    .slot__key { font-size: 10px; }
    .inventory__tabs button { padding: 6px 7px 4px; font-size: 12px; }
    .inventory__window { padding: 8px; }
    .inventory__detail { font-size: 14px; }
    .eyebrow { margin-bottom: 10px; font-size: 13px; }
    .panel--hero { padding: 16px 16px 18px; }
    .panel--hero .chips { display: none; }
    .panel--hero .lead { margin-top: 10px; font-size: 15px; line-height: 1.5; }
    .hero-logo { margin: 0 0 4px -4px; }
    .actions { gap: 8px; margin-top: 16px; }
    .panel--hero .actions { flex-wrap: nowrap; }
    .actions .mc-button { flex: 1 1 auto; min-height: 40px; padding: 0 8px; font-size: 12px; gap: 6px; }
    .platforms__featured .platform__text strong { font-size: 17px; }
    .platforms__featured .platform__icon { width: 40px; height: 40px; }
    .modes { gap: 4px; margin-top: 12px; }
    .modes li { padding: 7px 6px 5px; text-align: center; }
    .modes strong { font-size: 12px; }
    .modes span, .modes__hot strong::after { display: none; }
    .chapter--proxy .chips { display: none; }
    .chapter--proxy .tooltip-list li:nth-child(n + 3) { display: none; }
    .chips li { font-size: 12px; }
    .steps li { padding: 8px 10px; font-size: 14px; gap: 10px; }
    .steps strong { font-size: 14px; }
    .steps__n { width: 26px; height: 26px; font-size: 14px; }
    .legend { font-size: 12px; }
    .tooltip-list { margin-top: 14px; padding: 10px 12px; font-size: 13px; }
    .chapter .chips { margin-top: 12px; }
}

@media (orientation: portrait) and (min-width: 761px) and (max-width: 1100px) {
    .chapter { align-items: flex-start; padding: 104px 40px calc(var(--slot) + 110px); }
    .panel { max-width: 680px; }
    .panel--wide { max-width: 720px; }
    .scroll-cue { display: none; }
    .world-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 42%, transparent 82%, rgba(0, 0, 0, .35)); }
    .chat { left: 8px; right: auto; justify-items: start; max-width: 60vw; bottom: calc(var(--slot) + 64px); }
}

@media (min-width: 761px) and (max-height: 820px) and (min-height: 521px) {
    .chapter { padding-top: 84px; }
    .panel { padding: 22px 26px 24px; }
    .hero-logo { width: min(100%, 470px); }
    .tagline { margin-top: 6px; }
    .lead { margin-top: 12px; }
    .actions { margin-top: 18px; }
    .chips { margin-top: 14px; }
    .scroll-cue { display: none; }
    .tooltip-list { margin-top: 16px; }
}

@media (orientation: landscape) and (max-height: 520px) {
    :root { --slot: 30px; }
    .topbar { padding-top: 6px; padding-bottom: 6px; }
    .topbar__logo { width: 30px; height: 30px; }
    .topbar__title small { display: none; }
    .chapter { align-items: flex-start; padding: 50px max(16px, env(safe-area-inset-right)) 60px max(16px, env(safe-area-inset-left)); }
    .panel { max-width: min(460px, 54vw); padding: 12px 14px 14px; }
    .panel--wide { max-width: min(540px, 60vw); }
    .chapter h2 { font-size: 26px; }
    .eyebrow { margin-bottom: 6px; font-size: 12px; }
    .lead, .panel--hero .lead { margin-top: 8px; font-size: 13px; line-height: 1.45; }
    .tooltip-list, .chips, .project-card__summary, .scroll-cue, .crosshair, .inventory__detail, .tip, .legend { display: none; }
    .steps { gap: 4px; margin-top: 10px; }
    .steps li { padding: 5px 8px; font-size: 12px; }
    .steps li > span:last-child { font-size: 0; }
    .steps strong { margin: 0; font-size: 12px; }
    .hero-logo { width: min(100%, 300px); }
    .tagline { font-size: 15px; }
    .actions { margin-top: 10px; }
    .mc-button { min-height: 34px; font-size: 12px; }
    .xp { margin-bottom: 4px; }
    .xp__level { font-size: 12px; top: -13px; }
    .chat { bottom: 8px; max-width: 36vw; font-size: 12px; }
    .toasts { top: 44px; }
    .toast { width: 220px; padding: 6px 8px; }
    .inventory { --islot: 26px; margin-top: 10px; }
    .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platform { padding: 6px 8px; }
    .platform__icon, .platforms__featured .platform__icon { width: 28px; height: 28px; }
    .platforms__featured .platform { padding: 6px 8px; }
    .platforms__featured .platform__text strong { font-size: 16px; }
    .modes { margin-top: 8px; }
    .modes span { display: none; }
    .project-card { margin-top: 12px; padding: 8px; grid-template-columns: 48px 1fr; }
    .project-card__logo { width: 48px; height: 48px; }
    .world-shade { background: linear-gradient(90deg, rgba(4, 10, 8, .45), transparent 62%); }
    .loader__logo { margin-bottom: 12px; }
    .loader__inner { width: min(80vw, 480px); }
    .hotbar { left: auto; right: max(10px, env(safe-area-inset-right)); transform: none; }
    .is-entering .hotbar { animation-name: enter-rise; }
    .held-item { left: auto; right: 16px; transform: none; }
    .panel--hero .lead { display: none; }
    .chat { right: auto; left: 8px; justify-items: start; bottom: 8px; }
}

@media (min-width: 1600px) {
    .panel { max-width: 640px; }
    .panel--wide { max-width: 700px; }
}

@media (max-width: 480px) {
    .topbar__actions .mc-button--curse, .topbar__actions .mc-button--github { display: none; }
    .mc-button--lang .lang-badge { padding: 0 3px 1px; border: 0; background: none; font-size: 12px; text-shadow: 2px 2px 0 #2a0f28; }
    .topbar__logo { width: 32px; height: 32px; }
    .topbar__brand { gap: 8px; }
    .topbar__title strong { font-size: 14px; }
    .topbar__actions { gap: 5px; }
    .icon-button, .topbar__actions .mc-button { width: 34px; height: 34px; min-height: 34px; }
}

@media (max-width: 380px) {
    .topbar__actions .mc-button--home { display: none; }
    .tooltip-list li:nth-child(n + 4) { display: none; }
    .modes span { display: none; }
    .chapter:not(.chapter--inventory) .chips { display: none; }
}

@media (hover: none) {
    .crosshair { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .is-ready .chapter:not(.is-active) .panel { transform: none; }
}
