/* Horde Survivor, site v8: the diorama's sunset sky full of the game's painted floating
   islands, then the game section by section on paper, night and dusk, with the hero on the
   painted pedestals of the game's character screen. Lilita One for lettering (the game's
   font), Nunito for text. */

@font-face {
  font-family: 'Lilita One';
  src: url('assets/fonts/lilita-one-latin-400-normal.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lilita One';
  src: url('assets/fonts/lilita-one-latin-ext-400-normal.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/nunito-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/nunito-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #1f1838;
  --ink-soft: #4a3f66;
  --cream: #fff8ef;
  --paper: #fffaf3;
  --sun: #ff9a4d;
  --peach: #ffc9a0;
  --pink: #ff7fa8;
  --gold: #ffc94a;
  --violet: #7b5cd6;
  --sky-deep: #5a4bb8;
  --line: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 40px -18px rgba(60, 30, 90, 0.55);
  --radius: 22px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4.5vw, 72px);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #f9b98c;
  overflow-x: clip;
}

img { max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.wrap {
  width: min(1240px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.kicker {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title {
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin-top: 8px;
  text-wrap: balance;
}
.title--small { font-size: clamp(28px, 3.4vw, 46px); margin-top: 88px; }

.lede {
  margin-top: 14px;
  max-width: 62ch;
  font-size: clamp(16px, 1.35vw, 19px);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ header */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: 20px var(--gutter) 0;
}
.top__logo img {
  display: block;
  width: clamp(132px, 15vw, 236px);
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(80, 30, 60, 0.25));
}
.top__nav {
  display: flex;
  gap: clamp(20px, 4vw, 72px);
  margin-left: auto;
  padding-bottom: 14px;
  border-bottom: 1.5px solid rgba(31, 24, 56, 0.35);
  flex: 0 1 auto;
}
.top__nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  padding: 6px 0;
}
.top__nav a:hover { color: #b8452a; }
.top__soon {
  display: grid;
  padding-left: 22px;
  border-left: 1.5px solid rgba(31, 24, 56, 0.4);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}
.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1.5px rgba(31, 24, 56, 0.18);
}
.lang button {
  min-width: 44px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}
.lang button[aria-pressed='true'] { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------------ stores */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 26px 10px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(20, 10, 40, 0.7);
}
.store__logo { width: 28px; height: 28px; filter: invert(1); }
/* Room for the buttons before the script fills them in, so nothing below jumps. */
.stores:empty { min-height: 60px; }
.store__text { display: grid; line-height: 1.1; }
.store__text b { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.store__text small { font-size: 13px; opacity: 0.85; }

/* ------------------------------------------------------------------ the island diorama */

.isle {
  position: relative;
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
}
.isle__body img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* The area's footage lies on the island top: a tilted plane cut to the island's diamond
   and feathered so the painted rim and props frame it. */
.isle__top {
  position: absolute;
  left: 7%;
  top: 13%;
  width: 86%;
  height: 54%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='3.2'/%3E%3C/filter%3E%3Cpath d='M50 10 Q53 10 56 13 L92 45 Q96 50 92 55 L56 87 Q50 92 44 87 L8 55 Q4 50 8 45 L44 13 Q47 10 50 10Z' filter='url(%23b)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cfilter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='3.2'/%3E%3C/filter%3E%3Cpath d='M50 10 Q53 10 56 13 L92 45 Q96 50 92 55 L56 87 Q50 92 44 87 L8 55 Q4 50 8 45 L44 13 Q47 10 50 10Z' filter='url(%23b)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  overflow: hidden;
}
/* The footage is filmed from the island top's own angle (tools/capture_stress.gd
   --camera), so it lies flat in the island's diamond as it is. */
.isle__plane { position: absolute; inset: 0; }
.vid { position: relative; width: 100%; height: 100%; }
.vid video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.vid video.has-frame { opacity: 1; }
.isle__clip video { object-position: 50% 50%; }
.vid__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 24, 56, 0.8);
  cursor: pointer;
}
.vid__play::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 13px;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.vid__play.is-on::before {
  left: 15px;
  top: 14px;
  width: 4px;
  height: 16px;
  border: 0;
  border-left: 4px solid #fff;
  border-right: 4px solid #fff;
  box-sizing: content-box;
  width: 6px;
}
.isle--torment .isle__body img {
  filter: brightness(0.62) saturate(1.35) sepia(0.35) hue-rotate(-25deg) drop-shadow(0 0 40px rgba(255, 50, 40, 0.55));
}

/* The area's boss turning at the island's edge, popping in when the island is in focus. */
.isle__boss {
  position: absolute;
  left: 50%;
  top: 1%;
  width: 54%;
  opacity: 0;
  transform: translateY(18%) scale(0.35);
  transform-origin: 50% 88%;
  transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.3, 1.55, 0.5, 1);
  pointer-events: none;
}
.is-near .isle__boss { opacity: 1; transform: none; }

.turn {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-repeat: no-repeat;
  background-size: 600% 300%;
}
.turn--drag { cursor: grab; touch-action: pan-y; }
.turn--drag.is-dragging { cursor: grabbing; }

/* Map labels on thin leader lines. Each tag sits on its anchor point; --dx/--dy is where the
   line ends and the box hangs. */
.tag {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  transition: opacity 0.35s ease 0.15s;
  pointer-events: none;
  --dx: -80px;
  --dy: -90px;
  --bx: -100%;
  --by: -100%;
}
.is-near .tag { opacity: 1; }
.tag__dot {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(70, 120, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3);
}
.tag__line {
  position: absolute;
  left: 0;
  top: -0.75px;
  height: 1.5px;
  width: hypot(var(--dx), var(--dy));
  background: var(--line);
  transform-origin: 0 50%;
  rotate: atan2(var(--dy), var(--dx));
  box-shadow: 0 1px 3px rgba(40, 20, 60, 0.35);
}
.tag__box {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
  translate: var(--bx) var(--by);
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 280px;
  padding: 8px 12px 9px;
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 8px 18px -8px rgba(40, 20, 60, 0.6);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}
.tag__box small {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tag__box b { font-weight: 800; }
.tag--floor { left: 25%; top: 50%; --dx: -70px; --dy: -96px; --bx: -88%; --by: -100%; }
.tag--boss { left: 76%; top: 14%; --dx: 46px; --dy: -64px; --bx: -30%; --by: -100%; }
.tag--boss .tag__dot { background: #ff5a3c; }
.j-isles .tag--floor { --dx: -24px; --dy: 150px; --bx: -50%; --by: 0%; }

/* ------------------------------------------------------------------ 1. hero */

.hero {
  position: relative;
  min-height: max(100svh, 680px);
  overflow: hidden;
  isolation: isolate;
  --mx: 0;
  --my: 0;
}
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/sky/sky-wide.webp') 50% 52% / cover no-repeat, #f6a77b;
}
.hero__sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 233, 214, 0.78) 0%, rgba(255, 226, 205, 0.4) 36%, rgba(255, 220, 200, 0) 58%);
}
.hero__far,
.hero__clouds {
  position: absolute;
  inset: 0;
  translate: calc(var(--mx) * -26px) calc(var(--my) * -16px);
  transition: translate 0.6s ease-out;
}
.hero__clouds { translate: calc(var(--mx) * -48px) calc(var(--my) * -24px); }
.far {
  position: absolute;
  animation: bob 7s ease-in-out infinite alternate;
}
.far img { display: block; width: 100%; }
.far--snow { left: 29%; top: 10%; width: clamp(100px, 10vw, 160px); opacity: 0.88; animation-delay: -2s; }
.far--lava { right: 25%; top: 15%; width: clamp(120px, 15vw, 250px); animation-delay: -4s; }
.far--crystal { right: 1%; top: 15%; width: clamp(100px, 10vw, 170px); opacity: 0.9; animation-duration: 9s; }
.far--desert { left: 4%; bottom: 8%; width: clamp(130px, 16vw, 260px); opacity: 0.9; animation-delay: -1s; animation-duration: 8s; }
.far--islet { opacity: 0.7; filter: saturate(0.85); }
.far--islet1 { left: 26%; bottom: 18%; width: 64px; }
.far--islet3 { right: 34%; top: 9%; width: 54px; animation-delay: -3s; }
.far--islet6 { left: 47%; top: 12%; width: 46px; animation-delay: -5s; }
.far--islet8 { right: 4%; bottom: 10%; width: 72px; animation-delay: -6s; }
.cloud { position: absolute; pointer-events: none; animation: drift 38s linear infinite alternate; }
.cloud img { display: block; width: 100%; }
.cloud--h0 { left: -4%; top: 60%; width: 40vw; opacity: 0.9; }
.cloud--h1 { right: -8%; bottom: -4%; width: 46vw; animation-duration: 46s; }
.cloud--h2 { left: 30%; top: 4%; width: 26vw; opacity: 0.7; }
.cloud--h3 { left: 34%; bottom: -6%; width: 34vw; animation-duration: 52s; }
.cloud--h4 { right: 22%; top: 34%; width: 18vw; opacity: 0.6; }

@keyframes bob {
  from { transform: translateY(-8px); }
  to { transform: translateY(10px); }
}
@keyframes drift {
  from { transform: translateX(-3vw); }
  to { transform: translateX(3vw); }
}

.hero__stage {
  position: absolute;
  z-index: 2;
  top: 58%;
  right: 3vw;
  width: min(46vw, 76svh, 660px);
  translate: 0 -50%;
  perspective: 1400px;
}
.hero__tilt {
  transform: rotateX(calc(var(--my) * -6deg)) rotateY(calc(var(--mx) * 8deg));
  transition: transform 0.6s ease-out;
  transform-style: preserve-3d;
  animation: bob 6s ease-in-out infinite alternate;
}
.isle--hero .tag--floor { left: 18%; top: 52%; --dx: -60px; --dy: 110px; --bx: -82%; --by: 0%; }
.isle--hero .tag--boss { left: 76%; top: 16%; --dx: -84px; --dy: -40px; --bx: -100%; }
.hero__dragon {
  position: absolute;
  left: -16%;
  top: -3%;
  width: 26%;
  animation: bob 4.5s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero__copy {
  position: relative;
  z-index: 3;
  padding: clamp(150px, 26svh, 230px) var(--gutter) 0;
  max-width: calc(min(640px, 46vw) + 2 * var(--gutter));
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(46px, 6.1vw, 98px);
  line-height: 0.98;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}
.hero__title span { display: block; }
.hero__promise {
  margin-top: 18px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
}
.hero__lede {
  margin-top: 10px;
  max-width: 46ch;
  font-size: 16px;
  color: var(--ink-soft);
}

.hero__stats {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  bottom: clamp(24px, 5svh, 52px);
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero__stats li {
  display: grid;
  padding: 0 clamp(18px, 2.6vw, 40px);
  border-left: 1.5px solid rgba(31, 24, 56, 0.4);
  line-height: 1.05;
}
.hero__stats li:first-child { padding-left: 0; border-left: 0; }
.hero__stats b { font-family: var(--display); font-size: clamp(30px, 3vw, 44px); font-weight: 400; }
.hero__stats span { font-weight: 800; font-size: 15px; letter-spacing: 0.04em; }

.hero__cue {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: clamp(24px, 5svh, 52px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.85);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.hero__arrow {
  width: 14px;
  height: 14px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  rotate: 45deg;
  translate: 0 -3px;
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge {
  50% { transform: translate(3px, 3px); }
}

/* ------------------------------------------------------------------ 2. a run */

.run {
  position: relative;
  padding: clamp(72px, 10vw, 130px) 0 clamp(60px, 8vw, 100px);
  background:
    linear-gradient(180deg, #f7b28a 0%, #ffe3c8 22%, #fff3e4 100%);
}
.run__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px);
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.run__step {
  position: relative;
  padding: 26px 24px 26px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.run__num {
  position: absolute;
  right: 18px;
  top: 10px;
  font-family: var(--display);
  font-size: 64px;
  line-height: 1;
  color: rgba(255, 154, 77, 0.28);
}
.run__icon { display: block; width: 72px; height: 72px; object-fit: contain; }
.run__step h3 { margin-top: 14px; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.run__step p { margin-top: 8px; color: var(--ink-soft); }

.fair {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px);
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.fair li {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #5a4bb8, #8d5fd6);
  color: #fff;
}
.fair__icon { grid-row: span 2; width: 52px; height: 52px; object-fit: contain; }
.fair b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.fair span { font-size: 15px; opacity: 0.9; }

/* ------------------------------------------------------------------ 3. the journey */

.journey { position: relative; background: #d27aa2; }
.journey__intro { background: linear-gradient(180deg, #fff3e4 0%, #fbe0cf 40%, #d27aa2 100%); }
.journey__head { padding: 20px 0 72px; }
.journey__track { position: relative; height: calc(10 * 125svh + 100svh); }
.journey__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.j-sky {
  position: absolute;
  inset: 0;
  background: url('assets/sky/sky-wide.webp') 50% 52% / cover no-repeat, #f6a77b;
}
.j-tint { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.j-isles,
.j-clouds { position: absolute; inset: 0; }
.j-isles .isle {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.jcloud {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(220px, 30vw, 420px);
  will-change: transform, opacity;
  pointer-events: none;
}
.jcloud img { display: block; width: 100%; }
.jcloud--islet { width: clamp(90px, 11vw, 170px); }

.j-panel {
  position: absolute;
  z-index: 300;
  left: var(--gutter);
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  width: min(450px, 36vw);
  pointer-events: none;
}
.panel {
  width: 100%;
  padding: 26px 26px 22px;
  border-radius: 26px;
  background: rgba(255, 250, 243, 0.93);
  box-shadow: 0 24px 50px -24px rgba(50, 20, 70, 0.7);
  pointer-events: auto;
  animation: panel-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
}
.panel__kicker {
  font-weight: 900;
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.panel__name {
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(36px, 3.6vw, 54px);
  line-height: 1;
}
.panel__tier {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #e0582f;
}
.panel__tier--2 { background: #8a3fd0; }
.panel__tier--3 { background: #2c1d4a; }
.route {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  position: relative;
}
.route::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 42%;
  border-top: 2px dashed rgba(31, 24, 56, 0.25);
}
.route__floor {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 14px;
}
.route__isle {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.route__floor:hover .route__isle,
.route__floor[aria-pressed='true'] .route__isle { transform: translateY(-5px) scale(1.08); }
.route__num {
  position: absolute;
  left: 50%;
  bottom: -4px;
  translate: -50% 0;
  min-width: 28px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}
.route__floor[aria-pressed='true'] .route__num { background: var(--sun); }
.route__floor--boss .route__num { background: #d8432a; }
.route__skull {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 26px;
  height: 26px;
}
.panel__floor {
  display: grid;
  min-height: 46px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.35;
}
.panel__floor span { color: var(--ink-soft); }
.panel__text { margin-top: 14px; font-size: 17px; }
.panel__ask { margin-top: 12px; font-family: var(--display); font-size: 26px; color: #ff6a4a; }

/* The area's Boss Battle boss under its floors, and its fight beside the island. */
.jboss {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 10px 14px 12px 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3a2463, #5a3290);
  color: #fff;
}
.jboss__img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); }
.jboss__copy { display: grid; justify-items: start; gap: 3px; line-height: 1.2; }
.jboss__copy small { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #ffb39e; }
.jboss__copy b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; }
.jboss__copy .tier { font-size: 11px; padding: 2px 10px; }
.jboss__others { font-size: 13px; opacity: 0.85; }
.j-fight {
  position: absolute;
  z-index: 300;
  right: 74px;
  bottom: 6svh;
  width: clamp(180px, 15vw, 240px);
  pointer-events: none;
}
.fightcard { margin: 0; padding: 8px 8px 10px; border-radius: 20px; background: rgba(31, 24, 56, 0.88); color: #fff; box-shadow: 0 20px 40px -20px rgba(20, 10, 40, 0.9); }
.fightcard .vid { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; }
.fightcard figcaption { display: grid; padding: 8px 6px 0; line-height: 1.2; }
.fightcard small { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.fightcard b { font-weight: 800; font-size: 15px; }

.j-rail {
  position: absolute;
  z-index: 320;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  gap: 6px;
}
.rail__dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(31, 24, 56, 0.45);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.rail__dot[aria-current='step'] { background: var(--sun); transform: scale(1.18); }
.rail__skull { width: 20px; height: 20px; }

.journey__stage.is-torment .panel { background: rgba(32, 8, 16, 0.9); color: #ffe9e0; }
.journey__stage.is-torment .panel__kicker { color: #ff9a80; }
.journey__stage.is-torment .panel__name { color: #ff6a4a; }

/* ------------------------------------------------------------------ 5. end */

.end {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: 90svh;
  padding: 80px var(--gutter);
  background: url('assets/sky/sky-wide.webp') 50% 70% / cover no-repeat, #f6a77b;
  overflow: hidden;
}
.end__isle .isle { width: min(100%, 540px); margin-inline: auto; animation: bob 6s ease-in-out infinite alternate; }
.end__copy {
  padding: 36px;
  border-radius: 30px;
  background: rgba(255, 250, 243, 0.9);
  box-shadow: var(--shadow);
}
.end__logo { display: block; width: min(320px, 70%); height: auto; }
.end__promise { margin-top: 22px; font-weight: 900; letter-spacing: 0.06em; color: var(--ink-soft); }

.foot {
  padding: 28px var(--gutter) 40px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  text-align: center;
}


/* ------------------------------------------------------------------ the island's Suplício hordes */

.hordes { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.hordes li {
  display: grid;
  grid-template-columns: 74px 1fr 64px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.hordes b { font-weight: 800; }
.hordes__bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9a4d, #ff4a3a) 0 0 / calc(var(--power) * 100%) 100% no-repeat, rgba(255, 255, 255, 0.12);
}
.hordes .is-torment .hordes__bar { background-image: linear-gradient(90deg, #ff4a3a, #c4202f); }
.hordes__power { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ sections below the sky */

.sec { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.sec > .wrap { position: relative; }
/* A painted island floating by each section's title, as the sky carries on down the page. */
.sec__isle {
  position: absolute;
  right: 0;
  top: -64px;
  width: clamp(110px, 14vw, 210px);
  height: auto;
  pointer-events: none;
  animation: bob 6s ease-in-out infinite alternate;
  filter: drop-shadow(0 24px 30px rgba(60, 30, 90, 0.25));
}
.sec--paper { background: var(--paper); }
.sec--cream { background: linear-gradient(180deg, #ffe9d6 0%, #fff3e6 100%); }
.sec--night {
  background:
    radial-gradient(80% 60% at 30% 0%, rgba(123, 92, 214, 0.45), transparent 70%),
    linear-gradient(180deg, #2b2463 0%, #1c1740 100%);
  color: var(--cream);
}
.sec--dusk {
  background:
    radial-gradient(70% 50% at 50% 100%, rgba(255, 90, 60, 0.28), transparent 70%),
    linear-gradient(180deg, #2a1838 0%, #170c22 100%);
  color: var(--cream);
}
.sec--night .kicker,
.sec--dusk .kicker { color: var(--gold); }
.sec--night .lede,
.sec--dusk .lede { color: rgba(255, 248, 239, 0.8); }
.lede--small { font-size: 16px; }

.subtitle {
  margin-top: clamp(48px, 6vw, 80px);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  scroll-margin-top: 24px;
}
.subtitle--small { font-size: clamp(22px, 2vw, 28px); }

/* Class tabs: the game's class icons in pills. */
.ctabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ctab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 18px 6px 8px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(31, 24, 56, 0.14);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.ctab:hover { transform: translateY(-1px); }
.ctab[aria-pressed='true'] { background: var(--ink); color: #fff; box-shadow: none; }
.ctab__icon { width: 34px; height: 34px; object-fit: contain; }
.ctabs--small { margin-top: 20px; }
.ctabs--small .ctab { min-height: 42px; font-size: 14.5px; padding-right: 14px; }
.ctabs--small .ctab__icon { width: 28px; height: 28px; }
.sec--night .ctab { background: rgba(255, 255, 255, 0.08); color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18); }
.sec--night .ctab[aria-pressed='true'] { background: var(--gold); color: var(--ink); }

/* ------------------------------------------------------------------ 3. one build per run */

.build-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 30px -22px rgba(60, 30, 90, 0.6);
}
.step__art { display: flex; align-items: center; gap: 8px; height: 76px; }
.step__icon { width: 64px; height: 64px; object-fit: contain; }
.step__icon--card { width: 56px; height: 56px; padding: 4px; border-radius: 14px; background: #f1e9ff; }
.step__icon--card:nth-child(2) { translate: 0 -8px; box-shadow: 0 0 0 3px var(--gold); }
.step__icon--evo { width: auto; height: 76px; border-radius: 10px; rotate: -4deg; box-shadow: 0 10px 18px -8px rgba(20, 10, 40, 0.6); }
.step__num { position: absolute; right: 18px; top: 10px; font-family: var(--display); font-size: 56px; line-height: 1; color: rgba(255, 154, 77, 0.28); }
.step h3 { margin-top: 8px; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.step p { color: var(--ink-soft); }

/* ------------------------------------------------------------------ the heroes and their attacks */

.blurb {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin-top: 22px;
  padding: 14px 22px 14px 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff1e2, #ffe1cf);
}
.blurb__isle { position: relative; width: 112px; height: 112px; }
.blurb__ground { position: absolute; left: -6%; bottom: -26%; width: 112%; animation: bob 5s ease-in-out infinite alternate; }
.blurb__hero { position: relative; width: 112px; height: 112px; object-fit: contain; translate: 0 -12%; }
.blurb__name { font-family: var(--display); font-size: 30px; line-height: 1; }
.blurb p { margin-top: 6px; color: var(--ink-soft); }

.attacks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  grid-auto-flow: dense;
  gap: clamp(12px, 1.6vw, 20px);
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px -20px rgba(60, 30, 90, 0.6);
  overflow: hidden;
}
.tile--lead { grid-column: span 2; grid-row: span 2; }
.tile__media { position: relative; aspect-ratio: 1; background: #6b8a3a; }
.tile__cap { display: grid; gap: 3px; padding: 12px 14px 14px; }
.tile__name { display: flex; align-items: center; gap: 8px; }
.tile__name b { font-weight: 900; font-size: 16.5px; line-height: 1.15; }
.tile__icon { flex: none; width: 30px; height: 30px; }
.tile__cap small { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.tile__cap p { margin-top: 4px; font-size: 15px; color: var(--ink-soft); }
.tile--lead .tile__name b { font-family: var(--display); font-weight: 400; font-size: 28px; }
.tile--lead .tile__icon { width: 40px; height: 40px; }

.evo-lines { display: grid; gap: 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.evo-line { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.evo-line__from { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.evo-line__icon { width: 56px; height: 56px; }
.evo-line__from span { display: grid; line-height: 1.15; }
.evo-line__from small { font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.evo-line__from b { font-family: var(--display); font-weight: 400; font-size: 21px; overflow-wrap: anywhere; }
.evo-line__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile__card {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26%;
  border-radius: 8px;
  rotate: 5deg;
  box-shadow: 0 8px 16px -6px rgba(20, 10, 40, 0.7);
  pointer-events: none;
}
.tile--evo .tile__cap b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; }
.tile--evo .tile__cap p { font-size: 14px; }

.attrs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.attrs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  font-size: 14.5px;
  box-shadow: inset 0 0 0 1.5px rgba(31, 24, 56, 0.1);
}
.attr__icon { width: 32px; height: 32px; }

/* ------------------------------------------------------------------ the stage */
/* A painted backdrop square with its pedestal at (50%, 81%); the hero's picture is placed so
   its feet (--feet, measured by tools/build_site_assets.sh) stand on the pedestal. */

.stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 28px;
  background: #6d79c9 center / cover no-repeat;
  box-shadow: 0 30px 60px -30px rgba(10, 5, 30, 0.8);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  --pedestal: 81%;
}
.stage--throne { --feet: 90.07%; --pic-h: 88%; }
.stage--armory { --feet: 89.62%; --pic-h: 67%; }
.stage--courtyard { --feet: 93.52%; --pic-h: 70%; --pedestal: 84%; }
.stage--throne.is-near { background-image: url('assets/backdrops/throne_hall-wide.webp'); }
.stage--armory.is-near { background-image: url('assets/backdrops/armory-wide.webp'); }
.stage--courtyard.is-near { background-image: url('assets/backdrops/courtyard-wide.webp'); }
.stage__hero { position: absolute; inset: 0; }
.stage__pic {
  position: absolute;
  left: 50%;
  top: var(--pedestal);
  height: var(--pic-h);
  width: auto;
  max-width: none;
  translate: -50% calc(-1 * var(--feet));
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}
.stage__pic.is-on { opacity: 1; }
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.stage.is-loading::before {
  content: '';
  position: absolute;
  z-index: 2;
  right: 18px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  animation-delay: 0.15s;
}
@keyframes spin { to { rotate: 1turn; } }

.room {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  margin-top: 36px;
}
.room__stage { position: sticky; top: 20px; }
.stage-wrap { position: relative; }
.turn-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 24, 56, 0.82);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.turn-btn::before { content: '\21BB'; margin-right: 8px; font-size: 17px; }
.turn-btn:hover { background: var(--ink); }
.room__label {
  margin-top: 26px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sec--night .room__label { color: var(--gold); }

/* Item slots: every icon in the same square frame, so the pieces read at one size. */
.slots { display: grid; gap: 10px; margin-top: 10px; }
.slots--sets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slots--backs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 0 4px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.slot__frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, #4b4396, #2a2560);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 8px 16px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s;
}
.slot__icon { width: 74%; height: 74%; object-fit: contain; }
.slot:hover .slot__frame { transform: translateY(-3px); }
.slot[aria-pressed='true'] .slot__frame {
  background: radial-gradient(circle at 50% 35%, #6a5fd0, #3a3290);
  box-shadow: inset 0 0 0 3px var(--gold), 0 0 22px -4px var(--aura, rgba(255, 201, 74, 0.7));
}
.slot--set .slot__frame { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 18px -8px var(--aura, transparent); }
.slot__name {
  max-width: 100%;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.slot__tier { display: flex; gap: 3px; }
.slot__tier i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.slot__tier i.is-on { background: var(--gold); }
.slot__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #7fd3ff;
  color: var(--ink);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.slot--none .slot__frame::after {
  content: '';
  width: 34%;
  height: 34%;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.35);
}

.fit-info { display: grid; gap: 12px; margin-top: 26px; }
.fit-card {
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
}
.fit-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.aura-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--aura) 22%, #fff);
  color: var(--ink);
}
.aura-chip::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--aura); box-shadow: 0 0 8px var(--aura); }
.fit-card__name { margin-top: 4px; font-family: var(--display); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; }
.fit-card__name--small { font-size: 24px; }
.pieces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.pieces li { display: grid; justify-items: center; gap: 4px; text-align: center; }
.pieces__icon { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 6px; border-radius: 14px; background: #f1e9ff; }
.pieces b { font-size: 12px; line-height: 1.15; }
.pieces small { font-size: 11px; color: var(--ink-soft); }
.bonuses { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; }
.bonuses b { display: inline-block; min-width: 70px; margin-right: 6px; font-weight: 900; }
.fit-card__andar { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.fit-card--back { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; }
.fit-card__icon { width: 72px; height: 72px; padding: 6px; border-radius: 16px; background: #f1e9ff; }
.fit-card__fly {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #7fd3ff;
  font-weight: 900;
  font-size: 14px;
}
.fit-card__stats { margin-top: 6px; font-size: 14.5px; }

/* ------------------------------------------------------------------ 6. appearance */

.look__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.look__stage { display: grid; gap: 14px; }
.look__frame { position: relative; }
.arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.92);
  box-shadow: 0 10px 20px -10px rgba(20, 10, 40, 0.7);
  cursor: pointer;
  transition: transform 0.2s;
}
.arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  border-left: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  translate: -35% -50%;
  rotate: 45deg;
}
.arrow--prev { left: 14px; }
.arrow--next { right: 14px; }
.arrow--next::before { rotate: -135deg; translate: -65% -50%; }
.arrow:hover { transform: scale(1.08); }
.look__name { display: grid; justify-items: center; gap: 2px; text-align: center; }
.look__name small { font-weight: 900; font-size: 12.5px; letter-spacing: 0.14em; color: var(--ink-soft); }
.look__name b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; }
.look-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #dff3d8;
  color: #2f6b25;
  font-weight: 900;
  font-size: 13px;
}
.look-tag--premium { background: #f3e0ff; color: #7a2fb0; }
.look-tag__gem { width: 18px; height: 18px; }
.faces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.face {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffe4cf;
  box-shadow: inset 0 0 0 2px rgba(31, 24, 56, 0.1);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.face__img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.face:hover { transform: translateY(-3px); }
.face[aria-pressed='true'] { box-shadow: 0 0 0 4px var(--gold), 0 0 0 6px var(--ink); }
.face--premium { background: #f0dcff; }
.face--premium::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  background: url('assets/ui/premium_gem.webp') center / contain no-repeat;
}

/* ------------------------------------------------------------------ 7. the armory */

.room--arms .room__panel { padding-top: 0; }
.stage-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: grid;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.93);
  box-shadow: 0 10px 20px -12px rgba(20, 10, 40, 0.7);
  line-height: 1.15;
}
.stage-caption small { font-weight: 900; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.stage-caption b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.ladder { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.rung {
  display: grid;
  grid-template-columns: 30px 56px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 14px 8px 10px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(31, 24, 56, 0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.rung:hover { transform: translateX(3px); }
.rung[aria-pressed='true'] { background: var(--ink); color: #fff; }
.rung__no { font-family: var(--display); font-size: 22px; color: #c2501a; }
.rung[aria-pressed='true'] .rung__no { color: var(--sun); }
.rung__icon { width: 56px; height: 56px; object-fit: contain; }
.rung__text { display: grid; line-height: 1.25; min-width: 0; }
.rung__text b { font-weight: 900; font-size: 16px; }
.rung__text small { font-size: 13px; opacity: 0.75; }
.shields { margin-top: 20px; }
.shields ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.shields li { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.shields span { display: grid; line-height: 1.2; }
.shields b { font-size: 14px; }
.shields small { font-size: 12.5px; color: var(--ink-soft); }
.shield__icon { width: 44px; height: 44px; }

.forge {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(22px, 3vw, 36px);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}
.forge .subtitle { margin-top: 4px; }
.forge__copy p:not(.kicker) { margin-top: 10px; color: var(--ink-soft); }
.rarities { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.rarity {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--rarity) 14%, #fff);
  border-top: 6px solid var(--rarity);
}
.rarity b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.05; color: color-mix(in srgb, var(--rarity) 52%, #1f1838); }
.rarity span { font-size: 13px; color: var(--ink-soft); }
.rarity--0 { --rarity: #9c97ad; }
.rarity--1 { --rarity: #4fbf5a; }
.rarity--2 { --rarity: #3d8fe6; }
.rarity--3 { --rarity: #a35be8; }
.rarity--4 { --rarity: #ff8a1f; }

/* ------------------------------------------------------------------ tier chips */

.tier { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 900; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; background: #e0582f; color: #fff; }
.tier--2 { background: #8a3fd0; }
.tier--3 { background: #2c1d4a; box-shadow: inset 0 0 0 1.5px #ff6a4a; }

/* ------------------------------------------------------------------ 9. levels */

.track {
  position: relative;
  height: 300px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc94a, #ff9a4d 50%, #ff5a7a);
}
.mark {
  position: absolute;
  left: calc(var(--at) * (100% - 120px));
  top: 0;
  display: grid;
  justify-items: center;
  align-content: end;
  width: 120px;
  height: 50%;
  padding-bottom: 22px;
  text-align: center;
}
.mark::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ink);
}
.mark:nth-child(even) { top: 50%; align-content: start; padding: 22px 0 0; }
.mark:nth-child(even)::after { top: -9px; bottom: auto; }
.mark__level { font-weight: 900; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.mark__icon { width: 52px; height: 52px; margin: 4px 0 2px; }
.mark__name { font-weight: 900; font-size: 14px; line-height: 1.15; }
.mark__what { font-size: 12px; color: var(--ink-soft); }
.mark--phoenix .mark__icon { filter: drop-shadow(0 0 10px rgba(255, 120, 40, 0.8)); }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.lane { padding: 18px 20px; border-radius: 22px; background: #fff; box-shadow: 0 14px 30px -22px rgba(60, 30, 90, 0.6); }
.lane h3 { font-family: var(--display); font-size: 26px; }
.lane ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.lane li { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.lane__icon { width: 32px; height: 32px; }

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

@media (max-width: 1280px) {
  .top__soon { display: none; }
}

@media (max-width: 1100px) {
}

@media (max-width: 920px) {
  .room,
  .look__grid,
  .forge { grid-template-columns: minmax(0, 1fr); }
  .room__stage { position: relative; top: auto; }
  /* Title, then the stage, then the hero and face pickers. */
  .look__grid { row-gap: 0; }
  .look__copy { display: contents; }
  .look__stage { order: 1; margin-top: 24px; }
  #look-tabs,
  .faces { order: 2; }
  .evo-line { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .evo-line__from { padding-top: 0; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .top { padding-top: 14px; gap: 12px; }
  .top__nav { display: none; }
  .lang { margin-left: auto; }

  .hero { min-height: 0; display: flex; flex-direction: column; padding-bottom: 28px; }
  .hero__sky { background-image: url('assets/sky/sky.webp'); background-position: 50% 40%; }
  .hero__sky::after { background: linear-gradient(180deg, rgba(255, 233, 214, 0.75) 0%, rgba(255, 226, 205, 0.25) 40%, rgba(255, 220, 200, 0) 60%); }
  .hero__copy { order: 1; max-width: none; padding-top: 96px; }
  .hero__title { font-size: clamp(40px, 11.5vw, 60px); }
  .hero__promise { margin-top: 12px; }
  .hero__stage {
    order: 2;
    position: relative;
    top: auto;
    right: auto;
    width: 112vw;
    margin: 40px 0 0 -6vw;
    translate: none;
  }
  .hero__dragon { display: none; }
  .isle--hero .tag--floor { left: 24%; top: 56%; --dx: -20px; --dy: 92px; --bx: -14%; --by: 0%; }
  .isle--hero .tag--boss { left: 76%; top: 16%; --dx: -10px; --dy: -34px; --bx: -76%; }
  .tag__box { font-size: 12.5px; padding: 6px 9px 7px; }
  .tag__box small { font-size: 10px; }
  .hero__stats { order: 3; position: relative; left: auto; bottom: auto; margin: 100px var(--gutter) 0; }
  .hero__cue { display: none; }
  .far--snow { left: auto; right: 2%; top: 30%; }
  .far--lava { right: -8%; top: 10%; }
  .far--crystal { display: none; }
  .far--desert { left: -10%; bottom: 14%; }
  .cloud--h0 { width: 90vw; top: 70%; }
  .cloud--h1 { width: 90vw; }

  .run__steps,
  .fair { grid-template-columns: 1fr; }
  .run__step { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; padding: 18px; }
  .run__icon { grid-row: span 2; width: 64px; height: 64px; }
  .run__step h3 { margin-top: 0; font-size: 22px; align-self: end; }
  .run__step p { margin-top: 2px; font-size: 15px; }
  .run__num { font-size: 48px; }

  .journey__track { height: calc(10 * 115svh + 100svh); }
  .j-sky { background-image: url('assets/sky/sky.webp'); background-size: auto 150%; }
  .jcloud { width: 64vw; }
  .jcloud--islet { width: 28vw; }
  .j-panel {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    display: block;
  }
  .panel { padding: 16px 16px 14px; border-radius: 22px; }
  .panel__kicker { font-size: 11px; }
  .panel__name { font-size: 32px; }
  .panel__tier { margin-top: 6px; font-size: 11.5px; padding: 3px 10px; }
  .route { margin-top: 10px; gap: 4px; }
  .route__num { font-size: 13px; min-width: 24px; }
  .route__skull { width: 20px; height: 20px; }
  .panel__floor { min-height: 0; margin-top: 10px; font-size: 13.5px; }
  .panel__text { font-size: 15px; margin-top: 8px; }
  .panel__ask { font-size: 22px; }
  .hordes { margin-top: 10px; gap: 4px; }
  .hordes li { grid-template-columns: 64px 1fr 56px; font-size: 13px; }
  .jboss { grid-template-columns: 52px 1fr; gap: 10px; margin-top: 10px; padding: 8px 10px; }
  .jboss__img { width: 52px; height: 52px; }
  .jboss__copy b { font-size: 19px; }
  .jboss__others { display: none; }
  .j-fight { display: none; }
  .j-rail {
    top: 12px;
    right: 50%;
    translate: 50% 0;
    grid-auto-flow: column;
    gap: 4px;
  }
  .rail__dot { width: 26px; height: 26px; font-size: 12px; border-width: 1.5px; }
  .rail__skull { width: 16px; height: 16px; }
  .j-isles .tag--floor { --dx: -10px; --dy: -58px; --bx: -30%; }
  .j-isles .tag--boss { --dx: -8px; --dy: -40px; --bx: -76%; }

  .ctab { min-height: 44px; padding-right: 14px; font-size: 15px; }
  .ctab__icon { width: 30px; height: 30px; }
  .blurb { grid-template-columns: 76px 1fr; gap: 14px; padding: 12px 16px 12px 10px; }
  .blurb__isle,
  .blurb__hero { width: 76px; height: 76px; }
  .sec__isle { width: 96px; top: -36px; }
  .blurb__name { font-size: 24px; }
  .blurb p { font-size: 14.5px; }
  .build-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .step { grid-template-columns: auto 1fr; column-gap: 14px; padding: 16px; }
  .step__art { grid-row: span 2; height: auto; gap: 4px; }
  .step__icon { width: 48px; height: 48px; }
  .step__icon--card { width: 40px; height: 40px; }
  .step__icon--card:nth-child(2) { translate: 0 -4px; }
  .step__icon--evo { height: 60px; }
  .step h3 { margin-top: 0; font-size: 21px; }
  .step p { font-size: 14.5px; }
  .step__num { font-size: 40px; }
  .attacks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { border-radius: 16px; }
  .tile__cap { padding: 9px 10px 11px; }
  .tile__name b { font-size: 14.5px; }
  .tile__icon { width: 24px; height: 24px; }
  .tile__cap small { font-size: 12px; }
  .tile--lead .tile__name b { font-size: 24px; }
  .evo-line__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile--evo .tile__cap b { font-size: 15px; }
  .tile--evo .tile__cap p { display: none; }

  .stage { border-radius: 22px; }
  /* The stage stays in view while the slots below it are picked. */
  .fit .room__stage,
  .arms .room__stage {
    position: sticky;
    top: 0;
    z-index: 5;
    margin-inline: calc(-1 * var(--gutter));
    padding: 8px var(--gutter);
    background: #241e55;
  }
  .arms .room__stage { background: #ffecdc; }
  .fit .stage-wrap,
  .arms .stage-wrap { width: min(100%, 46svh); margin-inline: auto; }
  .slots { gap: 8px; }
  .slot__frame { border-radius: 14px; }
  .slot__name { font-size: 12px; }
  .slot__badge { font-size: 10px; padding: 1px 6px; }
  .fit-card { padding: 16px; }
  .pieces { gap: 5px; }
  .pieces b { font-size: 11px; }
  .pieces small { display: none; }
  .turn-btn { right: 10px; bottom: 10px; min-height: 40px; padding: 6px 14px; font-size: 14px; }
  .arrow { width: 44px; height: 44px; margin-top: -22px; }
  .arrow--prev { left: 8px; }
  .arrow--next { right: 8px; }
  .faces { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
  .stage-caption { left: 10px; bottom: 10px; padding: 8px 12px; }
  .stage-caption b { font-size: 19px; }
  .rung { grid-template-columns: 24px 48px 1fr; gap: 10px; padding: 6px 12px 6px 8px; }
  .rung__icon { width: 48px; height: 48px; }
  .rung__text b { font-size: 15px; }
  .rung__text small { font-size: 12px; }
  .rarities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { height: auto; display: grid; gap: 8px; }
  .track::before { left: 27px; right: auto; top: 0; bottom: 0; width: 6px; height: auto; margin: 0; background: linear-gradient(180deg, #ffc94a, #ff9a4d 50%, #ff5a7a); }
  .mark,
  .mark:nth-child(even) {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    display: grid;
    grid-template-columns: 60px auto 1fr;
    grid-template-areas: 'icon level level' 'icon name name' 'icon what what';
    justify-items: start;
    align-content: center;
    column-gap: 12px;
    padding: 6px 0 6px 0;
    text-align: left;
  }
  .mark::after,
  .mark:nth-child(even)::after { display: none; }
  .mark__icon { grid-area: icon; width: 60px; height: 60px; margin: 0; padding: 6px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--ink); }
  .mark__level { grid-area: level; }
  .mark__name { grid-area: name; }
  .mark__what { grid-area: what; }
  .lanes { grid-template-columns: minmax(0, 1fr); }

  .end { grid-template-columns: 1fr; padding: 56px var(--gutter) 64px; min-height: 0; }
  .end__isle { order: 2; }
  .end__copy { padding: 24px; }
  .stores { flex-wrap: nowrap; gap: 10px; }
  .store { flex: 1 1 0; gap: 10px; padding: 8px 12px; min-height: 54px; }
  .store__logo { width: 24px; height: 24px; }
  .store__text b { font-size: 17px; white-space: nowrap; }
}

@media (max-width: 400px) {
  .hero__stats li { padding: 0 14px; }
  .store { flex: 1 1 150px; }
  .slots--backs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
