/* EOR API home page. Plain CSS served from public/ (no build step). Theme tokens follow [data-theme], which
   public/js/home.js sets before the first paint and resources/js/app.js toggles.

   The look follows the game client's own dialogs (gfx002): a black outline, an olive-gold trim, wood planks, and
   dark inset wells for lists. Frames and wood stay the same in both themes; only the page and the wells change
   (dark wells at night, parchment by day). */

:root {
    --font: 'Alegreya Sans', 'Trebuchet MS', system-ui, sans-serif;
    --pixel: 'Pixelify Sans', 'Alegreya Sans', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
    --wrap: 1200px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* colours sampled from the client's dialog graphics */
    --ink: #121212;
    --trim: #736133;
    --trim-hi: #aea489;
    --trim-lo: #4d4022;
    --wood: #665139;
    --wood-text: #f4ead2;
    --wood-muted: #d6c7a2;
    --gold: #ecce78;
    --slot: #30291e;
    /* plain wood: the page's tile grid is the only grid, so panels stay clean on top of it */
    --wood-tex: linear-gradient(180deg, #6c573d, #5f4c33);
    --frame-shadow: 0 0 0 1px var(--ink), 6px 6px 0 rgba(0, 0, 0, .3);
    --bevel: inset 1px 1px 0 rgba(255, 240, 205, .32), inset -1px -1px 0 rgba(0, 0, 0, .38);

    /* item, NPC, skill, map and protocol families (enum icons, tags) */
    --fam-proto: #d8c79a;
    --fam-item: #ecce78;
    --fam-npc: #f08a5d;
    --fam-skill: #b9a3ff;
    --fam-map: #9fd36b;
}

:root,
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #17130e;
    --bg-grid: rgba(236, 206, 120, .05);
    --bg-glow: rgba(236, 206, 120, .08);
    --well: #2b251b;
    --well-2: #352d21;
    --well-ring: rgba(174, 164, 137, .28);
    --text: #efe5cb;
    --text-2: #d5c8a6;
    --muted: #a69676;
    --accent: #ecce78;
    --accent-soft: rgba(236, 206, 120, .12);
    --accent-line: rgba(236, 206, 120, .5);
    --get-bg: #3f5d1f;
    --get-ink: #e4f8b4;
    --new-bg: #a3341c;
    --new-ink: #ffe7c2;
    --warn-bg: rgba(240, 120, 80, .16);
    --warn-ink: #ffb79c;
    --hover: rgba(255, 236, 190, .065);
    --shade: rgba(0, 0, 0, .55);
    --json-key: #ecce78;
    --json-str: #b9dc8c;
    --json-num: #f4a66a;
    --json-lit: #9fd0ec;
    --json-punc: #8d7f63;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        color-scheme: light;
    }
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #d9c9a3;
    --bg-grid: rgba(92, 66, 30, .08);
    --bg-glow: rgba(255, 248, 224, .55);
    --well: #f6eed6;
    --well-2: #efe3c3;
    --well-ring: rgba(77, 64, 34, .35);
    --text: #2a2114;
    --text-2: #4b3d27;
    --muted: #7a6a4c;
    --accent: #8a5a12;
    --accent-soft: rgba(138, 90, 18, .1);
    --accent-line: rgba(138, 90, 18, .45);
    --get-bg: #4b7222;
    --get-ink: #f2ffd8;
    --new-bg: #a8321b;
    --new-ink: #fff1d6;
    --warn-bg: #f3d2c1;
    --warn-ink: #8a2a12;
    --hover: rgba(92, 60, 20, .075);
    --shade: rgba(0, 0, 0, .12);
    --json-key: #7a4e0c;
    --json-str: #3d6a1a;
    --json-num: #a4461a;
    --json-lit: #2d5f86;
    --json-punc: #9a8a6a;
    --fam-proto: #6b5a33;
    --fam-item: #8a5a12;
    --fam-npc: #a8401b;
    --fam-skill: #5b3fa8;
    --fam-map: #3f6b1c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

/* The page is the map: a faint 64 x 32 isometric tile grid under everything. */
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(1100px 520px at 50% -8%, var(--bg-glow), transparent 70%),
        repeating-linear-gradient(26.565deg, transparent 0 27.62px, var(--bg-grid) 27.62px 28.62px),
        repeating-linear-gradient(-26.565deg, transparent 0 27.62px, var(--bg-grid) 27.62px 28.62px);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

code,
kbd,
pre {
    font-family: var(--mono);
}

:focus-visible {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}

img {
    image-rendering: pixelated;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 16px;
    top: 16px;
    z-index: 100;
    padding: 8px 12px;
    background: var(--well);
    border: 1px solid var(--ink);
}

/* ---------- shared game parts ---------- */

/* A client dialog: black outline, bevelled olive trim, wood inside. */
.frame,
.card,
.drawer-head,
.footer-inner {
    background: var(--wood-tex);
    border: 4px solid;
    border-color: #8e7b46 var(--trim-lo) var(--trim-lo) #8e7b46;
    box-shadow: var(--frame-shadow), inset 0 0 0 1px var(--ink);
}

/* An inset well, the client's dark list area. */
.well,
.shelf,
.bundle,
.scene-well,
.eps,
.chips {
    background: var(--well);
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring), inset 2px 2px 0 var(--shade);
    color: var(--text);
}

/* The client's tan button. */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--ink);
    background: linear-gradient(180deg, #a08a52, #7a6639);
    box-shadow: var(--bevel), 2px 2px 0 rgba(0, 0, 0, .35);
    color: #1f180d;
    font: 600 15px var(--font);
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(255, 240, 205, .3);
}

.btn:hover {
    text-decoration: none;
    background: linear-gradient(180deg, #b49d61, #8a7442);
    color: #120d06;
}

.btn:active {
    box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .4), inset -1px -1px 0 rgba(255, 240, 205, .2);
    transform: translate(1px, 1px);
}

.btn-icon {
    width: 36px;
    justify-content: center;
    padding: 0;
}

.btn[disabled] {
    opacity: .45;
    cursor: default;
    transform: none;
}

#theme-toggle .fa-sun,
#theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] #theme-toggle .fa-moon,
[data-theme="light"] #theme-toggle .fa-sun {
    display: inline;
}

/* ---------- header: one slim sticky bar, the client's bottom bar ---------- */

.site-head {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--wood-tex);
    border-bottom: 1px solid var(--ink);
    box-shadow: inset 0 -3px 0 var(--trim-lo), 0 3px 0 rgba(0, 0, 0, .22);
}

.head-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 60px;
}

.brand {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--wood-text);
    font: 700 20px var(--pixel);
    letter-spacing: .02em;
    text-shadow: 1px 1px 0 var(--ink);
}

.brand:hover {
    text-decoration: none;
}

.brand b {
    color: var(--gold);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--slot);
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--trim-hi), inset 2px 2px 0 rgba(0, 0, 0, .5);
}

.brand-mark svg {
    display: block;
    width: 24px;
    height: 24px;
}

.jump {
    flex: 1;
    display: flex;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.jump::-webkit-scrollbar {
    display: none;
}

.jump a {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid transparent;
    color: var(--wood-text);
    font: 700 16px var(--font);
    white-space: nowrap;
    text-shadow: 1px 1px 0 var(--ink);
}

.jump a i {
    display: none;
    color: var(--gold);
    font-size: 13px;
}

.jump a:hover {
    text-decoration: none;
    color: var(--gold);
    background: rgba(18, 18, 18, .22);
    border-color: rgba(18, 18, 18, .55);
}

.jump a.on {
    color: var(--gold);
    background: rgba(18, 18, 18, .3);
    border-color: rgba(18, 18, 18, .65);
}

.search {
    position: relative;
    flex: 0 1 270px;
    display: flex;
    align-items: center;
}

.search > i {
    position: absolute;
    left: 11px;
    color: var(--gold);
    font-size: 13px;
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 36px;
    padding: 0 76px 0 33px;
    border: 1px solid var(--ink);
    background: var(--slot);
    box-shadow: 0 0 0 1px var(--trim-hi), inset 2px 2px 0 rgba(0, 0, 0, .5);
    color: var(--wood-text);
    font: 15px var(--font);
}

.search input::placeholder {
    color: #a69676;
}

.search input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--gold), inset 2px 2px 0 rgba(0, 0, 0, .5);
}

.search kbd {
    position: absolute;
    right: 8px;
    padding: 0 6px;
    border: 1px solid var(--ink);
    background: linear-gradient(180deg, #a08a52, #7a6639);
    box-shadow: var(--bevel);
    color: #1f180d;
    font: 600 12px var(--mono);
}

/* endpoints shown, inside the search box */
.count {
    position: absolute;
    right: 34px;
    color: #a69676;
    font: 500 12.5px var(--mono);
    white-space: nowrap;
    pointer-events: none;
}

.head-actions {
    flex: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ---------- hero: plain copy on the left, one game window on the right ---------- */

.hero {
    padding: 44px 0 10px;
}

.hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    color: var(--text-2);
    font: 600 15px var(--font);
    letter-spacing: .01em;
}

.dot {
    width: 10px;
    height: 10px;
    background: #8fd14f;
    border: 1px solid var(--ink);
    box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .3), inset 2px 2px 0 rgba(255, 255, 255, .45);
}

h1 {
    font-family: var(--pixel);
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .005em;
    text-shadow: 3px 3px 0 var(--shade);
}

.grad {
    color: var(--accent);
}

.lede {
    margin: 0 0 24px;
    max-width: 540px;
    color: var(--text-2);
    font-size: 18px;
}

.base-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn-try {
    height: 42px;
    padding: 0 16px;
    background: linear-gradient(180deg, #f0d585, #b8964a);
    font-size: 15px;
    font-weight: 600;
}

.btn-try:hover {
    background: linear-gradient(180deg, #f8e3a0, #c9a659);
}

.btn-try i {
    font-size: 12px;
}

.base {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 5px 5px 5px 12px;
    background: var(--slot);
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 2px var(--trim), 0 0 0 3px var(--ink), inset 2px 2px 0 rgba(0, 0, 0, .45);
}

.base-label {
    white-space: nowrap;
    color: var(--gold);
    font: 700 12px var(--font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.base code {
    font-size: 14px;
    color: var(--wood-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.base .copy-btn {
    position: static;
    height: 30px;
    width: 30px;
    padding: 0;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-2);
    font-size: 15px;
}

.facts i {
    margin-right: 7px;
    color: var(--accent);
}

/* the game window: a title strip over a live scene */
.parade {
    margin: 0;
}

.title-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 12px 8px;
    border-bottom: 1px solid var(--ink);
    color: var(--wood-text);
    font: 700 15px var(--font);
    letter-spacing: .03em;
    text-shadow: 1px 1px 0 var(--ink);
}

.title-strip i {
    margin-right: 6px;
    color: var(--gold);
}

.title-strip .ver {
    color: var(--wood-muted);
    font: 500 12px var(--mono);
    text-shadow: none;
}

.parade-view {
    position: relative;
    overflow: hidden;
    margin: 10px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        radial-gradient(70% 60% at 50% 105%, rgba(236, 206, 120, .16), transparent 70%),
        linear-gradient(180deg, #1b2130 0%, #2a2a33 55%, #3a3226 100%);
}

.parade-view::before {
    /* a few pixel stars */
    content: '';
    position: absolute;
    inset: 0 0 45% 0;
    background:
        linear-gradient(#f4ead2, #f4ead2) 12% 22% / 2px 2px no-repeat,
        linear-gradient(#ecce78, #ecce78) 31% 12% / 2px 2px no-repeat,
        linear-gradient(#f4ead2, #f4ead2) 47% 30% / 2px 2px no-repeat,
        linear-gradient(#ecce78, #ecce78) 68% 16% / 3px 3px no-repeat,
        linear-gradient(#f4ead2, #f4ead2) 83% 34% / 2px 2px no-repeat,
        linear-gradient(#f4ead2, #f4ead2) 92% 10% / 2px 2px no-repeat;
    opacity: .8;
}

.parade-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-evenly;
    gap: 6px;
    padding: 22px 10px 0;
    position: relative;
    z-index: 1;
}

.parade-row img {
    zoom: 1.2;
    max-height: 110px;
    margin-bottom: -10px;
    animation: bob 3.2s var(--ease) infinite;
    animation-delay: calc(var(--i) * -.37s);
}

/* Two offset copies of one 64 x 32 grass tile fill the plane, the way the client lays its floor. */
.ground {
    height: 46px;
    background-color: #3c6b1f;
    background-image: var(--tile), var(--tile);
    background-size: 64px 32px;
    background-position: 0 0, 32px 16px;
    border-top: 1px solid var(--ink);
}

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

/* ---------- the cutscene stage (stage.js): game NPCs on a map backdrop, 1:1 like the game window ---------- */

.stage-screen,
.stage-bar {
    display: none;
}

.stage-on .parade-view {
    display: block;
    min-height: 0;
    background: #000;
}

.stage-on .parade-view::before,
.stage-on .parade-row,
.stage-on .ground {
    display: none;
}

.stage-on .stage-screen {
    position: relative;
    display: block;
    aspect-ratio: 640 / 300;
    overflow: hidden;
    transition: opacity .4s var(--ease);
}

.stage-fade .stage-screen {
    opacity: 0;
}

.stage-screen img,
.stage-screen canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.stage-shake .stage-bg,
.stage-shake canvas {
    animation: stage-shake .3s steps(3) infinite;
}

@keyframes stage-shake {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-2px, 1px); }
    66% { transform: translate(2px, -1px); }
}

.stage-say {
    position: absolute;
    left: 10px;
    bottom: 8px;
    max-width: 70%;
    margin: 0;
    padding: 2px 8px;
    background: rgba(18, 18, 18, .72);
    color: #f4ead2;
    font: 600 14px var(--font);
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
}

.stage-say:empty {
    display: none;
}

/* under the stage: what a click does on the left, the scene dots on the right */
.stage-on .stage-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
    margin: -2px 10px 10px;
}

.stage-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--wood-muted);
    font: 600 14px var(--font);
}

.stage-hint i {
    color: var(--gold);
}

.hint-touch {
    display: none;
}

@media (hover: none) {
    .hint-mouse {
        display: none;
    }

    .hint-touch {
        display: inline;
    }
}

.stage-dots {
    display: flex;
    gap: 6px;
}

.stage-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid var(--ink);
    background: var(--slot);
    box-shadow: 0 0 0 1px var(--trim-hi);
    cursor: pointer;
}

.stage-dots button:hover {
    background: var(--trim);
}

.stage-dots button[aria-pressed="true"] {
    background: var(--gold);
}

.stage-dots button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (min-width: 1181px) {
    /* room for the 640 px game window at 1:1 */
    .hero-body {
        grid-template-columns: minmax(0, 1fr) 668px;
    }
}

/* ---------- sections and cards ---------- */

main.wrap {
    padding-top: 22px;
    padding-bottom: 40px;
}

.hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 26px;
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 15px;
}

.hint p {
    margin: 0;
}

.hint p i {
    margin-right: 6px;
    color: var(--accent);
}

/* what the tags on the endpoint rows mean */
.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend .m {
    margin: 0;
}

.legend .tag {
    margin: 0;
}

.legend .pv {
    font: 500 13.5px var(--mono);
}

.group-count {
    margin-left: auto;
    padding: 0 7px;
    border: 1px solid var(--well-ring);
    color: var(--muted);
    font: 500 14px/22px var(--font);
}

.group {
    padding-top: 30px;
}

.group-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--well-ring);
}

.group-head h2 {
    margin: 0;
    font: 800 26px var(--font);
    letter-spacing: 0;
    text-shadow: 2px 2px 0 var(--shade);
}

.group-head h2 i {
    margin-right: 10px;
    color: var(--accent);
    font-size: 21px;
}

.group-head p {
    margin: 0;
    color: var(--muted);
}

.group-head code {
    font-size: 13px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 12px;
    color: var(--wood-text);
}

.card-new {
    border-color: #c9a45a #6b5523 #6b5523 #c9a45a;
}

.card-wide {
    grid-column: 1 / -1;
}

/* feature card: picture and text on the left, endpoints on the right */
.card-feature {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "head eps" "text eps" "scene eps";
    column-gap: 12px;
}

.card-feature .card-head { grid-area: head; }
.card-feature .card-text { grid-area: text; }
.card-feature .scene-well { grid-area: scene; }

.card-feature .eps {
    grid-area: eps;
    margin: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-slim .card-text {
    margin-bottom: 0;
}

.eps-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* the dialog's title strip */
.card-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px 11px;
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 1px 0 rgba(255, 236, 196, .12);
    background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .22));
}

/* an inventory slot holding the card's icon */
.card-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: var(--slot);
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--trim-hi), inset 2px 2px 0 rgba(0, 0, 0, .5);
    color: var(--gold);
    font-size: 17px;
}

.card-new .card-icon {
    color: #ffd27a;
    box-shadow: 0 0 0 1px #e8c46a, inset 2px 2px 0 rgba(0, 0, 0, .5), 0 0 12px rgba(236, 206, 120, .35);
}

.card-id {
    min-width: 0;
}

.card h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    color: var(--wood-text);
    font: 700 20px var(--font);
    line-height: 1.25;
    letter-spacing: 0;
    text-shadow: 1px 1px 0 var(--ink);
}

.card-src {
    display: block;
    color: var(--wood-muted);
    font: 12px var(--mono);
}

.card-src i {
    margin-right: 2px;
    opacity: .75;
}

.badge-new {
    padding: 1px 7px 2px;
    background: var(--new-bg);
    border: 1px solid var(--ink);
    box-shadow: var(--bevel);
    color: var(--new-ink);
    font: 600 10.5px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    text-shadow: none;
}

.card-text {
    margin: 12px 16px 0;
    color: var(--wood-text);
    font-size: 15.5px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

/* sprite shelf: a row of real sprites from the API */
.shelf {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 12px 12px 0;
    padding: 12px 14px;
    min-height: 68px;
    overflow: hidden;
}

.shelf img {
    max-height: 46px;
    max-width: 52px;
    flex: none;
    transition: transform .2s var(--ease);
}

.shelf img:hover {
    transform: translateY(-3px) scale(1.12);
}

.shelf-zoom img {
    zoom: 1.8;
}

/* effect strips: a spell's whole animation in one image, every frame side by side */
.strips {
    display: grid;
    gap: 8px;
    margin: 12px 12px 0;
    padding: 10px 12px;
    overflow: hidden;
}

.strips img {
    display: block;
    height: 38px;
    max-width: 100%;
    object-fit: cover;
    object-position: left center;
}

/* experience bar, drawn like the client's */
.xp {
    margin: 12px 12px 0;
    padding: 12px 14px;
}

.xp-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 600 14px var(--font);
    color: var(--text-2);
}

.xp-row + .xp-row {
    margin-top: 8px;
}

.xp-lvl {
    flex: none;
    width: 56px;
    font: 500 13px var(--mono);
}

.xp-bar {
    flex: 1;
    height: 12px;
    background: #121212;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--trim);
}

.xp-bar span {
    display: block;
    height: 100%;
    width: var(--w);
    background: repeating-linear-gradient(90deg, #8fd14f 0 6px, #79b83f 6px 8px);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .25);
}

.xp-row:nth-child(2) .xp-bar span {
    background: repeating-linear-gradient(90deg, #6fb4f0 0 6px, #5a9bd6 6px 8px);
}

/* map scene: a real map render at its own pixel size, cropped to the well */
.scene-well {
    position: relative;
    margin: 12px 0 0 12px;
    padding: 6px 0 26px;
    overflow: hidden;
    background:
        radial-gradient(260px 120px at 50% 60%, rgba(236, 206, 120, .12), transparent 70%),
        #1d1a14;
}

.scene-map {
    display: block;
    width: 100%;
    height: 266px;
    object-fit: none;
    object-position: 50% 45%;
    image-rendering: pixelated;
}

.scene-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    text-align: center;
    color: #b9aa86;
    font-size: 12px;
}

.scene-cap code {
    font-size: 11px;
    color: #e6dbbd;
}

/* item bundle: box -> contents */
.bundle {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 12px 0;
    padding: 12px 14px;
}

.bundle a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-2);
    font-size: 13px;
    text-align: center;
    line-height: 1.2;
}

.bundle a:hover {
    text-decoration: none;
    color: var(--text);
}

.bundle-img {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    background: var(--slot);
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--trim-hi), inset 2px 2px 0 rgba(0, 0, 0, .5);
    transition: transform .2s var(--ease);
}

.bundle a:hover .bundle-img {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--gold), inset 2px 2px 0 rgba(0, 0, 0, .5);
}

.bundle-img img {
    max-width: 40px;
    max-height: 40px;
}

.bundle-src .bundle-img {
    width: 58px;
    height: 58px;
}

.qty {
    position: absolute;
    right: -7px;
    bottom: -7px;
    padding: 0 5px;
    background: var(--ink);
    border: 1px solid var(--trim);
    color: var(--gold);
    font: 600 11px/16px var(--mono);
}

.bundle-arrow {
    color: var(--accent);
    font-size: 18px;
}

.bundle-items {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.bundle .nm {
    max-width: 78px;
}

/* endpoint rows, listed in a well like the client's lists */
.eps {
    list-style: none;
    margin: 12px 12px 0;
    padding: 5px;
    flex: 1;
}

.ep a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid transparent;
    color: inherit;
}

.ep + .ep a {
    border-top-color: var(--hover);
}

.ep a:hover {
    text-decoration: none;
    background: var(--hover);
    border-color: var(--well-ring);
}

/* GET, as a small green gem */
.m {
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 2px;
    padding: 1px 6px 2px;
    background: var(--get-bg);
    border: 1px solid var(--ink);
    box-shadow: var(--bevel);
    color: var(--get-ink);
    font: 600 11px/1.4 var(--mono);
    letter-spacing: .06em;
}

.p {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow-wrap: anywhere;
}

.pv {
    color: var(--accent);
}

.d {
    grid-column: 2;
    color: var(--muted);
    font-size: 14px;
}

.tag {
    display: inline-block;
    margin-left: 8px;
    padding: 0 5px;
    border: 1px solid var(--well-ring);
    color: var(--accent);
    font: 600 10.5px/1.6 var(--mono);
    letter-spacing: .05em;
    text-transform: uppercase;
    vertical-align: 1px;
}

.tag-warn {
    border-color: var(--warn-ink);
    background: var(--warn-bg);
    color: var(--warn-ink);
}

.go {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: var(--accent);
    font-size: 12px;
    opacity: .4;
    transform: translateX(-3px);
    transition: opacity .15s, transform .15s;
}

.ep a:hover .go,
.ep a:focus-visible .go {
    opacity: 1;
    transform: none;
}

/* enums: one icon per table, grouped and coloured by family */
.enum-fams {
    display: grid;
    gap: 12px;
    margin: 12px 12px 0;
}

.enum-fam {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 10px 16px;
    align-items: start;
}

.enum-fam h4 {
    margin: 9px 0 0;
    color: var(--wood-text);
    font: 700 16px var(--font);
    text-shadow: 1px 1px 0 var(--ink);
}

.enum-fam h4 i {
    width: 20px;
    margin-right: 6px;
    color: var(--fam);
    filter: brightness(1.15);
}

.enum-fam h4 small {
    display: block;
    margin-left: 26px;
    color: var(--wood-muted);
    font: 12px var(--font);
}

.chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    gap: 2px;
    margin: 0;
    padding: 5px;
    list-style: none;
}

.chips a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border: 1px solid transparent;
    color: var(--text);
    font: 500 13px var(--mono);
}

.chips a:hover {
    text-decoration: none;
    background: var(--hover);
    border-color: var(--well-ring);
}

.chips .ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: var(--slot);
    border: 1px solid var(--ink);
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .45), 0 0 0 1px rgba(174, 164, 137, .35);
    color: var(--fam);
    font-size: 13px;
}

[data-theme="light"] .chips .ico {
    color: var(--fam-light, var(--fam));
}

.fam-proto { --fam: var(--fam-proto); --fam-light: #e3d4a8; }
.fam-item { --fam: var(--fam-item); --fam-light: #ecce78; }
.fam-npc { --fam: var(--fam-npc); --fam-light: #f29a6c; }
.fam-skill { --fam: var(--fam-skill); --fam-light: #c4b2ff; }
.fam-map { --fam: var(--fam-map); --fam-light: #a8da74; }

.chips .lbl {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.chips .lbl b {
    font: 700 15px var(--font);
    color: var(--text);
}

.chips .lbl small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font: 11.5px var(--mono);
}

.chips .cnt {
    flex: none;
    margin-left: auto;
    min-width: 26px;
    padding: 0 5px;
    border: 1px solid var(--well-ring);
    color: var(--muted);
    font: 500 12px/18px var(--mono);
    text-align: center;
}

.chips a:hover .cnt {
    color: var(--accent);
    border-color: var(--accent-line);
}

.empty {
    margin: 28px 0 0;
    padding: 22px;
    text-align: center;
    color: var(--muted);
    background: var(--well);
    border: 1px dashed var(--well-ring);
}

.empty i {
    margin-right: 8px;
}

[hidden] {
    display: none !important;
}

/* ---------- examples ---------- */

.examples {
    overflow: hidden;
}

.tabs {
    padding: 12px 12px 0;
}

.tabs > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tabs > label {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 5px 13px 6px;
    border: 1px solid var(--ink);
    background: linear-gradient(180deg, #a08a52, #7a6639);
    box-shadow: var(--bevel);
    color: #1f180d;
    font: 600 15px var(--font);
    cursor: pointer;
}

.tabs > label:hover {
    background: linear-gradient(180deg, #b49d61, #8a7442);
}

.tabs > input:focus-visible + label {
    outline: 2px dashed var(--gold);
    outline-offset: 2px;
}

#t-curl:checked + label,
#t-js:checked + label,
#t-py:checked + label,
#t-php:checked + label,
#t-cs:checked + label,
#t-rs:checked + label {
    background: var(--slot);
    color: var(--gold);
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5), 0 0 0 1px var(--trim-hi);
}

.panels {
    margin-top: 2px;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring);
}

.panel {
    display: none;
    position: relative;
}

#t-curl:checked ~ .panels .p-curl,
#t-js:checked ~ .panels .p-js,
#t-py:checked ~ .panels .p-py,
#t-php:checked ~ .panels .p-php,
#t-cs:checked ~ .panels .p-cs,
#t-rs:checked ~ .panels .p-rs {
    display: block;
}

.panel pre {
    margin: 0;
    padding: 20px 22px;
    overflow-x: auto;
    background: #14110c;
    font-size: 13.5px;
    line-height: 1.65;
}

.panel pre code.hljs {
    background: transparent;
    padding: 0;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--ink);
    background: linear-gradient(180deg, #a08a52, #7a6639);
    box-shadow: var(--bevel);
    color: #1f180d;
    font: 600 13px var(--font);
    cursor: pointer;
}

.copy-btn:hover {
    background: linear-gradient(180deg, #b49d61, #8a7442);
}

.tooltip {
    position: fixed;
    z-index: 1050;
    padding: 3px 9px;
    border: 1px solid var(--ink);
    font: 500 13px var(--font);
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s, visibility .2s;
    pointer-events: none;
}

/* the response that goes with the examples */
.response {
    margin: 12px;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring);
    background: #14110c;
}

.response-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #2a241a;
    color: #b9aa86;
    font-size: 13px;
}

.response-head .m {
    grid-row: auto;
    margin: 0;
}

.response-head code {
    color: #e6dbbd;
}

.response-note {
    margin-left: auto;
}

.response pre {
    margin: 0;
    padding: 16px 22px;
    max-height: 340px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
}

.response pre code.hljs {
    background: transparent;
    padding: 0;
}

/* ---------- footer ---------- */

.footer {
    padding: 10px 0 26px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 18px 22px;
    color: var(--wood-muted);
    font-size: 15px;
}

.footer a {
    color: var(--gold);
}

.footer p {
    margin: 4px 0;
}

.footer-brand {
    color: var(--wood-text);
    font: 700 18px var(--pixel);
    text-shadow: 1px 1px 0 var(--ink);
}

.footer-brand b {
    color: var(--gold);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.footer-brand .brand-mark {
    width: 30px;
    height: 30px;
}

.footer-brand .brand-mark svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 4px 22px;
    align-content: center;
}

.footer-links a {
    color: var(--wood-text);
    text-shadow: 1px 1px 0 var(--ink);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-links i {
    width: 16px;
    margin-right: 4px;
    color: var(--gold);
}

.pill {
    margin-left: 6px;
    padding: 0 7px 1px;
    background: var(--slot);
    border: 1px solid var(--ink);
    color: var(--gold);
    font: 500 12px var(--mono);
    text-shadow: none;
}

.footer-legal {
    text-align: right;
}

/* ---------- explorer drawer ---------- */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(10, 8, 5, .55);
    animation: fade .2s ease;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: min(620px, 100vw);
    background: var(--well);
    border-left: 4px solid var(--trim);
    outline: 1px solid var(--ink);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .28s var(--ease), visibility 0s linear .28s;
}

.drawer.open {
    transform: none;
    visibility: visible;
    box-shadow: -10px 0 0 rgba(0, 0, 0, .25);
    transition: transform .28s var(--ease);
}

.drawer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-width: 0 0 4px;
    box-shadow: inset 0 0 0 1px var(--ink);
}

.drawer-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-title .m {
    margin: 0;
}

.drawer-title code {
    color: var(--wood-text);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 0 var(--ink);
}

.drawer-pos {
    flex: none;
    color: var(--wood-muted);
    font: 500 12px var(--mono);
    white-space: nowrap;
}

.stepper {
    display: flex;
    gap: 4px;
}

.drawer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--ink);
    background: var(--well-2);
}

.drawer-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.meta-pill {
    padding: 1px 8px;
    background: var(--well);
    border: 1px solid var(--well-ring);
    font-family: var(--mono);
}

.meta-ok {
    background: var(--get-bg);
    color: var(--get-ink);
    border-color: var(--ink);
}

.meta-bad {
    background: var(--warn-bg);
    color: var(--warn-ink);
    border-color: var(--warn-ink);
}

.drawer-body {
    flex: 1;
    overflow: auto;
    background: var(--well);
}

.drawer-body pre {
    margin: 0;
    padding: 18px 20px 40px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text-2);
}

.drawer-body .j-key { color: var(--json-key); }
.drawer-body .j-str { color: var(--json-str); }
.drawer-body .j-num { color: var(--json-num); }
.drawer-body .j-lit { color: var(--json-lit); }
.drawer-body .j-punc { color: var(--json-punc); }

.drawer-body a.j-link {
    color: var(--json-str);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    cursor: pointer;
}

.drawer-body a.j-link:hover {
    color: var(--accent);
}

.drawer-img {
    display: grid;
    place-items: center;
    min-height: 100%;
    padding: 30px;
    background:
        conic-gradient(var(--well-2) 25%, transparent 0 50%, var(--well-2) 0 75%, transparent 0) 0 0 / 16px 16px;
}

.drawer-img img {
    max-width: 100%;
    min-width: 64px;
    image-rendering: pixelated;
    transform-origin: center;
}

.drawer-note {
    padding: 12px 20px;
    color: var(--muted);
    font-size: 14px;
    border-bottom: 1px solid var(--well-ring);
}

/* ---------- readable view ---------- */

.view-toggle {
    flex: none;
    display: inline-flex;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring);
}

.view-toggle[hidden] {
    display: none;
}

.view-toggle label {
    position: relative;
    cursor: pointer;
}

.view-toggle input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.view-toggle span {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    background: var(--well);
    color: var(--muted);
    font: 600 13.5px var(--font);
}

.view-toggle label + label span {
    border-left: 1px solid var(--ink);
}

.view-toggle label:hover span {
    color: var(--text);
}

.view-toggle input:checked + span {
    background: linear-gradient(180deg, #a08a52, #7a6639);
    box-shadow: var(--bevel);
    color: #1f180d;
}

.view-toggle input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.readable {
    padding: 18px 20px 48px;
    color: var(--text-2);
    font-size: 14.5px;
}

.r-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--well-ring);
}

.r-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.r-img {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-width: 76px;
    min-height: 76px;
    max-width: 260px;
    padding: 8px;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring);
    background:
        conic-gradient(var(--well-2) 25%, transparent 0 50%, var(--well-2) 0 75%, transparent 0) 0 0 / 12px 12px;
}

.r-img[hidden] {
    display: none;
}

.r-img:hover {
    box-shadow: 0 0 0 1px var(--accent);
    text-decoration: none;
}

.r-img img {
    max-width: 100%;
    max-height: 128px;
    image-rendering: pixelated;
}

.r-img span {
    color: var(--muted);
    font: 500 11.5px var(--mono);
}

.r-title {
    min-width: 0;
}

.r-title h3 {
    margin: 0;
    color: var(--text);
    font: 800 24px/1.2 var(--font);
    overflow-wrap: anywhere;
}

.r-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.r-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 0 12px;
}

.r-chips a {
    padding: 1px 8px;
    border: 1px solid var(--well-ring);
    background: var(--well-2);
    font: 500 12.5px var(--mono);
}

.r-fields {
    margin: 0;
}

.r-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--hover);
}

.r-row dt {
    min-width: 0;
    color: var(--text);
    font-weight: 600;
}

.r-row dt small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.r-row dd {
    margin: 0;
    font: 13.5px var(--mono);
    overflow-wrap: anywhere;
}

.r-num {
    color: var(--json-num);
}

.r-str {
    color: var(--text);
    font-family: var(--font);
    font-size: 14.5px;
}

.r-enum {
    margin-left: 4px;
    padding: 0 7px;
    border: 1px solid var(--well-ring);
    background: var(--well-2);
    color: var(--text);
    font: 600 13px var(--font);
}

.r-none {
    color: var(--muted);
    font-family: var(--font);
    font-style: italic;
}

.readable a.r-link {
    color: var(--json-lit);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
}

.readable a.r-link:hover {
    color: var(--accent);
}

.r-link .r-num {
    color: inherit;
}

.r-quiet {
    margin-top: 12px;
}

.r-quiet summary {
    padding: 4px 0;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}

.r-quiet summary:hover {
    color: var(--text);
}

.r-quiet .r-row {
    padding: 4px 0;
}

.r-sec {
    margin-top: 22px;
}

.r-sec h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--text);
    font: 700 17px var(--font);
}

.r-count {
    padding: 0 6px;
    border: 1px solid var(--well-ring);
    color: var(--muted);
    font: 500 12px var(--mono);
}

.r-desc {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13.5px;
}

.r-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.r-list li {
    padding: 1px 7px;
    border: 1px solid var(--well-ring);
    background: var(--well-2);
    font: 12.5px var(--mono);
}

.r-item {
    position: relative;
    margin: 10px 0;
    padding: 2px 0 2px 34px;
    border-left: 3px solid var(--well-ring);
}

.r-idx {
    position: absolute;
    top: 7px;
    left: 9px;
    color: var(--muted);
    font: 500 12px var(--mono);
}

.r-filter {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.r-filter i {
    position: absolute;
    left: 11px;
    color: var(--muted);
    font-size: 13px;
}

.r-filter input {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 32px;
    border: 1px solid var(--ink);
    background: var(--well-2);
    box-shadow: 0 0 0 1px var(--well-ring), inset 2px 2px 0 rgba(0, 0, 0, .25);
    color: var(--text);
    font: 15px var(--font);
}

.r-filter input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent), inset 2px 2px 0 rgba(0, 0, 0, .25);
}

.r-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ink);
    box-shadow: 0 0 0 1px var(--well-ring);
}

.r-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.r-table th {
    padding: 7px 10px;
    border-bottom: 1px solid var(--ink);
    background: var(--well-2);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.r-table td {
    padding: 5px 10px;
    border-top: 1px solid var(--hover);
    font-family: var(--mono);
    vertical-align: middle;
}

.r-table tbody tr:hover td {
    background: var(--hover);
}

.r-table .r-tdimg {
    width: 48px;
    padding: 2px 6px;
}

.r-tdimg img {
    display: block;
    max-width: 40px;
    max-height: 40px;
    margin: auto;
    image-rendering: pixelated;
}

.r-shown:empty {
    display: none;
}

.r-shown {
    margin: 8px 0 0;
}

/* a pixel spinner: four blocks taking turns */
.spinner {
    width: 24px;
    height: 24px;
    margin: 60px auto;
    background:
        linear-gradient(var(--accent), var(--accent)) 0 0 / 10px 10px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 14px 0 / 10px 10px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 14px 14px / 10px 10px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 0 14px / 10px 10px no-repeat;
    animation: blink 1s steps(4) infinite;
}

@keyframes blink {
    0% { opacity: 1; transform: rotate(0); }
    100% { opacity: 1; transform: rotate(360deg); }
}

@keyframes fade {
    from { opacity: 0; }
}

body.drawer-lock {
    overflow: hidden;
}

/* ---------- responsive ---------- */

@media (max-width: 1240px) and (min-width: 981px), (max-width: 640px) {
    .parade-row img:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 460px) {
    .parade-row img:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 1120px) {
    .search {
        flex-basis: 210px;
    }
    .head-actions .btn span {
        display: none;
    }
    .head-actions .btn {
        width: 36px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 980px) {
    .hero {
        padding-top: 28px;
    }
    .hero-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .parade-view {
        min-height: 200px;
    }
    .parade-row img {
        max-height: 92px;
    }
    .head-inner {
        flex-wrap: wrap;
        gap: 8px 14px;
        padding-top: 9px;
        padding-bottom: 7px;
    }
    .search {
        flex: 1 1 200px;
        order: 2;
    }
    .head-actions {
        order: 3;
    }
    .jump {
        order: 4;
        flex-basis: 100%;
    }
    .jump a i {
        display: inline;
    }
    html {
        scroll-padding-top: 118px;
    }
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .card-feature {
        display: flex;
    }
    .card-feature .eps {
        margin: 12px 12px 0;
    }
    .scene-well {
        margin: 12px 12px 0;
    }
    .eps-row {
        grid-template-columns: 1fr;
    }
    .enum-fam {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 14px;
    }
    /* three rows would take a phone's screen: the header scrolls away instead */
    .site-head {
        position: static;
    }
    html {
        scroll-padding-top: 10px;
    }
    .head-actions {
        margin-left: auto;
    }
    .search {
        order: 5;
        flex-basis: 100%;
    }
    .search kbd {
        display: none;
    }
    .count {
        right: 10px;
    }
    .footer-legal {
        text-align: left;
    }
    .bundle {
        flex-wrap: wrap;
    }
    /* the drawer bar keeps its room for the path */
    .drawer-pos,
    .drawer-title .m {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
