/* SCAPED — scapedmmo.com
 *
 * The house style the game is drawn in: a dark stone panel, gold on near-black, and the same
 * Tiny5 pixel face the app's headings use. Every sprite on the site is the app's own art,
 * exported from the game's renderers, so nothing here is a mock-up of the game.
 */

@font-face {
  font-family: "Tiny5";
  src: url("/Tiny5.ttf") format("truetype");
  font-display: swap;
}

:root {
  --sc-night: #0d0b10;
  --sc-night-2: #17131b;
  --sc-stone: #2b2620;
  --sc-stone-light: #4a4136;
  --sc-stone-edge: #0a0806;
  --sc-gold: #ffcf4a;
  --sc-orange: #ff9a2e;
  --sc-ember: #ff5a1f;
  --sc-text: #efe7d8;
  --sc-soft: #b9ad99;
  --sc-faint: #85796a;
  --sc-cyan: #6fe6ff;

  /* The seven rarity tiers, exactly as ItemArt.rarityColor paints them. */
  --sc-common: #b8b8ad;
  --sc-uncommon: #3dc757;
  --sc-rare: #4285fa;
  --sc-epic: #ab47eb;
  --sc-legendary: #ff8f14;
  --sc-mythic: #fa2e7a;
  --sc-relic: #ffe026;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sc-night);
  color: var(--sc-text);
}

.sc-site {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 154, 46, 0.18), transparent 26rem),
    radial-gradient(circle at 92% 12%, rgba(111, 230, 255, 0.08), transparent 30rem),
    linear-gradient(180deg, var(--sc-night-2), var(--sc-night) 40rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

.sc-wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.sc-wide { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }

.sc-pixel { font-family: "Tiny5", ui-monospace, monospace; letter-spacing: 0.02em; }

/* ── Navigation ───────────────────────────────────────────────────────────── */

.sc-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.sc-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sc-gold); text-decoration: none; font-family: "Tiny5", monospace; font-size: 26px; text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 154, 46, 0.45); }
.sc-brand img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--sc-stone-edge); image-rendering: pixelated; }
.sc-navlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-navlinks a {
  font-family: "Tiny5", monospace; font-size: 15px; color: var(--sc-soft); text-decoration: none;
  padding: 6px 12px; border: 2px solid var(--sc-stone-edge); background: var(--sc-stone);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
}
.sc-navlinks a:hover, .sc-navlinks a[aria-current="page"] { color: var(--sc-gold); background: #3a2a18; }

/* ── Stone panel ──────────────────────────────────────────────────────────── */

.sc-panel {
  background: linear-gradient(135deg, #332c24, #211c17);
  border: 3px solid var(--sc-stone-edge);
  box-shadow: inset 0 0 0 2px var(--sc-stone-light), 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: clamp(18px, 4vw, 32px);
}

/* ── Animated sprites ─────────────────────────────────────────────────────────
 *
 * Each creature's frames were appended into one horizontal strip at build time. The element is
 * one frame wide and steps the background across the strip, so the walk cycle is the app's own
 * animation rather than a CSS approximation of it. `--s` scales the whole thing in whole pixels.
 */

.sc-sprite {
  --n: 1;
  --s: 1;
  --dur: 0.8s;
  width: calc(var(--fw) * var(--s) * 1px);
  height: calc(var(--fh) * var(--s) * 1px);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--fw) * var(--n) * var(--s) * 1px) calc(var(--fh) * var(--s) * 1px);
  image-rendering: pixelated;
  animation: sc-step var(--dur) steps(var(--n)) infinite;
  flex: none;
}

@keyframes sc-step {
  to { background-position: calc(var(--fw) * var(--n) * var(--s) * -1px) 0; }
}

.sc-mob { --dur: 0.65s; }
.sc-pet { --dur: 1.1s; }

/* A still sprite: an item, a tool, a piece of armour. */
.sc-item { image-rendering: pixelated; display: block; }

/* ── The cover ────────────────────────────────────────────────────────────────
 *
 * A full-viewport opening: the app icon's own map art edge to edge, the wordmark set in the
 * game's pixel face over it, and the headline numbers on the fold. The art is an <img> rather
 * than a background so object-fit can keep the castle in shot at every aspect ratio, from a
 * phone held upright to an ultrawide.
 */

.sc-cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.sc-cover-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  image-rendering: pixelated;
}

/* Two washes: a vignette that pulls the eye to the middle, and a vertical fade that lands on the
 * page's own background so the cover and the first section are one surface. */
.sc-cover-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 58% at 50% 44%, rgba(6, 4, 8, 0.52), rgba(6, 4, 8, 0.1) 72%),
    linear-gradient(180deg,
      rgba(13, 11, 16, 0.72) 0%,
      rgba(13, 11, 16, 0.14) 20%,
      rgba(13, 11, 16, 0.2) 52%,
      rgba(13, 11, 16, 0.82) 86%,
      var(--sc-night) 100%);
}

.sc-cover-inner { display: flex; flex-direction: column; flex: 1; }

.sc-cover-mid {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 28px 0 20px;
}

.sc-cover h1 {
  font-family: "Tiny5", monospace; font-weight: normal;
  font-size: clamp(60px, 15vw, 150px); line-height: 0.92;
  margin: 0 0 10px; color: var(--sc-gold);
  letter-spacing: 0.01em;
  text-shadow:
    0 5px 0 #000, 0 7px 0 rgba(0, 0, 0, 0.6),
    0 0 26px rgba(255, 154, 46, 0.55), 0 0 70px rgba(255, 90, 31, 0.35);
}
.sc-cover .sc-tagline { font-size: clamp(15px, 2.6vw, 22px); margin: 0 0 18px; text-shadow: 0 2px 0 #000; }
.sc-cover .sc-lead { color: #e4dbc9; text-shadow: 0 1px 2px #000, 0 2px 14px rgba(0, 0, 0, 0.95); }
.sc-cover-eyebrow {
  display: inline-block; margin: 0 0 18px;
  font-family: "Tiny5", monospace; font-size: clamp(12px, 2vw, 15px);
  letter-spacing: 0.18em; color: var(--sc-gold);
  padding: 5px 16px;
  border: 2px solid rgba(255, 207, 74, 0.45);
  background: rgba(10, 8, 6, 0.55);
  backdrop-filter: blur(2px);
  text-shadow: 0 2px 0 #000;
}

.sc-cover-foot { padding-bottom: 18px; }
.sc-cover-foot .sc-stats { margin: 0 0 10px; }
.sc-cover .sc-stat b { text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 154, 46, 0.4); }
.sc-cover .sc-stat span { color: var(--sc-soft); }

/* The chevron that says there is more below. */
.sc-scroll {
  display: block; width: 26px; height: 26px; margin: 0 auto;
  border-right: 3px solid var(--sc-gold); border-bottom: 3px solid var(--sc-gold);
  transform: rotate(45deg);
  opacity: 0.75;
  animation: sc-nudge 1.8s ease-in-out infinite;
}
.sc-scroll:hover { opacity: 1; }
@keyframes sc-nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(5px, 5px); }
}

/* Over the art the nav needs no stone of its own. */
.sc-cover .sc-navlinks a { background: rgba(10, 8, 6, 0.55); backdrop-filter: blur(2px); }
.sc-cover .sc-navlinks a:hover, .sc-cover .sc-navlinks a[aria-current="page"] { background: rgba(58, 42, 24, 0.85); }

@media (max-width: 760px) {
  /* Covering a tall phone screen with a 1.75:1 image would show a sliver, so the cover gives up
     some height and the art keeps more of its width. */
  .sc-cover { min-height: 84svh; }
  .sc-cover-art { object-position: 50% 38%; }
  .sc-cover-mid { padding: 14px 0 6px; }
  /* The fight and the numbers both have to fit above the fold on a phone, so the copy gives way
     to them rather than the other way round. */
  .sc-cover .sc-lead { font-size: 15px; max-width: 34ch; }
  .sc-cover .sc-tagline { margin-bottom: 12px; }
  .sc-cover-eyebrow { margin-bottom: 12px; }
  .sc-cover .sc-cta { margin-top: 18px; gap: 8px; }
  .sc-cover .sc-btn { font-size: 15px; padding: 9px 14px; }
  .sc-cover .sc-stat b { font-size: 26px; }
  .sc-cover .sc-stat span { font-size: 11px; }
  .sc-cover-foot .sc-stats { gap: 6px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-scroll { animation: none; }
}


/* ── The fight on the fold ────────────────────────────────────────────────────
 *
 * A party of three attacking a boss, under the wordmark. The adventurers and the colossus are
 * the game's own sprites running their own cycles; the hit numbers, the health bar and the two
 * projectiles are the page's, timed to land when the attacks do.
 */

.sc-battle {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 0;
  padding: 6px 16px 26px;
  position: relative;
}

.sc-party { display: flex; align-items: flex-end; gap: clamp(4px, 1.4vw, 18px); }
/* A soft pool of light under the whole line, so the figures sit on the land rather than float. */
.sc-battle::after {
  content: ""; position: absolute; left: 50%; bottom: 20px; translate: -50% 0;
  width: min(760px, 92%); height: 26px; z-index: -1;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 72%);
}

.sc-foe { position: relative; display: flex; flex-direction: column; align-items: center; }

/* The boss's health, dropping under the party's damage and resetting on the next pull. */
.sc-hp {
  width: 84px; height: 7px; margin-bottom: 6px;
  border: 2px solid #0a0806; background: #2a0d08;
  box-shadow: 0 0 0 1px rgba(255, 207, 74, 0.25);
}
.sc-hp i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(180deg, #5ee06a, #2f9c3c);
  animation: sc-drain 9.6s linear infinite;
}
@keyframes sc-drain {
  0% { width: 100%; background: linear-gradient(180deg, #5ee06a, #2f9c3c); }
  60% { background: linear-gradient(180deg, #ffcf4a, #e08a16); }
  92% { width: 6%; background: linear-gradient(180deg, #ff6a4a, #c22d16); }
  93% { width: 100%; background: linear-gradient(180deg, #5ee06a, #2f9c3c); }
  100% { width: 100%; }
}

/* Damage numbers, in the game's own hitsplat colours. */
.sc-splat {
  position: absolute; left: 50%; top: 26%;
  font-family: "Tiny5", monospace; font-size: 19px; color: #fff;
  text-shadow: 0 0 3px #000, 0 2px 0 #000;
  padding: 1px 6px; border-radius: 50%;
  background: #b4231a; border: 2px solid #0a0806;
  opacity: 0;
  animation: sc-splat 2.4s ease-out infinite;
}
.sc-splat-1 { margin-left: -34px; animation-delay: 0.2s; }
.sc-splat-2 { margin-left: 6px; animation-delay: 0.9s; background: #1f6fb4; }
.sc-splat-3 { margin-left: -14px; top: 44%; animation-delay: 1.5s; }
.sc-splat-4 { margin-left: 22px; top: 14%; animation-delay: 2.0s; background: #7a2bb4; }
@keyframes sc-splat {
  0% { opacity: 0; transform: translateY(6px) scale(0.6); }
  8% { opacity: 1; transform: translateY(0) scale(1.1); }
  14% { transform: translateY(0) scale(1); }
  40% { opacity: 1; transform: translateY(-14px); }
  55%, 100% { opacity: 0; transform: translateY(-22px); }
}

/* An arrow and a magic bolt crossing the gap, timed to the archer's and the mage's release.
 * The gap is its own flex item, so a shot travels exactly the distance to the boss rather than a
 * guessed fraction of the viewport. */
.sc-shots {
  position: relative; flex: none; align-self: flex-end;
  width: clamp(70px, 11vw, 170px); height: 120px;
  pointer-events: none;
}
.sc-arrow, .sc-bolt { position: absolute; left: 0; opacity: 0; }
.sc-arrow {
  bottom: 42px; width: 16px; height: 2px; background: linear-gradient(90deg, transparent, #e8d9b6 40%, #fff);
  box-shadow: 0 0 4px rgba(255, 240, 200, 0.8);
  animation: sc-fly 1.8s linear infinite;
}
.sc-bolt {
  width: 7px; height: 7px; border-radius: 50%; bottom: 62px;
  background: radial-gradient(circle, #ffffff, #6fe6ff 45%, rgba(111, 230, 255, 0) 72%);
  box-shadow: 0 0 12px rgba(111, 230, 255, 0.9);
  animation: sc-fly 2.4s linear infinite;
  animation-delay: 0.7s;
}
@keyframes sc-fly {
  0%, 38% { opacity: 0; transform: translateX(0); }
  42% { opacity: 1; transform: translateX(0); }
  72% { opacity: 1; transform: translateX(100%); }
  76%, 100% { opacity: 0; transform: translateX(100%); }
}

@media (max-width: 760px) {
  .sc-battle { padding-bottom: 8px; }
  .sc-party { gap: 2px; }
  .sc-shots { width: 42px; height: 80px; }
  .sc-battle .sc-fighter { --s: 1.4 !important; }
  .sc-foe .sc-mob { --s: 1.6 !important; }
  .sc-hp { width: 64px; }
  /* Eleven tiers across a phone would be 30px each, so they wrap into rows instead. */
  .sc-gearladder { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sc-splat { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-hp i, .sc-splat, .sc-arrow, .sc-bolt { animation: none; }
  .sc-splat { opacity: 0; }
  .sc-hp i { width: 42%; }
}

/* ── Hero (the legal pages and 404 still use it) ─────────────────────────────────────────────────────────────────── */

.sc-hero { padding: clamp(28px, 7vw, 76px) 0 10px; text-align: center; position: relative; }
.sc-hero img.sc-icon { width: 128px; height: 128px; border-radius: 28px; border: 3px solid var(--sc-stone-edge); box-shadow: 0 0 0 2px var(--sc-stone-light), 0 0 60px rgba(255, 154, 46, 0.4); }
.sc-hero h1 { font-family: "Tiny5", monospace; font-weight: normal; font-size: clamp(48px, 11vw, 96px); line-height: 1; margin: 22px 0 8px; color: var(--sc-gold); text-shadow: 0 4px 0 #000, 0 0 36px rgba(255, 154, 46, 0.5); }
.sc-tagline { font-family: "Tiny5", monospace; color: #ffdb8f; font-size: clamp(16px, 3vw, 21px); margin: 0 0 18px; }
.sc-lead { max-width: 660px; margin: 0 auto; color: var(--sc-soft); font-size: 18px; }
.sc-badge { display: inline-block; font-family: "Tiny5", monospace; font-size: 16px; color: #1a1206; background: var(--sc-gold); padding: 8px 18px; border: 3px solid var(--sc-stone-edge); box-shadow: 0 4px 0 #000; }

.sc-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.sc-btn {
  font-family: "Tiny5", monospace; font-size: 18px; text-decoration: none;
  padding: 11px 22px; border: 3px solid var(--sc-stone-edge); box-shadow: 0 4px 0 #000;
  color: #1a1206; background: linear-gradient(180deg, var(--sc-gold), var(--sc-orange));
}
.sc-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.sc-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.sc-btn-ghost { color: var(--sc-gold); background: var(--sc-stone); box-shadow: inset 0 0 0 1px var(--sc-stone-light), 0 4px 0 #000; }
.sc-btn-ghost:hover { background: #3a2a18; }

/* The row of stats under the hero. */
.sc-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; margin: 30px 0 6px; }
.sc-stat { text-align: center; }
.sc-stat b { display: block; font-family: "Tiny5", monospace; font-weight: normal; font-size: 32px; color: var(--sc-gold); line-height: 1; text-shadow: 0 2px 0 #000; }
.sc-stat span { font-size: 13px; color: var(--sc-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── The marching band of monsters ────────────────────────────────────────── */

.sc-parade { overflow: hidden; margin: 28px 0 4px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.sc-parade-track { display: flex; gap: 20px; width: max-content; align-items: flex-end; animation: sc-march 52s linear infinite; }
@keyframes sc-march { to { transform: translateX(-50%); } }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.sc-section { padding: clamp(32px, 6vw, 64px) 0; }
.sc-section > header { margin-bottom: 22px; }
.sc-section h2 { font-family: "Tiny5", monospace; font-weight: normal; color: var(--sc-gold); font-size: clamp(28px, 5vw, 42px); line-height: 1.05; margin: 0 0 8px; text-shadow: 0 3px 0 #000; }
.sc-section > header p { color: var(--sc-soft); max-width: 680px; margin: 0; }
.sc-kicker { font-family: "Tiny5", monospace; color: var(--sc-orange); font-size: 15px; margin: 0 0 4px; }

.sc-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.sc-feature h3 { font-family: "Tiny5", monospace; font-weight: normal; font-size: 20px; color: var(--sc-orange); margin: 0 0 6px; }
.sc-feature p { margin: 0; color: var(--sc-soft); font-size: 15px; }
.sc-feature .sc-item { margin-bottom: 10px; }

/* Skills. */
.sc-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.sc-skill {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 2px solid var(--sc-stone-edge); background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
}
.sc-skill img { width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; flex: none; }
.sc-skill b { font-family: "Tiny5", monospace; font-weight: normal; font-size: 17px; color: var(--sc-text); }
.sc-skill span { display: block; font-size: 11px; color: var(--sc-faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* Bestiary. */
.sc-mobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.sc-mobcard {
  border: 2px solid var(--sc-stone-edge); background: radial-gradient(circle at 50% 95%, rgba(255, 154, 46, 0.1), transparent 70%), rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
  padding: 10px 10px 12px; text-align: center;
  display: flex; flex-direction: column;
}
.sc-mobcard .sc-stage { display: flex; align-items: flex-end; justify-content: center; height: 108px; }
.sc-mobcard.sc-boss { border-color: #4a2208; box-shadow: inset 0 0 0 1px #7a4414, 0 0 28px rgba(255, 90, 31, 0.22); }
.sc-mobname { font-family: "Tiny5", monospace; font-size: 17px; color: var(--sc-gold); margin: 4px 0 2px; }
.sc-mobmeta { font-size: 12px; color: var(--sc-faint); }
.sc-mobmeta b { color: var(--sc-soft); font-weight: 600; }
.sc-tag { display: inline-block; font-family: "Tiny5", monospace; font-size: 12px; padding: 1px 7px; border: 1px solid currentColor; margin-top: 8px; }
/* Pinned to the bottom so a wrapped stat line does not shove one card's tag out of line. */
.sc-mobcard .sc-tag { margin-top: auto; align-self: center; }
.sc-tag-melee { color: #ff9a6b; }
.sc-tag-magic { color: #b79bff; }
.sc-tag-ranged { color: #7ce8a8; }

/* Pets. */
.sc-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 12px; }
.sc-petcard {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  border: 2px solid var(--sc-stone-edge); background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
}
.sc-petcard .sc-halo {
  display: grid; place-items: center; flex: none; width: 76px; height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--glow) 26%, transparent), transparent 70%);
}
.sc-petcard .sc-sprite { --s: 1.1; }
.sc-petname { font-family: "Tiny5", monospace; font-size: 18px; color: var(--glow, var(--sc-gold)); }
.sc-petskill { font-size: 11px; color: var(--sc-faint); text-transform: uppercase; letter-spacing: 0.07em; }
.sc-petbless { font-size: 13px; color: var(--sc-text); margin-top: 4px; }
.sc-petsrc { font-size: 12px; color: var(--sc-faint); margin-top: 2px; }

/* The party row: the nearby-players panel, as a line of adventurers. */
.sc-mates {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: clamp(16px, 5vw, 54px);
  padding: 16px 10px 10px;
  border: 2px solid var(--sc-stone-edge);
  background: radial-gradient(ellipse 70% 120% at 50% 100%, rgba(255, 154, 46, 0.12), transparent 70%), rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
}
.sc-mate { text-align: center; }
.sc-mate .sc-sprite { margin: 0 auto 8px; }
.sc-matename { font-family: "Tiny5", monospace; font-size: 18px; color: var(--sc-gold); margin: 0; }
.sc-matelvl { font-size: 12px; color: var(--sc-faint); margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }

/* The ladder every slot climbs: bronze on the left, celestial on the right. */
.sc-gearladder {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px;
  padding: 14px 10px 10px;
  border: 2px solid var(--sc-stone-edge);
  background: linear-gradient(90deg, rgba(0,0,0,.34), rgba(255,154,46,.1));
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
}
.sc-rung-gear { text-align: center; min-width: 0; }
.sc-rung-gear img { width: 100%; max-width: 46px; height: 46px; object-fit: contain; margin-inline: auto; }
.sc-rung-gear span {
  display: block; font-family: "Tiny5", monospace; font-size: 11px;
  color: var(--sc-faint); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-rung-gear:last-child span { color: var(--sc-gold); }

/* An armour set, laid out as the three pieces you wear. */
.sc-kitrow { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.sc-kitrow img { width: 52px; height: 52px; object-fit: contain; }

/* Rarity ladder. */
.sc-ladder { display: grid; gap: 8px; }
.sc-rung {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  border: 2px solid var(--sc-stone-edge); background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px var(--sc-stone-light);
  border-left: 6px solid var(--tier);
}
.sc-rung b { font-family: "Tiny5", monospace; font-weight: normal; font-size: 20px; color: var(--tier); min-width: 120px; text-shadow: 0 0 14px color-mix(in srgb, var(--tier) 40%, transparent); }
.sc-rung span { color: var(--sc-soft); font-size: 14px; }
.sc-rung .sc-worth { margin-left: auto; font-family: "Tiny5", monospace; font-size: 17px; color: var(--sc-gold); white-space: nowrap; }

/* An item wall: a lot of sprites, tightly packed. */
.sc-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.sc-wall .sc-cell {
  aspect-ratio: 1; display: grid; place-items: center; padding: 4px;
  border: 1px solid var(--sc-stone-edge); background: rgba(0, 0, 0, 0.3);
}
.sc-wall img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }

/* Steps. */
.sc-steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sc-step { position: relative; padding-top: 6px; }
.sc-step::before {
  counter-increment: step; content: counter(step);
  font-family: "Tiny5", monospace; font-size: 42px; color: var(--sc-ember);
  line-height: 1; display: block; margin-bottom: 6px; text-shadow: 0 3px 0 #000;
}
.sc-step h3 { font-family: "Tiny5", monospace; font-weight: normal; font-size: 21px; color: var(--sc-gold); margin: 0 0 6px; }
.sc-step p { margin: 0; color: var(--sc-soft); font-size: 15px; }

/* ── Legal pages ──────────────────────────────────────────────────────────── */

.sc-legal-hero { padding: 26px 0 18px; }
.sc-eyebrow { font-family: "Tiny5", monospace; color: var(--sc-orange); margin: 0; font-size: 15px; }
.sc-legal-hero h1 { font-family: "Tiny5", monospace; font-weight: normal; color: var(--sc-gold); font-size: clamp(36px, 7vw, 56px); line-height: 1.05; margin: 6px 0 10px; text-shadow: 0 3px 0 #000; }
.sc-legal-hero p { color: var(--sc-soft); max-width: 680px; margin: 0 0 10px; }
.sc-updated { display: inline-block; font-size: 13px; color: var(--sc-faint); border: 1px solid var(--sc-stone-light); padding: 3px 10px; }

.sc-document { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding-bottom: 60px; align-items: start; }
.sc-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.sc-toc strong { font-family: "Tiny5", monospace; font-weight: normal; color: var(--sc-orange); margin-bottom: 6px; }
.sc-toc a { color: var(--sc-soft); text-decoration: none; padding: 2px 0; }
.sc-toc a:hover { color: var(--sc-gold); }

.sc-copy section { margin-bottom: 30px; scroll-margin-top: 16px; }
.sc-copy h2 { font-family: "Tiny5", monospace; font-weight: normal; color: var(--sc-gold); font-size: 24px; line-height: 1.2; margin: 0 0 10px; }
.sc-copy p, .sc-copy li { color: var(--sc-text); }
.sc-copy ul { padding-left: 20px; }
.sc-copy li { margin-bottom: 6px; }
.sc-copy strong { color: #fff3d6; }
.sc-copy a, .sc-site a.sc-link { color: var(--sc-cyan); }
.sc-note { border-left: 4px solid var(--sc-orange); background: rgba(255, 154, 46, 0.08); padding: 10px 14px; margin: 12px 0; }
.sc-note p { margin: 0; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.sc-table th, .sc-table td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--sc-stone-light); }
.sc-table th { font-family: "Tiny5", monospace; font-weight: normal; color: var(--sc-orange); background: rgba(0, 0, 0, 0.25); }

.sc-faq details { border: 2px solid var(--sc-stone-edge); background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--sc-stone-light); padding: 12px 16px; margin-bottom: 10px; }
.sc-faq summary { cursor: pointer; font-weight: 600; color: #fff3d6; }
.sc-faq details p { margin: 10px 0 0; color: var(--sc-soft); }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.sc-footer { border-top: 2px solid var(--sc-stone); padding: 22px 0 36px; color: var(--sc-faint); font-size: 13px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.sc-footer a { color: var(--sc-soft); }

/* ── Narrow screens and reduced motion ───────────────────────────────────── */

@media (max-width: 760px) {
  .sc-document { grid-template-columns: 1fr; }
  .sc-toc { position: static; border: 2px solid var(--sc-stone-edge); padding: 12px 14px; background: rgba(0, 0, 0, 0.25); }
  .sc-table { display: block; overflow-x: auto; }
  .sc-rung { flex-wrap: wrap; }
  .sc-rung .sc-worth { margin-left: 0; }
}

/* A walk cycle is decoration, so it stops on the first frame when motion is unwelcome. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sc-sprite, .sc-parade-track { animation: none; }
  .sc-btn:hover { transform: none; }
}
