/* BlockPedia website. Textures and icons come from the app (tools/make-textures.py in the
   BlockPedia repo), drawn at 16x16 and scaled up with crisp pixels. */

@font-face {
    font-family: "Pixelify Sans";
    src: url("../fonts/PixelifySans-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --pixel: "Pixelify Sans", "Courier New", monospace;
    --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --sky-top: #3b86d8;
    --sky-bottom: #92c9f4;
    --grass: #5d9b3a;
    --grass-dark: #3c6e22;
    --dirt: #6b4a2f;
    --deepslate: #24242a;
    --gui: #c6c6c6;
    --gui-light: #ffffff;
    --gui-dark: #555555;
    --slot: #8b8b8b;
    --slot-dark: #373737;
    --ink: #2a2a2a;
    --ink-soft: #4a4a4a;
    --white: #ffffff;
    --yellow: #ffe14d;
    --emerald: #3fe07a;
    --xp: #80ff20;
    --shadow-txt: 0.09em 0.09em 0 rgba(0, 0, 0, .55);

    --tex: 64px; /* one texture tile = 16px drawn at 4x */
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--white);
    background: var(--deepslate) url("../img/tex/deepslate.png") 0 0 / var(--tex);
    image-rendering: auto;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
.px, .tex { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--yellow); }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
kbd {
    display: inline-block;
    font-family: var(--pixel);
    font-size: .85em;
    line-height: 1;
    padding: .25em .45em .3em;
    margin: 0 .05em;
    color: var(--ink);
    background: var(--gui);
    border: 2px solid #000;
    box-shadow: inset 2px 2px 0 var(--gui-light), inset -2px -2px 0 var(--gui-dark);
    white-space: nowrap;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #000; color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 880px; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { opacity: .75; }

/* ---------- Header ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .45)),
        url("../img/tex/grass.png") 0 0 / 48px repeat-x,
        url("../img/tex/dirt.png") 0 0 / 48px;
    image-rendering: pixelated;
    border-bottom: 3px solid #000;
}
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand img { image-rendering: auto; filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .5)); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--pixel); font-size: 1.7rem; line-height: 1; text-shadow: var(--shadow-txt); }
.brand-tag { font-size: .72rem; opacity: .9; image-rendering: auto; }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.mainnav > a:not(.mc-btn) {
    font-family: var(--pixel);
    color: var(--white);
    text-decoration: none;
    font-size: 1.05rem;
    padding: 8px 12px;
    text-shadow: var(--shadow-txt);
}
.mainnav > a:not(.mc-btn):hover { color: var(--yellow); }
.lang-select { font-family: var(--pixel); font-size: 1rem; padding: 6px; border: 2px solid #000; background: var(--gui); }
.menu-btn { display: none; }

.xp {
    position: absolute;
    left: 0; right: 0; bottom: -9px;
    height: 7px;
    background: #1b1b1b repeating-linear-gradient(90deg, transparent 0 calc(5.55% - 2px), #000 calc(5.55% - 2px) 5.55%);
    border-bottom: 2px solid #000;
    pointer-events: none;
}
.xp-fill { height: 100%; width: 0; background: var(--xp); box-shadow: inset 0 -2px 0 #4fae0c; transition: width .15s linear; }
.xp-level {
    position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
    font-family: var(--pixel); font-size: 1rem; color: var(--xp);
    text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000;
    opacity: 0; transition: opacity .2s;
}
.xp-level.on { opacity: 1; }

/* ---------- Buttons ---------- */

.mc-btn {
    --btn-tint: rgba(0, 0, 0, 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    font-family: var(--pixel);
    font-size: 1.15rem;
    line-height: 1.1;
    color: var(--white);
    text-decoration: none;
    text-shadow: 2px 2px 0 #3a3a3a;
    padding: .75em 1.25em;
    border: 3px solid #000;
    background: linear-gradient(var(--btn-tint), var(--btn-tint)), url("../img/tex/button.png") 0 0 / var(--tex);
    image-rendering: pixelated;
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .45), inset -3px -4px 0 rgba(0, 0, 0, .45);
    cursor: pointer;
    transition: transform .08s, filter .15s;
}
.mc-btn:hover { filter: brightness(1.12); border-color: #fff; }
.mc-btn:active { transform: translateY(2px); box-shadow: inset -3px -3px 0 rgba(255, 255, 255, .3), inset 3px 4px 0 rgba(0, 0, 0, .45); }
.mc-btn-green { --btn-tint: rgba(38, 170, 62, .78); text-shadow: 2px 2px 0 #14531f; }
.mc-btn-green:hover { --btn-tint: rgba(48, 196, 74, .8); }
.mc-btn-sm { font-size: 1rem; padding: .55em .9em; }
.mc-btn-lg { font-size: 1.3rem; padding: .8em 1.4em; }
.mc-btn-xl { font-size: 1.6rem; padding: .7em 1.4em; box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .45), inset -4px -6px 0 rgba(0, 0, 0, .45), 0 6px 0 rgba(0, 0, 0, .35); }
.mc-btn-xl:hover { animation: wiggle .4s; }

.cta-block { margin: 26px 0 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.center .cta-row { justify-content: center; }
.cta-meta { margin: 12px 0 0; font-size: .95rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .6); }

/* ---------- GUI pieces ---------- */

.gui {
    position: relative;
    color: var(--ink);
    background: var(--gui);
    border: 3px solid #000;
    box-shadow: inset 4px 4px 0 var(--gui-light), inset -4px -4px 0 var(--gui-dark), 0 10px 0 rgba(0, 0, 0, .25);
    padding: 34px 36px;
}
.gui a:not(.mc-btn):not(.slot) { color: #1d4fd8; }
.gui-title { font-size: 2rem; color: var(--ink); margin-bottom: .3em; }
.gui-lead { font-size: 1.1rem; color: var(--ink-soft); }

.slot {
    display: inline-grid;
    place-items: center;
    width: 52px; height: 52px;
    background: var(--slot);
    box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--gui-light);
    flex-shrink: 0;
}
.slot-big { width: 76px; height: 76px; }
.slot-big img { width: 48px; height: 48px; }
.slot-link { transition: background .15s, transform .15s; }
.slot-link:hover { background: #a9b5ff; transform: translateY(-3px); }
.slot-missing { opacity: .35; outline: 2px dashed #ff5a5a; }

.eyebrow {
    font-family: var(--pixel);
    font-size: 1.05rem;
    letter-spacing: .04em;
    color: var(--yellow);
    text-shadow: var(--shadow-txt);
    margin-bottom: .6em;
    text-transform: uppercase;
}
.eyebrow-light { color: #fff7b0; }
.eyebrow-dark { color: #7a5a00; text-shadow: none; }
.title { font-size: clamp(2rem, 4.2vw, 3.1rem); text-shadow: 0.08em 0.08em 0 rgba(0, 0, 0, .55); }
.lead { font-size: 1.2rem; max-width: 760px; opacity: .95; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }

/* ---------- Bands (page sections) ---------- */

.band { position: relative; padding: 96px 0; image-rendering: pixelated; }
.band > .wrap, .band .gui, .band p, .band h2, .band h3 { image-rendering: auto; }
.band-dirt { background: linear-gradient(rgba(20, 12, 6, .55), rgba(20, 12, 6, .62)), url("../img/tex/dirt.png") 0 0 / var(--tex); }
.band-stone { background: linear-gradient(rgba(0, 0, 0, .32), rgba(0, 0, 0, .42)), url("../img/tex/stone.png") 0 0 / var(--tex); }
.band-deepslate { background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .35)), url("../img/tex/deepslate.png") 0 0 / var(--tex); }
.band-grass {
    background:
        url("../img/tex/grass.png") 0 0 / var(--tex) repeat-x,
        linear-gradient(rgba(20, 12, 6, .5), rgba(20, 12, 6, .62)) 0 var(--tex) / 100% 100% no-repeat,
        url("../img/tex/dirt.png") 0 0 / var(--tex);
    padding-top: calc(96px + 24px);
}
.page-top { min-height: 60vh; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 calc(var(--tex) * 1.6 + 40px);
    background: linear-gradient(var(--sky-top), var(--sky-bottom) 85%);
}
.sky { position: absolute; inset: 0; pointer-events: none; }
.sun {
    position: absolute; top: 46px; right: 8%;
    width: 84px; height: 84px; background: #fff9b8;
    box-shadow: 0 0 0 10px rgba(255, 249, 184, .35);
}
.cloud {
    position: absolute; display: block; height: 32px; background: rgba(255, 255, 255, .92);
    box-shadow: 32px -24px 0 rgba(255, 255, 255, .92), 64px -24px 0 rgba(255, 255, 255, .92);
    animation: drift linear infinite;
}
.cloud.c1 { top: 70px; width: 160px; animation-duration: 90s; left: -10%; }
.cloud.c2 { top: 190px; width: 112px; animation-duration: 120s; left: 30%; opacity: .8; }
.cloud.c3 { top: 120px; width: 200px; animation-duration: 150s; left: 60%; }
.cloud.c4 { top: 330px; width: 96px; animation-duration: 100s; left: 85%; opacity: .7; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(110vw); } }

.ground {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: calc(var(--tex) * 1.6);
    background: url("../img/tex/grass.png") 0 0 / var(--tex) repeat-x, url("../img/tex/dirt.png") 0 0 / var(--tex);
    image-rendering: pixelated;
    border-top: 0;
}

.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.hero-copy { color: #fff; text-shadow: 0 2px 10px rgba(30, 70, 130, .25); }
.hero-title { font-size: clamp(2.3rem, 4.6vw, 3.7rem); text-shadow: 0.07em 0.07em 0 rgba(15, 45, 95, .7); margin-bottom: .35em; }
.hero-title .accent { display: block; color: var(--yellow); }
.hero-lead { font-size: 1.22rem; max-width: 600px; text-shadow: 1px 2px 0 rgba(15, 45, 95, .75); }
.hero-lead b { color: #fff7b0; }
.see-inside {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    color: #fff; font-family: var(--pixel); font-size: 1.1rem; text-decoration: none; text-shadow: var(--shadow-txt);
}
.see-inside img { filter: invert(1) drop-shadow(1px 1px 0 rgba(0,0,0,.5)); transition: transform .2s; }
.see-inside:hover img { transform: translateX(5px); }

.hero-visual { position: relative; }
.app-window {
    margin: 0;
    border: 3px solid #000;
    background: #1c1c1c;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 14px 16px 0 rgba(10, 40, 80, .35);
    transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
    transition: transform .5s;
}
.app-window:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.app-window picture img { display: block; width: 100%; }
.app-window-bar img { width: 16px; height: 16px; }
.app-window-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; background: #f2f2f2; color: #222;
    font-size: .8rem; border-bottom: 2px solid #000;
}
.app-window-bar span { flex: 1; }
.app-window-bar i { width: 12px; height: 2px; background: #333; }
.float-items .fi { position: absolute; width: 56px; height: 56px; z-index: 2; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .3)); animation: bob 3.2s ease-in-out infinite; }
.fi1 { top: -28px; left: -20px; }
.fi2 { top: 18%; right: -26px; animation-delay: -.8s !important; }
.fi3 { bottom: -24px; left: 12%; animation-delay: -1.6s !important; }
.fi4 { top: -32px; right: 22%; animation-delay: -2.2s !important; width: 44px !important; height: 44px !important; }
.fi5 { bottom: 12%; right: -22px; animation-delay: -1.1s !important; width: 48px !important; height: 48px !important; }

.badges {
    position: relative; z-index: 2;
    list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    margin: 56px auto 0; padding: 0 20px;
}
.badges li {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--pixel); font-size: 1.05rem; color: var(--ink);
    background: var(--gui); border: 3px solid #000;
    box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 var(--gui-dark);
    padding: 8px 16px 8px 10px;
}
.badges img { width: 28px; height: 28px; }

/* ---------- Questions ---------- */

.questions { text-align: center; }
.questions .lead { margin-left: auto; margin-right: auto; }
.bubbles { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 22px; padding: 0; margin: 36px auto 40px; max-width: 980px; }
.bubble {
    position: relative;
    font-size: 1.1rem; color: var(--ink);
    background: #fff; border: 3px solid #000;
    padding: 12px 20px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
}
.bubble:nth-child(odd) { transform: rotate(-1.5deg); }
.bubble:nth-child(even) { transform: rotate(1.5deg); }
.bubble::after {
    content: ""; position: absolute; left: 22px; bottom: -15px;
    width: 12px; height: 12px; background: #fff; border: 3px solid #000; border-top: 0; border-left: 0;
    box-shadow: 3px 3px 0 #000;
}
.answer {
    display: inline-flex; align-items: center; gap: 14px;
    font-family: var(--pixel); font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--emerald);
    text-shadow: var(--shadow-txt);
}

/* ---------- Search demo ---------- */

.search-box {
    display: flex; align-items: center; gap: 12px;
    margin-top: 20px; padding: 6px 14px;
    background: #000; border: 3px solid #a0a0a0;
}
.search-box:focus-within { border-color: #fff; }
.search-box input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    color: #fff; font-family: var(--pixel); font-size: 1.35rem; padding: 12px 0;
}
.search-box input::placeholder { color: #9a9a9a; }
.results { list-style: none; padding: 0; margin: 14px 0 18px; min-height: 120px; }
.results li { margin-bottom: 8px; }
.result-note { color: var(--ink-soft); padding: 10px 4px; }
.result {
    display: flex; gap: 14px; align-items: center;
    padding: 10px 14px; text-decoration: none;
    background: var(--slot); color: #fff !important;
    box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 #b5b5b5;
    animation: pop .25s ease-out both;
}
.result:hover, .result:focus { background: #7d8ce0; }
.result img { width: 32px; height: 32px; }
.result strong { font-family: var(--pixel); font-weight: 400; font-size: 1.2rem; text-shadow: 2px 2px 0 #3a3a3a; display: block; }
.result span { font-size: .9rem; opacity: .95; }
.demo-foot { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.demo-foot p { margin: 0; flex: 1 1 300px; color: var(--ink-soft); }

/* ---------- Shortcut ---------- */

.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.try { font-size: 1.15rem; color: #fff7b0; }
.keys { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.plus { font-family: var(--pixel); font-size: 1.6rem; color: #aaa; }
.key {
    font-family: var(--pixel); font-size: 1.5rem; color: var(--ink);
    min-width: 84px; padding: 18px 16px 22px;
    background: var(--gui); border: 3px solid #000; cursor: pointer;
    box-shadow: inset 4px 4px 0 #fff, inset -4px -7px 0 var(--gui-dark), 0 6px 0 #000;
    transition: transform .06s, box-shadow .06s, background .15s;
}
.key-w { min-width: 72px; }
.key.down { transform: translateY(6px); box-shadow: inset 4px 4px 0 #fff, inset -4px -4px 0 var(--gui-dark), 0 0 0 #000; background: var(--xp); }
.swap { position: relative; height: 270px; margin-top: 26px; }
.swap > div {
    position: absolute; width: 78%; border: 3px solid #000;
    transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), z-index 0s .2s, filter .3s;
    box-shadow: 10px 12px 0 rgba(0, 0, 0, .4);
}
.swap-label {
    position: absolute; top: -14px; left: 12px; z-index: 2;
    font-family: var(--pixel); font-size: .95rem; color: var(--ink);
    background: var(--yellow); border: 2px solid #000; padding: 1px 8px;
}
.swap-game { left: 0; top: 0; z-index: 2; background: linear-gradient(#7ec0ff, #c4e6ff); height: 220px; }
.swap-scene { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.swap-scene .b { aspect-ratio: 1; background-size: cover; image-rendering: pixelated; }
.b.grass { background-image: url("../img/tex/grass.png"); }
.b.dirt { background-image: url("../img/tex/dirt.png"); }
.b.stone { background-image: url("../img/tex/stone.png"); }
.swap-app { right: 0; bottom: 0; z-index: 1; filter: brightness(.55); background: #111; }
.swap-app img { display: block; width: 100%; }
.swap.is-app .swap-game { z-index: 1; filter: brightness(.55); transform: translate(-6px, -6px) scale(.97); }
.swap.is-app .swap-app { z-index: 3; filter: none; transform: translate(-10px, -10px) scale(1.04); }

/* ---------- Inventory ---------- */

.inventory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 44px; padding: 26px; }
.inv-item {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px; border: 3px solid transparent;
    transition: background .15s, border-color .15s, transform .15s;
}
.inv-item:hover { background: rgba(255, 255, 255, .45); border-color: #000; transform: translateY(-3px); }
.inv-item:hover .slot { background: #a9b5ff; }
.inv-item h3 { font-size: 1.35rem; margin: 2px 0 6px; color: var(--ink); }
.inv-item p { margin: 0; font-size: 1rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Tour ---------- */

.tour { margin-top: 40px; }
.tour-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: -3px; position: relative; z-index: 2; }
.tour-tab { font-size: 1.1rem; }
.tour-tab.is-active { --btn-tint: rgba(38, 170, 62, .78); border-color: #fff; }
.tour-panel {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: center;
    margin-top: 18px; padding: 22px;
    background: rgba(0, 0, 0, .55); border: 3px solid #000;
}
.tour-panel[hidden] { display: none; }
.tour-shot { position: relative; padding: 0; border: 3px solid #000; background: #000; cursor: zoom-in; display: block; }
.tour-shot > img { display: block; width: 100%; transition: transform .3s; }
.tour-shot:hover > img { transform: scale(1.015); }
.zoom-hint {
    position: absolute; right: 10px; bottom: 10px;
    display: inline-flex; gap: 6px; align-items: center;
    font-family: var(--pixel); font-size: .9rem; color: #fff; background: rgba(0, 0, 0, .75); padding: 4px 10px;
}
.tour-text h3 { font-size: 1.9rem; color: var(--yellow); text-shadow: var(--shadow-txt); }
.tour-text p { font-size: 1.1rem; }
.lightbox {
    position: fixed; inset: 0; z-index: 90;
    display: grid; place-items: center; padding: 60px 20px 20px;
    background: rgba(0, 0, 0, .88);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: calc(100vh - 100px); border: 3px solid #000; box-shadow: 0 0 0 3px #fff; }
.lightbox-close { position: absolute; top: 14px; right: 14px; }

/* ---------- Steps ---------- */

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0; margin: 44px 0 30px; }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.step { text-align: center; padding-top: 44px; }
.step-num {
    position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
    width: 52px; height: 52px; display: grid; place-items: center;
    font-family: var(--pixel); font-size: 1.8rem; color: var(--ink);
    background: var(--yellow); border: 3px solid #000;
    box-shadow: inset 3px 3px 0 #fff6b8, inset -3px -3px 0 #c9a400;
}
.step .slot { margin-bottom: 14px; }
.step h3 { font-size: 1.5rem; color: var(--ink); }
.step p { color: var(--ink-soft); margin: 0; }
.step p b { color: var(--ink); }

/* ---------- Languages ---------- */

.langs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 30px auto 0; max-width: 900px; }
.langs li {
    font-size: 1.15rem; padding: 8px 18px; color: #fff;
    background: var(--slot); box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 #bdbdbd;
    text-shadow: 2px 2px 0 #3a3a3a;
    transition: transform .15s;
}
.langs li:hover { transform: translateY(-3px) rotate(-2deg); }

/* ---------- Parents ---------- */

.parent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 24px 0 10px; }
.parent-item h3 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; color: var(--ink); margin-bottom: .3em; }
.parent-item p { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.parent-note { border-top: 3px dashed #9a9a9a; padding-top: 14px; margin: 20px 0 0; color: var(--ink-soft); }

/* ---------- FAQ ---------- */

.faq { margin-top: 36px; display: grid; gap: 12px; }
.faq-item {
    color: var(--ink); background: var(--gui); border: 3px solid #000;
    box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 var(--gui-dark);
}
.faq-item summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 22px; font-family: var(--pixel); font-size: 1.25rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center;
    font-size: 1.4rem; color: #fff; background: var(--slot);
    box-shadow: inset 2px 2px 0 var(--slot-dark), inset -2px -2px 0 #fff;
}
.faq-item[open] summary::after { content: "−"; background: #3aa64a; }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); }

/* ---------- Final CTA & share ---------- */

.final { overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-bottom)); padding-bottom: calc(var(--tex) * 1.6 + 60px); }
.final-inner { position: relative; z-index: 1; }
.final .title { text-shadow: 0.07em 0.07em 0 rgba(20, 50, 100, .55); max-width: 900px; margin-left: auto; margin-right: auto; }
.final .lead { text-shadow: 1px 2px 0 rgba(15, 45, 95, .75); }
.final-logo { filter: drop-shadow(5px 6px 0 rgba(20, 50, 100, .4)); animation: bob 3s ease-in-out infinite; }
.share-gui { max-width: 640px; margin: 44px auto 0; text-align: center; padding: 26px; }
.share-title { font-size: 1.6rem; color: var(--ink); margin-bottom: .2em; }
.share p { color: var(--ink-soft); }
.share-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }

/* ---------- Download page ---------- */

.hero-small { padding-top: 56px; }
.dl-head { position: relative; color: #fff; }
.dl-head .hero-lead { margin: 0 auto 1em; }
.dl-chest { margin-bottom: 14px; }
.dl-chest img { animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(5px 6px 0 rgba(20, 50, 100, .4)); }
.dl-progress { width: min(460px, 90%); height: 26px; margin: 10px auto 22px; background: #2b2b2b; border: 3px solid #000; padding: 3px; }
.dl-progress-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--xp) 0 18px, #5fd10f 18px 22px); animation: fill 1.4s steps(14) forwards; }
.dl-retry { font-size: 1.05rem; text-shadow: 1px 1px 0 rgba(20, 50, 100, .4); display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.req { width: 100%; border-collapse: collapse; }
.req th, .req td { text-align: left; padding: 10px 6px; border-bottom: 2px solid #a5a5a5; vertical-align: top; }
.req th { font-family: var(--pixel); font-weight: 400; font-size: 1.1rem; width: 36%; }
.tips { list-style: none; padding: 0; margin: 0; }
.tips li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; color: var(--ink-soft); }
.tips img { margin-top: 3px; }

/* ---------- Footer ---------- */

.footer { position: relative; background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .7)), url("../img/tex/deepslate.png") 0 0 / var(--tex); image-rendering: pixelated; padding-bottom: 30px; }
.footer { border-top: 3px solid #000; }
.footer-grass { display: none; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 30px; image-rendering: auto; }
.footer h3 { font-size: 1.3rem; color: var(--yellow); }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { opacity: .85; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #ddd; text-decoration: none; line-height: 2; }
.footer-links a:hover { color: var(--yellow); }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.footer-legal { border-top: 2px solid rgba(255, 255, 255, .12); padding-top: 22px; font-size: .82rem; opacity: .75; image-rendering: auto; }
.footer-legal p { margin-bottom: .5em; }
.disclaimer { font-weight: 700; letter-spacing: .03em; }

/* ---------- Prose pages ---------- */

.prose h2 { font-size: 1.5rem; color: var(--ink); margin-top: 1.4em; }
.prose p { color: var(--ink-soft); }
.void { background: radial-gradient(ellipse at center, #2a1a3a 0%, #0b0b10 70%); display: grid; place-items: center; }

/* ---------- Advancement toast ---------- */

.toast {
    position: fixed; top: 92px; right: 18px; z-index: 80;
    display: flex; gap: 14px; align-items: center;
    min-width: 290px; padding: 12px 18px 12px 12px;
    background: #212121; border: 3px solid #000;
    box-shadow: inset 3px 3px 0 #5a5a5a, inset -3px -3px 0 #0d0d0d, 0 8px 0 rgba(0, 0, 0, .35);
    transform: translateX(calc(100% + 40px));
    transition: transform .45s cubic-bezier(.2, .9, .3, 1.15);
}
.toast.show { transform: translateX(0); }
.toast > img { background: var(--slot); padding: 4px; box-shadow: inset 2px 2px 0 var(--slot-dark), inset -2px -2px 0 #fff; width: 48px; height: 48px; }
.toast-label { font-family: var(--pixel); color: var(--yellow); font-size: 1.05rem; line-height: 1.2; }
.toast-title { font-family: var(--pixel); color: #fff; font-size: 1.2rem; line-height: 1.2; }

/* ---------- Motion ---------- */

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fill { to { width: 100%; } }
.bob { animation: bob 2.6s ease-in-out infinite; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .bubble.reveal.in:nth-child(odd) { transform: rotate(-1.5deg); }
.js .bubble.reveal.in:nth-child(even) { transform: rotate(1.5deg); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .mainnav > a:not(.mc-btn) { padding: 8px 7px; font-size: .98rem; }
    .inventory { grid-template-columns: repeat(2, 1fr); }
    .steps-4 { grid-template-columns: repeat(2, 1fr); row-gap: 50px; }
}

@media (max-width: 900px) {
    body { font-size: 17px; }
    .menu-btn {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        margin-left: auto; width: 48px; height: 44px; padding: 0 11px;
        background: var(--gui); border: 3px solid #000; cursor: pointer;
        box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 var(--gui-dark);
    }
    .menu-btn span:not(.sr) { display: block; height: 3px; background: #222; }
    .mainnav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 10px 20px 20px; background: rgba(20, 20, 24, .97); border-bottom: 3px solid #000;
    }
    .mainnav.open { display: flex; }
    .mainnav > a:not(.mc-btn) { padding: 12px 4px; border-bottom: 2px solid rgba(255, 255, 255, .08); font-size: 1.15rem; }
    .mainnav .mc-btn { margin-top: 12px; }
    .hero-grid, .shortcut-grid, .tour-panel, .dl-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 40px; }
    .hero-visual { margin: 10px 14px 0; }
    .app-window { transform: none; }
    .band { padding: 72px 0; }
    .steps { grid-template-columns: 1fr; row-gap: 50px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .swap { height: 230px; }
}

@media (max-width: 640px) {
    :root { --tex: 48px; }
    .wrap { padding: 0 16px; }
    .brand-tag { display: none; }
    .brand-name { font-size: 1.45rem; }
    .gui { padding: 24px 20px; }
    .gui-title { font-size: 1.6rem; }
    .inventory { grid-template-columns: 1fr; padding: 14px; }
    .parent-grid { grid-template-columns: 1fr; }
    .steps-4 { grid-template-columns: 1fr; }
    .mc-btn-xl { font-size: 1.3rem; width: 100%; }
    .cta-row .mc-btn { width: 100%; }
    .hero-lead, .lead { font-size: 1.08rem; }
    .key { min-width: 64px; font-size: 1.15rem; padding: 14px 10px 18px; }
    .keys { gap: 6px; }
    .plus { font-size: 1.2rem; }
    .float-items .fi { width: 40px; height: 40px; }
    .badges li { font-size: .95rem; }
    .bubble { font-size: 1rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .toast { left: 16px; right: 16px; min-width: 0; top: 84px; }
    .tour-tab { font-size: .95rem; padding: .5em .7em; }
    .search-box input { font-size: 1.1rem; }
}

@media (max-width: 640px) {
    .sun { width: 52px; height: 52px; top: 18px; right: 16px; opacity: .7; }
    .cloud { opacity: .45 !important; }
}
