/* Gone Bonking: comic horror. Palette and fonts follow the game's title screen and cards. */

@font-face { font-family: "Bangers"; src: url("fonts/Bangers-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/Rubik-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/Rubik-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("fonts/IMFellEnglishSC-Regular.ttf") format("truetype"); font-display: swap; }

:root {
    --ink: #0d0606;
    --ink-2: #160a09;
    --ink-3: #221110;
    --line: #3b1c19;
    --bone: #f3e8d2;
    --bone-dim: #c4b39a;
    --muted: #9b8a78;
    --blood: #a30f0b;
    --blood-hi: #d42a1e;
    --gold: #ffcf3f;
    --gold-deep: #e39c1c;
    --paper: #f6ecd3;
    --paper-2: #eadcbc;
    --paper-ink: #1d1410;
    --black: #000;

    --f-display: "Bangers", "Impact", "Arial Black", sans-serif;
    --f-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
    --f-fell: "IM Fell English SC", Georgia, serif;
    --f-hand: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    --marker: #ffcf3f;
    --tape: rgba(236, 222, 178, .62);
    /* a hand-cut box: no two corners alike */
    --wobble: 14px 4px 12px 5px / 5px 12px 4px 14px;

    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius: 6px;
    --shadow: 6px 6px 0 var(--black);
    --halftone: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px);
}

*, *::before, *::after { box-sizing: border-box; }
/* site.js shows and hides things with the hidden attribute, including buttons and boxes that set their own display. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* paper grain over everything, so nothing is a perfectly flat colour */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
    opacity: .07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.05; }
code { font-size: .9em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.spaced { margin-top: 3rem; }
.spaced-bottom { margin-bottom: 2.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--black); padding: 8px 14px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------ type */
.display {
    font-family: var(--f-display);
    font-weight: 400;
    letter-spacing: .02em;
    text-transform: uppercase;
}
h1.display { font-size: clamp(2.6rem, 6vw, 4.6rem); text-shadow: 4px 4px 0 var(--blood), 7px 7px 0 var(--black); }
h2.display { font-size: clamp(2rem, 4.2vw, 3.1rem); text-shadow: 3px 3px 0 var(--black); }
h3.display { font-size: 1.7rem; }
.fell { font-family: var(--f-fell); font-weight: 400; letter-spacing: .02em; text-transform: none; }
h1.fell { font-size: clamp(2.6rem, 6vw, 4.4rem); }

/* the little line above a heading is a margin note, written in, not typeset */
.kicker {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.1;
    color: var(--gold);
    width: fit-content;
    max-width: 100%;
    margin: 0 0 .25em;
    transform: rotate(-2deg);
    transform-origin: left center;
}
.section-head:not(.left) .kicker, .center .kicker { transform-origin: center; margin-left: auto; margin-right: auto; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.lead { font-size: 1.2rem; color: var(--bone-dim); max-width: 46rem; }
.section-head { text-align: center; margin: 0 auto 2.5rem; }
.section-head .lead { margin-left: auto; margin-right: auto; }
.section-head.left { text-align: left; margin-left: 0; }
.section-head.spaced { margin-top: clamp(3rem, 6vw, 4.5rem); }
.section-head.left .lead { margin-left: 0; }

kbd {
    display: inline-block;
    font-family: var(--f-body);
    font-size: .8em;
    font-weight: 700;
    line-height: 1;
    padding: .35em .55em;
    margin: 0 .12em;
    border: 2px solid var(--black);
    border-radius: 4px;
    background: var(--paper);
    color: var(--paper-ink);
    box-shadow: 0 3px 0 var(--black);
    vertical-align: .1em;
}

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    font-family: var(--f-display);
    font-size: 1.35rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
    padding: .7em 1.2em .62em;
    border: 3px solid var(--black);
    border-radius: var(--wobble);
    box-shadow: 4px 4px 0 var(--black);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
    color: var(--black);
    background: var(--gold);
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--black); color: var(--black); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--black); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #ffe07a; }
.btn-blood { background: var(--blood-hi); color: #fff; }
.btn-blood:hover { background: #ee3a2c; color: #fff; }
.btn-ghost { background: var(--ink-3); color: var(--bone); border-color: var(--black); }
.btn-ghost:hover { background: #33191a; color: #fff; }
.btn-sm { font-size: 1.05rem; padding: .55em .9em .5em; box-shadow: 3px 3px 0 var(--black); }
.btn-lg { font-size: 1.55rem; }

.play-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------------ panels */
.panel {
    margin: 0;
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: var(--ink-2);
}
.panel img { width: 100%; }
.panel-tilt { transform: rotate(-1.2deg); }
.panel-tilt-r { transform: rotate(1.2deg); }

.paper {
    background: var(--paper);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 40%), radial-gradient(rgba(120, 80, 30, .08) 1px, transparent 1.5px);
    background-size: auto, 7px 7px;
    color: var(--paper-ink);
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.paper .muted { color: #6f5d4b; }
.paper a { color: var(--blood); }

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color .2s ease, box-shadow .2s ease;
}
body.scrolled .site-header, .site-header:has(.nav-toggle:checked) {
    background: rgba(13, 6, 6, .94);
    box-shadow: 0 2px 0 var(--black), 0 8px 24px rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { width: 150px; height: auto; filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .6)); transition: transform .15s ease; }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) {
    font-family: var(--f-display);
    font-size: 1.25rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--bone);
    padding: 6px 12px;
    border-radius: 4px;
}
.site-nav a:not(.btn):hover { color: var(--gold); }
.site-nav a.active { color: var(--gold); text-shadow: 2px 2px 0 var(--blood); }
.site-nav .btn { margin-left: 10px; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

@media (max-width: 980px) {
    .nav-burger {
        display: grid;
        place-items: center;
        width: 48px;
        height: 44px;
        border: 3px solid var(--black);
        border-radius: var(--radius);
        background: var(--gold);
        box-shadow: 3px 3px 0 var(--black);
        cursor: pointer;
    }
    .nav-burger span, .nav-burger span::before, .nav-burger span::after {
        display: block; width: 22px; height: 3px; background: var(--black); border-radius: 2px; position: relative; content: "";
        transition: transform .2s ease, background-color .2s ease;
    }
    .nav-burger span::before { position: absolute; top: -7px; }
    .nav-burger span::after { position: absolute; top: 7px; }
    .nav-toggle:checked + .nav-burger span { background: transparent; }
    .nav-toggle:checked + .nav-burger span::before { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked + .nav-burger span::after { transform: translateY(-7px) rotate(-45deg); }
    .nav-toggle:focus-visible + .nav-burger { outline: 3px solid var(--gold); outline-offset: 3px; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 20px;
        background: rgba(13, 6, 6, .98);
        border-bottom: 3px solid var(--black);
        display: none;
    }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 1.45rem; }
    .site-nav .btn { margin: 16px 0 0; }
}

/* ------------------------------------------------------------------ home banner (the title screen) */
.hero-banner {
    position: relative;
    margin-top: -76px;
    padding: 130px 0 90px;
    min-height: min(100vh, 900px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 70% at 75% 30%, rgba(160, 20, 12, .45), transparent 70%),
        radial-gradient(ellipse 90% 80% at 20% 20%, rgba(70, 8, 6, .9), transparent 75%),
        linear-gradient(180deg, #2a0807 0%, #170505 55%, var(--ink) 100%);
    isolation: isolate;
}
.hero-banner::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, var(--ink));
    z-index: -1;
}
.moon {
    position: absolute;
    width: clamp(180px, 22vw, 320px);
    aspect-ratio: 1;
    right: 12%;
    top: 16%;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 40%, #ff6a4a 0%, #e8301f 35%, #b51510 62%, #7a0a08 100%);
    box-shadow: 0 0 80px 30px rgba(214, 38, 24, .45), 0 0 220px 120px rgba(150, 16, 10, .35);
    opacity: .9;
    z-index: -2;
    animation: moon-pulse 7s ease-in-out infinite;
}
@keyframes moon-pulse { 50% { box-shadow: 0 0 100px 40px rgba(214, 38, 24, .55), 0 0 260px 140px rgba(150, 16, 10, .4); } }

.rain {
    position: absolute;
    inset: -100px 0 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(103deg, transparent 0 46px, rgba(255, 220, 210, .10) 46px 47px, transparent 47px 97px),
        repeating-linear-gradient(101deg, transparent 0 71px, rgba(255, 220, 210, .07) 71px 72px, transparent 72px 151px);
    background-size: 240px 120px, 330px 170px;
    -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 34px, transparent 34px 90px);
    mask-image: repeating-linear-gradient(180deg, #000 0 34px, transparent 34px 90px);
    animation: rain 0.55s linear infinite;
}
@keyframes rain { to { background-position: -26px 120px, -36px 170px; } }

.hero-banner-inner { width: 100%; }
.hero-logo {
    width: min(760px, 92%);
    filter: drop-shadow(8px 10px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 30px rgba(0, 0, 0, .5));
    margin-left: -10px;
    animation: logo-drop .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes logo-drop { from { transform: translateY(-40px) rotate(-3deg); opacity: 0; } }
.hero-tagline { font-style: italic; font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--bone-dim); margin: 6px 0 14px 4px; }
.hero-pitch { max-width: 36rem; font-size: 1.15rem; margin-bottom: 28px; }
.hero-scrawl { font-family: var(--f-hand); font-weight: 500; font-size: 1.6rem; line-height: 1.2; color: var(--bone); margin: 22px 0 0 4px; transform: rotate(-1deg); transform-origin: left; }
.hero-scrawl b { color: var(--gold); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .rain, .moon, .hero-logo { animation: none; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(56px, 8vw, 110px) 0; position: relative; }

.video-frame { aspect-ratio: 16 / 9; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; background: #000; }

/* ------------------------------------------------------------------ the hand-made layer */
/* Anything can lean: set --tilt on the element (by hand, per element; never nth-child). */
.tilt { transform: rotate(var(--tilt, -1deg)); }

/* masking tape: .taped gets one strip on top; --tape-x / --tape-r move it */
.taped { position: relative; }
.taped::before {
    content: "";
    position: absolute;
    z-index: 3;
    top: -14px;
    left: var(--tape-x, 50%);
    width: clamp(80px, 14%, 130px);
    height: 30px;
    transform: translateX(-50%) rotate(var(--tape-r, -4deg));
    background: var(--tape);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 9%, 96% 0, 100% 10%, 100% 90%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 91%, 4% 100%, 0 92%);
}
.taped.taped-corners::before { top: -10px; left: -18px; transform: rotate(-38deg); width: 96px; }
.taped.taped-corners::after {
    content: "";
    position: absolute;
    z-index: 3;
    bottom: -8px;
    right: -18px;
    width: 96px;
    height: 30px;
    transform: rotate(-38deg);
    background: var(--tape);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 9%, 96% 0, 100% 10%, 100% 90%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 91%, 4% 100%, 0 92%);
}

/* a printed photo: bone border, fat bottom edge to write on */
.photo {
    margin: 0;
    padding: 10px 10px 0;
    background: #efe6d2;
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .5), transparent 40%);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .55), 0 2px 3px rgba(0, 0, 0, .4);
}
.photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #111; }
.photo figcaption, .photo .photo-caption {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #2a1d18;
    padding: 8px 6px 12px;
}

/* handwritten words anywhere in running text */
.hand { font-family: var(--f-hand); font-weight: 700; font-size: 1.35em; line-height: 1; color: var(--gold); }
/* a marker swipe under a word or two */
.scribble {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 40 3, 80 10, 120 5 S 180 4, 198 7' fill='none' stroke='%23ffcf3f' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% .32em no-repeat;
    padding-bottom: .12em;
}

/* hand-drawn marks laid over a screenshot (an <svg class="ink"> with the image's own viewBox) */
.annotated { position: relative; }
.annotated .ink { position: absolute; inset: 10px 10px auto; width: calc(100% - 20px); height: auto; aspect-ratio: 16 / 9; pointer-events: none; overflow: visible; }
.ink path { fill: none; stroke: var(--marker); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ink text {
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 64px;
    fill: #fff;
    stroke: #000;
    stroke-width: 9px;
    paint-order: stroke;
    stroke-linejoin: round;
}
/* site.js adds .can-draw, then .drawn once the marks scroll into view */
.can-draw .ink path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.can-draw .ink text { opacity: 0; }
.can-draw .ink.drawn path { animation: ink-draw .55s ease-out forwards; animation-delay: calc(var(--i, 0) * .35s); }
.can-draw .ink.drawn text { animation: ink-text .3s ease-out forwards; animation-delay: calc(var(--i, 0) * .35s + .3s); }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }
@keyframes ink-text { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .can-draw .ink path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
    .can-draw .ink text { opacity: 1; animation: none !important; }
}

/* the home page's big screenshot */
.showcase { padding-top: 10px; }
.showcase .photo { --tilt: -1.1deg; }
.showcase .photo img { aspect-ratio: 16 / 9; }
.showcase .photo figcaption { font-size: clamp(1.3rem, 2.4vw, 1.75rem); padding: 10px 8px 14px; }

/* a note from the dev, on ruled paper */
.dev-note-section { padding-top: clamp(30px, 5vw, 60px); }
.dev-note {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding: 46px clamp(22px, 5vw, 56px) 34px clamp(48px, 8vw, 86px);
    color: #2a1f1a;
    background:
        linear-gradient(90deg, transparent calc(clamp(48px, 8vw, 86px) - 18px), rgba(200, 50, 40, .45) calc(clamp(48px, 8vw, 86px) - 18px) calc(clamp(48px, 8vw, 86px) - 16px), transparent 0),
        repeating-linear-gradient(180deg, transparent 0 37px, rgba(70, 110, 170, .28) 37px 38px),
        #f4ecd8;
    background-position: 0 0, 0 30px, 0 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 2px 3px rgba(0, 0, 0, .35);
    transform: rotate(.7deg);
}
.dev-note h2 { font-family: var(--f-hand); font-weight: 700; font-size: clamp(2.1rem, 4vw, 2.7rem); line-height: 1; margin: 0 0 14px; color: #8c1610; }
.dev-note p { font-family: var(--f-hand); font-weight: 500; font-size: clamp(1.4rem, 2.3vw, 1.6rem); line-height: 38px; margin: 0 0 38px; }
.dev-note p:last-of-type { margin-bottom: 8px; }
.dev-note a { color: #8c1610; text-decoration-thickness: 2px; }
.dev-note .sign { font-family: var(--f-hand); font-weight: 700; font-size: 1.9rem; color: #8c1610; text-align: right; margin: 0; transform: rotate(-3deg); }
.sticker {
    position: absolute;
    width: clamp(110px, 18vw, 170px);
    filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(4px 6px 3px rgba(0, 0, 0, .45));
}
.dev-note .sticker { right: clamp(-56px, -4vw, -10px); top: -118px; transform: rotate(9deg); }
@media (max-width: 640px) {
    .dev-note .sticker { width: 84px; top: -70px; right: -4px; }
    .dev-note h2 { padding-right: 64px; }
}

/* features as a scrapbook: photos stuck down where they landed, notes under each */
.features { background: var(--halftone), linear-gradient(180deg, var(--ink), var(--ink-2) 30%, var(--ink-2) 70%, var(--ink)); background-size: 9px 9px, auto; }
.scrapbook { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(20px, 4vw, 56px); row-gap: clamp(48px, 6vw, 80px); align-items: start; }
.snap { grid-column: span 6; }
.snap .photo { transform: rotate(var(--tilt, 0deg)); }
.snap h3.display { font-size: clamp(1.7rem, 2.8vw, 2.2rem); text-shadow: 3px 3px 0 var(--black); margin-top: 22px; }
.snap > p { color: var(--bone-dim); font-size: 1.08rem; max-width: 36rem; }
.snap-lineup { display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 16 / 10; padding: 0 2%; --burst-at: 50% 75%; }
.snap-lineup img { flex: 0 0 auto; width: 40% !important; aspect-ratio: auto !important; object-fit: contain !important; background: none !important; margin: 0 -8% -1%; filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .5)); }
.snap-lineup img:nth-child(2), .snap-lineup img:nth-child(3) { z-index: 1; }
/* the one without a photo: a sticky note */
.sticky {
    position: relative;
    padding: 30px 28px 26px;
    color: #2a2410;
    background: linear-gradient(175deg, #ffe46b, #f6cf3a);
    box-shadow: 0 16px 26px rgba(0, 0, 0, .5), inset 0 -30px 40px -30px rgba(120, 80, 0, .35);
    transform: rotate(var(--tilt, 2deg));
    clip-path: polygon(0 0, 100% 0, 100% 92%, 94% 100%, 0 100%);
}
.sticky h3 { font-family: var(--f-hand); font-weight: 700; font-size: 2.3rem; line-height: 1; margin: 0 0 10px; color: #6b1d0c; }
.sticky p { font-family: var(--f-hand); font-weight: 500; font-size: 1.5rem; line-height: 1.25; margin: 0 0 .6em; }
.sticky p:last-child { margin: 0; }
@media (max-width: 860px) {
    .scrapbook { grid-template-columns: 1fr; }
    .snap { grid-column: auto !important; margin: 0 !important; }
}

/* torn paper edge along the top of a band (in the colour of the section above it) */
.torn-top { position: relative; }
.torn-top::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M0 0H240V7L232 12 221 6 210 13 197 5 186 11 176 4 163 12 151 7 140 14 128 6 117 11 104 3 93 12 81 6 70 13 58 5 47 10 35 4 24 12 12 6 0 11Z' fill='%230d0606'/%3E%3C/svg%3E") 0 0 / 240px 16px repeat-x;
    z-index: 1;
}

/* comic sunburst behind hero portraits, in the hero's --accent */
.sunburst {
    --burst-at: 50% 60%;
    background:
        radial-gradient(circle at var(--burst-at), rgba(255, 255, 255, .22) 0 12%, transparent 40%, rgba(0, 0, 0, .5) 85%),
        var(--halftone),
        repeating-conic-gradient(from 4deg at var(--burst-at),
            color-mix(in srgb, var(--accent, #c8402f) 85%, #000) 0deg 9deg,
            color-mix(in srgb, var(--accent, #c8402f) 55%, #000) 9deg 18deg);
    background-size: auto, 7px 7px, auto;
}


/* hero grid (character select) */
.select-screen { background: radial-gradient(ellipse at 50% 0%, rgba(163, 15, 11, .25), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 22px); margin-bottom: 2.5rem; }
@media (max-width: 640px) { .hero-grid { grid-template-columns: repeat(2, 1fr); } }
.hero-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--bone);
    background: var(--ink-3);
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 var(--black);
    overflow: hidden;
    transition: transform .14s ease, box-shadow .14s ease;
}
.hero-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--accent); z-index: 1; }
.hero-card:hover, .hero-card:focus-visible { transform: translate(-3px, -3px) rotate(-.8deg); box-shadow: 9px 9px 0 var(--black); color: #fff; }
.hero-card:hover .hero-card-art img { transform: scale(1.06); }
.hero-card-art { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; aspect-ratio: 4 / 5; border-bottom: 3px solid var(--black); }
.hero-card-art img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .45)); transform-origin: 50% 100%; transition: transform .3s ease; }
.hero-card-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.hero-card-name { font-family: var(--f-display); font-size: clamp(1.15rem, 2.2vw, 1.6rem); letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; }
.hero-card-tag { font-size: .9rem; color: var(--muted); font-style: italic; }
.hero-card-lock {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 2;
    font-family: var(--f-display);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 8px 2px;
    background: var(--black);
    color: var(--gold);
    border-radius: 3px;
}

/* hero antics (antics.js): live 3D heroes that watch the mouse, react to it and get bonked; the portrait shows until one loads */
.antics { position: relative; }
.antics > img { transition: opacity .35s; user-select: none; -webkit-user-drag: none; }
.antics.live > img { opacity: 0; }
.antics-3d { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity .35s; pointer-events: none; filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .45)); }
.antics.live > .antics-3d { opacity: 1; }
.antics-torn > .antics-3d { filter: brightness(.13) saturate(0) drop-shadow(5px 6px 0 rgba(0, 0, 0, .45)); }
.antics.aim { cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><g transform='rotate(-45 16 16)'><rect x='14' y='18' width='4.5' height='13' rx='1.5' fill='%237a4a24' stroke='black' stroke-width='1.5'/><path d='M11 19C9 10 11 2 16.2 1.5 21.5 2 23.5 10 21.5 19z' fill='%23d79a52' stroke='black' stroke-width='1.5'/><path d='M14 5c-1 4-1 8 0 12' stroke='%23f3c78f' stroke-width='1.5' fill='none'/></g></svg>") 7 7, pointer; }
.antics.aim.swing { cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><g transform='rotate(-95 16 16)'><rect x='14' y='18' width='4.5' height='13' rx='1.5' fill='%237a4a24' stroke='black' stroke-width='1.5'/><path d='M11 19C9 10 11 2 16.2 1.5 21.5 2 23.5 10 21.5 19z' fill='%23d79a52' stroke='black' stroke-width='1.5'/><path d='M14 5c-1 4-1 8 0 12' stroke='%23f3c78f' stroke-width='1.5' fill='none'/></g></svg>") 4 17, pointer; }
.antics.antics-repo, .antics.antics-repo * { cursor: none !important; }
.antics-shake { animation: antics-shake .45s linear; }
.antics-fx { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; font-size: clamp(11px, calc(15px * var(--s, 1)), 24px); }
.antics-fx > * { position: absolute; left: 0; top: 0; }

.antics-say {
    width: max-content;
    padding: .32em .6em .2em;
    font: 1em/1.08 var(--f-display);
    letter-spacing: .03em;
    text-align: center;
    color: var(--black);
    background: #fff;
    border: 2.5px solid var(--black);
    border-radius: 1em;
    box-shadow: 3px 3px 0 var(--black);
    transform-origin: 100% 60%;
    transform: scale(.3);
    opacity: 0;
    transition: opacity .12s, transform .12s;
    z-index: 4;
}
.antics-say.tail-left { transform-origin: 0 60%; }
.antics-say::after {
    content: "";
    position: absolute;
    top: 55%;
    right: -7px;
    width: 10px;
    height: 10px;
    background: inherit;
    border: solid var(--black);
    border-width: 2.5px 2.5px 0 0;
    transform: rotate(45deg);
}
.antics-say.tail-left::after { right: auto; left: -7px; border-width: 0 0 2.5px 2.5px; }
.antics-say.on { opacity: 1; transform: rotate(-2deg); transition: opacity .1s, transform .22s cubic-bezier(.3, 1.8, .5, 1); }
.antics-say.loud { background: var(--gold); font-size: 1.15em; }
.antics-say.stop, .antics-say.go { color: #fff; font-size: 1.45em; text-shadow: 2px 2px 0 var(--black); }
.antics-say.stop { background: #d42a1e; }
.antics-say.go { background: #3a9e44; }

.antics-alert {
    font: 2.6em/1 var(--f-display);
    color: #ff3b2f;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
    text-shadow: 3px 3px 0 #000;
    animation: antics-alert .65s ease-out both;
    z-index: 5;
}
.antics-burst { width: 6.4em; height: 4.6em; display: grid; place-items: center; animation: antics-burst .7s cubic-bezier(.2, 1.6, .4, 1) both; z-index: 5; }
.antics-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.antics-burst b { position: relative; font: 1.35em/1 var(--f-display); letter-spacing: .04em; color: #d42a1e; -webkit-text-stroke: .5px #000; text-shadow: 1px 1px 0 #000; }
.antics-star { color: var(--gold); font-size: 1.25em; line-height: 1; transform: translate(-50%, -50%); text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; z-index: 3; }
.antics-puff { width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); border: 2px solid rgba(0, 0, 0, .55); border-radius: 50%; animation: antics-puff .7s ease-out both; z-index: 3; }
.antics-bag { width: 22%; transform-origin: 50% 100%; animation: antics-wobble .3s ease-in-out infinite alternate; z-index: 3; }
.antics-bag svg, .antics-wet svg { display: block; width: 100%; height: auto; }
.antics-wet { width: 20%; animation: antics-drop .35s cubic-bezier(.3, 1.6, .5, 1) both, antics-fade .4s 2.4s forwards; z-index: 3; }
.antics-mound {
    width: 36%;
    height: 7%;
    transform: translate(-50%, -100%);
    background: #5a3d22;
    border: 2.5px solid #000;
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    animation: antics-fade .5s 1.8s forwards;
    z-index: 0;
}
.antics-flash { inset: 0; background: #fff; animation: antics-flash .5s ease-out both; z-index: 6; }
.antics-polaroid {
    width: 32%;
    padding: 5% 5% 2%;
    background: #fbf8f0;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    text-align: center;
    animation: antics-polaroid 3.8s ease-out both;
    z-index: 5;
}
.antics-polaroid span { display: grid; place-items: center; aspect-ratio: 1; background: radial-gradient(circle at 40% 35%, #3a3540, #121016); }
.antics-polaroid svg { width: 30%; }
.antics-polaroid i { display: block; font: 700 1.1em/1.2 var(--f-hand); font-style: normal; color: #1d1410; }
.antics-ticket {
    padding: .25em .5em .2em;
    font: 700 1.15em/1 var(--f-hand);
    color: #a30f0b;
    text-align: center;
    background: #fffbe6;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    animation: antics-ticket 2.3s ease-in both;
    z-index: 5;
}
.antics-ticket small { display: block; font-size: .7em; color: #1d1410; }
.antics-stamp {
    padding: .18em .4em .06em;
    font: 1.3em/1 var(--f-display);
    letter-spacing: .06em;
    color: #d42a1e;
    background: rgba(255, 255, 255, .88);
    border: 3px solid #d42a1e;
    border-radius: 4px;
    animation: antics-stamp .3s cubic-bezier(.3, 1.5, .5, 1) both;
    z-index: 5;
}
.antics-sign {
    left: 50%;
    top: 16%;
    width: 64%;
    padding: .45em .4em .4em;
    text-align: center;
    color: #2a1a0c;
    background: #c9a46a;
    border: 2.5px solid #000;
    border-radius: 3px;
    box-shadow: 3px 4px 0 rgba(0, 0, 0, .6);
    transform-origin: 50% -2.2em;
    animation: antics-swing 1.6s ease-out both;
    z-index: 4;
}
.antics-sign::before {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 100%;
    height: 2.2em;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'><path d='M3 30L50 3l47 27' fill='none' stroke='black' stroke-width='2.5'/><circle cx='50' cy='3' r='3'/></svg>") center / 100% 100% no-repeat;
}
.antics-sign b { display: block; font: 700 1.6em/1 var(--f-hand); }
.antics-sign small { display: block; font: 700 1.05em/1.1 var(--f-hand); }
.antics-sign.off { animation: antics-sign-off .4s ease-in forwards; }
.antics-eyes { display: flex; gap: .7em; transform: translate(-50%, -50%); z-index: 3; }
.antics-eyes i { width: .5em; height: .32em; border-radius: 50%; background: #ff2a1a; box-shadow: 0 0 6px 2px #ff2a1a; animation: antics-blink 2.2s steps(1) infinite; }
.antics-bee {
    left: -6px;
    top: -5px;
    width: 12px;
    height: 9px;
    border: 1px solid #000;
    border-radius: 50%;
    background: repeating-linear-gradient(90deg, #ffcf3f 0 3px, #111 3px 5px);
    z-index: 4;
}
.antics-bee::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -5px;
    width: 6px;
    height: 5px;
    border: 1px solid rgba(0, 0, 0, .5);
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    animation: antics-buzz .05s linear infinite alternate;
}
.antics-line { inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transition: opacity .15s; z-index: 3; }
.antics-line.on { opacity: 1; }
.antics-line path { fill: none; stroke: rgba(235, 240, 255, .85); stroke-width: 1.4; }
.antics-line circle { fill: #7ff3ff; stroke: #000; stroke-width: 1.5; }
.antics-line.rope path { stroke: #c9a46a; stroke-width: 3; stroke-linecap: round; }
.antics-hint { width: fit-content; margin: -1.6rem 0 .8rem auto; font: 700 1.45rem/1.1 var(--f-hand); color: var(--bone-dim); transform: rotate(-2deg); }
.antics-hint b { font-weight: 700; color: var(--gold); }
.antics-hint::after {
    content: "";
    display: inline-block;
    width: 1.5em;
    height: 1.2em;
    margin-left: .15em;
    vertical-align: -.55em;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 30'><path d='M4 5c15-3 26 5 26 21m-8-7 8 8 6-9' fill='none' stroke='%23ffcf3f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

@keyframes antics-alert {
    0% { transform: translate(-50%, -60%) scale(.2); opacity: 0; }
    25% { transform: translate(-50%, -115%) scale(1.25); opacity: 1; }
    70% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 0; }
}
@keyframes antics-burst {
    0% { transform: translate(-50%, -50%) rotate(var(--r)) scale(.2); }
    30% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1.1); opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); opacity: 0; }
}
@keyframes antics-puff {
    from { transform: scale(.3); opacity: 1; }
    to { transform: translate(var(--dx), var(--dy)) scale(1.5); opacity: 0; }
}
@keyframes antics-wobble {
    from { transform: translate(-50%, -100%) rotate(-7deg); }
    to { transform: translate(-50%, -100%) rotate(7deg); }
}
@keyframes antics-drop {
    from { transform: translate(-50%, -160%) rotate(-12deg); opacity: 0; }
    to { transform: translate(-50%, -100%) rotate(0); opacity: 1; }
}
@keyframes antics-fade { to { opacity: 0; } }
@keyframes antics-flash { from { opacity: .95; } to { opacity: 0; } }
@keyframes antics-polaroid {
    0% { transform: translateY(-140%) rotate(25deg); opacity: 0; }
    15% { transform: translateY(0) rotate(-9deg); opacity: 1; }
    85% { transform: translateY(0) rotate(-7deg); opacity: 1; }
    100% { transform: translateY(15%) rotate(-7deg); opacity: 0; }
}
@keyframes antics-ticket {
    0% { transform: translate(-50%, 0) rotate(-20deg) scale(.5); opacity: 0; }
    12% { transform: translate(-50%, 6px) rotate(-6deg) scale(1); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate(-40%, 90px) rotate(14deg); opacity: 0; }
}
@keyframes antics-stamp {
    from { transform: translate(-50%, -50%) rotate(-14deg) scale(2.4); opacity: 0; }
    to { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; }
}
@keyframes antics-swing {
    0% { transform: translate(-50%, -260%) rotate(0); }
    35% { transform: translate(-50%, 0) rotate(9deg); }
    55% { transform: translate(-50%, 0) rotate(-6deg); }
    75% { transform: translate(-50%, 0) rotate(3deg); }
    100% { transform: translate(-50%, 0) rotate(-1.5deg); }
}
@keyframes antics-sign-off { to { transform: translate(-50%, -280%) rotate(-6deg); } }
@keyframes antics-blink { 0%, 92% { transform: scaleY(1); } 93%, 97% { transform: scaleY(.1); } }
@keyframes antics-buzz { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes antics-shake {
    0%, 100% { translate: 0 0; }
    15% { translate: -6px 2px; }
    30% { translate: 6px -2px; }
    45% { translate: -4px 1px; }
    60% { translate: 3px -1px; }
    80% { translate: -1px 0; }
}

/* run roller */
.roll-section { background: var(--halftone), linear-gradient(180deg, var(--ink), #1f0807 50%, var(--ink)); background-size: 9px 9px, auto; }
.roller {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 30px);
    background: linear-gradient(180deg, #c2221a, #8c0f0b);
    border: 4px solid var(--black);
    border-radius: 14px;
    box-shadow: 8px 8px 0 var(--black), inset 0 0 0 6px rgba(255, 207, 63, .9), inset 0 0 0 9px var(--black);
    text-align: center;
}
.roller-machine { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.roller-reel { color: var(--paper-ink); border: 3px solid var(--black); border-radius: 8px; overflow: hidden; }
.roller-small { background: var(--paper); }
.roller-hero { aspect-ratio: 1; display: flex; align-items: flex-end; justify-content: center; box-shadow: inset 0 0 0 4px var(--accent); }
.roller-hero img { height: 96%; width: auto; object-fit: contain; filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .45)); }
.roller-hero .roller-empty { align-self: center; color: #fff; text-shadow: 4px 4px 0 var(--black); }
.roller-empty { font-family: var(--f-display); font-size: 6rem; color: var(--blood); }
.roller-reels { display: grid; gap: 10px; }
.roller-small { padding: 8px 14px; text-align: left; display: flex; flex-direction: column; justify-content: center; }
.roller-label { font-family: var(--f-display); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blood); }
.roller-value { font-family: var(--f-display); font-size: 1.55rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
.roller-value img { width: 28px; height: 28px; }
.roller-verdict { font-family: var(--f-display); font-size: clamp(1.2rem, 2.5vw, 1.6rem); letter-spacing: .03em; color: #fff; text-shadow: 2px 2px 0 var(--black); margin: 20px 0 16px; min-height: 2.4em; display: grid; place-items: center; }
.roller-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
@media (max-width: 640px) { .roller-machine { grid-template-columns: 1fr; } }

/* bosses */
.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 2.5rem; }
.boss-card { padding: 26px 22px 18px; position: relative; border-radius: 3px; transform: rotate(var(--tilt, var(--tilt-auto, -.6deg))); }
.boss-card:nth-child(even) { --tilt-auto: .7deg; }
.boss-card:nth-child(3n) { --tilt-auto: -.2deg; }
.boss-card:nth-child(5n) { --tilt-auto: 1.1deg; }
/* a pin through the top, like a notice on a door */
.boss-card::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8a7a, #b3170f 55%, #5c0805);
    box-shadow: 2px 3px 2px rgba(0, 0, 0, .45);
}
.boss-card h3.display { color: var(--blood); font-size: 2rem; margin-bottom: .3em; }
.boss-role { font-family: var(--f-display); letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; color: #7a6650; margin: 0; }
.boss-card p:last-child { margin: 0; }

/* news cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.news-card { display: flex; flex-direction: column; text-decoration: none; color: var(--bone); transition: transform .14s ease, box-shadow .14s ease; }
.news-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--black); color: #fff; }
.news-card img { aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--black); }
.news-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.news-card time { font-family: var(--f-hand); font-size: 1.35rem; line-height: 1; color: var(--gold); font-weight: 700; }
.more-link { margin: 26px 0 0; text-align: right; font-family: var(--f-hand); font-weight: 700; font-size: 1.6rem; }
.more-link a { text-decoration: none; }
.more-link a:hover { text-decoration: underline; }
.news-card-title { font-family: var(--f-display); font-size: 1.7rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; }
.news-card-summary { color: var(--bone-dim); font-size: .98rem; }

/* page banners */
.page-banner {
    position: relative;
    margin-top: -76px;
    padding: 150px 0 70px;
    background: linear-gradient(90deg, rgba(13, 6, 6, .94) 0%, rgba(13, 6, 6, .6) 50%, rgba(13, 6, 6, .1) 100%), var(--banner, none) center / cover no-repeat;
    border-bottom: 3px solid var(--black);
}
.page-banner::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(180deg, transparent, var(--ink)); pointer-events: none; }
.page-banner .wrap { position: relative; z-index: 1; }
.page-banner .lead { color: var(--bone); }

/* the game: steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; counter-reset: none; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding: 26px; background: var(--ink-2); border: 3px solid var(--black); border-radius: var(--radius); box-shadow: var(--shadow); }
.step { transform: rotate(var(--tilt, 0deg)); }
.step h2.display { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.step p { color: var(--bone-dim); }
.step p:last-child { margin-bottom: 0; }
.step-num {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    font-family: var(--f-display);
    font-size: 2.6rem;
    color: var(--black);
    background: var(--gold);
    border: 3px solid var(--black);
    box-shadow: 4px 4px 0 var(--black);
    clip-path: polygon(50% 0, 61% 18%, 82% 10%, 80% 32%, 100% 40%, 84% 56%, 96% 76%, 74% 78%, 70% 100%, 50% 86%, 30% 100%, 26% 78%, 4% 76%, 16% 56%, 0 40%, 20% 32%, 18% 10%, 39% 18%);
}
@media (max-width: 600px) { .step { grid-template-columns: 1fr; } }

/* sigils */
.sigils-section { background: var(--halftone), var(--ink-2); background-size: 9px 9px, auto; border-block: 3px solid var(--black); }
.sigil-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.sigil { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 12px 14px; gap: 4px; transition: transform .14s ease; }
.sigil:hover { transform: rotate(-2deg) scale(1.04); }
.sigil img { width: 84px; height: 84px; object-fit: contain; }
.sigil-name { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.sigil-effect { font-size: .9rem; color: var(--blood); font-weight: 700; }

/* controls + faq */
.controls { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.controls th { text-align: left; white-space: nowrap; padding: 10px 18px 10px 0; width: 1%; font-weight: 400; }
.controls td { padding: 10px 16px; background: var(--ink-2); border-radius: var(--radius); color: var(--bone-dim); }
.faq details { background: var(--ink-2); border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--black); margin-bottom: 14px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-family: var(--f-display); font-size: 1.45rem; letter-spacing: .03em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.8rem; line-height: .8; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--bone-dim); }

/* hero detail */
.hero-detail-banner {
    margin-top: -76px;
    padding: 130px 0 60px;
    background:
        radial-gradient(ellipse 70% 90% at 20% 40%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
        var(--halftone),
        linear-gradient(180deg, var(--ink-3), var(--ink));
    background-size: auto, 9px 9px, auto;
    border-bottom: 3px solid var(--black);
}
.hero-detail-top { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; }
.hero-detail-art {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--black), 0 0 0 6px var(--accent);
    transform: rotate(-1.2deg);
}
.hero-detail-art img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(6px 8px 0 rgba(0, 0, 0, .45)); }
.move-art { width: 100%; margin-top: 16px; border: 3px solid var(--black); border-radius: 4px; }
.hero-name { font-size: clamp(3rem, 8vw, 5.6rem) !important; }
.hero-sub { font-size: 1.5rem; font-style: italic; color: var(--bone-dim); }
@media (max-width: 760px) { .hero-detail-top { grid-template-columns: 1fr; } }

.move-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.move { padding: 22px; }
.move h2.display { font-size: 1.9rem; text-shadow: none; color: var(--paper-ink); }
.move-kind { font-family: var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--blood); margin: 0 0 .2em; }
.move p:last-child { margin: 0; }

.catch {
    display: flex;
    align-items: stretch;
    margin-top: 28px;
    background: #f7e3d6;
    color: #8c1610;
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.catch-mark { display: grid; place-items: center; min-width: 54px; background: #a3241a; color: #fff; font-family: var(--f-display); font-size: 2rem; }
.catch p { margin: 0; padding: 14px 18px; font-size: 1.1rem; }

.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.path { padding: 20px 22px; border-top: 6px solid var(--accent); }
.path h3.display { font-size: 1.9rem; color: var(--gold); }
.path ul { list-style: none; padding: 0; margin: 0; }
.path li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.path li:last-child { border-bottom: 0; }
.path li.signature { font-weight: 700; color: #fff; }
.badge { font-family: var(--f-display); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: var(--black); padding: 3px 8px 1px; border-radius: 3px; }

.picture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.picture-grid img { width: 100%; box-shadow: 4px 4px 0 var(--black); }
.hero-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 3.5rem; }

/* world */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.tick-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.tick-list li { position: relative; padding: 4px 0 4px 30px; }
.tick-list li::before { content: "✖"; position: absolute; left: 0; top: 4px; color: var(--blood-hi); font-weight: 700; }

.places-section { background: var(--halftone), var(--ink-2); background-size: 9px 9px, auto; border-block: 3px solid var(--black); }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.place { overflow: hidden; display: flex; flex-direction: column; }
.place img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; border-bottom: 3px solid var(--black); }
.place h3 { font-size: 1.8rem; margin: 16px 20px 6px; color: var(--paper-ink); }
.place p { margin: 0 20px 20px; }

.beyond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.beyond { text-align: center; }
.beyond img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--black); border-radius: var(--radius); filter: grayscale(.85) brightness(.75) sepia(.3); transition: filter .3s ease; }
.beyond:hover img { filter: none; }
.beyond h3 { font-size: 1.35rem; margin: 12px 0 2px; }

/* gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { position: relative; display: block; width: 100%; padding: 0; font: inherit; cursor: zoom-in; background: var(--ink-2); border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--black); overflow: hidden; text-decoration: none; transition: transform .14s ease, box-shadow .14s ease; }
.gallery-item:hover, .gallery-item:focus-visible { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 9px 9px 0 var(--black); }
.gallery-item img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.gallery-caption { position: absolute; inset: auto 0 0; padding: 26px 12px 8px; font-size: .9rem; color: #fff; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85)); opacity: 0; transition: opacity .2s ease; }
.gallery-item:hover .gallery-caption, .gallery-item:focus-visible .gallery-caption { opacity: 1; }
@media (hover: none) { .gallery-caption { opacity: 1; } }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 2, 2, .93); display: grid; place-items: center; padding: 60px 70px; outline: none; animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } }
.lightbox-figure { margin: 0; max-width: min(1400px, 100%); }
.lightbox-figure img { max-height: calc(100vh - 160px); width: auto; margin: 0 auto; border: 3px solid var(--black); box-shadow: 8px 8px 0 var(--black); }
.lightbox-figure figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: 1.05rem; }
.lightbox-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; font-size: 2.2rem; line-height: 1; border: 3px solid var(--black); border-radius: 50%; background: var(--gold); color: var(--black); box-shadow: 3px 3px 0 var(--black); cursor: pointer; }
.lightbox-btn:hover { background: #ffe07a; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 12px; top: 12px; }
@media (max-width: 640px) { .lightbox { padding: 70px 12px; } .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; } }

/* news post */
.post h1.display { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.post figure { margin: 2rem 0; }
.post p { font-size: 1.12rem; }

/* press */
.press { display: grid; grid-template-columns: 320px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.factsheet { padding: 22px; position: sticky; top: 96px; }
.factsheet h2.display { color: var(--paper-ink); text-shadow: none; font-size: 2rem; }
.factsheet dl { margin: 0; }
.factsheet dt { font-family: var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--blood); margin-top: 12px; }
.factsheet dd { margin: 0; overflow-wrap: anywhere; }
.press-copy h2.display { font-size: 2rem; margin-top: 1.6em; }
.press-copy h2.display:first-child { margin-top: 0; }
.press-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; background: var(--halftone), #2a0a08; background-size: 9px 9px, auto; border: 3px solid var(--black); border-radius: var(--radius); }
.press-logo img { width: min(520px, 100%); }
.press-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.press-shots img { border: 2px solid var(--black); border-radius: 4px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
@media (max-width: 900px) { .press { grid-template-columns: 1fr; } .factsheet { position: static; } }

/* 404 / error */
.lost { min-height: 60vh; display: grid; align-items: center; }

/* ------------------------------------------------------------------ signup band + footer */
.signup-band {
    padding: clamp(56px, 7vw, 90px) 0;
    background:
        repeating-linear-gradient(135deg, rgba(0, 0, 0, .08) 0 14px, transparent 14px 28px),
        linear-gradient(180deg, #b3170f, #7d0c08);
    border-block: 4px solid var(--black);
}
.signup-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.signup-band .kicker { color: var(--gold); }
.signup-band h2.display { text-shadow: 3px 3px 0 var(--black); }
.signup-copy p:last-child { font-size: 1.1rem; color: #ffe2d6; }
.signup-form, .signup-done { background: var(--paper); color: var(--paper-ink); border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--black); padding: 24px; }
.signup-done .display { font-size: 2rem; color: var(--blood); margin-bottom: .3em; }
.signup-done p:last-child { margin: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
    width: 100%;
    font: inherit;
    padding: 12px 14px;
    color: var(--paper-ink);
    background: #fff;
    border: 3px solid var(--black);
    border-radius: var(--radius);
}
.field input:focus, .field select:focus { outline: 3px solid var(--gold-deep); outline-offset: 1px; }
.field input.invalid { border-color: var(--blood); }
.field-error, .validation-message { color: var(--blood); font-size: .92rem; font-weight: 700; margin-top: 6px; }
.signup-form .btn { width: 100%; }
.fine-print { font-size: .85rem; margin: 12px 0 0; text-align: center; color: #6f5d4b !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) { .signup-inner { grid-template-columns: 1fr; } }

.site-footer { background: #080303; padding: 56px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.footer-brand img { width: 220px; margin-bottom: 10px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-size: 1.2rem; }
.footer-links a { display: block; color: var(--bone-dim); text-decoration: none; padding: 3px 0; overflow-wrap: anywhere; }
.footer-links a:hover { color: #fff; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.footer-scrawl { font-family: var(--f-hand); font-weight: 500; font-size: 1.3rem; color: var(--bone-dim); transform: rotate(-1.5deg); }
@media (max-width: 760px) { .footer-inner, .footer-links { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ the 3D map (/world/map, wwwroot/world/map3d.js) */
.wm {
    display: block;
    position: relative;
    height: calc(100svh - 76px);
    min-height: 540px;
    background: radial-gradient(ellipse at 50% 30%, #140c18, #05040a 70%);
    border-bottom: 3px solid var(--black);
    overflow: hidden;
    isolation: isolate;
    -webkit-user-select: none;
    user-select: none;
}
.wm:fullscreen { height: 100vh; }
.wm-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; outline: none; }
.wm-stage.is-dragging { cursor: grabbing; }
.wm-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.wm-stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.wm.is-ready .wm-stage canvas { opacity: 1; }
.wm-pins { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }

/* title, top left */
.wm-title { position: absolute; top: 18px; left: 22px; z-index: 3; pointer-events: none; max-width: 60%; }
.wm-title .kicker { margin: 0; font-size: 1rem; text-shadow: 2px 2px 0 var(--black); }
.wm-title h1.display { font-size: clamp(2rem, 3.6vw, 3.3rem); margin: 0; }
.wm-sub { margin: 2px 0 0; color: var(--bone-dim); font-size: .95rem; text-shadow: 1px 1px 0 var(--black); }
/* when the map last changed in the game (world/map-info.json), with buttons to fly to what changed */
.wm-updated { margin: 6px 0 0; color: var(--bone-dim); font-size: .85rem; text-shadow: 1px 1px 0 var(--black); pointer-events: auto; }
.wm-updated-spot { all: unset; cursor: pointer; color: var(--gold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wm-updated-spot:hover, .wm-updated-spot:focus-visible { color: var(--gold-deep); }

/* the places list, down the left */
.wm-list {
    position: absolute;
    top: 150px;
    left: 22px;
    bottom: 78px;
    width: 260px;
    z-index: 3;
    overflow-y: auto;
    padding: 6px 8px 10px;
    background: rgba(13, 6, 6, .78);
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 var(--black);
    backdrop-filter: blur(6px);
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.wm-list-toggle { display: none; }
.wm-group h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 10px 6px 2px; }
.wm-group ul { list-style: none; margin: 0; padding: 0; }
.wm-place {
    --dot: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 5px 8px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--bone);
    font: inherit;
    font-size: .93rem;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}
.wm-place::before { content: ""; flex: none; width: 10px; height: 10px; border: 2px solid var(--black); border-radius: 50%; background: var(--dot); box-shadow: 1px 1px 0 var(--black); }
.wm-place[data-kind="seal"] { --dot: var(--blood-hi); }
.wm-place[data-kind="seal"]::before { border-radius: 2px; transform: rotate(45deg); }
.wm-place[data-kind="boss"], .wm-place[data-kind="dragon"] { --dot: #ff7a2a; }
.wm-place[data-layer="1"], .wm-place[data-layer="2"] { --dot: #8fa9ff; }
.wm-place:hover, .wm-place:focus-visible { background: rgba(255, 207, 63, .12); color: #fff; }
.wm-place[aria-current="true"] { background: var(--gold); color: var(--black); }
.wm-place-blurb { display: none; }

/* pins on the map */
.wm-pin {
    --c: var(--gold);
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: auto;
    cursor: pointer;
    transform-origin: 0 0;
    will-change: transform;
}
.wm-pin-dot {
    position: absolute;
    left: -8px;
    top: -8px;
    width: 16px;
    height: 16px;
    border: 3px solid var(--black);
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 0 14px var(--c);
}
.wm-pin-stem { position: absolute; left: -1.5px; bottom: 6px; width: 3px; height: 26px; background: var(--black); }
.wm-pin-label {
    position: absolute;
    left: 0;
    bottom: 30px;
    transform: translateX(-50%) rotate(-2deg);
    white-space: nowrap;
    padding: 4px 10px 2px;
    font-family: var(--f-display);
    font-size: 1.02rem;
    letter-spacing: .06em;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--paper-ink);
    background: var(--paper);
    border: 2.5px solid var(--black);
    border-radius: 4px;
    box-shadow: 3px 3px 0 var(--black);
    transition: opacity .2s ease, transform .2s ease;
}
.wm-pin-seal { --c: var(--blood-hi); }
.wm-pin-seal .wm-pin-dot { border-radius: 3px; transform: rotate(45deg); animation: wm-throb 1.6s ease-in-out infinite; }
.wm-pin-seal .wm-pin-label { background: var(--blood-hi); color: #fff; }
.wm-pin-boss, .wm-pin-dragon { --c: #ff7a2a; }
.wm-pin-boss .wm-pin-label, .wm-pin-dragon .wm-pin-label { background: var(--ink-3); color: var(--gold); }
.wm-pin.no-label .wm-pin-label { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.85); pointer-events: none; }
.wm-pin.no-label .wm-pin-stem { height: 10px; }
.wm-pin.is-hover .wm-pin-label, .wm-pin:hover .wm-pin-label { opacity: 1; transform: translateX(-50%) rotate(-2deg) scale(1.08); background: var(--gold); color: var(--black); }
.wm-pin.is-selected .wm-pin-label { opacity: 1; transform: translateX(-50%) rotate(-2deg) scale(1.12); background: var(--gold); color: var(--black); }
.wm-pin.is-selected .wm-pin-dot { animation: wm-throb 1.2s ease-in-out infinite; }
@keyframes wm-throb { 50% { box-shadow: 0 0 0 6px rgba(255, 207, 63, .25), 0 0 26px var(--c); } }

/* the place card, top right */
.wm-card {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 4;
    width: min(370px, calc(100% - 44px));
    max-height: calc(100% - 120px);
    overflow: auto;
    padding: 0;
}
.wm-card-in { animation: wm-pop .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes wm-pop { from { opacity: 0; transform: translateY(-10px) rotate(2deg) scale(.94); } }
.wm-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--black); background: var(--ink-2); }
.wm-card-body { padding: 12px 18px 16px; }
.wm-card .kicker { color: var(--blood); margin: 0; font-size: 1rem; }
.wm-card-title { font-size: 1.9rem; margin: 0 0 .25em; line-height: 1.05; color: var(--paper-ink); }
.wm-card-blurb { font-size: .98rem; margin: 0 0 12px; }
.wm-card-nav { display: flex; justify-content: space-between; gap: 10px; }
.wm-card-nav .btn { font-size: .95rem; }
.wm-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 34px;
    height: 34px;
    border: 3px solid var(--black);
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--black);
}
.wm-card-tour { height: 6px; margin-top: 12px; border: 2px solid var(--black); border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.wm-card-tour span { display: block; height: 100%; width: 0; background: var(--blood-hi); }

/* the toolbar, bottom centre */
.wm-toolbar {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100% - 24px);
}
.wm-layers { display: flex; border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--black); overflow: hidden; }
.wm-layers button, .wm-tool {
    font-family: var(--f-display);
    font-size: 1.05rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
    padding: .55em .8em .48em;
    border: 0;
    background: var(--ink-3);
    color: var(--bone);
    cursor: pointer;
}
.wm-layers button + button { border-left: 3px solid var(--black); }
.wm-layers button[aria-pressed="true"] { background: #8fa9ff; color: var(--black); }
.wm-layers button[data-layer-btn="0"][aria-pressed="true"] { background: var(--gold); }
.wm-tool { border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--black); }
.wm-tool:hover, .wm-layers button:hover { color: var(--gold); }
.wm-tool[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.wm-toolbar .btn[aria-pressed="true"] { background: var(--blood-hi); color: #fff; }

.wm-compass {
    position: absolute;
    right: 22px;
    bottom: 18px;
    z-index: 3;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 3px solid var(--black);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 3px 3px 0 var(--black);
    cursor: pointer;
}
.wm-compass-needle { position: absolute; inset: 0; display: block; }
.wm-compass-needle::before { content: ""; position: absolute; left: 50%; top: 9px; margin-left: -7px; border: 7px solid transparent; border-bottom: 18px solid var(--blood-hi); border-top: 0; }
.wm-compass-needle::after { content: ""; position: absolute; left: 50%; bottom: 9px; margin-left: -7px; border: 7px solid transparent; border-top: 18px solid var(--paper-ink); border-bottom: 0; }
.wm-compass-needle span { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-family: var(--f-display); font-size: .95rem; color: var(--gold); text-shadow: 1px 1px 0 var(--black); }

.wm-hint { position: absolute; right: 22px; top: 22px; z-index: 3; margin: 0; max-width: 440px; text-align: right; line-height: 2.1; font-size: .82rem; color: var(--bone-dim); pointer-events: none; text-shadow: 1px 1px 0 var(--black); }
.wm-has-card .wm-hint { display: none; }
.wm-hint kbd { font-size: .72rem; margin-left: 8px; }
.wm-hint kbd:first-child { margin-left: 0; }
.wm-zone {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    pointer-events: none;
    padding: 3px 8px 1px;
    font-family: var(--f-display);
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bone);
    background: rgba(0, 0, 0, .72);
    border-radius: 3px;
    white-space: nowrap;
}

/* fireballs: the dragon's taunt when it dodges, the toast that tells you you can throw them, the tip on its card */
.wm-taunt {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    padding: 6px 14px 3px;
    font-family: var(--f-display);
    font-size: 1.6rem;
    letter-spacing: .05em;
    line-height: 1;
    white-space: nowrap;
    color: var(--black);
    background: var(--gold);
    border: 3px solid var(--black);
    border-radius: 50% 46% 52% 44% / 60% 55% 48% 50%;
    box-shadow: 4px 4px 0 var(--black);
    transform: translate(-50%, -100%) rotate(-6deg);
}
.wm-taunt.is-on { animation: wm-taunt 2.2s ease-out forwards; }
@keyframes wm-taunt {
    0% { opacity: 0; transform: translate(-50%, -60%) rotate(-14deg) scale(.4); }
    12% { opacity: 1; transform: translate(-50%, -100%) rotate(-4deg) scale(1.15); }
    22% { transform: translate(-50%, -100%) rotate(-7deg) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -150%) rotate(-7deg) scale(.95); }
}
.wm-toast {
    position: absolute;
    left: 50%;
    bottom: 78px;
    z-index: 3;
    margin: 0;
    padding: 8px 16px 6px;
    transform: translateX(-50%) rotate(-1deg);
    font-weight: 700;
    font-size: .98rem;
    color: var(--black);
    background: #ff7a2a;
    border: 3px solid var(--black);
    border-radius: var(--radius);
    box-shadow: 4px 4px 0 var(--black);
    white-space: nowrap;
    pointer-events: none;
    animation: wm-toast-in .4s cubic-bezier(.2, 1.4, .4, 1);
    transition: opacity .6s ease;
}
@keyframes wm-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(12px) rotate(-1deg) scale(.94); } }
.wm-toast.is-gone { opacity: 0; }
.wm-card-tip { margin: -4px 0 12px; padding: 6px 10px; font-size: .9rem; font-weight: 700; background: #ffd9b8; border: 2px dashed var(--blood); border-radius: 4px; }

/* loading, and the picture for browsers that can't draw it */
.wm-loading { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #1a0d0d, #070305 70%); transition: opacity .8s ease; }
.wm-loading.is-done { opacity: 0; pointer-events: none; }
.wm-loading-card { width: min(380px, calc(100% - 40px)); padding: 22px 26px 18px; text-align: center; transform: rotate(-1.5deg); }
.wm-loading-card .kicker { color: var(--blood); }
.wm-loading-title { font-size: 2.2rem; margin: 0 0 14px; line-height: 1; text-shadow: 3px 3px 0 var(--gold); }
.wm-bar { height: 14px; border: 3px solid var(--black); border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.wm-bar span { display: block; height: 100%; width: 2%; background: repeating-linear-gradient(-45deg, var(--blood-hi) 0 10px, var(--blood) 10px 20px); transition: width .3s ease; }
.wm-loading-tip { margin: 10px 0 0; font-style: italic; color: #6f5d4b; }
.wm-fallback { display: none; position: absolute; inset: 0; z-index: 11; background: var(--ink); padding: 90px var(--gutter) 30px; text-align: center; }
.wm-fallback img { max-height: calc(100% - 80px); margin: 0 auto 14px; width: auto; border: 3px solid var(--black); box-shadow: var(--shadow); }
.wm-failed .wm-fallback { display: block; }
.wm-failed .wm-loading { display: none; }

.wm-after { padding-top: clamp(48px, 7vw, 80px); }
/* ?still: the bare map filling the window, for capturing pictures of it */
.wm.wm-still { position: fixed; inset: 0; z-index: 100; height: auto; border: 0; }
.wm-still :is(.wm-title, .wm-list, .wm-list-toggle, .wm-toolbar, .wm-compass, .wm-hint, .wm-pins, .wm-toast, .wm-zone) { display: none !important; }

@media (max-width: 860px) {
    .wm { height: calc(100svh - 76px - 40px); min-height: 480px; }
    .wm-title { top: 12px; left: 14px; max-width: calc(100% - 120px); }
    .wm-title h1.display { font-size: 1.9rem; }
    .wm-sub, .wm-hint { display: none; }
    .wm-list-toggle { display: inline-flex; position: absolute; top: 14px; right: 14px; z-index: 5; }
    .wm-list { display: none; top: 64px; left: 12px; right: 12px; bottom: 76px; width: auto; z-index: 6; background: rgba(13, 6, 6, .95); }
    .wm-list-open .wm-list { display: block; }
    .wm-card { top: auto; bottom: 74px; right: 12px; left: 12px; width: auto; max-height: 52%; }
    .wm-card-img { aspect-ratio: 21 / 9; }
    .wm-card-title { font-size: 1.5rem; }
    .wm-has-card .wm-title { opacity: .25; }
    .wm-toolbar { bottom: 12px; gap: 6px; }
    .wm-layers button, .wm-tool, .wm-toolbar .btn { font-size: .9rem; }
    .wm-tool[data-act="full"], .wm-tool[data-act="rain"] { display: none; }
    .wm-compass { width: 46px; height: 46px; right: 12px; bottom: auto; top: 64px; }
    .wm-compass-needle::before { top: 5px; }
    .wm-compass-needle::after { bottom: 5px; }
    .wm-pin-label { font-size: .88rem; }
    .wm-toast { white-space: normal; width: calc(100% - 40px); text-align: center; bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    .wm-card-in, .wm-pin-seal .wm-pin-dot, .wm-pin.is-selected .wm-pin-dot { animation: none; }
}

/* download page */
.download-options { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(22px, 4vw, 44px); }
.download-card { flex: 0 1 auto; width: max-content; min-width: min(100%, 340px); max-width: 100%; padding: 24px 26px 22px; transform: rotate(var(--tilt, 0deg)); }
.download-kind { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blood); margin: 0 0 14px; }
.download-card .btn { width: 100%; color: var(--black); }   /* not .paper a's red */
.download-card .btn-ghost, .download-card .btn-ghost:hover { color: var(--bone); }
.download-card h3.display { margin: 0 0 6px; }
.download-meta { font-family: var(--f-hand); font-weight: 700; font-size: 1.4rem; line-height: 1.2; color: #6f5d4b; margin: 12px 0 8px; }
.download-card p:last-child { margin-bottom: 0; }
@media (min-width: 700px) { .download-card [data-download-ready] p, .download-card > .download-meta { white-space: nowrap; } }   /* the card grows to fit; phones still wrap */
.download-card [data-download-soon] { max-width: 400px; }
.download-small { text-align: center; margin: 2.5rem auto 1.5rem; max-width: 40rem; }

/* high scores (/scores): board tabs over a paper score sheet; site.js fills in the rows */
.scores-section { padding-top: clamp(36px, 5vw, 64px); }
.scores-build { font-family: var(--f-hand); font-weight: 700; font-size: 1.55rem; line-height: 1.2; color: var(--gold); text-align: center; margin: 0 0 16px; transform: rotate(-1deg); }
.scores-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.scores-tab {
    font-family: var(--f-display);
    font-size: 1.3rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
    padding: .62em 1.1em .54em;
    border: 3px solid var(--black);
    border-radius: var(--wobble);
    background: var(--ink-3);
    color: var(--bone);
    box-shadow: 3px 3px 0 var(--black);
    cursor: pointer;
    transition: transform .12s ease, background-color .12s ease;
}
.scores-tab:hover { transform: translate(-1px, -1px) rotate(-1deg); background: #33191a; color: #fff; }
.scores-tab[aria-selected="true"] { background: var(--gold); color: var(--black); transform: rotate(-1.5deg); }
/* solo / co-op: a smaller pair of the same tabs above the boards (red when on, so it doesn't read as a fifth board) */
.scores-modes { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; }
.scores-mode { font-size: 1rem; padding: .5em .95em .44em; }
.scores-mode[aria-pressed="true"] { background: var(--blood); color: #fff; transform: rotate(1deg); }
.scoreboard { margin-top: 20px; padding: 10px clamp(12px, 3vw, 26px); min-height: 240px; transform: rotate(var(--tilt, 0deg)); }
.scores-note { font-family: var(--f-hand); font-weight: 700; font-size: 1.6rem; color: #6f5d4b; text-align: center; padding: 60px 0; margin: 0; }
.scoreboard-list { list-style: none; margin: 0; padding: 0; }
.score-row { display: grid; grid-template-columns: 2.6rem 58px minmax(0, 1fr) auto; align-items: center; gap: 2px 14px; padding: 12px 6px; border-bottom: 2px dashed rgba(29, 20, 16, .22); }
.score-row:last-child { border-bottom: 0; }
.score-top-1 { background: linear-gradient(90deg, rgba(255, 207, 63, .32), transparent 75%); }
.score-rank { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; text-align: center; color: #6f5d4b; }
.score-top .score-rank { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; padding-top: 3px; border: 3px solid var(--black); border-radius: 50%; color: var(--black); box-shadow: 2px 2px 0 var(--black); }
.score-top-1 .score-rank { background: var(--gold); transform: rotate(-6deg); }
.score-top-2 .score-rank { background: #ddd6c6; }
.score-top-3 .score-rank { background: #d38d4c; }
/* the hero's model on their colour, whole (the portraits frame each hero differently, so a head crop misses some) */
.score-face { position: relative; width: 58px; height: 70px; overflow: hidden; border: 3px solid var(--black); border-radius: 8px; background: radial-gradient(circle at 50% 55%, var(--accent, #6f5d4b), #2a1410 115%); box-shadow: 2px 2px 0 var(--black); }
.score-face img { position: absolute; inset: 2px 0 0; width: 100%; height: calc(100% - 2px); object-fit: contain; object-position: 50% 100%; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .4)); }
.score-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.score-name { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: .03em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-tags { font-size: .92rem; font-weight: 700; color: var(--blood); }
.score-others { font-size: .9rem; color: #6f5d4b; }
.score-value { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; text-align: right; }
.score-value b { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: .03em; }
.score-value small { font-family: var(--f-hand); font-weight: 700; font-size: 1.15rem; color: #6f5d4b; }
.scores-empty { text-align: center; padding: 34px 0 26px; }
.scores-empty h3.display { margin-bottom: 6px; }
.scores-empty .btn { color: var(--black); }
.scores-foot { text-align: center; margin: 24px auto 0; max-width: 36rem; }
.scores-how { padding-top: 0; }
.scores-build-old { color: var(--bone-dim); }
.scores-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: -4px 0 18px; }
.scores-pick label { font-family: var(--f-hand); font-weight: 700; font-size: 1.2rem; color: var(--bone-dim); }
.scores-pick select { max-width: 100%; font: inherit; font-weight: 700; padding: 6px 12px; border: 3px solid var(--black); border-radius: 8px; background: var(--ink-3); color: var(--bone); box-shadow: 2px 2px 0 var(--black); cursor: pointer; }
/* Past Builds: one paper slip per old build with its four board leaders */
.scores-history { padding-top: 0; }
.history-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.history-build { padding: 18px clamp(16px, 3vw, 26px); transform: rotate(var(--tilt, 0deg)); }
.history-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; border-bottom: 2px dashed rgba(29, 20, 16, .22); padding-bottom: 8px; margin-bottom: 12px; }
.history-head h3.display { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); overflow-wrap: anywhere; }
.history-dates { font-family: var(--f-hand); font-weight: 700; font-size: 1.15rem; color: #6f5d4b; }
.history-leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; margin: 0; }
.history-leader dt { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blood); }
.history-leader dd { margin: 2px 0 0; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.history-leader b { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .03em; }
.history-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-leader small { color: #6f5d4b; }
.history-none { margin: 0; }
.history-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0; }
.history-open { font-size: 1rem; padding: .5em 1em .42em; }

/* a board row opens into the run's loadout (site.js), like the game's High Scores card (RunDetails.cs) */
.score-openable { grid-template-columns: 2.6rem 58px minmax(0, 1fr) auto 2.2rem; cursor: pointer; }
.score-openable:hover { background-color: rgba(29, 20, 16, .05); }
.score-open { width: 2rem; height: 2rem; padding: 0; border: 3px solid var(--black); border-radius: 50%; background: var(--paper); color: var(--paper-ink); box-shadow: 2px 2px 0 var(--black); cursor: pointer; font-family: var(--f-body); font-weight: 800; font-size: 1.35rem; line-height: 1; transition: transform .14s ease, background .14s ease; }
.score-open::before { content: "+"; }
.score-open:hover { background: var(--gold); transform: rotate(-8deg); }
.is-open .score-open { background: var(--paper-ink); color: var(--gold); }
.is-open .score-open::before { content: "\2212"; }
.score-kit { grid-column: 1 / -1; margin: 10px 0 2px; cursor: auto; }
.kit-body { --accent: var(--blood); display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 22px; padding: 16px 18px 18px; background: var(--paper-2); border: 3px solid var(--black); border-left: 8px solid var(--accent); border-radius: var(--wobble); box-shadow: 4px 4px 0 var(--black); }
.kit-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.kit-build { margin: 0; display: flex; flex-direction: column; line-height: 1; }
.kit-build small { font-family: var(--f-hand); font-weight: 700; font-size: 1.15rem; color: #6f5d4b; }
.kit-build .display { font-size: clamp(1.5rem, 3.6vw, 2rem); color: var(--blood); letter-spacing: .04em; text-shadow: 2px 2px 0 rgba(0, 0, 0, .12); }
.kit-stamp { margin: 0; font-family: var(--f-display); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blood); border: 3px solid var(--blood); border-radius: 4px; padding: .2em .55em .08em; transform: rotate(-3deg); }
.kit-col { min-width: 0; }
.kit-head { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 2px dashed rgba(29, 20, 16, .25); font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-ink); }
.kit-col .kit-head + * + .kit-head { margin-top: 14px; }
.kit-list { list-style: none; margin: 0; padding: 0; }
.kit-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: .95rem; line-height: 1.3; }
.kit-row span { min-width: 0; overflow-wrap: anywhere; }
.kit-row b { flex: none; font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; letter-spacing: .04em; }
.kit-ability span { font-style: italic; }
.kit-sig span { font-weight: 700; color: var(--accent); }
.kit-max b { color: var(--blood); }
.kit-relic span::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .4em; border: 2px solid var(--black); border-radius: 50%; background: var(--tier); vertical-align: -.05em; }
.kit-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kit-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; font-size: .88rem; line-height: 1.2; background: var(--paper); border: 2px solid var(--black); border-left: 6px solid var(--tier); border-radius: 4px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); cursor: help; }
.kit-item-stacks { font-family: var(--f-display); font-weight: 400; font-size: .95rem; letter-spacing: .04em; color: var(--paper); background: var(--paper-ink); border-radius: 3px; padding: 1px 4px 0; }
.kit-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0; }
.kit-stat { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; font-size: .88rem; border-bottom: 1px dotted rgba(29, 20, 16, .2); }
.kit-stat dt { color: #6f5d4b; }
.kit-stat dd { margin: 0; font-weight: 700; }
.kit-stat.up dd, .kit-tally .up { color: #1d7a2c; }
.kit-stat.down dd, .kit-tally .down { color: var(--blood); }
.kit-stat.odd dd { color: #b8620f; }
.kit-tally { margin: 10px 0 0; font-size: .92rem; }
.kit-none { margin: 0; font-family: var(--f-hand); font-weight: 700; font-size: 1.25rem; }
.score-kit > .kit-none { text-align: center; padding: 12px 0; }

@media (max-width: 560px) {
    .score-row { grid-template-columns: 2rem 46px minmax(0, 1fr); gap: 2px 10px; }
    .score-openable { grid-template-columns: 2rem 46px minmax(0, 1fr) 2rem; }
    .score-face, .score-rank, .score-open { grid-row: span 2; }
    .score-open { grid-column: 4; grid-row: 1 / span 2; }
    .score-face { width: 46px; height: 56px; }
    .score-top .score-rank { width: 2rem; height: 2rem; font-size: 1.3rem; }
    .score-value { grid-column: 3; flex-direction: row; align-items: baseline; gap: 6px; }
    .kit-body { padding: 12px; }
    .kit-stats { grid-template-columns: 1fr; }
}

/* the teaser on /world */
.map-cta { position: relative; display: block; overflow: hidden; border: 3px solid var(--black); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--bone); background: #05040a; }
.map-cta img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; transition: transform .6s ease; opacity: .85; }
.map-cta:hover img { transform: scale(1.04); opacity: 1; }
.map-cta-copy { position: absolute; inset: auto 0 0 0; padding: 70px clamp(18px, 4vw, 40px) 26px; background: linear-gradient(transparent, rgba(5, 4, 10, .95)); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.map-cta-copy h2.display { margin: 0; }
.map-cta-copy p { margin: 4px 0 0; color: var(--bone-dim); max-width: 38rem; }
.map-cta:hover { color: var(--bone); }
@media (max-width: 760px) {
    .map-cta img { aspect-ratio: 16 / 9; }
    .map-cta-copy { position: static; padding: 16px 18px 20px; background: var(--ink-2); border-top: 3px solid var(--black); }
}

