/* The Perler Bros — Minecraft x perler beads.
   Layout: sky hero -> grass -> underground gallery (stone) -> deepslate "Meet the Bros" -> bedrock footer.
   Fixed UI (hotbar, lightbox, toasts, confetti canvas) lives outside .world so screen-shake can't move it. */

/* Monocraft: a Minecraft-style pixel font (SIL OFL, see fonts/Monocraft-OFL.txt), subset to Latin, no ligatures */
@font-face {
    font-family: 'Monocraft';
    src: url('../fonts/monocraft-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Monocraft';
    src: url('../fonts/monocraft-bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --pixel: 'Monocraft', 'Courier New', monospace;
    --round: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --block: 64px;
    --ink: #f4f6fb;
    --muted: #bcc3cf;
    --panel: #1d2028;
    --edge: #0a0b0f;
    --mc-yellow: #ffff55;
    --mc-aqua: #55ffff;
    --mc-green: #55ff55;
    --mc-gold: #ffaa00;
    --mc-purple: #ff77ff;
    --mc-red: #ff5555;
    --cave: 10, 12, 18;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--round);
    line-height: 1.55;
    color: var(--ink);
    background: #14161b;
    -webkit-font-smoothing: antialiased;
}

img {
    image-rendering: auto;
}

button {
    font: inherit;
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.world {
    overflow-x: hidden; /* torch glows and clouds must never widen the page */
    overflow-x: clip;
}

.world.shake {
    animation: shake 0.55s linear;
}

/* ---------- Minecraft-style button ---------- */

.mc-btn {
    --b: #727272;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 22px 12px;
    font-family: var(--pixel);
    font-size: 17px;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    text-shadow: 2px 2px 0 #3a3a3a;
    background: var(--b);
    border: 3px solid #111;
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.32), inset -3px -4px 0 rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.mc-btn:hover,
.mc-btn:focus-visible {
    border-color: #fff;
    outline: none;
    transform: translateY(-2px);
}

.mc-btn:active {
    transform: translateY(1px);
    box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.2), inset 3px 4px 0 rgba(0, 0, 0, 0.35);
}

.mc-btn--green {
    --b: #3c8527;
    font-size: 18px;
}

.mc-btn--fever {
    --b: #d9480f;
}

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

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
}

.sky {
    position: absolute;
    inset: 0;
    z-index: -3;
    background: linear-gradient(#4a8ff7, #8cc4ff 62%, #bfe0ff);
}

.sky::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(#030722, #0f1a45 60%, #24346b);
    opacity: 0;
    transition: opacity 1.4s ease;
}

.night .sky::after {
    opacity: 1;
}

.stars {
    position: absolute;
    inset: 0 0 30% 0;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.night .stars {
    opacity: 1;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    animation: twinkle 2.6s ease-in-out infinite;
}

.sun {
    position: absolute;
    top: clamp(16px, 4vh, 40px);
    left: clamp(14px, 4vw, 60px);
    z-index: -1;
    width: clamp(56px, 7vw, 92px);
    aspect-ratio: 1;
    border: 0;
    cursor: pointer;
    background: #fff8c8;
    box-shadow:
        inset 0 0 0 clamp(8px, 1.1vw, 14px) #ffe866,
        0 0 0 clamp(8px, 1vw, 12px) rgba(255, 240, 150, 0.35),
        0 0 70px 26px rgba(255, 236, 140, 0.55);
    transition: background 1s ease, box-shadow 1s ease, transform 0.25s ease;
    animation: sun-glow 4s ease-in-out infinite;
}

.sun:hover {
    transform: scale(1.08) rotate(6deg);
}

.night .sun {
    background: #d9e0ea;
    box-shadow:
        inset 6px 6px 0 #bfc8d6,
        inset -10px -8px 0 #aab4c4,
        0 0 0 10px rgba(190, 210, 255, 0.12),
        0 0 60px 18px rgba(170, 195, 255, 0.35);
}

.clouds {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.cloud {
    position: absolute;
    left: 0;
    height: auto;
    image-rendering: pixelated;
    opacity: 0.92;
    animation: drift var(--dur, 90s) linear infinite;
    animation-delay: var(--delay, 0s);
    transition: filter 1.4s ease;
}

.night .cloud {
    filter: brightness(0.38) saturate(0.6);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: clamp(34px, 7vh, 80px) 20px 18px;
    text-align: center;
}

.hero-the {
    font-family: var(--pixel);
    font-weight: 700;
    font-size: clamp(18px, 2.4vw, 28px);
    letter-spacing: 0.55em;
    padding-left: 0.55em;
    text-shadow: 3px 3px 0 #1a1530;
}

.logo {
    position: relative;
    margin: 6px auto 0;
    width: max-content;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1;
}

.logo-slot {
    display: block;
    width: var(--logo-w, auto);
    height: var(--logo-h, auto);
    font-family: var(--pixel);
    font-size: clamp(48px, 10vw, 112px);
    font-weight: 700;
    color: #ffd319;
    text-shadow: 5px 5px 0 #1a1530;
}

.js .logo-slot {
    font-size: 0;
    touch-action: pan-y; /* sideways finger swipes push the beads around; up/down still scrolls */
}

.splash {
    position: absolute;
    right: 0;
    bottom: 30%;
    z-index: 3;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: var(--pixel);
    font-weight: 700;
    --splash-max: 0.42;
    font-size: clamp(14px, 1.8vw, 22px);
    color: var(--mc-yellow);
    text-shadow: 3px 3px 0 #3f3f00;
    white-space: nowrap;
    transform: translate(30%, 50%) rotate(-14deg) scale(var(--fit, 1));
    animation: splash 0.5s ease-in-out infinite alternate;
}

.hero-sub {
    margin-top: clamp(26px, 4vh, 40px);
    font-family: var(--pixel);
    font-weight: 400;
    font-size: clamp(18px, 2.3vw, 27px);
    text-shadow: 3px 3px 0 #1a1530;
}

.hero-welcome {
    max-width: 620px;
    margin: 10px auto 0;
    font-size: clamp(16px, 1.6vw, 19px);
    font-weight: 500;
    text-shadow: 0 2px 0 rgba(15, 25, 60, 0.75), 0 0 10px rgba(15, 30, 80, 0.55);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: clamp(20px, 3.4vh, 32px);
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    list-style: none;
    font-family: var(--pixel);
    font-size: 15px;
    text-shadow: 2px 2px 0 #1a1530;
}

.stats li {
    padding: 4px 14px 6px;
    background: rgba(10, 20, 60, 0.28);
    border: 2px solid rgba(10, 20, 60, 0.3);
}

.stats b {
    color: var(--mc-yellow);
    font-size: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 0 #3f3f00;
}

/* new-build parade that rolls past above the grass */

.parade {
    position: relative;
    z-index: 1;
    --item: clamp(124px, 17vh, 200px);
    flex: none;
    height: calc(var(--item) * 0.75 + 46px);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.parade.dragging {
    cursor: grabbing;
}

.parade-label {
    position: absolute;
    top: -8px;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    font-family: var(--pixel);
    font-size: 15px;
    letter-spacing: 0.2em;
    color: var(--mc-yellow);
    text-shadow: 2px 2px 0 #3f3f00;
    pointer-events: none;
}

.parade-track {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    gap: clamp(14px, 2.4vw, 34px);
    will-change: transform;
}

.parade-item {
    position: relative;
    flex: none;
    width: var(--item);
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.parade-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    filter: drop-shadow(0 10px 6px rgba(20, 40, 80, 0.28));
    animation: bob 2.8s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    -webkit-user-drag: none;
    transition: scale 0.25s ease;
}

.parade-item:hover img,
.parade-item:focus-visible img {
    scale: 1.12;
}

.parade-item .nametag {
    bottom: 92%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.parade-item:hover .nametag,
.parade-item:focus-visible .nametag {
    opacity: 1;
}

.nametag {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 1px 8px 3px;
    font-family: var(--pixel);
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.ground {
    position: relative;
    z-index: 2;
    flex: none;
    height: var(--block);
    background: url('../images/ui/grass_side.png') 0 0 / var(--block) repeat-x;
    image-rendering: pixelated;
}

.bro {
    position: absolute;
    bottom: calc(100% - 4px);
    height: clamp(104px, min(25vh, 21vw), 250px);
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    transform-origin: 50% 100%;
}

.bro img {
    display: block;
    height: 100%;
    width: auto;
    filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.3));
    transform-origin: 50% 100%;
    animation: breathe 3.6s ease-in-out infinite;
    -webkit-user-drag: none;
}

.bro--left {
    left: clamp(6px, 4vw, 90px);
}

.bro--right {
    right: clamp(0px, 3vw, 80px);
}

.bro--right img {
    animation-delay: -1.7s;
}

.bro.jump,
.character-card.jump .character-stage img {
    animation: jump 0.7s cubic-bezier(0.3, 0.7, 0.4, 1);
}

html.hero-off .cloud,
html.hero-off .star,
html.hero-off .sun,
html.hero-off .splash,
html.hero-off .bro img,
html.hero-off .parade-item img {
    animation-play-state: paused;
}

/* ---------- Underground ---------- */

.underground {
    position: relative;
    padding-bottom: 60px;
    background:
        linear-gradient(rgba(var(--cave), 0), rgba(var(--cave), 0.62) 320px),
        url('../images/ui/strata_dirt_stone.png') 0 0 / auto calc(var(--block) * 3) repeat-x,
        url('../images/ui/stone.png') 0 0 / var(--block) repeat;
    image-rendering: pixelated;
}

.ores {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ore {
    position: absolute;
    width: var(--block);
    height: var(--block);
    background:
        linear-gradient(rgba(var(--cave), 0.62), rgba(var(--cave), 0.62)),
        var(--tex) 0 0 / 100% 100%;
    image-rendering: pixelated;
}

.ore.sparkle::after {
    content: '';
    position: absolute;
    left: var(--sx, 30%);
    top: var(--sy, 30%);
    width: 6px;
    height: 6px;
    background: #fff;
    box-shadow: 6px 0 #fff8, -6px 0 #fff8, 0 6px #fff8, 0 -6px #fff8;
    opacity: 0;
    animation: twinkle 3.2s ease-in-out infinite;
    animation-delay: var(--tw, 0s);
}

.section {
    position: relative;
    z-index: 1;
}

.section-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 4vw, 48px);
    padding: clamp(110px, 16vh, 160px) 0 10px;
    text-align: center;
}

.section-title {
    font-family: var(--pixel);
    font-weight: 700;
    font-size: clamp(30px, 5.4vw, 56px);
    line-height: 1.05;
    color: #fff;
    text-shadow: 4px 4px 0 #2a2a2a;
}

.section-hint {
    margin: 4px 0 34px;
    text-align: center;
    font-size: 18px;
    color: var(--muted);
}

.torch {
    position: relative;
    flex: none;
    width: 32px;
    height: 48px;
    background: url('../images/ui/torch.png') 0 0 / 100% 100%;
    image-rendering: pixelated;
}

.torch::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(255, 190, 80, 0.33), rgba(255, 160, 60, 0.1) 55%, transparent);
    animation: flicker 2.2s steps(1) infinite;
    pointer-events: none;
}

/* ---------- Gallery cards ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 26px;
    transition: opacity 0.14s ease;
}

.gallery.switching {
    opacity: 0;
}

.creation-card {
    --glow: #7aa7ff;
    --cat: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 3px solid var(--edge);
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 8px 0 rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.creation-card[hidden] {
    display: none;
}

@media (hover: hover) {
    .creation-card:hover {
        transform: translateY(-6px);
        border-color: color-mix(in srgb, var(--glow) 70%, #000);
        box-shadow:
            inset 0 0 0 2px rgba(255, 255, 255, 0.07),
            0 8px 0 rgba(0, 0, 0, 0.35),
            0 22px 60px color-mix(in srgb, var(--glow) 38%, transparent);
    }

    .creation-card:hover .float img,
    .creation-card:hover .glint {
        scale: 1.07;
    }
}

.creation-card.tilting {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
    transition: transform 0.08s linear, box-shadow 0.3s ease, border-color 0.3s ease;
}

.creation-card[data-category="players"] { --cat: var(--mc-aqua); }
.creation-card[data-category="mobs"] { --cat: var(--mc-green); }
.creation-card[data-category="items"] { --cat: var(--mc-purple); }
.creation-card[data-category="blocks"] { --cat: var(--mc-gold); }
.creation-card[data-category="micro"] { --cat: var(--mc-red); }

/* before JS wraps the image in a stage */
.creation-card > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

.stage {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 3px solid var(--edge);
    border-radius: 3px 3px 0 0;
    background:
        radial-gradient(closest-side, color-mix(in srgb, var(--glow) 50%, transparent), transparent) 50% 56% / 86% 92% no-repeat,
        radial-gradient(circle, rgba(255, 255, 255, 0.075) 1.7px, transparent 2.3px) 0 0 / 16px 16px,
        linear-gradient(#2c313d, #1d2029);
}

.float {
    position: absolute;
    inset: 5% 6% 11%;
}

.in-view .float {
    animation: bob 3.2s ease-in-out infinite;
    animation-delay: var(--bob, 0s);
}

.float img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: scale 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.shadow {
    position: absolute;
    left: 50%;
    bottom: 6%;
    width: 50%;
    height: 8%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
    transform: translateX(-50%);
}

.in-view .shadow {
    animation: shadow 3.2s ease-in-out infinite;
    animation-delay: var(--bob, 0s);
}

/* enchanted glint, masked to the build's own outline */
.glint {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask: var(--mask) center / contain no-repeat;
    mask: var(--mask) center / contain no-repeat;
    transition: scale 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.glint::before {
    content: '';
    position: absolute;
    inset: -10% -100%;
    background: linear-gradient(110deg,
        transparent 44%,
        rgba(190, 120, 255, 0.35) 47.5%,
        rgba(255, 240, 255, 0.75) 50%,
        rgba(190, 120, 255, 0.35) 52.5%,
        transparent 56%);
    transform: translateX(-34%);
}

.in-view .glint::before,
.filter-btn .glint::before {
    animation: glint 4.2s ease-in-out infinite;
    animation-delay: var(--glint, 0s);
}

.sheen {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.16), transparent 42%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.creation-card.tilting .sheen {
    opacity: 1;
}

.card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 20px;
}

.card-title {
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.15;
    color: #fff;
    text-shadow: 2px 2px 0 #3a3a3a;
}

.is-new .card-title {
    color: var(--mc-aqua);
    text-shadow: 2px 2px 0 #153f3f;
}

.card-description {
    font-size: 15.5px;
    color: var(--muted);
}

.card-description:empty {
    display: none;
}

.card-category {
    align-self: flex-start;
    margin-top: auto;
    padding: 1px 9px 3px;
    font-family: var(--pixel);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cat);
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid color-mix(in srgb, var(--cat) 70%, transparent);
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 8px;
    z-index: 3;
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 19px;
    text-transform: uppercase;
    color: var(--mc-yellow);
    text-shadow: 2px 2px 0 #3f3f00;
    transform: rotate(-12deg);
}

.in-view .new-badge {
    animation: badge 0.55s ease-in-out infinite alternate;
}

.new-badge::after {
    content: '!';
}

.photo-count {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 1px 8px 2px;
    font-family: var(--pixel);
    font-size: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.14);
}

/* reveal as you scroll; replays when the hotbar filter changes */
.js .creation-card:not(.revealed) {
    opacity: 0;
}

.creation-card.revealed {
    animation: pop-in 0.62s cubic-bezier(0.2, 1.35, 0.4, 1) backwards;
    animation-delay: var(--stagger, 0ms);
}

/* TNT + Creeper: primed, blown up, respawned */
.creation-card.primed .float {
    animation: primed 0.36s steps(1) infinite, swell 1.3s ease-in forwards;
}

.creation-card.blown .float {
    opacity: 0;
    scale: 0.2;
}

.creation-card.respawn .float {
    animation: respawn 0.6s cubic-bezier(0.2, 1.5, 0.4, 1);
}

/* coming soon: wobbling spawn egg */
.coming-soon .stage {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.075) 1.7px, transparent 2.3px) 0 0 / 16px 16px,
        linear-gradient(#2c313d, #1d2029);
}

.egg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30%;
    aspect-ratio: 14 / 13;
    translate: -50% -55%;
    background: var(--egg) 0 0 / 100% 100%;
    image-rendering: pixelated;
    transform-origin: 50% 90%;
}

.in-view .egg {
    animation: wobble 2.6s ease-in-out infinite;
}

.coming-soon .egg.jiggle {
    animation: jiggle 0.6s ease;
}

/* ---------- Portal to Beaver Fever ---------- */

.portal-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 6vw, 80px);
    padding: clamp(80px, 12vh, 130px) 0 30px;
}

.portal {
    position: relative;
    display: block;
    flex: none;
    width: clamp(220px, 28vw, 290px);
    aspect-ratio: 4 / 5;
    background: url('../images/ui/obsidian.png') 0 0 / 36px;
    image-rendering: pixelated;
    box-shadow: 0 0 0 3px #000, 0 0 60px rgba(160, 70, 255, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal:hover,
.portal:focus-visible {
    outline: none;
    transform: scale(1.03);
    box-shadow: 0 0 0 3px #fff, 0 0 90px rgba(180, 90, 255, 0.75);
}

.portal-view,
.portal-swirl {
    position: absolute;
    inset: 36px;
    overflow: hidden;
}

.portal-view {
    background: linear-gradient(#ff5a6e, #ffc15e 68%, #5d9c3a 68% 74%, #866043 74%);
}

.crazy-sun {
    position: absolute;
    left: 50%;
    top: 12%;
    width: 46%;
    aspect-ratio: 1;
    transform: translateX(-50%);
}

.crazy-sun::before {
    content: '';
    position: absolute;
    inset: -34%;
    border-radius: 50%;
    background: repeating-conic-gradient(#ffd23f 0 8deg, transparent 8deg 20deg);
    -webkit-mask: radial-gradient(circle, transparent 36%, #000 37% 69%, transparent 70%);
    mask: radial-gradient(circle, transparent 36%, #000 37% 69%, transparent 70%);
    animation: spin 5s linear infinite, rainbow 2.5s linear infinite;
}

.crazy-sun::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 40%, #111 0 6%, #fff 7% 16%, transparent 17%),
        radial-gradient(circle at 66% 40%, #111 0 6%, #fff 7% 16%, transparent 17%),
        radial-gradient(ellipse 32% 15% at 50% 68%, #3a1500 0 96%, transparent 100%),
        radial-gradient(circle, #fff6a8 0 42%, #ffb020 72%);
    box-shadow: 0 0 30px rgba(255, 200, 80, 0.8);
}

.portal-beaver {
    position: absolute;
    left: 50%;
    bottom: 22%;
    width: 46%;
    transform: translateX(-50%);
    transform-origin: 50% 100%;
    animation: waddle 0.5s ease-in-out infinite alternate;
}

/* nether-portal swirl over the view */
.portal-swirl::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: conic-gradient(rgba(130, 40, 255, 0.6), rgba(210, 140, 255, 0.25), rgba(90, 20, 200, 0.6), rgba(220, 160, 255, 0.25), rgba(130, 40, 255, 0.6));
    animation: spin 7s linear infinite;
}

.portal-swirl::after {
    content: '';
    position: absolute;
    left: 20%;
    bottom: 0;
    width: 6px;
    height: 6px;
    background: #e9c6ff;
    box-shadow: 40px -30px #c48cff, 90px -10px #e9c6ff, 130px -50px #b06bff, 20px -80px #f2dcff, 110px -110px #c48cff;
    animation: portal-rise 3s linear infinite;
}

.portal-text {
    max-width: 470px;
}

.portal-kicker {
    display: inline-block;
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 18px;
    color: var(--mc-yellow);
    text-shadow: 2px 2px 0 #3f3f00;
    transform: rotate(-4deg);
}

.portal-text .section-title {
    color: #ffe14d;
    text-shadow: 4px 4px 0 #b34700;
}

.portal-text p:not(.portal-kicker) {
    margin: 10px 0 22px;
    font-size: 18px;
    color: #d5dae3;
}

.portal-text .portal-fact {
    padding: 10px 14px 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 225, 77, 0.4);
}

.portal-fact b {
    display: block;
    margin-bottom: 2px;
    font-family: var(--pixel);
    font-size: 14px;
    font-weight: 400;
    color: var(--mc-yellow);
}

html.teleport .world {
    animation: teleport 0.6s ease-in forwards;
}

/* ---------- Meet the Bros ---------- */

.about {
    padding-bottom: 40px;
    background:
        linear-gradient(rgba(var(--cave), 0.62), rgba(var(--cave), 0.7)),
        url('../images/ui/strata_stone_deep.png') 0 0 / auto calc(var(--block) * 2) repeat-x,
        url('../images/ui/deepslate.png') 0 0 / var(--block) repeat;
    image-rendering: pixelated;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 34px;
}

.character-card {
    position: relative;
    background: var(--panel);
    border: 3px solid var(--edge);
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 8px 0 rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease;
}

.character-card:hover {
    transform: translateY(-6px);
}

.character-stage {
    position: relative;
    height: 260px;
    padding: 46px 20px 10px;
    border-bottom: 3px solid var(--edge);
    background:
        radial-gradient(closest-side, rgba(120, 170, 255, 0.28), transparent) 50% 60% / 80% 90% no-repeat,
        radial-gradient(circle, rgba(255, 255, 255, 0.075) 1.7px, transparent 2.3px) 0 0 / 16px 16px,
        linear-gradient(#2c313d, #1d2029);
}

.character-stage .nametag {
    bottom: auto;
    top: 12px;
}

.character-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 100%;
}

.character-card.gold {
    border-color: #ffd84a;
    box-shadow: inset 0 0 0 2px rgba(255, 216, 74, 0.25), 0 8px 0 rgba(0, 0, 0, 0.35), 0 0 50px rgba(255, 216, 74, 0.45);
}

.character-card.gold .character-stage {
    background:
        radial-gradient(closest-side, rgba(255, 216, 74, 0.45), transparent) 50% 60% / 80% 90% no-repeat,
        radial-gradient(circle, rgba(255, 255, 255, 0.075) 1.7px, transparent 2.3px) 0 0 / 16px 16px,
        linear-gradient(#2c313d, #1d2029);
}

.character-card.king .character-stage::after {
    content: '\1F451';
    position: absolute;
    top: 30px;
    left: calc(50% - 20px);
    font-size: 36px;
    line-height: 1;
    rotate: -10deg;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.4));
    animation: crown-bob 0.9s ease-in-out infinite alternate;
}

.character-content {
    padding: 22px 24px 26px;
    text-align: center;
}

.character-card h3 {
    margin-bottom: 10px;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 24px;
    color: var(--mc-aqua);
    text-shadow: 2px 2px 0 #153f3f;
}

.character-card p {
    font-size: 16.5px;
    color: var(--muted);
}

.about-outro {
    max-width: 760px;
    margin: 56px auto 0;
    text-align: center;
    font-size: 18px;
    color: #d5dae3;
}

/* ---------- Footer (bedrock) ---------- */

footer {
    position: relative;
    padding: 150px 20px 130px;
    text-align: center;
    color: var(--muted);
    background:
        linear-gradient(rgba(6, 7, 10, 0.5), rgba(6, 7, 10, 0.78) 260px),
        url('../images/ui/strata_deep_bedrock.png') 0 0 / auto calc(var(--block) * 2) repeat-x,
        url('../images/ui/bedrock.png') 0 0 / var(--block) repeat;
    image-rendering: pixelated;
}

.ach-panel {
    max-width: 900px;
    margin: 0 auto 44px;
    padding: 20px 20px 22px;
    text-align: left;
    background: rgba(18, 19, 24, 0.9);
    border: 3px solid #000;
    box-shadow: inset 0 0 0 2px #464646;
}

.ach-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-family: var(--pixel);
}

.ach-head h2 {
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    text-shadow: 2px 2px 0 #3a3a3a;
}

.ach-count {
    font-size: 18px;
    color: var(--mc-yellow);
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    list-style: none;
}

.ach {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.07);
}

.ach:not(.got) {
    opacity: 0.5;
}

.ach.secret .ach-icon span {
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 26px;
    color: #9aa0aa;
}

.ach:not(.got) .ach-icon {
    filter: grayscale(1) brightness(0.7);
}

.ach.got {
    border-color: rgba(255, 255, 85, 0.35);
}

.ach-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1;
}

.ach-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.ach b {
    display: block;
    font-family: var(--pixel);
    font-weight: 400;
    font-size: 15px;
    color: #fff;
}

.ach.got b {
    color: var(--mc-yellow);
}

.ach span {
    font-size: 14px;
    color: var(--muted);
}

.bead-icon {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #5a1c1c 26%, transparent 28%), conic-gradient(#ef3a3a, #ffd319, #2fbf5a, #2f7bff, #8a4dff, #ef3a3a);
}

.surface-btn {
    margin-bottom: 30px;
}

/* Cheesemoe Gold: something shiny hiding in the bedrock */
.cheese {
    position: absolute;
    left: 7%;
    bottom: 34px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: url('../images/ui/cheese.png') 0 0 / 100% 100%;
    image-rendering: pixelated;
    filter: brightness(0.45) saturate(0.7);
    transition: filter 0.3s ease;
}

.cheese::after {
    content: '';
    position: absolute;
    left: 30%;
    top: 25%;
    width: 5px;
    height: 5px;
    background: #fff;
    box-shadow: 5px 0 #fff8, -5px 0 #fff8, 0 5px #fff8, 0 -5px #fff8;
    opacity: 0;
    animation: twinkle 3.6s ease-in-out infinite;
}

.cheese:hover {
    filter: brightness(0.75);
}

.cheese.found {
    filter: none;
    animation: cheese-glow 1.8s ease-in-out infinite;
}

.cheese.pop {
    animation: cheese-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1), cheese-glow 1.8s ease-in-out infinite;
}

footer p {
    font-size: 15px;
}

footer p + p {
    margin-top: 4px;
}

/* ---------- Hotbar (filters) ---------- */

.hotbar {
    position: fixed;
    left: 50%;
    bottom: 10px;
    width: max-content;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transform: translate(-50%, 160%);
    transition: transform 0.5s cubic-bezier(0.2, 1.25, 0.4, 1);
}

.hotbar.show {
    transform: translate(-50%, 0);
}

.item-name {
    margin-bottom: 30px;
    padding: 0 8px 2px;
    font-family: var(--pixel);
    font-size: 17px;
    color: #fff;
    text-shadow: 2px 2px 0 #3a3a3a;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.item-name.show {
    opacity: 1;
}

.xp {
    position: relative;
    width: calc(100% - 6px);
    height: 11px;
    margin-bottom: 5px;
    background: #2a2a2a;
    border: 2px solid #000;
}

.xp-fill {
    height: 100%;
    width: calc(var(--p, 0) * 100%);
    background: linear-gradient(#c6ff87, #80ff20 45%, #4caf16);
    transition: width 0.25s ease;
}

.xp-level {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, 2px);
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 19px;
    line-height: 1;
    color: #80ff20;
    text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000;
}

.xp-level.bump {
    animation: bump 0.3s ease;
}

.hotbar-slots {
    display: flex;
    padding: 3px;
    pointer-events: auto;
    background: rgba(16, 16, 16, 0.78);
    border: 3px solid #000;
    box-shadow: inset 0 0 0 2px #5a5a5a, 0 12px 30px rgba(0, 0, 0, 0.45);
}

.filter-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 7px;
    background: rgba(139, 139, 139, 0.32);
    border: 3px solid #303030;
    box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.4), inset -2px -2px 0 rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.filter-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.45));
    transition: transform 0.2s cubic-bezier(0.2, 1.5, 0.4, 1);
    -webkit-user-drag: none;
}

.filter-btn:hover img {
    transform: translateY(-3px) scale(1.06);
}

.filter-btn.active {
    z-index: 1;
    border-color: #fff;
    outline: 3px solid #000;
    transform: scale(1.1);
}

.filter-btn .count {
    position: absolute;
    right: 2px;
    bottom: -1px;
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    text-shadow: 2px 2px 0 #3f3f3f;
}

.filter-btn .glint {
    inset: 7px;
}

/* ---------- Lightbox ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 10, 16, 0.84);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal.open {
    display: flex;
    animation: fade-in 0.2s ease both;
}

.modal.closing {
    animation: fade-out 0.18s ease both;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    animation: zoom-in 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.modal.closing .modal-content {
    animation: zoom-out 0.18s ease both;
}

.modal-frame {
    overflow: hidden;
    background: #101217;
    border: 4px solid #000;
    border-radius: 6px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow, #fff) 75%, transparent), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 120px color-mix(in srgb, var(--glow, #fff) 25%, transparent);
}

.modal-content img {
    display: block;
    min-width: min(92vw, 640px);
    max-width: 92vw;
    max-height: 74vh;
    object-fit: contain;
}

#modalImage.slide-next {
    animation: slide-next 0.34s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

#modalImage.slide-prev {
    animation: slide-prev 0.34s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.modal-caption {
    margin-top: 14px;
    font-family: var(--pixel);
    font-size: 20px;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.modal-dots {
    display: flex;
    gap: 9px;
    margin-top: 10px;
}

.modal-dots button {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.55) 26%, #6c7380 29%);
    transition: transform 0.2s ease;
}

.modal-dots button.on {
    transform: scale(1.3);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.45) 26%, var(--glow, #fff) 29%);
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 54px;
    height: 54px;
    padding: 0 0 4px;
    font-size: 34px;
    line-height: 1;
    translate: 0 -50%;
}

.modal-nav[hidden] {
    display: none;
}

.modal-prev {
    left: 16px;
}

.modal-next {
    right: 16px;
}

.close-modal {
    position: absolute;
    top: -54px;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-family: var(--pixel);
    font-size: 30px;
    line-height: 1;
    color: #fff;
    background: #8b2c2c;
    border: 3px solid #111;
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.3), inset -3px -3px 0 rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.close-modal:hover {
    border-color: #fff;
}

/* ---------- Floating bits: sound, toasts, confetti, flash ---------- */

.sound-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 950;
    width: 48px;
    height: 48px;
    padding: 0;
    --b: #6b4a2f;
    font-size: 24px;
}

.sound-toggle svg {
    flex: none;
    width: 22px;
    height: 22px;
    filter: drop-shadow(2px 2px 0 #3a2414);
    transition: opacity 0.2s ease;
}

.sound-toggle:not(.on) svg {
    opacity: 0.6;
}

.sound-toggle:not(.on)::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 34px;
    background: #ff5555;
    box-shadow: 0 0 0 2px #2a0f0f;
    transform: translate(-50%, -50%) rotate(45deg);
}

.toasts {
    position: fixed;
    top: 70px;
    right: 12px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 10px 14px;
    font-family: var(--pixel);
    background: #202020;
    border: 3px solid #000;
    box-shadow: inset 0 0 0 2px #575757, 0 12px 30px rgba(0, 0, 0, 0.45);
    animation: toast-in 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.toast.out {
    animation: toast-out 0.35s ease both;
}

.toast b {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--mc-yellow);
}

.toast span {
    font-size: 17px;
    color: #fff;
}

.fx-canvas {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bead-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.flash {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: #fff;
    pointer-events: none;
    opacity: 0;
}

.flash.go {
    animation: flash 0.5s ease-out;
}

/* ---------- Keyframes ---------- */

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5%); }
}

@keyframes shadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.95; }
    50% { transform: translateX(-50%) scale(0.8); opacity: 0.6; }
}

@keyframes breathe {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.025); }
}

@keyframes jump {
    0% { transform: translateY(0) scale(1, 1); }
    15% { transform: translateY(0) scale(1.12, 0.86); }
    45% { transform: translateY(-34%) scale(0.92, 1.08); }
    75% { transform: translateY(0) scale(1.1, 0.9); }
    100% { transform: translateY(0) scale(1, 1); }
}

@keyframes splash {
    from { scale: 1; }
    to { scale: 1.09; }
}

@keyframes badge {
    from { transform: rotate(-12deg) scale(1); }
    to { transform: rotate(-12deg) scale(1.12); }
}

@keyframes drift {
    from { transform: translateX(-110%); }
    to { transform: translateX(100vw); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes sun-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}

@keyframes flicker {
    0% { opacity: 1; }
    20% { opacity: 0.85; }
    40% { opacity: 1; }
    55% { opacity: 0.9; }
    75% { opacity: 0.97; }
}

@keyframes glint {
    0% { transform: translateX(-34%); }
    28%, 100% { transform: translateX(34%); }
}

@keyframes pop-in {
    0% { opacity: 0; transform: translateY(40px) scale(0.86) rotate(-2deg); }
    100% { opacity: 1; transform: none; }
}

@keyframes primed {
    0% { filter: brightness(1); }
    50% { filter: brightness(2.6) saturate(0.2); }
}

@keyframes swell {
    from { scale: 1; }
    to { scale: 1.18; }
}

@keyframes respawn {
    0% { opacity: 0; scale: 0.2; }
    100% { opacity: 1; scale: 1; }
}

@keyframes spin {
    to { transform: rotate(1turn); }
}

@keyframes rainbow {
    to { filter: hue-rotate(360deg); }
}

@keyframes waddle {
    from { rotate: -6deg; }
    to { rotate: 6deg; }
}

@keyframes portal-rise {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-160px); opacity: 0; }
}

@keyframes teleport {
    to { opacity: 0; transform: scale(1.06); filter: hue-rotate(80deg) saturate(2) brightness(1.3); }
}

@keyframes crown-bob {
    from { translate: 0 0; }
    to { translate: 0 -5px; }
}

@keyframes cheese-pop {
    0% { transform: none; }
    40% { transform: translateY(-34px) scale(1.6) rotate(20deg); }
    100% { transform: none; }
}

@keyframes cheese-glow {
    50% { box-shadow: 0 0 24px 6px rgba(255, 216, 74, 0.65); }
}

@keyframes jiggle {
    0%, 100% { rotate: 0deg; scale: 1; }
    20% { rotate: -14deg; scale: 1.1; }
    45% { rotate: 12deg; }
    70% { rotate: -6deg; }
}

@keyframes wobble {
    0%, 55%, 100% { rotate: 0deg; }
    62% { rotate: -10deg; }
    70% { rotate: 8deg; }
    78% { rotate: -5deg; }
    86% { rotate: 2deg; }
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-10px, 6px); }
    20% { transform: translate(9px, -8px); }
    30% { transform: translate(-7px, -4px); }
    40% { transform: translate(6px, 7px); }
    55% { transform: translate(-4px, 3px); }
    70% { transform: translate(3px, -3px); }
    85% { transform: translate(-1px, 1px); }
}

@keyframes flash {
    0% { opacity: 0.85; }
    100% { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes zoom-in {
    from { opacity: 0; transform: scale(0.72) translateY(30px); }
    to { opacity: 1; transform: none; }
}

@keyframes zoom-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: scale(0.9); }
}

@keyframes slide-next {
    from { opacity: 0; transform: translateX(70px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes slide-prev {
    from { opacity: 0; transform: translateX(-70px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes bump {
    50% { transform: translate(-50%, 2px) scale(1.45); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to { opacity: 1; transform: none; }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateX(120%); }
}

/* ---------- Small screens ---------- */

@media (max-width: 768px) {
    :root {
        --block: 48px;
    }

    .container {
        padding: 0 16px;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hero-inner {
        padding: 30px 16px 14px;
    }

    .mc-btn {
        font-size: 17px;
        min-height: 46px;
        padding: 8px 16px 10px;
    }

    .mc-btn--green {
        width: 100%;
        max-width: 420px;
        font-size: 17px;
    }

    .update-banner .long {
        display: none;
    }

    /* two-line logo: the splash sits underneath instead of over the letters */
    .splash {
        --splash-max: 0.92;
        right: 50%;
        bottom: 0;
        transform: translate(50%, 120%) rotate(-5deg) scale(var(--fit, 1));
    }

    .hero-sub {
        margin-top: 58px;
    }

    .stats {
        font-size: 15px;
        gap: 8px;
    }

    .stats li {
        padding: 3px 10px 5px;
    }

    .stats b {
        font-size: 19px;
    }

    .sun {
        top: 8px;
        left: 8px;
        width: 40px;
        box-shadow:
            inset 0 0 0 7px #ffe866,
            0 0 0 6px rgba(255, 240, 150, 0.35),
            0 0 40px 14px rgba(255, 236, 140, 0.55);
    }

    .section-head {
        padding-top: 96px;
    }

    .torch {
        width: 24px;
        height: 36px;
    }

    .filter-btn {
        width: 47px;
        height: 47px;
        padding: 5px;
    }

    .filter-btn .count {
        font-size: 14px;
    }

    .xp-level {
        font-size: 18px;
    }

    .item-name {
        font-size: 17px;
        margin-bottom: 24px;
    }

    .modal-nav {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }

    .modal-prev {
        left: 8px;
    }

    .modal-next {
        right: 8px;
    }

    .character-stage {
        height: 230px;
    }

    .portal-text,
    .portal-text .section-title {
        text-align: center;
    }

    .sound-toggle {
        width: 38px;
        height: 38px;
        min-height: 0;
        padding: 0;
        top: 8px;
        right: 8px;
        opacity: 0.85;
    }

    .sound-toggle svg {
        width: 18px;
        height: 18px;
    }

    .sound-toggle:not(.on)::after {
        height: 28px;
    }

    .toasts {
        top: 58px;
        right: 8px;
    }
}

@media (max-width: 400px) {
    .filter-btn {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .cloud {
        transform: translateX(var(--still, 20vw));
    }
}
