:root { --atlas: url(/assets/sprites.png?v=72851c69d8); --atlas-w: 512px; --atlas-h: 1184px; }
/* The Fantasy Idle wiki: the game's own look (its tokens, Cinzel and Outfit, bronze hairlines on dark
   wood), laid out as a wiki: a top bar with search, a side menu, pages with an infobox, tables and
   pictures. The build puts the sprite sheet's size and address on :root above this. */

:root {
    color-scheme: dark;
    --bg: #0d0a07;
    --panel: #1a1510;
    --panel-2: #110d09;
    --well: rgba(0, 0, 0, 0.26);
    --line: rgba(214, 170, 92, 0.2);
    --line-strong: rgba(214, 170, 92, 0.48);
    --text: #efe6d2;
    --muted: #a8998a;
    --heading: #f3dfb1;
    --accent: #d6aa5c;
    --accent-hover: #f0c674;
    --gold: #fcd34d;
    --arcane: #b794f6;
    --verdigris: #34d399;
    --ember: #dc2626;
    --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    --radius: 14px;
    --side: 248px;
    --k: 2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-padding-top: 72px; }
body {
    font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 60% 45% at 50% -8%, rgba(214, 150, 70, 0.13), transparent 70%),
        radial-gradient(ellipse 50% 60% at 100% 100%, rgba(130, 40, 20, 0.12), transparent 70%),
        radial-gradient(ellipse 40% 50% at 0% 60%, rgba(40, 70, 90, 0.1), transparent 70%);
    background-attachment: fixed;
    min-height: 100vh; overflow-x: hidden;
}
a { color: var(--accent-hover); text-decoration: none; }
a:hover { color: #fff1c9; text-decoration: underline; text-underline-offset: 3px; }
code { font-size: 0.88em; padding: 0.05em 0.35em; border-radius: 5px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); }
small, .muted { color: var(--muted); }
strong { color: #fff6e3; }

/* ---------- sprites (the game's sheet, crisp at whole scales) ---------- */
.spr {
    display: inline-block; width: calc(32px * var(--k)); height: calc(32px * var(--k)); vertical-align: middle;
    background-image: var(--atlas); background-repeat: no-repeat;
    background-size: calc(var(--atlas-w) * var(--k)) calc(var(--atlas-h) * var(--k));
    background-position: calc(var(--sx) * -32px * var(--k)) calc(var(--sy) * -32px * var(--k));
    image-rendering: pixelated; image-rendering: crisp-edges;
}
.spr.soft { image-rendering: auto; }
.spr.res-spr { vertical-align: -0.32em; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
.sp-fallback { display: inline-block; font-size: calc(22px * var(--k)); line-height: 1; vertical-align: middle; }
.spr.silhouette { filter: brightness(0) drop-shadow(0 0 1px rgba(214, 170, 92, 0.45)); opacity: 0.7; }
.hero-doll { position: relative; display: inline-block; width: calc(32px * var(--k)); height: calc(32px * var(--k)); line-height: 0; vertical-align: middle; }
.hero-doll .spr { position: absolute; left: 0; top: 0; }

/* ---------- the top bar ---------- */
.top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 0.9rem;
    height: 60px; padding: 0 1.1rem;
    background: linear-gradient(180deg, rgba(26, 20, 14, 0.97), rgba(14, 11, 8, 0.95)); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--heading); white-space: nowrap; }
.brand:hover { text-decoration: none; color: #fff1c9; }
.brand .hero-doll { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: 0.03em; }
.brand-text b { color: var(--accent); font-weight: 700; }
.search { position: relative; flex: 1 1 auto; max-width: 520px; margin-left: auto; }
.search input {
    width: 100%; padding: 0.55rem 0.9rem 0.55rem 2.3rem; border-radius: 999px; font: inherit; font-size: 0.95rem; color: var(--text);
    background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23d6aa5c' stroke-width='2'><circle cx='7' cy='7' r='5'/><path d='M11 11l4 4'/></svg>") 0.85rem 50% no-repeat;
    border: 1px solid var(--line-strong); outline: none;
}
.search input:focus { border-color: var(--accent-hover); box-shadow: 0 0 0 3px rgba(214, 170, 92, 0.18); }
.results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 460px); overflow-y: auto; z-index: 40;
    border-radius: 12px; border: 1px solid var(--line-strong); background: #17110b; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}
.results a { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.8rem; color: var(--text); border-bottom: 1px solid rgba(214, 170, 92, 0.08); }
.results a:hover, .results a.on { background: rgba(214, 170, 92, 0.14); text-decoration: none; }
.results .r-pic { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; }
.results .r-pic .spr { --k: 1; }
.results .r-sec { margin-left: auto; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.results .r-none { padding: 0.7rem 0.9rem; color: var(--muted); }
.play {
    flex: 0 0 auto; padding: 0.45rem 1rem; border-radius: 999px; font-weight: 800; color: #1f1406;
    background: linear-gradient(180deg, #e2b95f, #9c7127); border: 1px solid #f7d88a; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.play:hover { color: #140d03; text-decoration: none; background: linear-gradient(180deg, #f0cb72, #b08233); }
.menu-btn { display: none; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.35); cursor: pointer; padding: 10px 9px; flex-direction: column; justify-content: space-between; }
.menu-btn i { display: block; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- the shell: the side menu and the page ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); max-width: 1380px; margin: 0 auto; }
.side {
    position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 1.1rem 0.8rem 2rem;
    border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: rgba(214, 170, 92, 0.3) transparent;
}
.nav-group { margin-bottom: 1.1rem; }
.nav-title { padding: 0 0.6rem 0.35rem; font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.side a { display: flex; align-items: center; gap: 0.55rem; padding: 0.28rem 0.6rem; border-radius: 8px; color: var(--text); font-size: 0.92rem; }
.side a:hover { background: rgba(214, 170, 92, 0.1); text-decoration: none; }
.side a[aria-current="page"] { background: linear-gradient(90deg, rgba(214, 170, 92, 0.22), rgba(214, 170, 92, 0.05)); color: #fff1c9; box-shadow: inset 2px 0 0 var(--accent); }
.side a .spr { --k: 0.75 !important; flex: 0 0 auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
.nav-dot { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; background: radial-gradient(circle, var(--accent) 0 3px, transparent 4px); opacity: 0.6; }

.page { min-width: 0; padding: 1.4rem 2rem 3rem; }
.crumbs { margin-bottom: 0.6rem; font-size: 0.82rem; color: var(--muted); }
.crumbs span { margin: 0 0.3rem; }
.banner {
    height: 170px; margin-bottom: 1rem; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(13, 10, 7, 0) 40%, rgba(13, 10, 7, 0.85)), var(--art) var(--art-at, center) / cover no-repeat, var(--panel-2);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
.banner + h1 { margin-top: -3.4rem; position: relative; padding-left: 1.1rem; }
h1 {
    display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem;
    font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1.15; letter-spacing: 0.02em; color: var(--heading);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 24px rgba(214, 170, 92, 0.25);
}
.h1-icon { line-height: 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)); }
.lead { margin-bottom: 1rem; font-size: 1.08rem; color: #f6ecd8; }

.content { font-size: 1rem; }
.content > * + * { margin-top: 0.85rem; }
.content h2 {
    margin-top: 2rem; padding-bottom: 0.35rem; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--heading);
    border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, var(--line-strong), transparent 80%) 1;
    clear: none;
}
.content h3 { margin-top: 1.4rem; font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; color: #f0d9a8; }
.content h4 { margin-top: 1rem; font-size: 1rem; color: var(--heading); }
.content ul, .content ol { padding-left: 1.4rem; }
.content li + li { margin-top: 0.3rem; }
.content li::marker { color: var(--accent); }
.content p { max-width: 78ch; }

/* ---------- the infobox ---------- */
.infobox {
    float: right; width: 290px; margin: 0 0 1.2rem 1.6rem; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(255, 236, 200, 0.035), transparent 42%), linear-gradient(180deg, #1c1611, #120d09);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}
.ib-title { padding: 0.6rem 0.9rem; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; color: var(--heading); background: rgba(214, 170, 92, 0.12); border-bottom: 1px solid var(--line); }
.ib-image { display: grid; place-items: center; min-height: 140px; padding: 1rem; background: radial-gradient(circle at 50% 45%, rgba(214, 170, 92, 0.16), transparent 62%), var(--art, none) center / cover no-repeat; }
.ib-image .spr, .ib-image .hero-doll { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.7)); }
.ib-caption { padding: 0 0.9rem 0.7rem; text-align: center; font-size: 0.85rem; color: var(--muted); }
.infobox table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.infobox th, .infobox td { padding: 0.42rem 0.8rem; text-align: left; vertical-align: top; border-top: 1px solid rgba(214, 170, 92, 0.1); }
.infobox th { width: 40%; font-weight: 600; color: var(--muted); }

/* ---------- contents ---------- */
.toc { display: inline-block; min-width: 220px; max-width: 100%; margin: 0 0 1rem; padding: 0.7rem 1.1rem 0.8rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--well); }
.toc-title { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem; }
.toc ol { padding-left: 1.3rem; font-size: 0.9rem; }

/* ---------- tables ---------- */
.table-wrap { max-width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); }
/* a wide table starts below the infobox, where it has the page's whole width (ui.mjs table's `wide`) */
.table-wrap.wide { clear: right; }
.wt { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wt caption { padding: 0.5rem 0.8rem; text-align: left; color: var(--muted); }
.wt th { padding: 0.55rem 0.7rem; text-align: left; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--heading); background: #221a12; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.wt td { padding: 0.45rem 0.7rem; border-top: 1px solid rgba(214, 170, 92, 0.08); vertical-align: middle; }
.wt tbody tr:nth-child(even) td { background: rgba(255, 236, 200, 0.022); }
.wt tbody tr:hover td { background: rgba(214, 170, 92, 0.07); }
.wt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wt .mid { text-align: center; }
.wt.sortable th { cursor: pointer; user-select: none; }
.wt.sortable th::after { content: ''; display: inline-block; width: 0.8em; margin-left: 0.25em; opacity: 0.5; }
.wt.sortable th[aria-sort="ascending"]::after { content: '▲'; font-size: 0.65em; }
.wt.sortable th[aria-sort="descending"]::after { content: '▼'; font-size: 0.65em; }
.wt.tall td { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.wt.compact td { padding: 0.25rem 0.7rem; }
.wt td:target, .wt tr:has(:target) td { background: rgba(214, 170, 92, 0.18) !important; }
.res, .wt td a:has(> .spr) { white-space: nowrap; }
.res span { margin-left: 0.3rem; }
.act { display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.act > span { white-space: normal; }
.card-thumb { display: inline-block; flex: 0 0 auto; width: 52px; height: 34px; border-radius: 7px; background: center / cover no-repeat; border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.stage-pip { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 999px; font-weight: 800; font-size: 0.8rem; color: #3b2a10; background: radial-gradient(circle at 35% 30%, #fde68a, #c08a2a); }
.stage-pip.boss { color: #fff; background: radial-gradient(circle at 35% 30%, #f87171, #7f1d1d); }
.tag { display: inline-block; padding: 0 0.4rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 0.1em; }
.tag.boss { color: #fecaca; background: rgba(220, 38, 38, 0.25); border: 1px solid rgba(248, 113, 113, 0.45); }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; vertical-align: middle; border: 1px solid rgba(255, 255, 255, 0.25); }
pre.formula { overflow-x: auto; padding: 0.8rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); font-size: 0.85rem; line-height: 1.55; color: #f3e7cf; }

/* ---------- tiles, chips, galleries ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-top: 0.8rem; }
.tile {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.2rem; min-height: 112px; padding: 0.7rem 0.6rem 0.65rem; overflow: hidden;
    text-align: center; color: var(--text); border-radius: 12px; border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 236, 200, 0.04), transparent 50%), #17110c;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5); }
.tile-pic { line-height: 0; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7)); }
.tile-name { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--heading); line-height: 1.2; text-shadow: 0 1px 3px #000; }
.tile-note { font-size: 0.78rem; color: var(--muted); line-height: 1.3; text-shadow: 0 1px 2px #000; }
.tiles.painted .tile { min-height: 132px; background: linear-gradient(180deg, rgba(13, 10, 7, 0.1) 20%, rgba(13, 10, 7, 0.88)), var(--art, none) var(--art-at, center) / cover no-repeat, #17110c; }
.tiles.painted .tile-note { color: #e4d6bd; }
.tiles.small { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.tiles.small .tile { min-height: 96px; padding: 0.5rem 0.4rem; }
.tiles.small .tile-name { font-size: 0.82rem; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tiles.wide .tile { flex-direction: row; justify-content: flex-start; align-items: center; gap: 0.8rem; min-height: 84px; text-align: left; }
.tiles.wide .tile-name, .tiles.wide .tile-note { display: block; }
.tiles.wide .tile > span:not(.tile-pic) { display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.chip small { color: var(--muted); }
.chip.boss { border-color: rgba(248, 113, 113, 0.45); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.pill { padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.feature-row { display: flex; align-items: center; gap: 1rem; }
.feature-row > :first-child { flex: 0 0 auto; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.7)); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.gallery figure { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.8rem 0.5rem; border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(214, 170, 92, 0.12), transparent 65%), #15100b; }
.gallery figcaption { font-size: 0.82rem; text-align: center; color: var(--muted); }

/* ---------- the level calculator ---------- */
.calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem 0.9rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(255, 236, 200, 0.04), transparent 50%), #17110c; }
.calc label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.calc .calc-wide { grid-column: span 2; }
.calc input, .calc select { width: 100%; padding: 0.45rem 0.6rem; border-radius: 8px; font: inherit; font-size: 0.95rem; color: var(--text); background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-strong); }
.calc output { grid-column: 1 / -1; padding-top: 0.4rem; border-top: 1px solid var(--line); font-size: 0.98rem; }
.calc output b { color: var(--heading); }
@media (max-width: 600px) { .calc .calc-wide { grid-column: 1 / -1; } }

/* ---------- callouts and the navbox ---------- */
.callout { padding: 0.7rem 0.95rem; border-radius: 10px; border: 1px solid var(--line-strong); border-left-width: 4px; background: rgba(214, 170, 92, 0.07); max-width: 82ch; }
.callout.tip { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.07); }
.callout.warning { border-color: rgba(248, 113, 113, 0.55); background: rgba(220, 38, 38, 0.08); }
.callout strong:first-child { color: var(--heading); }
.navbox { clear: both; margin-top: 2.2rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); overflow: hidden; }
.nb-title { padding: 0.45rem 0.9rem; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--heading); background: rgba(214, 170, 92, 0.1); border-bottom: 1px solid var(--line); }
.nb-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; padding: 0.6rem 0.9rem; font-size: 0.88rem; }
.nb-links a { white-space: nowrap; }

/* ---------- the main page ---------- */
.home-hero {
    position: relative; display: flex; align-items: flex-end; gap: 1.5rem; min-height: 300px; padding: 1.6rem 1.8rem; overflow: hidden;
    border-radius: 18px; border: 1px solid var(--line-strong);
    background: linear-gradient(90deg, rgba(13, 10, 7, 0.9) 0%, rgba(13, 10, 7, 0.55) 55%, rgba(13, 10, 7, 0.15)), linear-gradient(180deg, transparent 50%, rgba(13, 10, 7, 0.75)), var(--art) var(--art-at, center) / cover no-repeat;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.home-figures { position: absolute; right: 2rem; bottom: 1.2rem; display: flex; align-items: flex-end; gap: 1.2rem; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.6)); }
.home-text { position: relative; max-width: 560px; }
.home-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.home-title { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1.05; color: var(--heading); text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9), 0 0 30px rgba(214, 170, 92, 0.3); }
.home-tag { margin-top: 0.4rem; font-size: 1.05rem; color: #f6ecd8; text-shadow: 0 1px 4px #000; }
.home-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.btn { display: inline-block; padding: 0.6rem 1.2rem; border-radius: 10px; font-weight: 800; color: #1f1406; background: linear-gradient(180deg, #e2b95f, #9c7127); border: 1px solid #f7d88a; }
.btn:hover { text-decoration: none; color: #140d03; background: linear-gradient(180deg, #f0cb72, #b08233); }
.btn.ghost { color: var(--heading); background: rgba(0, 0, 0, 0.45); border-color: var(--line-strong); }
.btn.ghost:hover { color: #fff1c9; background: rgba(0, 0, 0, 0.6); }
.home-counts { margin: 0.9rem 0 0.4rem; font-size: 0.88rem; color: var(--muted); text-align: center; }
.page:has(.home-hero) h1 { display: none; }

/* ---------- the footer ---------- */
.foot { max-width: 1380px; margin: 0 auto; padding: 1.4rem 2rem 2.2rem calc(var(--side) + 2rem); font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot p + p { margin-top: 0.3rem; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
    .infobox { width: 260px; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .menu-btn { display: flex; }
    .side {
        position: fixed; top: 60px; left: 0; z-index: 25; width: min(300px, 86vw); height: calc(100vh - 60px); height: calc(100dvh - 60px);
        background: #120d09; border-right: 1px solid var(--line-strong); box-shadow: 12px 0 30px rgba(0, 0, 0, 0.6);
        transform: translateX(-102%); transition: transform 0.22s ease;
    }
    body.nav-open .side { transform: none; }
    body.nav-open::after { content: ''; position: fixed; inset: 60px 0 0 0; z-index: 20; background: rgba(0, 0, 0, 0.55); }
    .page { padding: 1rem 1rem 2.4rem; }
    .foot { padding: 1.2rem 1rem 2rem; }
    .infobox { float: none; width: auto; max-width: 420px; margin: 0 0 1rem; }
    .brand-text { display: none; }
    .search { max-width: none; }
}
@media (max-width: 600px) {
    .top { gap: 0.55rem; padding: 0 0.6rem; }
    .play { padding: 0.4rem 0.75rem; font-size: 0.85rem; }
    h1 { font-size: 1.55rem; }
    .banner { height: 120px; }
    .banner + h1 { margin-top: -2.8rem; padding-left: 0.7rem; }
    .content h2 { font-size: 1.25rem; }
    .wt { font-size: 0.82rem; }
    .wt th, .wt td { padding: 0.4rem 0.5rem; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tiles.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tiles.wide { grid-template-columns: minmax(0, 1fr); }
    .home-hero { min-height: 340px; padding: 1.1rem; align-items: flex-start; flex-direction: column; justify-content: flex-end; }
    .home-figures { position: static; order: -1; align-self: center; }
    .home-figures .hero-doll { --k: 3 !important; }
    .home-title { font-size: 2.1rem; }
    .card-thumb { width: 40px; height: 27px; }
    /* the infobox as a compact card: the picture beside its facts */
    .infobox { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "t t" "i r" "c c"; max-width: none; }
    .ib-title { grid-area: t; padding: 0.45rem 0.8rem; }
    .ib-image { grid-area: i; min-height: 0; padding: 0.5rem; }
    .ib-image .spr, .ib-image .hero-doll { --k: 2 !important; }
    .infobox table { grid-area: r; align-self: center; }
    .infobox tr:first-child th, .infobox tr:first-child td { border-top: 0; }
    .ib-caption { grid-area: c; padding: 0.4rem 0.8rem 0.6rem; border-top: 1px solid rgba(214, 170, 92, 0.1); }
    .infobox th, .infobox td { padding: 0.32rem 0.55rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
