/* Ashen Crypt site. One token set, dark by default, parchment light theme. */
@font-face { font-family: 'Tiny5'; src: url(/fonts/tiny5.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Handjet'; src: url(/fonts/handjet.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #15111b; --bg-2: #1d1825; --bg-3: #272031; --line: #3d3349; --line-2: #54476a;
  --ink: #f1e7d2; --ink-2: #d2c6b0; --muted: #a99d89;
  --accent: #f0c35a; --on-accent: #1a1208; --link: #f0c35a; --focus: #8ff0dc;
  --ember: #ff9a4a; --blood: #f2737a; --soul: #8ff0dc; --good: #9be37a; --bad: #f2737a;
  --paper: #e9dcc0; --paper-ink: #2b2118; --paper-2: #d8c8a5;
  --glow: rgba(255, 166, 70, .13); --shade: rgba(8, 5, 12, .55);
  --el-bone: #ede0c7; --el-fire: #ff9a4a; --el-frost: #9fd8ff; --el-venom: #a8e04a; --el-blood: #f4737b; --el-storm: #9cc4ff; --el-holy: #ffd86b; --el-void: #c39bff; --el-neutral: #b6ab98;
  --font-display: 'Tiny5', 'Courier New', monospace;
  --font-body: 'Handjet', ui-monospace, 'Courier New', monospace;
  --maxw: 1120px;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #efe3c8; --bg-2: #f6edd7; --bg-3: #e4d4b0; --line: #c4ad84; --line-2: #a58d62;
  --ink: #2b2118; --ink-2: #473a2a; --muted: #67573f;
  --accent: #7a2e12; --on-accent: #fbf1da; --link: #8a3410; --focus: #0b6b5c;
  --ember: #a84300; --blood: #a8212b; --soul: #0b6b5c; --good: #2f6b10; --bad: #a8212b;
  --paper: #f8f0da; --paper-ink: #2b2118; --paper-2: #e8d9b6;
  --glow: rgba(190, 110, 30, .12); --shade: rgba(70, 40, 10, .25);
  --el-bone: #5c4f3a; --el-fire: #a84300; --el-frost: #0b5f8f; --el-venom: #3f6e00; --el-blood: #a8212b; --el-storm: #2552a6; --el-holy: #7a5800; --el-void: #6a34b8; --el-neutral: #5d5242;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 500 21px/1.45 var(--font-body); letter-spacing: .01em;
  background-image: radial-gradient(70% 380px at 50% 0, var(--glow), transparent 72%);
  background-repeat: no-repeat; overflow-x: hidden; font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: .02em; }
h1 { font-size: clamp(30px, 7.4vw, 56px); }
h2 { font-size: clamp(24px, 4.6vw, 34px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin: 0 0 .8em; }
.wrap { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.pixelated, .ic, .an, .pix { image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
.lead { font-size: 1.15em; color: var(--ink-2); }
.muted { color: var(--muted); }
.num, td, th { font-variant-numeric: tabular-nums; }

/* pixel frame: a border with the corner pixels missing, no radius */
.px { box-shadow: -3px 0 0 var(--line), 3px 0 0 var(--line), 0 -3px 0 var(--line), 0 3px 0 var(--line); margin: 3px; background: var(--bg-2); }
.px-gold { box-shadow: -3px 0 0 var(--accent), 3px 0 0 var(--accent), 0 -3px 0 var(--accent), 0 3px 0 var(--accent); }

/* sprites */
.ic {
  display: inline-block; flex: none; width: calc(28px * var(--s, 2)); height: calc(28px * var(--s, 2));
  background: url(/img/icons.6f88d3eb.png) no-repeat; background-size: calc(24 * 28px * var(--s, 2)) auto;
  background-position: calc(var(--c) * -28px * var(--s, 2)) calc(var(--r) * -28px * var(--s, 2));
}
.an {
  --s: 4; display: inline-block; flex: none; width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px);
  background-repeat: no-repeat; background-size: calc(var(--w) * var(--f) * var(--s) * 1px) 100%; background-position: 0 0;
}
.an.flip { transform: scaleX(-1); }
.an.play { animation: strip var(--d) steps(var(--f)) infinite; }
@keyframes strip { from { background-position-x: 0; } to { background-position-x: calc(var(--w) * var(--f) * var(--s) * -1px); } }
@media (prefers-reduced-motion: reduce) { .an.play { animation: none; } html { scroll-behavior: auto; } .drift, .float { animation: none !important; } }

/* header */
.top { border-bottom: 3px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 22px; margin-right: auto; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.nav { display: flex; gap: 4px; align-items: center; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; font-size: 20px; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }
.tools { display: flex; align-items: center; gap: 6px; }
.lang { display: inline-flex; box-shadow: -3px 0 0 var(--line), 3px 0 0 var(--line), 0 -3px 0 var(--line), 0 3px 0 var(--line); margin: 3px 6px; }
.lang a { color: var(--ink-2); text-decoration: none; padding: 0 12px; min-height: 38px; display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 16px; }
.lang a[aria-current] { background: var(--bg-3); color: var(--accent); }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; color: var(--ink); border: 0; cursor: pointer; padding: 0; text-decoration: none;
  box-shadow: -3px 0 0 var(--line), 3px 0 0 var(--line), 0 -3px 0 var(--line), 0 3px 0 var(--line); margin: 3px; }
.ibtn:hover { color: var(--accent); background: var(--bg-3); }
.ibtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.ibtn[aria-pressed='true'] { color: var(--accent); background: var(--bg-3); }
.theme-dark-only, .theme-light-only { display: none; }
:root:not([data-theme='light']) .theme-dark-only { display: block; }
:root[data-theme='light'] .theme-light-only { display: block; }
@media (min-width: 760px) { .nav { order: 0; width: auto; margin-left: 8px; } .top .wrap { flex-wrap: nowrap; } .brand { margin-right: 0; } .tools { margin-left: auto; } }

/* buttons: at most one filled button per section */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px; font: 500 22px/1 var(--font-display); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 0;
  background: transparent; color: var(--ink); box-shadow: -3px 0 0 var(--line-2), 3px 0 0 var(--line-2), 0 -3px 0 var(--line-2), 0 3px 0 var(--line-2); margin: 3px; }
.btn:hover { background: var(--bg-3); color: var(--accent); }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.btn.fill { background: var(--accent); color: var(--on-accent); box-shadow: -3px 0 0 var(--accent), 3px 0 0 var(--accent), 0 -3px 0 var(--accent), 0 3px 0 var(--accent); }
.btn.fill:hover { filter: brightness(1.1); color: var(--on-accent); }
.btn small { display: block; font: 500 16px/1.1 var(--font-body); opacity: .85; margin-top: 3px; }
.btn.two { align-items: flex-start; padding-block: 10px; }
.textlink { color: var(--link); }

/* breadcrumb, section tabs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 14px 0 0; font-size: 18px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.crumbs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; padding: 6px 0 8px; margin-top: 8px; border-bottom: 3px solid var(--line); scroll-snap-type: x proximity; }
.tabs a { scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 44px; text-decoration: none; color: var(--ink-2); white-space: nowrap; font-size: 20px; }
.tabs a:hover { color: var(--accent); background: var(--bg-2); }
.tabs a[aria-current] { color: var(--on-accent); background: var(--accent); }

/* page body */
main { padding-bottom: 72px; }
.page-head { display: grid; gap: 14px 24px; padding: 26px 0 8px; }
.page-head p { max-width: 62ch; }
.sec { margin-top: 44px; }
.sec > h2 { margin-bottom: 14px; }
.prose { max-width: 68ch; }
.prose h2 { margin: 38px 0 12px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose li::marker { color: var(--accent); }
.note { background: var(--paper); color: var(--paper-ink); padding: 12px 16px; margin: 14px 3px; box-shadow: -3px 0 0 var(--paper-2), 3px 0 0 var(--paper-2), 0 -3px 0 var(--paper-2), 0 3px 0 var(--paper-2); }
.note a { color: #7a2e12; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; background: var(--bg-2); color: var(--ink-2); text-decoration: none; min-height: 40px; line-height: 28px; box-shadow: -2px 0 0 var(--line), 2px 0 0 var(--line), 0 -2px 0 var(--line), 0 2px 0 var(--line); margin: 2px; }
.toc a:hover { color: var(--accent); }

/* inline item references */
.ref { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: -6px; text-decoration: none; border-bottom: 1px solid var(--line-2); color: var(--link); }
.ref .ic { --s: 1; margin-right: 1px; }
.ref:hover { border-bottom-color: var(--accent); }

/* element words */
.el { font-weight: 700; }
.el-bone { color: var(--el-bone); } .el-fire { color: var(--el-fire); } .el-frost { color: var(--el-frost); } .el-venom { color: var(--el-venom); }
.el-blood { color: var(--el-blood); } .el-storm { color: var(--el-storm); } .el-holy { color: var(--el-holy); } .el-void { color: var(--el-void); } .el-neutral { color: var(--el-neutral); }
.good { color: var(--good); } .bad { color: var(--bad); }
.tag { color: var(--ink-2); }

/* item header */
.item-head { display: grid; grid-template-columns: auto 1fr; gap: 18px 22px; align-items: center; padding: 26px 0 6px; }
.niche { display: grid; place-items: center; padding: 14px; min-width: 112px; min-height: 112px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, var(--bg-2)), var(--bg-2) 70%); }
.item-head .ttl { display: grid; gap: 8px; min-width: 0; }
.item-head .tags { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 20px; }
.item-head .desc { grid-column: 1 / -1; max-width: 62ch; font-size: 1.1em; color: var(--ink-2); margin: 0; }
@media (min-width: 700px) { .item-head { grid-template-columns: auto 1fr; } .niche { min-width: 170px; min-height: 170px; } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; margin: 0; padding: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; text-align: right; font-weight: 700; }

/* tables */
.tbl-wrap { overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%;
  background:
    linear-gradient(90deg, var(--bg), var(--bg)) left center / 24px 100% no-repeat local,
    linear-gradient(270deg, var(--bg), var(--bg)) right center / 24px 100% no-repeat local,
    linear-gradient(90deg, rgba(0, 0, 0, .55), transparent) left center / 14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(0, 0, 0, .55), transparent) right center / 14px 100% no-repeat scroll; }
:root[data-theme='light'] .tbl-wrap { background:
    linear-gradient(90deg, var(--bg), var(--bg)) left center / 24px 100% no-repeat local,
    linear-gradient(270deg, var(--bg), var(--bg)) right center / 24px 100% no-repeat local,
    linear-gradient(90deg, rgba(60, 30, 10, .3), transparent) left center / 14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(60, 30, 10, .3), transparent) right center / 14px 100% no-repeat scroll; }
@media (max-width: 599px) {
  table { font-size: 18px; }
  th, td { padding: 7px 5px; }
  thead th { font: 500 15px/1.1 var(--font-body); letter-spacing: 0; padding-inline: 4px; }
  th:first-child { min-width: 0; }
  tbody th { font-size: 17px; }
  .tbl-wrap { background: none; }
  table.stack thead { position: absolute; left: -9999px; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 6px 0 8px; border-bottom: 1px dashed var(--line); }
  table.stack tbody th { grid-column: 1 / -1; display: block; border: 0; padding: 4px 6px; font-family: var(--font-display); font-size: 17px; text-align: left; }
  table.stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 6px; border: 0; text-align: right; }
  table.stack td:last-child { grid-column: 1 / -1; }
  table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 16px; text-align: left; }
}
table { border-collapse: collapse; width: 100%; font-size: 20px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px dashed var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { font-family: var(--font-display); font-weight: 400; color: var(--muted); font-size: 16px; border-bottom: 3px solid var(--line); white-space: nowrap; }
tbody th { font-weight: 500; color: var(--ink-2); }
td.chg { color: var(--accent); font-weight: 700; background: color-mix(in srgb, var(--accent) 12%, transparent); }
tr.max td, tr.max th { background: var(--bg-2); }
.legend { color: var(--muted); font-size: 18px; margin-top: 8px; }
.legend .chg { color: var(--accent); font-weight: 700; }

/* lists of items */
.filters { display: grid; gap: 12px 18px; padding: 16px; margin: 20px 3px 10px; }
.filters .grp { display: grid; gap: 6px; }
.filters .lbl { font-family: var(--font-display); font-size: 15px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px; background: transparent; color: var(--ink-2); border: 0; cursor: pointer; font: 500 19px/1 var(--font-body);
  box-shadow: -2px 0 0 var(--line-2), 2px 0 0 var(--line-2), 0 -2px 0 var(--line-2), 0 2px 0 var(--line-2); margin: 2px; }
.chip:hover { background: var(--bg-3); }
.chip[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); box-shadow: -2px 0 0 var(--accent), 2px 0 0 var(--accent), 0 -2px 0 var(--accent), 0 2px 0 var(--accent); }
.chip .sw { width: 12px; height: 12px; background: currentColor; flex: none; }
input[type='search'], select { font: 500 20px/1 var(--font-body); color: var(--ink); background: var(--bg); border: 0; min-height: 44px; padding: 8px 12px; width: 100%; border-radius: 0;
  box-shadow: -2px 0 0 var(--line-2), 2px 0 0 var(--line-2), 0 -2px 0 var(--line-2), 0 2px 0 var(--line-2); margin: 2px 0; }
input[type='search']::placeholder { color: var(--muted); }
.frow { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .frow { grid-template-columns: repeat(3, 1fr); } }
.count { color: var(--muted); font-size: 18px; margin: 6px 0 0; }
.list { list-style: none; margin: 16px 0 0; padding: 0; }
.list li[hidden] { display: none; }
.irow { display: grid; grid-template-columns: 60px 1fr; gap: 2px 14px; align-items: center; padding: 10px 6px; border-bottom: 1px dashed var(--line); color: inherit; text-decoration: none; min-height: 72px; }
.irow:hover { background: var(--bg-2); }
.irow .nm { font-size: 22px; font-weight: 700; color: var(--ink); display: flex; flex-wrap: wrap; gap: 0 12px; align-items: baseline; }
.irow .sub { color: var(--ink-2); font-size: 19px; grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 16px; }
.irow .go { display: none; }
.irow { grid-template-rows: auto 1fr; }
.irow:has(.txt) { grid-template-rows: auto; }
.irow > span:first-child { grid-row: 1 / span 2; justify-self: center; align-self: center; }
.irow .nm { align-self: end; } .irow .sub { align-self: start; }
@media (min-width: 760px) {
  .irow { grid-template-columns: 60px minmax(0, 1.4fr) minmax(0, 2fr) 22px; }
  .irow .sub { grid-column: auto; align-self: center; }
  .irow .nm { align-self: center; }
  .irow { grid-template-rows: none; }
  .irow > span:first-child { grid-row: auto; }
  .irow .go { display: block; color: var(--muted); }
  .irow .go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }
}
.grp-title { margin: 34px 0 4px; display: flex; align-items: center; gap: 12px; }
.sections { display: grid; gap: 0; margin-top: 18px; }
.sec-link { display: grid; grid-template-columns: 64px 1fr 22px; gap: 14px; align-items: center; padding: 14px 6px; text-decoration: none; color: inherit; border-bottom: 1px dashed var(--line); min-height: 76px; }
.sec-link:hover { background: var(--bg-2); }
.sec-link b { font: 400 24px/1.1 var(--font-display); display: block; color: var(--ink); }
.sec-link span { color: var(--ink-2); }
.sec-link .go svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.5; }
@media (min-width: 860px) { .sections { grid-template-columns: 1fr 1fr; column-gap: 40px; } }

/* search */
.sbox { position: relative; }
.results { list-style: none; margin: 6px 0 0; padding: 0; background: var(--bg-2); max-height: 60vh; overflow-y: auto; }
.results[hidden] { display: none; }
.results a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; text-decoration: none; color: var(--ink); min-height: 56px; border-bottom: 1px dashed var(--line); }
.results a:hover, .results a[aria-selected='true'] { background: var(--bg-3); }
.results .ty { color: var(--muted); font-size: 17px; }
.results .none { padding: 14px; color: var(--muted); }

/* grids with real sprites */
.pair { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pair .op { font-family: var(--font-display); font-size: 28px; color: var(--muted); }
.recipe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recipe a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.recipe a:hover span { text-decoration: underline; }
.recipe .op { color: var(--muted); font-family: var(--font-display); }
.strips { display: grid; gap: 22px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: end; }
.strip-item { display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--ink-2); font-size: 18px; text-decoration: none; }
.strip-item .an { --s: 3; }
.hlist { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.relrow { display: flex; flex-wrap: wrap; gap: 6px; }
.relrow a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; text-decoration: none; color: var(--ink); background: var(--bg-2); min-height: 44px;
  box-shadow: -2px 0 0 var(--line), 2px 0 0 var(--line), 0 -2px 0 var(--line), 0 2px 0 var(--line); margin: 2px; }
.relrow a:hover { color: var(--accent); }

/* biome tint bands */
.biome-band { background-color: var(--tint); background-image: var(--tile-img); background-size: calc(16px * var(--ts, 4)); image-rendering: pixelated; position: relative; }
.biome-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 5, 12, .8), rgba(8, 5, 12, .2) 85%); }
.biome-band > * { position: relative; z-index: 1; }

/* footer */
.foot { border-top: 3px solid var(--line); background: var(--bg-2); padding: 34px 0 44px; margin-top: 40px; color: var(--ink-2); font-size: 19px; }
.foot .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot h2 { font-size: 16px; color: var(--muted); margin-bottom: 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot a { color: var(--ink-2); display: inline-block; padding: 6px 0; min-height: 36px; }
.foot a:hover { color: var(--accent); }
.foot .fine { grid-column: 1 / -1; color: var(--muted); font-size: 17px; border-top: 1px dashed var(--line); padding-top: 16px; }

/* ---------- landing ---------- */
/* Scenes stay dark in both themes; the text bands (bell, weapons, world) follow the theme tokens. */
.art {
  --bg: #15111b; --bg-2: #1d1825; --bg-3: #272031; --line: #3d3349; --line-2: #54476a;
  --ink: #f1e7d2; --ink-2: #d9ceb8; --muted: #b8ac97; --accent: #f0c35a; --on-accent: #1a1208; --link: #f0c35a; --focus: #8ff0dc;
  color: var(--ink); background-color: #0b0810;
}
:where(.landing main .wrap) { position: relative; z-index: 5; }
.landing main h2 { font-size: clamp(32px, 6.4vw, 60px); line-height: 1.04; }
.landing .sub { font-size: 1.12em; color: var(--ink-2); max-width: 54ch; margin: 14px 0 0; }
.btn.big { min-height: 60px; padding: 10px 26px; font-size: 25px; gap: 12px; }
.btn.big svg { width: 26px; height: 26px; }
.art .btn:not(.fill) { background: rgba(12, 8, 16, .55); }
.art .btn:not(.fill):hover { background: var(--bg-3); }

/* header floats over the first screen */
.landing .top { position: fixed; left: 0; right: 0; top: 0; border-bottom-color: transparent; background: linear-gradient(rgba(8, 5, 12, .82), rgba(8, 5, 12, 0)); backdrop-filter: none; transition: background .25s, border-color .25s; }
.landing .top:not(.solid) { --ink: #f1e7d2; --ink-2: #d9ceb8; --accent: #f0c35a; --line: rgba(241, 231, 210, .4); --bg-3: rgba(255, 255, 255, .14); }
.landing .top.solid { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom-color: var(--line); backdrop-filter: blur(6px); }
@media (max-width: 759px) {
  .landing .top .wrap { flex-wrap: nowrap; gap: 4px; padding-block: 4px; }
  .landing .brand span { display: none; }
  .landing .brand { margin-right: 0; }
  .landing .nav { order: 0; width: auto; margin-left: 0; }
  .landing .nav a { padding: 8px 8px; font-size: 19px; }
  .landing .tools { margin-left: auto; gap: 0; }
  .landing .lang { margin: 3px 4px; }
  .landing .lang a { padding: 0 8px; }
  .landing #sound { display: none; }
}

/* particles */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

/* download controls */
.dl-set { display: grid; justify-items: center; gap: 12px; }
.dl-alt { display: flex; flex-wrap: wrap; gap: 0 20px; justify-content: center; margin: 0; }
.dl-alt a { color: var(--ink-2); font-size: 20px; padding: 8px 2px; min-height: 40px; display: inline-flex; align-items: center; }
.dl-alt a:hover { color: var(--accent); }
.dl-alt a[hidden] { display: none; }
.dl-note { color: var(--muted); font-size: 18px; max-width: 46ch; margin: 0; }
.dl-set .btn.fill { box-shadow: -3px 0 0 var(--accent), 3px 0 0 var(--accent), 0 -3px 0 var(--accent), 0 3px 0 var(--accent), 0 0 34px rgba(240, 195, 90, .35); }

/* ---- first screen */
.hero { --u: 4; position: relative; overflow: hidden; height: max(100svh, calc(490px + 69 * var(--u) * 1px)); min-height: 560px; border-bottom: 3px solid var(--line); }
@media (min-width: 480px) and (min-height: 700px) { .hero { --u: 5; } }
@media (min-width: 900px) and (min-height: 760px) { .hero { --u: 6; } }
@media (min-width: 1500px) and (min-height: 960px) { .hero { --u: 7; } }
@media (min-width: 1900px) and (min-height: 1120px) { .hero { --u: 8; } }
.hero-wall { position: absolute; inset: 0; background: url(/img/w/crypt.png) 50% 100% / calc(64px * var(--u)) calc(32px * var(--u)); image-rendering: pixelated; filter: brightness(.24); }
.scene { position: absolute; left: 50%; bottom: calc(var(--u) * -8px); width: calc(256px * var(--u)); height: calc(144px * var(--u)); margin-left: calc(-128px * var(--u)); }
.scene-in { position: absolute; inset: 0; will-change: transform; }
.dio { position: absolute; inset: 0; background: url(/img/diorama.png) 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
.scene .an { --s: var(--u); position: absolute; left: calc(var(--x) * var(--u) * 1px); top: calc(var(--y) * var(--u) * 1px); }
.scene .an.bob { animation: bob 3.2s ease-in-out infinite alternate, strip var(--d) steps(var(--f)) infinite; }
.scene .an.drift { animation: drift 11s ease-in-out infinite alternate, strip var(--d) steps(var(--f)) infinite; }
.scene .an.drift.b { animation-duration: 15s, var(--d); animation-delay: -6s, 0s; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(calc(var(--u) * -4px)); } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(calc(var(--u) * 36px), calc(var(--u) * 10px)); } }
.glow { position: absolute; left: calc((var(--x) - var(--r)) * var(--u) * 1px); top: calc((var(--y) - var(--r)) * var(--u) * 1px); width: calc(var(--r) * 2 * var(--u) * 1px); height: calc(var(--r) * 2 * var(--u) * 1px);
  border-radius: 50%; mix-blend-mode: screen; pointer-events: none; background: radial-gradient(circle, rgba(255, 176, 80, .6) 0, rgba(255, 120, 40, .24) 36%, transparent 70%); animation: flick 2.8s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes flick { 0% { opacity: .65; transform: scale(.94); } 25% { opacity: 1; } 55% { opacity: .78; transform: scale(1); } 100% { opacity: .95; transform: scale(1.05); } }
.mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at calc(139px * var(--u)) calc(104px * var(--u)), rgba(5, 3, 9, 0) 0, rgba(5, 3, 9, .08) calc(30px * var(--u)), rgba(5, 3, 9, .78) calc(118px * var(--u))); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(8, 5, 12, .92) 0, rgba(8, 5, 12, .55) 38%, rgba(8, 5, 12, 0) 62%); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 62%, transparent 55%, rgba(5, 3, 9, .8)); }
.fg { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fg .an { --s: calc(var(--u) * 2); position: absolute; left: auto; top: auto; filter: brightness(0); opacity: .9; }
.fg-l, .fg-r { position: absolute; top: 0; bottom: 0; width: calc(50px * var(--u)); will-change: transform; }
.fg-l { left: -4%; } .fg-r { right: -4%; transform: scaleX(-1); }
.fg .an:nth-child(1) { top: -6%; left: 14%; }
.fg .an:nth-child(2) { --s: calc(var(--u) * 1.5); bottom: -2%; left: 2%; }
.hero-copy { position: absolute; z-index: 5; left: 0; right: 0; top: 0; margin-inline: auto; padding-top: 92px; display: grid; justify-items: center; gap: 14px; text-align: center; will-change: transform, opacity; }
.hero h1 { font-size: min(54px, 15vw); line-height: .96; color: #f6e7c8; text-shadow: 0 3px 0 #4a1c0a, 0 0 36px rgba(255, 140, 50, .38); text-wrap: balance; }
.hero .line { text-wrap: balance; font: 400 clamp(19px, 5vw, 28px)/1.2 var(--font-display); color: var(--ink); max-width: 46ch; margin: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.hero .sub { max-width: 36ch; margin: 0; font-size: 20px; text-shadow: 0 1px 0 rgba(0, 0, 0, .7); }
.hero .dl-set { margin-top: 6px; }
@media (min-width: 760px) {
  .hero h1 { font-size: clamp(76px, 8.6vw, 132px); white-space: nowrap; }
  .hero-copy { padding-top: 92px; gap: 14px; }
  .hero .sub { max-width: 64ch; font-size: 22px; }
}
.cue { position: absolute; z-index: 5; left: 50%; bottom: 12px; margin-left: -22px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); animation: cue 2.2s ease-in-out infinite; }
.cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(6px); opacity: 1; } }

/* ---- the bell */
.bell { position: relative; overflow: hidden; padding: 110px 0 120px; background: var(--bg); }
.bell h2 { margin-bottom: 34px; }
.bell-lines { font-size: clamp(25px, 5.4vw, 36px); max-width: 15em; }
.bell-line { font: 500 1em/1.28 var(--font-body); margin: 0 0 1em; color: var(--ink); }
.js .bell-line { opacity: .28; transition: opacity .9s ease; }
.js .bell-line.seen { opacity: .72; }
.js .bell-line.now { opacity: 1; }
.bell-fig { position: absolute; right: -12%; top: 0; width: 280px; height: 560px; opacity: .2; }
.bell-fig::before { content: ''; position: absolute; left: 50%; top: -20px; width: 8px; height: 190px; margin-left: -4px; background: repeating-linear-gradient(#8b7a5e 0 8px, #3b3326 8px 14px); }
.bell-fig .an { --s: 5; position: absolute; left: 50%; top: 160px; margin-left: -115px; transform-origin: 50% 0; filter: drop-shadow(0 0 30px rgba(255, 150, 60, .4)); animation: strip var(--d) steps(var(--f)) infinite, toll 9s ease-in-out infinite; }
.ring { position: absolute; left: 50%; top: 330px; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 4px solid var(--accent); border-radius: 50%; opacity: 0; animation: ringout 9s ease-out infinite; }
.ring.r2 { animation-delay: .6s; } .ring.r3 { animation-delay: 1.2s; }
@keyframes ringout { 0% { transform: scale(.3); opacity: 0; } 3% { opacity: .7; } 40% { transform: scale(6); opacity: 0; } 100% { transform: scale(6); opacity: 0; } }
@keyframes toll { 0%, 100% { rotate: 0deg; } 1% { rotate: 6deg; } 3% { rotate: -5deg; } 5% { rotate: 4deg; } 7% { rotate: -2.5deg; } 10% { rotate: 1deg; } 14% { rotate: 0deg; } }
@media (min-width: 900px) { .bell { padding: 160px 0 170px; } .bell-fig { right: 7%; width: 360px; height: 700px; opacity: 1; } .bell-fig .an { --s: 7; margin-left: -161px; top: 200px; } .ring { top: 420px; } .bell-fig::before { height: 240px; } .bell-lines { font-size: 40px; } }

/* ---- the descent */
.descent { padding: 90px 0 40px; background: linear-gradient(#15111b, #0b0810); text-align: center; }
.descent .sub { margin-inline: auto; }
.act { --fh: 128px; --fu: 3; --wu: 4; position: relative; overflow: hidden; padding: 64px 0 0; }
@media (min-width: 900px) { .act { --fh: 168px; --fu: 4; --wu: 5; padding-top: 90px; } }
.act-wall { position: absolute; inset: 0 0 calc(var(--fh) - 6px) 0; background: var(--wall) 50% 0 / calc(64px * var(--wu)) calc(32px * var(--wu)); image-rendering: pixelated; }
.act-wall::before { content: ''; position: absolute; inset: 0; background: var(--tint); mix-blend-mode: color; opacity: .6; }
.act-wall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(6, 4, 10, .9), rgba(6, 4, 10, .62) 55%, rgba(6, 4, 10, .84)); }
.act-floor { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fh); background: var(--floor) 50% 0 / calc(64px * var(--fu)) calc(64px * var(--fu)); image-rendering: pixelated; }
.act-floor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(5, 3, 9, .85), rgba(5, 3, 9, .3) 55%, rgba(5, 3, 9, .5)); }
.act-in { position: relative; z-index: 5; display: grid; gap: 22px; justify-items: start; align-items: end; padding-bottom: 0; }
.act-text { display: grid; gap: 14px; justify-items: start; max-width: 520px; padding-bottom: 20px; }
.act h3 { font-size: clamp(38px, 8.4vw, 68px); line-height: 1; color: #f6ecd8; text-shadow: 0 3px 0 rgba(0, 0, 0, .6), 0 0 30px color-mix(in srgb, var(--tint) 80%, transparent); }
.act .mood { font-size: 22px; color: var(--ink); margin: 0; text-shadow: 0 1px 0 rgba(0, 0, 0, .8); }
.act .lore { font-size: 22px; color: #e6cf94; margin: 0; text-shadow: 0 1px 0 rgba(0, 0, 0, .8); }
.guardian { display: grid; gap: 0; margin: 8px 0 0; }
.guardian span { color: var(--muted); font-size: 19px; }
.guardian a { font: 400 clamp(26px, 5vw, 34px)/1.1 var(--font-display); color: var(--ink); text-decoration: none; text-shadow: 0 2px 0 rgba(0, 0, 0, .7); }
.guardian a:hover { color: var(--accent); text-decoration: underline; }
.phases-l { width: 100%; max-width: 380px; display: grid; gap: 10px; }
.hpb { position: relative; height: 12px; background: #2a2230; box-shadow: -2px 0 0 var(--line-2), 2px 0 0 var(--line-2), 0 -2px 0 var(--line-2), 0 2px 0 var(--line-2); margin: 2px; }
.hpb i { position: absolute; inset: 0; background: #c8434d; }
.hpb b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: var(--ink); }
.phases-l ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 21px; }
.phases-l li { display: flex; gap: 12px; align-items: baseline; text-shadow: 0 1px 0 rgba(0, 0, 0, .8); }
.phases-l .pct { color: var(--accent); min-width: 2.4em; font-variant-numeric: tabular-nums; }
.boss-fig { --bs: var(--s1); position: relative; justify-self: center; margin-bottom: -26px; }
.boss-fig .an { --s: var(--bs); display: block; }
.boss-fig .f2 { position: absolute; left: 0; top: 0; opacity: 0; }
.boss-fig.two.lit .f1 { animation: strip var(--d) steps(var(--f)) infinite, f1 10s ease-in-out infinite; }
.boss-fig.two.lit .f2 { animation: strip var(--d) steps(var(--f)) infinite, f2 10s ease-in-out infinite; }
@keyframes f1 { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes f2 { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
.js .boss-fig { filter: brightness(0) drop-shadow(0 0 10px rgba(255, 255, 255, .06)); transition: filter 1.8s ease; }
.js .boss-fig.lit { filter: brightness(1) drop-shadow(0 0 34px color-mix(in srgb, var(--tint) 75%, #ffd9a0)); }
@media (min-width: 900px) {
  .act-in { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; }
  .act-in.right { grid-template-columns: auto minmax(0, 1fr); }
  .act-in.right .act-text { order: 2; justify-self: end; }
  .boss-fig { --bs: var(--s2); justify-self: end; margin-bottom: -34px; }
  .act-in.right .boss-fig { justify-self: start; }
  .act-text { padding-bottom: 56px; }
}
.mons { position: relative; z-index: 5; height: var(--fh); display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 14px; gap: 6px; }
.mon { display: block; text-decoration: none; }
.mon .an { --s: 2; }
.mon:nth-child(n+6) { display: none; }
@media (min-width: 640px) { .mon:nth-child(n+6) { display: block; } }
@media (min-width: 900px) { .mon .an { --s: 3; } .mons { padding-bottom: 22px; } }
.mon { animation: pace 14s ease-in-out infinite alternate; }
.mon:nth-child(2n) { animation-duration: 18s; animation-delay: -7s; }
.mon:nth-child(3n) { animation-duration: 21s; animation-delay: -3s; }
@keyframes pace { from { transform: translateX(-14px); } to { transform: translateX(22px); } }

/* ---- body parts */
.bodysec { position: relative; }
.bs-pin { position: relative; padding: 90px 0 70px; overflow: hidden; }
.bs-bg { position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 55%, rgba(255, 150, 60, .2), transparent 72%), url(/img/w/crypt.png) 50% 0 / 256px 128px; image-rendering: pixelated; }
.bs-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(6, 4, 10, .9), rgba(6, 4, 10, .78) 40%, rgba(6, 4, 10, .95)); }
.bs-grid { display: grid; gap: 22px; align-items: center; }
.bs-fig { --fs: 5; position: relative; justify-self: center; width: calc(50 * var(--fs) * 1px); height: calc(47 * var(--fs) * 1px); margin-bottom: calc(10 * var(--fs) * 1px); }
.bs-fig .halo { position: absolute; left: 50%; top: 40%; width: calc(120 * var(--fs) * 1px); height: calc(120 * var(--fs) * 1px); margin: calc(-60 * var(--fs) * 1px) 0 0 calc(-60 * var(--fs) * 1px); border-radius: 50%; background: radial-gradient(circle, rgba(255, 170, 70, .34), transparent 62%); animation: flick 3.4s ease-in-out infinite alternate; }
.bs-fig .circle { --s: var(--fs); position: absolute; left: 50%; top: auto; bottom: calc(-12 * var(--fs) * 1px); margin-left: calc(-33 * var(--fs) * 1px); opacity: .9; }
.fig { position: absolute; inset: 0; opacity: 0; }
.fig:last-child { opacity: 1; }
.fig .an { --s: var(--fs); }
.js-steps .fig { opacity: 0; transition: opacity .3s ease; }
.js-steps .fig.on { opacity: 1; }
.bs-text { display: grid; gap: 14px; justify-items: start; }
.picks { display: flex; flex-wrap: wrap; gap: 4px; }
.pick { background: rgba(12, 8, 16, .55); color: var(--ink); }
.pick .ic { --s: 2; }
.pick.on, .pick[aria-current='true'] { box-shadow: -3px 0 0 var(--accent), 3px 0 0 var(--accent), 0 -3px 0 var(--accent), 0 3px 0 var(--accent); background: var(--bg-3); }
.bs-info { display: grid; width: 100%; max-width: 520px; }
.it { display: grid; gap: 4px; align-content: start; margin-bottom: 16px; }
.it b { font: 400 clamp(26px, 5vw, 36px)/1.1 var(--font-display); color: var(--ink); }
.it .slot { color: var(--accent); font-size: 19px; }
.it p { margin: 0; font-size: 22px; color: var(--ink-2); }
.js-steps .it { grid-area: 1 / 1; margin: 0; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.js-steps .it.on { opacity: 1; pointer-events: auto; }
.js-steps .it .slot:empty { display: none; }
.sticky-on .bs-pin { position: sticky; top: 0; height: 100svh; min-height: 560px; padding: 70px 0 24px; display: grid; align-items: center; }
@media (min-width: 900px) {
  .bs-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .bs-fig { --fs: 8; }
  .bs-pin { padding: 120px 0; }
  .sticky-on .bs-pin { padding: 80px 0 30px; }
}
@media (max-height: 760px) and (max-width: 899px) { .bs-fig { --fs: 4; } .bs-text .sub { display: none; } }

/* ---- weapons */
.arms { padding: 100px 0 90px; background: var(--bg); overflow: hidden; }
.forge { position: relative; margin-top: 30px; padding: 26px 8px 18px; background: radial-gradient(ellipse 70% 70% at 50% 60%, #3a2214, #15111b 75%); box-shadow: -4px 0 0 var(--line-2), 4px 0 0 var(--line-2), 0 -4px 0 var(--line-2), 0 4px 0 var(--line-2); margin-inline: 4px; }
.evrs { display: grid; min-height: 330px; }
.evr { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; align-items: center; justify-items: center; gap: 18px 6px; visibility: hidden; align-content: center; }
.evr.on { visibility: visible; }
.rz { display: grid; justify-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 400 19px/1.15 var(--font-display); text-align: center; max-width: 150px; position: relative; }
.rz:hover span { text-decoration: underline; }
.rz .ic { --s: 3 !important; }
.evr .op { font: 400 38px/1 var(--font-display); color: var(--muted); }
.evr .op.eq { display: none; }
.rz.res { grid-column: 1 / -1; grid-row: 2; max-width: 220px; }
.rz.res .ic { --s: 5 !important; filter: drop-shadow(0 0 16px rgba(255, 170, 70, .6)); }
.flash { position: absolute; left: 50%; top: 40%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 170, .9), rgba(255, 150, 60, .35) 40%, transparent 70%); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.evr.on .rz.l { animation: inl 1.1s cubic-bezier(.65, 0, .35, 1) both; }
.evr.on .rz.r { animation: inr 1.1s cubic-bezier(.65, 0, .35, 1) both; }
.evr.on .rz.res { animation: pop .7s 1.05s cubic-bezier(.2, .9, .3, 1.2) both; }
.evr.on .flash { animation: flash .9s 1.05s ease-out both; }
.evr.on .op { animation: fadein .4s .1s both; }
@keyframes inl { from { transform: translateX(-70px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes inr { from { transform: translateX(70px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(.2); opacity: 0; filter: brightness(4); } 55% { transform: scale(1.16); opacity: 1; filter: brightness(1.8); } 100% { transform: none; opacity: 1; filter: none; } }
@keyframes flash { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.forge .picks { justify-content: center; margin-top: 6px; }
.forge .pick { color: var(--ink); }
@media (min-width: 700px) {
  .evrs { min-height: 280px; }
  .evr { grid-template-columns: auto auto auto auto auto; grid-template-rows: auto; gap: 16px; justify-content: center; }
  .evr .op.eq { display: block; }
  .rz.res { grid-column: auto; grid-row: auto; max-width: 200px; }
  .rz .ic { --s: 4 !important; }
  .rz.res .ic { --s: 6 !important; }
}
.marquee { display: grid; gap: 10px; margin-top: 44px; overflow: hidden; }
.mq { overflow: hidden; }
.mq-track { display: flex; width: max-content; animation: mq 80s linear infinite; }
.mq.b .mq-track { animation-direction: reverse; animation-duration: 95s; }
.mq a { flex: none; display: grid; place-items: center; width: 64px; height: 64px; margin-right: 8px; background: var(--bg-2); box-shadow: -3px 0 0 var(--line), 3px 0 0 var(--line), 0 -3px 0 var(--line), 0 3px 0 var(--line); text-decoration: none; }
.mq a:hover { background: var(--bg-3); }
@keyframes mq { to { transform: translateX(-50%); } }
@media (hover: hover) { .mq:hover .mq-track { animation-play-state: paused; } }
.arms-more { margin: 30px 0 0; }

/* ---- heroes */
.heroes { padding: 100px 0 90px; background: radial-gradient(70% 60% at 50% 70%, #241829, #0b0810 75%); overflow: hidden; }
.gallery { --pw: min(76vw, 330px); position: relative; margin-top: 26px; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px calc(50% - var(--pw) / 2) 84px; }
.track.smooth { scroll-behavior: smooth; }
.track::-webkit-scrollbar { display: none; }
.hp { position: relative; flex: none; width: var(--pw); scroll-snap-align: center; padding: 8px 14px 18px; text-align: center; display: grid; gap: 8px; justify-items: center; align-content: start; }
.hp::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 74%; background: radial-gradient(ellipse 60% 60% at 50% 46%, rgba(255, 190, 100, .3), transparent 72%); opacity: 0; transition: opacity .6s; pointer-events: none; }
.hp.lit::before { opacity: 1; }
.js .hp { filter: brightness(.36) saturate(.6); transition: filter .6s; }
.js .hp.lit { filter: none; }
.hp-fig { position: relative; display: grid; align-items: end; justify-items: center; height: calc(47 * 5 * 1px + 20px); }
.hp-fig .an { --s: 5; }
.hp-fig::after { content: ''; position: absolute; left: 14%; right: 14%; bottom: 4px; height: 14px; background: radial-gradient(ellipse, rgba(0, 0, 0, .7), transparent 70%); z-index: -1; }
.hp h3 { font-size: 30px; }
.hp h3 a { color: var(--ink); text-decoration: none; }
.hp h3 a:hover { color: var(--accent); text-decoration: underline; }
.hp .trait { margin: 0; color: var(--ink); font-size: 21px; }
.hp .hook { margin: 0; color: var(--ink-2); font-size: 20px; }
.hp .wpn { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 20px; }
.hp .wpn .ic { --s: 2; }
.g-prev, .g-next { position: absolute; bottom: 12px; background: rgba(12, 8, 16, .7); color: var(--ink); z-index: 6; }
.g-prev { left: calc(50% - 56px); } .g-next { left: calc(50% + 8px); }
@media (min-width: 900px) { .gallery { --pw: 340px; } .hp-fig { height: calc(47 * 6 * 1px + 20px); } .hp-fig .an { --s: 6; } }

/* ---- the world */
.world { padding: 100px 0 90px; background: var(--bg); }
.strata { margin-top: 40px; }
.stratum { position: relative; overflow: hidden; padding: 56px 0; color: var(--st-ink, #f1e7d2); }
.stratum h3 { font-size: clamp(30px, 6vw, 46px); margin-bottom: 8px; }
.stratum p { margin: 0; font-size: 23px; max-width: 34ch; }
.st-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.stratum.right .st-text { order: 2; justify-self: end; text-align: right; }
.stratum.right .st-in { grid-template-columns: auto minmax(0, 1fr); }
.st-fig .an { --s: 2; filter: brightness(var(--fb, .5)); opacity: .85; }
@media (min-width: 700px) { .st-fig .an { --s: 4; } .stratum { padding: 72px 0; } }
.s-vault { background: linear-gradient(#f6e7b4, #d8b75e); --st-ink: #2b2118; --fb: .1; }
.s-world { background: linear-gradient(#5a4128, #3a2a1c); --fb: .55; }
.s-abyss { background: linear-gradient(#4d1616, #2b0c10); --fb: .8; }
.s-deep { background: linear-gradient(#150f33, #07050f); --fb: .7; }
.fh { margin: 70px 0 6px; font-size: clamp(28px, 5vw, 40px); }
.factions { overflow-x: auto; padding: 0 16px 22px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.banners { position: relative; list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 20px; width: max-content; }
.banners::before { content: ''; position: absolute; left: -10px; right: -10px; top: 0; height: 8px; background: #4b4033; box-shadow: 0 3px 0 #2c251d; }
.banner { flex: none; width: 176px; position: relative; padding-top: 44px; scroll-snap-align: center; }
.chain { position: absolute; top: 6px; left: 50%; width: 6px; height: 40px; margin-left: -3px; background: repeating-linear-gradient(#8b7a5e 0 6px, #3b3326 6px 10px); }
.cloth { position: relative; height: 230px; clip-path: var(--clip); display: grid; place-items: center; background: linear-gradient(90deg, rgba(0, 0, 0, .4), transparent 28%, transparent 72%, rgba(0, 0, 0, .4)), color-mix(in srgb, var(--hue) 52%, #150e12); }
.cloth::before { content: ''; position: absolute; left: 10px; right: 10px; top: 10px; height: 3px; background: color-mix(in srgb, var(--hue) 80%, #fff); opacity: .55; }
.emblem { margin-top: -26px; }
.banner h4 { margin: 14px 0 6px; font-size: 24px; color: var(--ink); }
.banner p { margin: 0; font-size: 20px; color: var(--ink-2); line-height: 1.3; }
@media (min-width: 1280px) { .factions { overflow: visible; } .banners { width: auto; justify-content: center; } }

/* ---- last screen */
.finale { --u: 4; position: relative; overflow: hidden; min-height: calc(500px + 69 * var(--u) * 1px); padding: 100px 0 40px; text-align: center; border-top: 3px solid var(--line); }
@media (min-width: 480px) and (min-height: 700px) { .finale { --u: 5; } }
@media (min-width: 900px) and (min-height: 760px) { .finale { --u: 6; } }
@media (min-width: 1500px) and (min-height: 960px) { .finale { --u: 7; } }
.finale-wall { position: absolute; inset: 0; background: url(/img/w/crypt.png) 50% 100% / calc(64px * var(--u)) calc(32px * var(--u)); image-rendering: pixelated; filter: brightness(.24); }
.finale::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(8, 5, 12, .92) 0, rgba(8, 5, 12, .55) 40%, rgba(8, 5, 12, 0) 66%); }
.finale::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 62%, transparent 55%, rgba(5, 3, 9, .8)); }
.finale .mask { background: radial-gradient(circle at calc(139px * var(--u)) calc(104px * var(--u)), rgba(5, 3, 9, 0) 0, rgba(5, 3, 9, .35) calc(22px * var(--u)), rgba(5, 3, 9, .9) calc(78px * var(--u))); }
.fin-in { position: relative; z-index: 5; display: grid; justify-items: center; gap: 16px; }
.fin-in .sub { margin: 0; }
.fin-in h2 { text-shadow: 0 3px 0 #4a1c0a, 0 0 36px rgba(255, 140, 50, .3); }
.fin-in .btn:not(.fill) { margin-top: 4px; }
.landing .foot { margin-top: 0; }

/* ---- motion */
@media (prefers-reduced-motion: reduce) {
  .scene .an.bob, .scene .an.drift, .glow, .cue, .ring, .mon, .mq-track, .bs-fig .halo, .bell-fig .an { animation: none !important; }
  .scene .an.bob, .scene .an.drift { animation: none !important; }
  .evr.on .rz, .evr.on .op, .evr.on .flash { animation: none !important; }
  .evr.on .flash { opacity: 0; }
  .js .bell-line, .js .bell-line.seen { opacity: 1; transition: none; }
  .js .boss-fig { filter: none; transition: none; }
  .boss-fig.two.lit .f2 { animation: none; opacity: 0; }
  .track { scroll-behavior: auto; }
  .mq-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .mq-track a[aria-hidden='true'] { display: none; }
}
html[data-theme='light'] .hero-wall { filter: brightness(.24); }


/* floor bands, also used on the guide pages */
.floors { display: grid; gap: 0; margin-top: 22px; }
.floor { display: grid; grid-template-columns: 1fr; align-items: end; min-height: 170px; padding: 18px 16px; text-decoration: none; color: var(--ink); border-bottom: 3px solid var(--bg); }
.floor .an { --s: 2; justify-self: end; align-self: end; }
.floor h3 { font-size: 26px; text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); color: #f6ecd8; }
.floor p { margin: 4px 0 0; color: #eadfc8; text-shadow: 1px 1px 0 rgba(0, 0, 0, .6); max-width: 36ch; }
.floor .row { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.floor:hover h3 { text-decoration: underline; }
@media (min-width: 900px) { .floor { min-height: 150px; padding: 20px 28px; } .floors .floor:nth-child(odd) { padding-left: 8%; } .floors .floor:nth-child(even) { padding-left: 16%; } .floor .an { --s: 3; } }

/* boss, biome pages */
.moves { display: grid; gap: 22px 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: end; }
.move { display: grid; justify-items: center; gap: 6px; font-size: 18px; color: var(--ink-2); text-align: center; }
.move .an { --s: 2; }
.phases { display: grid; gap: 14px; }
.phase { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 14px; align-items: start; }
.phase .n { font: 400 30px/1 var(--font-display); color: var(--accent); }
.phase b { display: block; font: 400 20px/1.2 var(--font-display); }
.atk { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.atk b { font: 400 20px/1.2 var(--font-display); color: var(--ink); }
.atk p { margin: 0; color: var(--ink-2); max-width: 66ch; }
.tips { margin: 0; padding-left: 1.2em; }
.tips li { margin-bottom: .5em; }
.tips li::marker { color: var(--accent); }
.hpbar { height: 14px; background: var(--bg-3); position: relative; margin: 10px 3px 0; box-shadow: -2px 0 0 var(--line-2), 2px 0 0 var(--line-2), 0 -2px 0 var(--line-2), 0 2px 0 var(--line-2); }
.hpbar i { position: absolute; top: 0; bottom: 0; background: var(--blood); }
.hpbar b { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ink); }
.two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 48px; } }
.biome-hero { padding: 26px 0; margin-top: 18px; }
.swatch { display: inline-block; width: 22px; height: 22px; vertical-align: -4px; margin-right: 6px; box-shadow: 0 0 0 2px var(--line-2); }
.hearts { display: inline-flex; gap: 2px; vertical-align: -4px; }
audio { width: 100%; margin-top: 8px; }
.err { text-align: center; padding: 60px 0; display: grid; gap: 18px; justify-items: center; }
@media print { .top, .foot, .tabs, .filters { display: none; } body { background: #fff; color: #000; } }
#sound .snd-on { display: none; } #sound[aria-pressed='true'] .snd-on { display: block; } #sound[aria-pressed='true'] .snd-off { display: none; }

.item-head h1 { overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 430px) { .item-head h1 { font-size: 27px; } }
.item-head.wide { grid-template-columns: minmax(0, 1fr); }
.item-head.wide .niche { justify-self: start; }
@media (min-width: 700px) { .item-head.wide { grid-template-columns: auto minmax(0, 1fr); } }
@media (min-width: 600px) { th:first-child { min-width: 6.5em; } }

.irow .txt { display: grid; gap: 2px; align-content: center; min-width: 0; }
.irow .txt > span:not(.nm) { display: block; }

/* ---- trailer: a phone-shaped frame; the play button fades out as the video takes over */
.trailer { position: relative; padding: 90px 0 100px; background: var(--bg-2); }
.tr-in { display: flex; flex-direction: column; align-items: center; }
.tr-in h2 { margin-bottom: 28px; }
.tr-frame { position: relative; width: min(100%, 420px, calc((100svh - 140px) * 9 / 16)); aspect-ratio: 9 / 16; background: #07050a;
  box-shadow: -4px 0 0 var(--line-2), 4px 0 0 var(--line-2), 0 -4px 0 var(--line-2), 0 4px 0 var(--line-2), 0 24px 60px rgba(0, 0, 0, .55); }
.tr-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #07050a; }
/* full screen shows the whole vertical frame (cover would crop a 9:16 video to a strip on a wide or rotated screen) */
.tr-video:fullscreen { object-fit: contain; width: 100%; height: 100%; background: #000; }
.tr-video:-webkit-full-screen { object-fit: contain; width: 100%; height: 100%; background: #000; }
.tr-play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: -4px 0 0 var(--accent), 4px 0 0 var(--accent), 0 -4px 0 var(--accent), 0 4px 0 var(--accent), 0 0 44px rgba(240, 195, 90, .45);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.4), opacity .35s ease, filter .2s ease; }
.tr-play svg { width: 44px; height: 44px; fill: currentColor; stroke: none; margin-left: 6px; }
.tr-play:hover { transform: scale(1.08); filter: brightness(1.1); }
.tr-play:active { transform: scale(.94); }
.tr-frame.on .tr-play { opacity: 0; transform: scale(1.5); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tr-play { transition: opacity .2s; } .tr-frame.on .tr-play { transform: none; } }
