/* =========================================================
   $PLAT · Platinum Token
   ========================================================= */

@font-face {
  font-family: "RuneScape Bold 12";
  src: url("../assets/fonts/RuneScape-Bold-12.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "RuneScape Plain 12";
  src: url("../assets/fonts/RuneScape-Plain-12.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --ink-2: #111114;
  --line: #232327;
  --text: #e8ecee;
  --mute: #98a0a5;

  --plat-hi: #f6f9fa;
  --plat: #cdd5d7;
  --plat-mid: #a6b0b0;

  --stone-hi: #6b5c43;
  --stone-lo: #15110c;

  --paper-ink: #2b1d0e;

  --rs-yellow: #ffff00;
  --rs-orange: #ff981f;
  --rs-item: #ff9040;
  --rs-green: #00ff80;
  --rs-cyan: #00ffff;
  --rs-red: #ff3030;
  --rs-darkred: #7f0000;
  --rs-navy: #000080;

  /* The RuneScape fonts are pixel perfect at multiples of 16px */
  --rs-b: "RuneScape Bold 12", "Jersey 15", monospace;
  --rs-p: "RuneScape Plain 12", "Jersey 15", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --max: 1180px;
  --gutter: clamp(16px, 5vw, 64px);
  --px-shadow: .0625em .0625em 0 #000; /* one font pixel */

  --noise-stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .08 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .3 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --parchment: radial-gradient(130% 100% at 50% 35%, #f6eedb 0%, #ebe0c3 55%, #dbc9a0 100%);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main, footer { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
code {
  font-family: var(--mono);
  font-size: .86em;
  color: #e8ecee;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--rs-yellow); outline-offset: 3px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 300;
  background: var(--rs-yellow); color: #000; padding: 8px 12px; font-weight: 600;
}
.skip:focus { left: 8px; }

.o { color: var(--rs-item); }
.y { color: var(--rs-yellow); }

.plat-text {
  background: linear-gradient(180deg, #ffffff 8%, #e3e9eb 44%, #a7b1b5 60%, #dde3e5 82%, #ffffff 100%);
  background-size: 100% 1em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(.0625em .0625em 0 #000);
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--rs-b);
  font-size: 24px;
  line-height: 1;
  color: var(--rs-orange);
  text-shadow: var(--px-shadow);
  margin: 0 0 16px;
}
.h2 {
  font-family: var(--rs-b);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  color: var(--plat-hi);
  text-shadow: var(--px-shadow);
  margin: 0 0 18px;
}
.sub { font-size: 18px; line-height: 1.6; color: #b3bbbf; margin: 0; }
.sub a { color: var(--plat-hi); }
.big { font-size: 22px; line-height: 1.5; color: #dfe4e6; max-width: 580px; margin: 0 0 34px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 18px;
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  border-radius: 3px;
  text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: filter .15s ease, transform .06s ease, box-shadow .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lg { min-height: 58px; padding: 0 26px; font-size: 32px; }
.btn-lg svg { width: 22px; height: 22px; }
.btn-sm { min-height: 38px; padding: 0 12px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-icon { width: 46px; padding: 0; }

.btn-plat {
  color: #0d1012;
  background: linear-gradient(180deg, #ffffff 0%, #e5eaec 42%, #b1bbbf 100%);
  border: 2px solid #20262a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(40, 50, 55, .22), 0 3px 0 #000, 0 0 26px rgba(210, 225, 232, .14);
}
.btn-plat:hover { filter: brightness(1.06); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(40, 50, 55, .22), 0 3px 0 #000, 0 0 34px rgba(210, 225, 232, .34); }
.btn-plat:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(40, 50, 55, .22), 0 1px 0 #000; }

.btn-stone {
  color: var(--rs-orange);
  text-shadow: var(--px-shadow);
  background: var(--noise-stone), linear-gradient(180deg, #56493a, #3a3127);
  border: 2px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px #77674c, 0 3px 0 #000;
}
.btn-stone:hover { color: var(--rs-yellow); }
.btn-stone:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px #77674c, 0 1px 0 #000; }
.btn-stone svg { filter: drop-shadow(1px 1px 0 #000); }

.btn .soon {
  font-family: var(--rs-p); font-size: 16px; line-height: 1;
  color: #fff; text-shadow: 1px 1px 0 #000;
  background: #8c1111; border: 1px solid #000;
  padding: 3px 5px 2px; border-radius: 2px;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: #000;
  transition: opacity .35s ease, visibility .35s ease;
  animation: loader-failsafe .01s linear 5s forwards;
}
html:not(.js) .loader, html.no-loader .loader { display: none; }
.loader.done { opacity: 0; visibility: hidden; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader-box { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px; }
.loader-token { width: 72px; height: auto; animation: bob 1.6s ease-in-out infinite; }
.loader-title { margin: 0; font-family: var(--rs-b); font-size: 24px; color: #fff; text-align: center; }
.loader-bar {
  position: relative;
  width: min(608px, 86vw); height: 68px;
  border: 2px solid #8c1111; background: #000;
}
.loader-fill { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 0; max-width: calc(100% - 8px); background: #8c1111; }
.loader-text {
  position: relative; z-index: 1;
  display: grid; place-items: center; height: 100%;
  font-family: var(--rs-b); font-size: 24px; color: #fff;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(11, 11, 12, .84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1c1c1f;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rs-b); font-size: 32px; line-height: 1;
  color: var(--plat-hi); text-shadow: var(--px-shadow);
  text-decoration: none;
}
.brand img { width: 34px; height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: var(--rs-orange); text-shadow: var(--px-shadow);
  text-decoration: none; padding: 6px 0;
}
.nav-links a:hover { color: var(--rs-yellow); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 60px var(--gutter) 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: 32px;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  right: -8%; top: -4%; width: 72%; height: 112%;
  background: radial-gradient(closest-side, rgba(205, 220, 228, .14), rgba(205, 220, 228, 0) 72%);
  pointer-events: none;
}
.hero-title {
  font-family: var(--rs-b); font-weight: 400;
  font-size: 96px; line-height: .92;
  text-transform: uppercase;
  margin: 4px 0 26px;
}
.hero-title.plat-text { background-size: 100% .92em; }
span.plat-text { background-size: 100% 100%; }
.hero-title span { display: block; width: max-content; max-width: 100%; white-space: nowrap; }
.lede { font-size: 19px; line-height: 1.6; color: #c4cbcf; max-width: 530px; margin: 0 0 26px; }

.rate {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 8px 18px 8px 10px; margin: 0 0 28px;
  background: var(--noise-stone), linear-gradient(180deg, #4a3f31, #372e24);
  border: 2px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px var(--stone-hi), 0 3px 0 #000;
  border-radius: 3px;
}
.rate-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rs-b); line-height: 1;
  text-shadow: var(--px-shadow); white-space: nowrap;
}
.rate-plat { font-size: 32px; color: #fff; }
.rate-plat img { width: 52px; height: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .55)); }
.rate-gp { font-size: 24px; color: var(--rs-yellow); }
.rate-gp img { width: 30px; height: auto; filter: drop-shadow(1px 1px 0 #000); }
.rate-eq { font-family: var(--rs-b); font-size: 32px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }

.ca-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; }
.ca-tag {
  font-family: var(--rs-b); font-size: 16px; line-height: 1;
  color: #0b0b0c; background: var(--plat);
  padding: 4px 6px 3px; border-radius: 2px;
}
.ca-value { font-family: var(--rs-p); font-size: 24px; line-height: 1; color: var(--rs-cyan); text-shadow: var(--px-shadow); }
.ca-line.live .ca-value { font-family: var(--mono); font-size: 13.5px; color: #d6dde0; text-shadow: none; word-break: break-all; }
.ca-copy {
  font-family: var(--rs-b); font-size: 16px; line-height: 1;
  color: var(--rs-orange); text-shadow: 1px 1px 0 #000;
  background: linear-gradient(180deg, #56493a, #3a3127);
  border: 1px solid var(--stone-lo); box-shadow: inset 0 0 0 1px #77674c;
  padding: 5px 8px 4px; border-radius: 2px;
}
.ca-copy:hover { color: var(--rs-yellow); }

.hero-art { position: relative; display: flex; flex-direction: column; align-items: center; }
.pile {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 553 / 503;
  padding: 0; border: 0; background: none;
  animation: bob 6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.pile img {
  width: 100%; height: 100%;
  -webkit-user-drag: none;
  pointer-events: none;
  filter: drop-shadow(0 28px 24px rgba(0, 0, 0, .6)) drop-shadow(0 0 44px rgba(200, 215, 225, .14));
  transition: transform .12s ease;
}
.pile:active img { transform: scale(.97); }
.pile:focus-visible { outline-offset: -6px; }
.pile-shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../assets/token-pile.svg") center / 100% 100% no-repeat;
  mask: url("../assets/token-pile.svg") center / 100% 100% no-repeat;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, 0) 58%) no-repeat;
  background-size: 300% 100%;
  background-position: 150% 0;
  mix-blend-mode: overlay;
  animation: shine 5.5s ease-in-out 1.2s infinite;
}
.pile-stack {
  position: absolute; z-index: 2; top: 4%; left: 3%;
  width: 66px; color: var(--rs-yellow);
  filter: drop-shadow(6px 6px 0 #000);
}
.pile-stack svg { width: 100%; height: auto; shape-rendering: crispEdges; }
.hint { margin: 6px 0 0; font-family: var(--rs-p); font-size: 24px; line-height: 1; color: #858e93; text-shadow: var(--px-shadow); text-align: center; }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}
.float-txt {
  position: absolute; z-index: 3;
  font-family: var(--rs-b); font-size: 32px; line-height: 1;
  color: var(--rs-yellow); text-shadow: var(--px-shadow);
  white-space: nowrap; pointer-events: none;
  animation: float-up 1.1s ease-out forwards;
}

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shine { 0% { background-position: 150% 0; } 45%, 100% { background-position: -50% 0; } }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.8); }
  14% { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -96px); }
}

/* ---------- Ticker ---------- */
.ticker {
  position: relative; overflow: hidden;
  background: var(--noise-stone), linear-gradient(180deg, #3f3629, #2b241c);
  border-block: 2px solid #0f0c09;
  box-shadow: inset 0 1px 0 var(--stone-hi), inset 0 -1px 0 var(--stone-hi);
}
.ticker-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.ticker-set { display: flex; align-items: center; gap: 24px; padding: 14px 12px; }
.ticker-set span {
  font-family: var(--rs-b); font-size: 32px; line-height: 1;
  color: #fff; text-shadow: var(--px-shadow); white-space: nowrap;
}
.ticker-set img { width: 30px; height: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.ticker-set .t-y { color: var(--rs-yellow); }
.ticker-set .t-g { color: var(--rs-green); }
.ticker-set .t-c { color: var(--rs-cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 112px 0; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section-head { margin-bottom: 44px; }
.section-head .sub { max-width: 700px; }

/* ---------- Inventory slots ---------- */
.slot {
  position: relative; flex: none;
  width: 76px; height: 68px;
  display: grid; place-items: center;
  background: var(--noise-stone), linear-gradient(180deg, #3c342a, #2c261e);
  border: 1px solid #0f0c09;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 3px 8px rgba(0, 0, 0, .45);
  border-radius: 2px;
}
.slot img { width: 58%; height: auto; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .75)); }
.slot-plat img { width: 70%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.slot-glow::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  box-shadow: 0 0 20px rgba(220, 235, 245, .32), inset 0 0 14px rgba(220, 235, 245, .18);
}
.stack {
  position: absolute; top: 3px; left: 5px; z-index: 1;
  font-family: var(--rs-p); font-size: 24px; line-height: 1;
  text-shadow: var(--px-shadow); pointer-events: none;
}
.stack.y { color: var(--rs-yellow); }
.stack.w { color: #fff; }
.stack.g { color: var(--rs-green); }
.stack.r { color: var(--rs-red); }
.stack.inf { width: 33px; top: 7px; left: 7px; color: var(--rs-yellow); filter: drop-shadow(3px 3px 0 #000); }
.stack.inf svg { width: 100%; height: auto; shape-rendering: crispEdges; }
.stamp {
  position: absolute; right: -10px; bottom: -9px; z-index: 2;
  font-family: var(--rs-b); font-size: 16px; line-height: 1;
  color: #fff; text-shadow: 1px 1px 0 #000; text-transform: uppercase;
  background: #b3120b; border: 2px solid #1a0402;
  padding: 3px 5px 2px;
  transform: rotate(-9deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
.slot-no::after {
  content: ""; position: absolute; inset: 11px 15px; pointer-events: none;
  border: 4px solid #d8140c; border-radius: 50%;
  background: linear-gradient(45deg, transparent calc(50% - 2px), #d8140c calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px));
  filter: drop-shadow(1px 1px 0 #000);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
.facts { display: grid; gap: 14px; }
.fact {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 20px 16px 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.fact h3 {
  font-family: var(--rs-b); font-weight: 400; font-size: 32px; line-height: 1.05;
  color: #fff; text-shadow: var(--px-shadow);
  margin: 0 0 6px;
}
.fact p { margin: 0; color: #a8b0b4; font-size: 16px; line-height: 1.55; }
.fact-plat {
  border-color: #58636a;
  background: linear-gradient(90deg, rgba(205, 218, 225, .12), rgba(205, 218, 225, .02) 70%), var(--ink-2);
  box-shadow: 0 0 30px rgba(205, 218, 225, .06);
}
.fact-plat .slot { width: 92px; height: 82px; }

.infobox {
  position: sticky; top: 96px;
  background: #e2dbc8; color: #2a2419;
  border: 1px solid #94866d; border-radius: 3px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
  font-size: 15px; line-height: 1.4;
  overflow: hidden;
}
.ib-head {
  padding: 9px 12px;
  background: #c0a886; border-bottom: 1px solid #94866d;
  text-align: center; font-weight: 700; font-size: 18px;
}
.ib-img {
  display: grid; place-items: center;
  padding: 20px;
  background: radial-gradient(closest-side, #f4efe2, #d8ccb4);
  border-bottom: 1px solid #94866d;
}
.ib-img img { width: 124px; height: auto; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .28)); }
.ib-rows { margin: 0; }
.ib-rows > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); border-bottom: 1px solid #c2b598; }
.ib-rows dt { padding: 7px 10px; background: #d4c7aa; font-weight: 700; }
.ib-rows dd { margin: 0; padding: 7px 10px; overflow-wrap: anywhere; }
.ib-rows dd.mono { font-family: var(--mono); font-size: 12px; }
.ib-examine { padding: 10px 12px 12px; font-style: italic; }
.ib-examine span { display: block; font-style: normal; font-weight: 700; }

/* ---------- World map / trail ---------- */
.trail-section { padding-bottom: 120px; }
.worldmap {
  max-width: calc(var(--max) + 20px);
  margin: 0 auto;
  padding: 0 10px 10px;
  background: var(--noise-stone), linear-gradient(180deg, #4a3f31, #3a3126);
  border: 2px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px var(--stone-hi), 0 30px 60px rgba(0, 0, 0, .55);
  border-radius: 4px;
}
.wm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 50px; padding: 0 4px; }
.wm-title { font-family: var(--rs-b); font-size: 24px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); }
.wm-select {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rs-p); font-size: 24px; line-height: 1;
  color: #fff; text-shadow: var(--px-shadow);
  background: #2a231b; border: 1px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px #5a4d39;
  padding: 6px 10px 5px 12px;
}
.wm-select::after {
  content: ""; width: 0; height: 0;
  border: 6px solid transparent; border-top-color: var(--rs-orange);
  transform: translateY(3px);
}

.trail {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 230px 3% 100px;
  background: #4b5e2c;
  border: 2px solid var(--stone-lo);
}
.trail::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--noise-map);
  opacity: .6;
}
.trail::after {
  content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55);
}
.map-svg, .map-lit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.map-svg { z-index: 0; }
.map-lit { z-index: 1; will-change: transform; }
.map-svg text { font-family: var(--rs-b); }

.cartouche {
  position: absolute; z-index: 3; top: 34px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 36px 12px;
  background: var(--noise-paper), linear-gradient(180deg, #f3ead2, #dccb9f);
  border: 2px solid #3d2f1a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5), inset 0 0 0 4px rgba(61, 47, 26, .14);
}
.c-title { font-family: var(--rs-b); font-size: 48px; line-height: 1; color: var(--paper-ink); text-transform: uppercase; letter-spacing: .04em; }
.c-sub { margin-top: 6px; font-family: var(--rs-p); font-size: 16px; line-height: 1; color: var(--rs-darkred); white-space: nowrap; }

.compass { position: absolute; z-index: 3; top: 22px; right: 3%; width: 128px; height: 128px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.compass-n { font-family: var(--rs-b); font-size: 16px; fill: #fff; stroke: #000; stroke-width: 3px; paint-order: stroke; }

.hud-wrap { position: sticky; top: 88px; height: 0; z-index: 9; }
.hud {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px;
  background: rgba(24, 20, 15, .9);
  border: 1px solid #0a0806;
  box-shadow: inset 0 0 0 1px var(--stone-hi), 0 6px 14px rgba(0, 0, 0, .45);
  border-radius: 3px;
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: var(--rs-orange); text-shadow: var(--px-shadow);
}
.hud img { width: 26px; height: auto; }
.hud b { font-weight: 400; color: var(--rs-yellow); }
.hud-bar { position: relative; width: 92px; height: 14px; background: #7a0000; border: 1px solid #000; }
.hud-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(180deg, #2fe02f, #0b8a0b); transition: width .3s ease; }

.stops {
  position: relative; z-index: 2;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 120px;
}
.stop { display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 48px; }
.spot { display: flex; align-items: center; justify-content: center; gap: 22px; }
.stop[data-lane="left"] .spot { grid-column: 1; grid-row: 1; flex-direction: row-reverse; }
.stop[data-lane="left"] .scroll { grid-column: 2; grid-row: 1; justify-self: start; }
.stop[data-lane="right"] .spot { grid-column: 2; grid-row: 1; }
.stop[data-lane="right"] .scroll { grid-column: 1; grid-row: 1; justify-self: end; }

.site { display: flex; flex-direction: column; align-items: center; }
.landmark {
  width: 168px; height: auto; aspect-ratio: 140 / 110;
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.stop.reached .landmark { transform: scale(1.07); }
.place {
  margin-top: 2px;
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: #fff; text-shadow: var(--px-shadow);
  white-space: nowrap;
  transition: color .3s ease;
}
.stop.reached .place { color: var(--rs-yellow); }
.place-new { color: var(--rs-cyan); }

.marker {
  position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  padding-top: 2px;
  font-family: var(--rs-b); font-size: 32px; line-height: 1;
  color: #d5dcdf; text-shadow: var(--px-shadow);
  background: radial-gradient(circle at 35% 30%, #5a6368, #22282b 72%);
  border: 3px solid #0e1011;
  box-shadow: 0 0 0 3px #97a1a5, 0 0 0 5px #0e1011, 0 6px 10px rgba(0, 0, 0, .45);
  transition: background .35s ease, box-shadow .35s ease, color .35s ease;
}
.stop.reached .marker {
  color: #101416; text-shadow: none;
  background: radial-gradient(circle at 35% 30%, #ffffff, #c4cdd1 58%, #879297);
  box-shadow: 0 0 0 3px #f4f7f8, 0 0 0 5px #0e1011, 0 0 28px 8px rgba(225, 238, 246, .55);
}
.marker-x {
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #e0473f, #7d0d09 72%);
  box-shadow: 0 0 0 3px #f1c9c3, 0 0 0 5px #0e1011, 0 6px 10px rgba(0, 0, 0, .45);
}
.stop.reached .marker-x {
  color: #fff; text-shadow: var(--px-shadow);
  background: radial-gradient(circle at 35% 30%, #ff6a5f, #b3120b 70%);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #0e1011, 0 0 30px 10px rgba(255, 210, 120, .55);
}

/* parchment scroll cards */
.scroll, .journal, .qc-scroll {
  position: relative;
  color: var(--paper-ink);
  background: var(--noise-paper), var(--parchment);
  border-left: 3px solid #b39a6b;
  border-right: 3px solid #b39a6b;
  box-shadow: 0 18px 32px rgba(0, 0, 0, .45), inset 0 0 34px rgba(120, 90, 40, .2);
}
.scroll::before, .scroll::after,
.journal::before, .journal::after,
.qc-scroll::before, .qc-scroll::after {
  content: ""; position: absolute; left: -15px; right: -15px; height: 22px;
  border-radius: 11px;
  background: linear-gradient(180deg, #7a633e 0%, #d6c398 22%, #f7efdb 45%, #d5c296 70%, #6c5735 100%);
  border: 2px solid #3d2f1a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .35);
}
.scroll::before, .journal::before, .qc-scroll::before { top: -15px; }
.scroll::after, .journal::after, .qc-scroll::after { bottom: -15px; }

.scroll { width: 100%; max-width: 480px; margin: 16px 0; padding: 32px 32px 28px; }
.scroll p { margin: 0 0 12px; font-size: 17px; line-height: 1.55; color: #3d2c17; }
.scroll p:last-child { margin-bottom: 0; }
.scroll .clue {
  margin-bottom: 16px;
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: var(--rs-darkred);
}
.s-title {
  font-family: var(--rs-b); font-weight: 400;
  font-size: 32px; line-height: 1.05;
  color: #1c1209;
  margin: 0 0 12px;
}
.s-big { font-size: 48px; line-height: 1; }
.s-sm { font-size: 24px; line-height: 1.1; margin: 0; }
.s-gp { color: #8a6400; }
.s-plat {
  background: linear-gradient(180deg, #5d686d 0%, #252c30 55%, #69757a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.scroll .shout {
  font-family: var(--rs-b); font-size: 32px; line-height: 1.05;
  color: #1c1209;
}
.scroll .shout-red { font-size: 48px; line-height: 1; color: #b3120b; }
.scroll .exact { margin: 0; font-size: 15px; color: #5d4628; }
.scroll .exact b { font-family: var(--mono); font-weight: 600; font-size: 14px; color: #1c1209; }

.inv-line { display: flex; align-items: center; gap: 22px; margin: 4px 0 16px; }
.inv-line .s-title { margin-bottom: 4px; }
.convert { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.convert-arrow { width: 40px; height: 30px; color: var(--rs-darkred); shape-rendering: crispEdges; }
.classes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.class-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.class-plat .slot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 0 16px rgba(120, 140, 150, .45); }

/* the last stop */
.stop-final { grid-template-columns: 1fr; justify-items: center; row-gap: 30px; }
.stop-final .spot { grid-column: 1; grid-row: 1; flex-direction: column; gap: 8px; }
.stop-final .reward { grid-column: 1; grid-row: 2; }
.stop-final .landmark { width: 200px; }
.stop-final .place { font-size: 32px; }

.rs-panel {
  position: relative;
  background: var(--noise-stone), linear-gradient(180deg, #4b4032 0%, #3c3328 55%, #322a20 100%);
  border: 2px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px var(--stone-hi), inset 0 0 0 3px #2a231a, 0 22px 44px rgba(0, 0, 0, .55);
  border-radius: 4px;
}
.rs-panel::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  background:
    radial-gradient(circle at 4px 4px, #9a8763 0 1.6px, #15110c 2.2px, transparent 3px),
    radial-gradient(circle at calc(100% - 4px) 4px, #9a8763 0 1.6px, #15110c 2.2px, transparent 3px),
    radial-gradient(circle at 4px calc(100% - 4px), #9a8763 0 1.6px, #15110c 2.2px, transparent 3px),
    radial-gradient(circle at calc(100% - 4px) calc(100% - 4px), #9a8763 0 1.6px, #15110c 2.2px, transparent 3px);
}

.reward { width: 100%; max-width: 600px; padding: 28px 34px 32px; text-align: center; }
.reward-close, .bank-x {
  display: grid; place-items: center;
  width: 32px; height: 30px; padding: 0;
  color: var(--rs-orange);
  background: linear-gradient(180deg, #5b4e3d, #3a3126);
  border: 1px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px #77674c;
}
.reward-close { position: absolute; top: 12px; right: 12px; }
.reward-close:hover, .bank-x:hover { color: var(--rs-yellow); }
.reward-close svg, .bank-x svg { width: 14px; height: 14px; shape-rendering: crispEdges; filter: drop-shadow(1px 1px 0 #000); }
.reward-kicker { margin: 0 0 12px; font-family: var(--rs-b); font-size: 24px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); }
.reward-title { margin: 0 0 10px; font-family: var(--rs-b); font-weight: 400; font-size: 48px; line-height: 1; color: var(--rs-yellow); text-shadow: var(--px-shadow); }
.reward-sub { margin: 0; color: #d9d2c2; font-size: 16px; }
.reward-loot {
  display: flex; align-items: center; gap: 16px;
  width: fit-content; max-width: 100%;
  margin: 18px auto 22px; padding: 10px 18px 10px 10px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid #0f0c09;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.reward-loot .slot { width: 92px; height: 82px; }
.loot-name { margin: 0; font-family: var(--rs-p); font-size: 24px; line-height: 1.1; color: #fff; text-shadow: var(--px-shadow); text-align: left; }
.reward-name { margin: 0 0 6px; font-family: var(--rs-b); font-size: 48px; line-height: 1; }
.reward-coming { margin: 0; font-family: var(--rs-b); font-size: 32px; line-height: 1; color: var(--rs-cyan); text-shadow: var(--px-shadow); }
.reward-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

.traveler {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: 46px; height: auto;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(235, 244, 248, .75));
  transition: opacity .3s ease;
}
.traveler.on { opacity: 1; }
.traveler.on.done { opacity: 0; }

.scroll, .reward { transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.stop.reached .scroll, .stop.reached .reward { transform: translateY(-4px); }

/* ---------- Exchange (bank) ---------- */
.bank { max-width: 880px; margin: 0 auto; padding: 0 22px 22px; }
.bank-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 58px; }
.bank-title { font-family: var(--rs-b); font-size: 32px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); }
.bank-x { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.bank-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start; gap: 20px;
  padding: 26px 22px;
  background: rgba(0, 0, 0, .24);
  border: 1px solid #0f0c09;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.bank-col { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.bank-label { font-family: var(--rs-b); font-size: 24px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); }
.slot-lg { width: 128px; height: 114px; }
.slot-lg .stack { font-size: 32px; top: 5px; left: 7px; }
.slot-lg .stamp { font-size: 24px; right: -14px; bottom: -12px; }
.bank-col-plat .slot-lg { width: 150px; height: 134px; }
.bank-input {
  width: 100%; max-width: 290px;
  padding: 11px 12px 9px;
  text-align: center;
  font-family: var(--rs-p); font-size: 32px; line-height: 1;
  color: var(--rs-yellow); text-shadow: var(--px-shadow);
  background: #0f0c09;
  border: 1px solid #000; border-radius: 2px;
  box-shadow: inset 0 0 0 1px #5a4d39, inset 0 3px 8px rgba(0, 0, 0, .6);
}
.bank-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--rs-yellow), inset 0 3px 8px rgba(0, 0, 0, .6); }
.bank-col-plat .bank-input { color: #fff; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.quick button {
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: var(--rs-orange); text-shadow: var(--px-shadow);
  padding: 7px 10px 6px;
  background: linear-gradient(180deg, #56493a, #3a3127);
  border: 1px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px #77674c;
  border-radius: 2px;
}
.quick button:hover { color: var(--rs-yellow); }
.bank-mid {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 92px;
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
  color: var(--rs-orange); text-shadow: var(--px-shadow);
}
.bank-arrow { width: 56px; height: 42px; color: var(--plat); filter: drop-shadow(3px 3px 0 #000); shape-rendering: crispEdges; }
.leftover { margin: 0; font-family: var(--rs-p); font-size: 24px; line-height: 1.1; color: var(--rs-yellow); text-shadow: var(--px-shadow); text-align: center; }
.leftover:empty { display: none; }
.bank-foot {
  margin: 18px 0 0; text-align: center;
  font-family: var(--rs-p); font-size: 24px; line-height: 1.25;
  color: #fff; text-shadow: var(--px-shadow);
}
.bank-foot .warn { color: var(--rs-red); }
.fine { margin: 18px auto 0; text-align: center; color: #767f84; font-size: 14px; }

/* ---------- Quest ---------- */
.quest-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 60px; align-items: start; }
.quest-meta { margin: 30px 0 0; border-top: 1px solid var(--line); }
.quest-meta > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.quest-meta dt { font-family: var(--rs-b); font-size: 24px; line-height: 1.05; color: var(--rs-orange); text-shadow: var(--px-shadow); }
.quest-meta dd { margin: 0; font-size: 16px; color: #c9d0d3; }
.quest-meta a { color: var(--plat-hi); }

.journal { padding: 42px 40px 36px; margin: 16px 0; }
.journal-title { margin: 0 0 20px; text-align: center; font-family: var(--rs-b); font-weight: 400; font-size: 32px; line-height: 1; color: var(--rs-darkred); }
.journal-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.journal-steps button {
  position: relative; display: block; width: 100%;
  padding: 9px 10px 9px 46px;
  text-align: left;
  font-family: var(--rs-p); font-size: 24px; line-height: 1.25;
  color: var(--rs-navy);
  background: none; border: 0; border-radius: 3px;
  transition: background .15s ease;
}
.journal-steps button:hover { background: rgba(127, 0, 0, .07); }
.journal-steps button::before {
  content: ""; position: absolute; left: 8px; top: 9px;
  width: 24px; height: 24px;
  background: #f7f0de;
  border: 2px solid #3d2f1a;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .12);
}
.journal-steps button[aria-pressed="true"] {
  text-decoration: line-through;
  text-decoration-thickness: .0625em;
}
.journal-steps button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 16px; top: 10px;
  width: 9px; height: 17px;
  border: solid #0b7d0b; border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}
.journal-steps em { font-style: normal; color: var(--rs-darkred); }
.journal-reward { margin: 20px 0 0; text-align: center; font-family: var(--rs-p); font-size: 24px; line-height: 1.2; color: var(--paper-ink); }

.qc { padding: 0; border: 0; background: transparent; color: var(--paper-ink); max-width: min(540px, calc(100vw - 40px)); overflow: visible; }
.qc::backdrop { background: rgba(0, 0, 0, .65); }
.qc[open] .qc-scroll { animation: qc-in .4s cubic-bezier(.2, 1.4, .5, 1); }
.qc-scroll { padding: 36px 34px 28px; text-align: center; }
.qc-kicker { margin: 0; font-family: var(--rs-b); font-size: 32px; line-height: 1; color: var(--rs-darkred); }
.qc-title { margin: 10px 0 18px; font-family: var(--rs-b); font-weight: 400; font-size: 32px; line-height: 1.05; color: #1c1209; }
.qc-body { display: flex; align-items: center; justify-content: center; gap: 20px; text-align: left; }
.qc-body img { width: 150px; height: auto; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .3)); }
.qc-label { margin: 0 0 8px; font-family: var(--rs-b); font-size: 24px; line-height: 1; color: var(--rs-darkred); }
.qc-list { margin: 0; padding: 0; list-style: none; font-family: var(--rs-p); font-size: 24px; line-height: 1.25; color: var(--rs-navy); }
.qc-qp { margin: 18px 0 16px; font-family: var(--rs-b); font-size: 24px; line-height: 1; }
@keyframes qc-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* ---------- Clan chat ---------- */
.chat-stage { max-width: 900px; margin: 0 auto; padding: 0 var(--gutter); }
.scene {
  position: relative; overflow: hidden;
  height: 270px;
  background: linear-gradient(180deg, #06080b 0%, #121a22 45%, #1c2716 62%);
  border: 2px solid var(--stone-lo); border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.scene::before {
  content: ""; position: absolute; left: -60%; right: -60%; bottom: 0; height: 150%;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 2px, transparent 2px 56px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0 2px, transparent 2px 56px),
    var(--noise-map),
    linear-gradient(180deg, #4a6628, #62832f);
  transform: perspective(360px) rotateX(62deg);
  transform-origin: 50% 100%;
}
.scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #06080b 0%, rgba(6, 8, 11, .8) 22%, rgba(6, 8, 11, 0) 46%);
}
.player { position: absolute; z-index: 2; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.player img { width: 104px; height: auto; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 14px 8px rgba(0, 0, 0, .55)); }
.player-name { margin-top: 6px; font-family: var(--rs-p); font-size: 24px; line-height: 1; color: #fff; text-shadow: var(--px-shadow); }
.overhead {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  margin: 0; white-space: pre;
  font-family: var(--rs-b); font-size: 32px; line-height: 1;
  color: var(--rs-yellow); text-shadow: var(--px-shadow);
}
.overhead .ch { display: inline-block; white-space: pre; }

.fx-red { color: #ff0000; }
.fx-green { color: #00ff00; }
.fx-cyan { color: #00ffff; }
.fx-purple { color: #ff00ff; }
.fx-white { color: #ffffff; }
.fx-glow1 { animation: glow1 1.5s linear infinite; }
.fx-glow2 { animation: glow2 1.5s linear infinite; }
.fx-glow3 { animation: glow3 1.5s linear infinite; }
.fx-flash1 { animation: flash1 .6s steps(1) infinite; }
.fx-flash2 { animation: flash2 .6s steps(1) infinite; }
.fx-flash3 { animation: flash3 .6s steps(1) infinite; }
.fx-wave .ch { animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -.09s); }
.fx-wave2 .ch { animation: wave2 1.1s linear infinite; animation-delay: calc(var(--i) * -.09s); }
.fx-shake .ch { animation: shake .45s steps(2) infinite; animation-delay: calc(var(--i) * -.07s); }
.fx-scroll { width: 12em; overflow: hidden; }
.fx-scroll .line { display: inline-block; padding-left: 100%; animation: scroll-x 4.5s linear infinite; }
.fx-slide .line { display: inline-block; animation: slide 3s ease-in-out infinite; }

@keyframes glow1 { 0% { color: #ff0000; } 33% { color: #ffff00; } 66% { color: #00ff00; } 100% { color: #ff0000; } }
@keyframes glow2 { 0% { color: #ff0000; } 33% { color: #ff00ff; } 66% { color: #0000ff; } 100% { color: #ff0000; } }
@keyframes glow3 { 0% { color: #ffffff; } 33% { color: #00ff00; } 66% { color: #00ffff; } 100% { color: #ffffff; } }
@keyframes flash1 { 0% { color: #ff0000; } 50% { color: #ffff00; } }
@keyframes flash2 { 0% { color: #00ffff; } 50% { color: #0000ff; } }
@keyframes flash3 { 0% { color: #00b000; } 50% { color: #80ff80; } }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.3em); } }
@keyframes wave2 {
  0% { transform: translate(0, 0); } 25% { transform: translate(.12em, -.25em); }
  50% { transform: translate(0, 0); } 75% { transform: translate(-.12em, .25em); } 100% { transform: translate(0, 0); }
}
@keyframes shake { 0% { transform: translate(.06em, -.12em); } 50% { transform: translate(-.06em, .1em); } }
@keyframes scroll-x { to { transform: translateX(-100%); } }
@keyframes slide { 0% { transform: translateY(-.8em); opacity: 0; } 15%, 80% { transform: none; opacity: 1; } 100% { transform: translateY(.8em); opacity: 0; } }

.chatbox {
  background: var(--noise-paper), linear-gradient(180deg, #e0d4b0, #cbbd93);
  border: 3px solid #2b241b;
  box-shadow: inset 0 0 0 1px #a39572, 0 24px 48px rgba(0, 0, 0, .5);
  border-radius: 0 0 4px 4px;
}
.chat-log {
  height: 230px; overflow-y: auto;
  padding: 10px 14px 6px;
  font-family: var(--rs-p); font-size: 24px; line-height: 1.15;
  color: #000;
  scrollbar-width: thin;
  scrollbar-color: #5d5447 #bfb08a;
}
.msg { margin: 0 0 3px; overflow-wrap: anywhere; }
.msg .cc { color: #0000ff; }
.msg .t { color: #7f0000; }
.msg-you .t { color: #0000ff; }
.chat-form {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 8px 14px;
  border-top: 1px solid #9c8d68;
}
.chat-me { flex: none; font-family: var(--rs-p); font-size: 24px; line-height: 1; color: #000; }
#chatText {
  flex: 1; min-width: 0;
  padding: 8px 0 6px;
  font-family: var(--rs-p); font-size: 24px; line-height: 1;
  color: #0000ff;
  background: transparent; border: 0;
}
#chatText::placeholder { color: #6b604c; }
#chatText:focus { outline: none; }
.chat-form:focus-within { box-shadow: inset 0 0 0 2px rgba(0, 0, 255, .3); }
.chat-tabs { display: flex; background: linear-gradient(180deg, #4a3f31, #2e271e); border-top: 2px solid var(--stone-lo); }
.chat-tabs span {
  flex: 1; text-align: center;
  padding: 9px 2px 7px;
  font-family: var(--rs-b); font-size: 16px; line-height: 1;
  color: #fff; text-shadow: 1px 1px 0 #000;
  border-right: 1px solid var(--stone-lo);
  box-shadow: inset 0 0 0 1px #5d503c;
}
.chat-tabs span:last-child { border-right: 0; }
.chat-tabs .on { color: var(--rs-yellow); background: #5c4f3c; }
.effects-help { margin: 16px 0 0; font-size: 14px; line-height: 2.1; color: #8a9398; }

/* ---------- Buy ---------- */
.buy { padding-top: 40px; }
.buy-card {
  max-width: calc(1060px);
  margin: 0 var(--gutter);
  display: grid; grid-template-columns: 320px minmax(0, 1fr);
  align-items: center; gap: 30px;
  padding: 42px 46px;
}
@media (min-width: 1188px) { .buy-card { margin: 0 auto; } }
.buy-pile { width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .55)); animation: bob 6s ease-in-out infinite; }
.buy-copy .sub { color: #d6cfc0; }
.ca-box {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 24px; padding: 10px 10px 10px 12px;
  background: #0f0c09;
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px #5a4d39;
}
.ca-code {
  flex: 1; min-width: 0;
  font-family: var(--rs-b); font-size: 24px; line-height: 1.1;
  color: var(--rs-cyan); text-shadow: var(--px-shadow);
  background: none; border: 0; padding: 0; white-space: normal;
}
.ca-box.live .ca-code { font-family: var(--mono); font-size: 15px; color: var(--rs-yellow); text-shadow: none; overflow-wrap: anywhere; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer { padding: 46px 0 60px; background: #08080a; border-top: 1px solid var(--line); }
.foot-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { font-family: var(--rs-b); font-size: 24px; line-height: 1; color: var(--rs-orange); text-shadow: var(--px-shadow); text-decoration: none; }
.foot-links a:hover { color: var(--rs-yellow); }
.disclaimer { max-width: 920px; margin: 0 0 12px; font-size: 13.5px; line-height: 1.7; color: #7d868b; }
.credits { margin: 0; font-size: 12.5px; color: #5c6468; }

/* ---------- Toast (game message) ---------- */
.toast {
  position: fixed; left: 16px; bottom: 16px; z-index: 150;
  max-width: min(580px, calc(100vw - 32px));
  padding: 10px 16px 8px;
  font-family: var(--rs-p); font-size: 24px; line-height: 1.15;
  color: #000;
  background: var(--noise-paper), linear-gradient(180deg, #e0d4b0, #cbbd93);
  border: 3px solid #2b241b;
  box-shadow: inset 0 0 0 1px #a39572, 0 12px 30px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(16px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.toast.on { opacity: 1; transform: none; }
.toast .t { color: #0000ff; }

/* ---------- Right-click menu ---------- */
.rs-menu {
  position: fixed; z-index: 200;
  min-width: 200px;
  padding: 0 0 3px;
  background: #5d5447;
  border: 1px solid #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55);
  font-family: var(--rs-b); font-size: 24px; line-height: 1;
}
.rs-menu-head { margin: 1px 1px 3px; padding: 4px 6px 3px; background: #000; color: #5d5447; }
.rs-menu button {
  display: block; width: 100%;
  padding: 4px 8px 3px;
  text-align: left; white-space: nowrap;
  color: #fff; text-shadow: var(--px-shadow);
  background: none; border: 0;
}
.rs-menu button:hover, .rs-menu button:focus-visible { color: var(--rs-yellow); outline: none; background: rgba(0, 0, 0, .12); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .hero-title { font-size: 80px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 1040px) {
  .nav-links { display: none; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 72px; gap: 8px; }
  .hero-title { font-size: 96px; }
  .hero-art { order: -1; }
  .pile { width: min(100%, 400px); }
  .about-grid, .quest-grid { grid-template-columns: 1fr; gap: 44px; }
  .infobox { position: static; width: 100%; max-width: 440px; }
  .stop { column-gap: 24px; }
  .landmark { width: 140px; }
}
@media (max-width: 860px) {
  .buy-card { grid-template-columns: 1fr; padding: 34px 26px; }
  .buy-pile { width: 230px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .section { padding: 84px 0; }
  .trail-section { padding-bottom: 90px; }
  .hero-title { font-size: 64px; }
  .h2 { font-size: 48px; }
  .big { font-size: 19px; }
  .btn-lg { min-height: 52px; padding: 0 20px; font-size: 24px; }
  .btn-lg svg { width: 18px; height: 18px; }
  .rate { gap: 12px; padding-right: 14px; }
  .fact { align-items: flex-start; }
  .fact h3 { font-size: 24px; }
  .quest-meta > div { grid-template-columns: 1fr; gap: 4px; }
  .journal { padding: 38px 18px 30px; }
  .journal-steps button { font-size: 24px; padding-left: 42px; }

  .bank { padding: 0 12px 16px; }
  .bank-title { font-size: 24px; }
  .bank-body { grid-template-columns: 1fr; padding: 22px 14px; }
  .bank-mid { padding-top: 0; }
  .bank-arrow { transform: rotate(90deg); }

  /* map: a trail rail down the left edge */
  .worldmap { margin: 0 10px; padding: 0 6px 6px; }
  .wm-select { font-size: 16px; }
  .trail { padding: 196px 12px 110px 62px; }
  .cartouche { top: 22px; padding: 10px 22px 9px; }
  .c-title { font-size: 32px; }
  .compass { top: 108px; right: 10px; width: 78px; height: 78px; }
  .hud-wrap { display: none; }
  .stops { gap: 74px; }
  .stop[data-lane] { grid-template-columns: minmax(0, 1fr); row-gap: 14px; justify-items: stretch; }
  .stop[data-lane] .spot { grid-column: 1; grid-row: 1; position: relative; flex-direction: row; justify-content: flex-start; gap: 0; }
  .stop[data-lane] .scroll, .stop[data-lane] .reward { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; }
  .spot .marker { position: absolute; left: -49px; top: 50%; margin-top: -19px; width: 38px; height: 38px; font-size: 24px; border-width: 2px; }
  .site { flex-direction: row; gap: 10px; }
  .landmark, .stop-final .landmark { width: 104px; }
  .place, .stop-final .place { font-size: 24px; white-space: normal; }
  .scroll { padding: 28px 20px 24px; margin: 14px 4px; width: auto; }
  .scroll::before, .scroll::after { left: -10px; right: -10px; }
  .s-title { font-size: 32px; }
  .s-big, .scroll .shout-red { font-size: 32px; }
  .classes { grid-template-columns: 1fr; }
  .reward { padding: 26px 16px 24px; }
  .reward-kicker { padding: 0 34px; line-height: 1.1; }
  .reward-actions .btn { max-width: 100%; white-space: normal; line-height: 1.1; text-align: center; padding: 8px 14px; }
  .reward-title, .reward-name { font-size: 32px; }
  .reward-coming { font-size: 24px; }
  .reward-loot { padding-right: 12px; }
  .loot-name { font-size: 16px; }
}
@media (max-width: 479px) {
  .hero-title { font-size: 48px; }
}
@media (max-width: 359px) {
  .hero-title span { white-space: normal; width: auto; }
}
@media (max-width: 440px) {
  .nav { gap: 10px; }
  .nav .soon { display: none; }
  .brand { font-size: 24px; }
  .brand img { width: 28px; }
  .nav .btn-plat { padding: 0 12px; }
  .rate-plat { font-size: 24px; }
  .rate-plat img { width: 40px; }
  .rate-gp { font-size: 16px; }
  .rate-eq { font-size: 24px; }
  .ticker-set span { font-size: 24px; }
  .h2 { font-size: 32px; }
  .scroll .s-big { font-size: 32px; }
  .chat-form { flex-wrap: wrap; }
  #chatText { flex-basis: calc(100% - 60px); }
  .chat-tabs span { font-size: 16px; }
  .chat-tabs span:nth-child(n+6):not(.on) { display: none; }
  .qc-body { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .ticker-track, .pile, .buy-pile, .player img, .loader-token { animation: none !important; }
}
