:root {
  color-scheme: dark;
  --ink: #0d0c0a;
  --ink-soft: #14110e;
  --charcoal: #1b1916;
  --stone: #28241f;
  --stone-light: #393229;
  --leather: #3b291d;
  --leather-deep: #241811;
  --bronze: #8c6a3f;
  --bronze-dark: #5f4528;
  --gold: #c7a667;
  --gold-bright: #e0c485;
  --parchment: #d8c8a6;
  --sand: #aa997a;
  --ash: #81796e;
  --crimson: #7d2824;
  --crimson-dark: #441614;
  --success: #77815c;
  --border: rgba(199, 166, 103, 0.24);
  --border-strong: rgba(199, 166, 103, 0.48);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  --content: 1240px;
  --header-height: 76px;
  --radius: 5px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  scrollbar-color: var(--bronze-dark) var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 15% 0%, rgba(125, 40, 36, 0.09), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.016) 25%, transparent 25%) 0 0 / 8px 8px,
    var(--ink-soft);
  color: var(--parchment);
  font: 400 1rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--gold-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #f1dca9;
}

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

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin-block-start: 0;
}

h1,
h2,
h3,
h4 {
  color: #eee0bd;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.17;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

[hidden],
.is-hidden {
  display: none !important;
}

html[data-active-lang="en"] [data-lang="ar"],
html[data-active-lang="ar"] [data-lang="en"] {
  display: none !important;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  border: 1px solid var(--gold);
  background: var(--ink);
  color: var(--parchment);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-bridge {
  border-block-end: 1px solid rgba(199, 166, 103, 0.18);
  background: linear-gradient(180deg, rgba(20, 17, 14, 0.98), rgba(13, 12, 10, 0.92));
}

.site-bridge-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: min(calc(100% - 2rem), 1480px);
  margin-inline: auto;
  padding-block: 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.site-bridge-link {
  color: var(--sand);
  text-decoration: none;
}

.site-bridge-link:hover,
.site-bridge-link:focus-visible {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-bridge-link.is-active {
  color: var(--gold);
  font-weight: 600;
}

.site-bridge-sep {
  color: var(--ash);
  opacity: 0.7;
}

/* Reserve the shared shell before the deferred runtime injects its markup. */
[data-site-header] {
  display: block;
  min-height: calc(var(--header-height) + 2.1rem);
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-block-end: 1px solid var(--border-strong);
  background: rgba(13, 12, 10, 0.96);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.42);
}

.masthead {
  display: flex;
  align-items: center;
  width: min(calc(100% - 2rem), 1480px);
  min-height: var(--header-height);
  margin-inline: auto;
  gap: 0.75rem;
}

/* Season Switcher Positioning & Controls */
.season-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 105;
}

html[dir="ltr"] .season-switcher {
  order: -1;
  margin-inline-end: 0.25rem;
}

html[dir="rtl"] .season-switcher {
  order: 99;
  margin-inline-start: 0.25rem;
}

.season-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(199, 167, 109, 0.45);
  background: linear-gradient(180deg, rgba(28, 24, 20, 0.95), rgba(16, 14, 12, 0.98));
  color: var(--gold-bright);
  font-family: var(--font-display, inherit);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(242, 214, 153, 0.15);
  transition: all 180ms ease;
  user-select: none;
}

.season-toggle-btn:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(40, 34, 28, 0.98), rgba(22, 19, 16, 0.98));
  box-shadow: 0 0 14px rgba(199, 167, 109, 0.35), inset 0 1px 0 rgba(242, 214, 153, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.season-toggle-btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.season-gem {
  width: 11px;
  height: 11px;
  rotate: 45deg;
  border-radius: 2px;
  flex: 0 0 11px;
  transition: box-shadow 200ms ease, background 200ms ease;
}

.season-gem.s1 {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border: 1px solid #7dd3fc;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8), 0 0 2px #fff;
}

.season-gem.default {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  border: 1px solid var(--gold);
  box-shadow: 0 0 8px rgba(139, 30, 40, 0.7);
}

.season-current-label {
  display: inline-block;
  line-height: 1;
}

.season-chevron {
  width: 10px;
  height: 6px;
  color: var(--ash);
  transition: transform 200ms ease, color 180ms ease;
}

.season-toggle-btn[aria-expanded="true"] .season-chevron {
  transform: rotate(180deg);
  color: var(--gold-bright);
}

.season-toggle-btn[aria-expanded="true"] {
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(199, 167, 109, 0.4);
}

/* Dropdown Menu */
.season-menu {
  position: absolute;
  top: calc(100% + 8px);
  width: 290px;
  background: #14120f;
  border: 1px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6);
  padding: 0.6rem;
  backdrop-filter: blur(16px);
  z-index: 120;
  animation: seasonFadeIn 150ms ease-out;
}

html[dir="ltr"] .season-menu {
  left: 0;
}

html[dir="rtl"] .season-menu {
  left: 0;
}

@keyframes seasonFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.season-menu-header {
  padding: 0.35rem 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.4rem;
}

.season-menu-title {
  font-family: var(--font-display, inherit);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 600;
}

.season-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.season-option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
  text-align: start;
  transition: background 150ms ease, border-color 150ms ease;
  font-family: inherit;
}

.season-option-item:hover {
  background: rgba(199, 167, 109, 0.12);
  border-color: rgba(199, 167, 109, 0.3);
}

.season-option-item.is-active {
  background: rgba(199, 167, 109, 0.18);
  border-color: var(--gold);
}

.season-option-marker {
  width: 12px;
  height: 12px;
  rotate: 45deg;
  border-radius: 2px;
  flex: 0 0 12px;
}

.season-option-marker.s1 {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border: 1px solid #7dd3fc;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
}

.season-option-marker.default {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  border: 1px solid var(--gold);
  box-shadow: 0 0 6px rgba(139, 30, 40, 0.6);
}

.season-option-details {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  flex: 1 1 auto;
}

.season-option-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display, inherit);
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.season-option-desc {
  font-size: 0.72rem;
  color: var(--ash);
  line-height: 1.25;
}

/* Mobile Season Switcher in Drawer */
.mobile-season-block {
  display: none;
  padding: 1rem 0.5rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.75rem;
}

.mobile-season-title {
  display: block;
  font-family: var(--font-display, inherit);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.5rem;
}

.mobile-season-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mobile-season-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(199, 167, 109, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--parchment);
  font-family: var(--font-display, inherit);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-season-btn.is-active {
  background: rgba(199, 167, 109, 0.2);
  border-color: var(--gold);
  color: var(--gold-bright);
}

@media (max-width: 1080px) {
  .mobile-season-block {
    display: block;
  }
}

@media (max-width: 640px) {
  .season-toggle-btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.74rem;
    gap: 0.35rem;
  }
  .season-menu {
    width: min(280px, calc(100vw - 2rem));
  }
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  color: var(--parchment);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  rotate: 45deg;
  border: 1px solid var(--gold);
  background: linear-gradient(145deg, var(--crimson), var(--crimson-dark));
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px var(--bronze);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold-bright);
  background: var(--bronze-dark);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-block-start: 0.28rem;
  color: var(--ash);
  font-size: 0.66rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.55rem;
  border-block-end: 2px solid transparent;
  color: var(--sand);
  font-size: 0.79rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  border-block-end-color: var(--crimson);
  color: var(--parchment);
  background: linear-gradient(180deg, transparent, rgba(125, 40, 36, 0.12));
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
}

.icon-button,
.lang-button,
.button,
.filter-button,
.stage-tab {
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: linear-gradient(180deg, #2b251e, #17130f);
  color: var(--parchment);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.025em;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.lang-button:hover,
.button:hover,
.filter-button:hover,
.stage-tab:hover {
  border-color: var(--gold);
  color: #f2deb0;
  background: linear-gradient(180deg, #382f25, #1a1511);
}

.lang-button {
  min-width: 74px;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.menu-button {
  display: none;
  width: 42px;
  height: 40px;
  padding: 9px;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.menu-lines {
  position: relative;
}

.menu-lines::before,
.menu-lines::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.menu-lines::before { inset-block-start: -7px; }
.menu-lines::after { inset-block-start: 7px; }

.nav-scrim {
  display: none;
}

.site-main {
  min-height: calc(100vh - var(--header-height));
}

.container {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(650px, calc(100vh - var(--header-height)));
  display: grid;
  align-items: end;
  overflow: hidden;
  border-block-end: 1px solid var(--border-strong);
  background-image:
    linear-gradient(90deg, rgba(13, 12, 10, 0.94) 0%, rgba(13, 12, 10, 0.63) 42%, rgba(13, 12, 10, 0.12) 75%),
    linear-gradient(0deg, var(--ink-soft) 0%, transparent 45%),
    var(--hero-image, url("../images/arise-citadel-r1.webp"));
  background-position: center;
  background-size: cover;
}

[dir="rtl"] .hero {
  background-image:
    linear-gradient(270deg, rgba(13, 12, 10, 0.94) 0%, rgba(13, 12, 10, 0.63) 42%, rgba(13, 12, 10, 0.12) 75%),
    linear-gradient(0deg, var(--ink-soft) 0%, transparent 45%),
    var(--hero-image, url("../images/arise-citadel-r1.webp"));
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, transparent 49.8%, rgba(199, 166, 103, 0.035) 50%, transparent 50.2%);
  background-size: 26px 100%;
  pointer-events: none;
}

.hero-compact {
  min-height: 355px;
  align-items: end;
  background-position: center 38%;
}

.hero-content {
  width: min(680px, 100%);
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-compact .hero-content {
  padding-block: 5.5rem 3rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: 0.9rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
}

.display-title {
  max-width: 13ch;
  margin-block-end: 1rem;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  letter-spacing: -0.025em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.72);
}

.hero-compact .display-title {
  font-size: clamp(2.35rem, 6vw, 4.3rem);
}

.hero-lead {
  max-width: 60ch;
  margin-block-end: 1.55rem;
  color: #c9bea7;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1rem;
  text-decoration: none;
}

.button-primary {
  border-color: #a9874d;
  background: linear-gradient(180deg, #9a7844, #6d4e2c);
  color: #120f0b;
  text-shadow: 0 1px rgba(255, 255, 255, 0.2);
}

.button-primary:hover {
  background: linear-gradient(180deg, #c19b59, #806039);
  color: #0c0a08;
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-tight {
  padding-block: 2.5rem;
}

.section-dark {
  border-block: 1px solid rgba(199, 166, 103, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem;
  margin-block-end: 2rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--border);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.section-heading p {
  max-width: 55ch;
  margin: 0;
  color: var(--ash);
}

.ornament-title {
  position: relative;
  padding-inline-start: 1rem;
}

.ornament-title::before {
  content: "";
  position: absolute;
  inset-block: 0.1em;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(var(--gold), var(--crimson));
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.018), transparent 36%),
    #1a1713;
  box-shadow: var(--shadow);
}

.content-panel {
  padding: clamp(1.1rem, 3vw, 2rem);
}

.prose {
  max-width: 76ch;
}

.prose h2,
.prose h3 {
  margin-block-start: 2rem;
}

.prose li + li {
  margin-block-start: 0.45rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-block-start: -1px;
  border-block: 1px solid var(--border-strong);
  background: #17130f;
}

.stat-block {
  min-width: 0;
  padding: 1.35rem clamp(1rem, 3vw, 2rem);
  border-inline-end: 1px solid var(--border);
}

.stat-block:last-child {
  border-inline-end: 0;
}

.stat-label {
  display: block;
  margin-block-end: 0.25rem;
  color: var(--ash);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
}

.feature-grid,
.category-grid,
.collection-grid,
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.category-card,
.collection-card,
.class-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1a1713;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.feature-card:hover,
.category-card:hover,
.collection-card:hover,
.class-card:hover {
  transform: translateY(-2px);
  border-color: var(--bronze);
  background: #211c17;
}

.feature-card {
  display: grid;
  min-height: 220px;
  align-content: end;
  padding: 1.35rem;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-block-start: 3px solid var(--crimson);
  pointer-events: none;
}

.feature-kicker,
.card-kicker {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feature-card h3 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.55rem;
}

.feature-card p {
  margin: 0;
  color: var(--ash);
  font-size: 0.93rem;
}

.category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.category-card {
  display: grid;
  width: 100%;
  min-height: 156px;
  padding: 1.1rem;
  text-align: start;
  cursor: pointer;
}

.category-card[aria-pressed="true"] {
  border-color: var(--gold);
  background: linear-gradient(155deg, #32251a, #191511 60%);
}

.category-icon,
.class-icon,
.collection-icon,
.item-icon,
.ingredient-icon,
.pet-icon {
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--ink);
}

.category-icon {
  width: 46px;
  height: 46px;
  margin-block-end: 1.2rem;
}

.category-name {
  align-self: end;
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 1.04rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1.5rem;
}

.search-field {
  position: relative;
  flex: 1 1 320px;
  max-width: 620px;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #100e0c;
  color: var(--parchment);
}

.search-input::placeholder {
  color: #736b60;
}

.search-input:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(199, 166, 103, 0.18);
  outline-offset: 1px;
}

.filter-group,
.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-button,
.stage-tab {
  min-height: 40px;
  padding: 0.45rem 0.75rem;
}

.filter-button[aria-pressed="true"],
.stage-tab[aria-selected="true"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, #765936, #3f2c1b);
  color: #f3dfb3;
}

.category-banner {
  position: relative;
  min-height: 250px;
  margin-block: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #17130f;
}

.category-banner img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.08) brightness(0.75);
}

.category-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 12, 10, 0.88), transparent 75%);
  pointer-events: none;
}

.category-description {
  margin-block-end: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-inline-start: 3px solid var(--crimson);
  background: rgba(0, 0, 0, 0.18);
  color: #c7bca6;
}

.category-description table {
  width: 100% !important;
  color: inherit;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.item-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-block-start: 3px solid var(--bronze-dark);
  border-radius: var(--radius);
  background: #191612;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.item-card[data-rarity="legendary"] { border-block-start-color: var(--gold); }
.item-card[data-rarity="epic"] { border-block-start-color: #8a5c50; }
.item-card[data-rarity="rare"] { border-block-start-color: #68798a; }

.item-header,
.pet-header,
.collection-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border-block-end: 1px solid var(--border);
  background: #211c17;
}

.item-icon,
.pet-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
}

.item-title,
.pet-title,
.collection-title {
  min-width: 0;
  flex: 1 1 auto;
}

.item-title h3,
.pet-title h3,
.collection-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.rarity-label {
  display: inline-block;
  margin-block-start: 0.25rem;
  color: var(--gold);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.item-body {
  padding: 1rem;
}

.item-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  margin-block-end: 1rem;
  padding-block-end: 0.85rem;
  border-block-end: 1px solid var(--border);
  color: var(--ash);
  font-size: 0.82rem;
}

.gs-value {
  color: var(--gold-bright);
  font-weight: 750;
}

.ingredient-list {
  display: grid;
  gap: 0.45rem;
  margin-block-end: 1rem;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.22);
}

.ingredient-icon {
  width: 32px;
  height: 32px;
}

.ingredient-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #c4baa5;
  font-size: 0.82rem;
}

.ingredient-count {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 750;
}

.ingredient-or {
  color: var(--bronze);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.obtain-note {
  padding: 0.7rem;
  border-inline-start: 2px solid var(--bronze);
  background: rgba(140, 106, 63, 0.08);
  color: #bdb19b;
  font-size: 0.82rem;
}

.pet-list {
  display: grid;
  gap: 1rem;
}

.pet-card {
  --pet-rarity: var(--bronze);
  --pet-rarity-wash: rgba(145, 108, 66, 0.13);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--pet-rarity);
  border-radius: var(--radius);
  background: #191612;
}

.pet-card[data-rarity="epic"] {
  --pet-rarity: #b34f43;
  --pet-rarity-wash: rgba(179, 79, 67, 0.15);
}

.pet-card[data-rarity="unique"] {
  --pet-rarity: #c99a45;
  --pet-rarity-wash: rgba(201, 154, 69, 0.15);
}

.pet-card[data-rarity="special"] {
  --pet-rarity: #4779ad;
  --pet-rarity-wash: rgba(71, 121, 173, 0.16);
}

.pet-card[data-rarity="rare"] {
  --pet-rarity: #70adc1;
  --pet-rarity-wash: rgba(112, 173, 193, 0.15);
}

.pet-card[data-rarity="basic"] {
  --pet-rarity: #6f965b;
  --pet-rarity-wash: rgba(111, 150, 91, 0.15);
}

.pet-card .pet-header {
  background: linear-gradient(90deg, var(--pet-rarity-wash), #211c17 48%);
}

[dir="rtl"] .pet-card .pet-header {
  background: linear-gradient(270deg, var(--pet-rarity-wash), #211c17 48%);
}

.pet-card .pet-icon {
  border-color: var(--pet-rarity);
  box-shadow: 0 0 0 2px var(--pet-rarity-wash);
}

.pet-card .rarity-label {
  padding: 0.16rem 0.42rem;
  border: 1px solid var(--pet-rarity);
  color: var(--pet-rarity);
  background: var(--pet-rarity-wash);
}

#pet-filters .filter-button[data-rarity="epic"] { --pet-filter-rarity: #b34f43; }
#pet-filters .filter-button[data-rarity="unique"] { --pet-filter-rarity: #c99a45; }
#pet-filters .filter-button[data-rarity="special"] { --pet-filter-rarity: #4779ad; }
#pet-filters .filter-button[data-rarity="rare"] { --pet-filter-rarity: #70adc1; }
#pet-filters .filter-button[data-rarity="basic"] { --pet-filter-rarity: #6f965b; }

#pet-filters .filter-button[data-rarity]:not([data-rarity="all"]) {
  border-block-end-color: var(--pet-filter-rarity);
}

#pet-filters .filter-button[data-rarity]:not([data-rarity="all"])[aria-pressed="true"] {
  border-color: var(--pet-filter-rarity);
  color: var(--pet-filter-rarity);
  background: linear-gradient(180deg, #302820, #17130f);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--bronze-dark) var(--ink);
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  border: 1px solid rgba(199, 166, 103, 0.16);
  text-align: center;
}

.data-table th {
  background: #282119;
  color: var(--gold-bright);
  font-family: var(--font-display);
}

.data-table td:first-child,
.data-table th:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: #211c17;
  text-align: start;
}

.collection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.collection-card {
  padding: 1rem;
}

.collection-header {
  padding: 0;
  border: 0;
  background: transparent;
}

.collection-icon {
  width: 52px;
  height: 52px;
}

.collection-id {
  color: var(--ash);
  font-size: 0.72rem;
}

.collection-state {
  margin-block-start: 1rem;
  padding-block-start: 0.8rem;
  border-block-start: 1px solid var(--border);
  color: var(--ash);
  font-size: 0.82rem;
}

.stage-tabs {
  margin-block-end: 1.5rem;
}

.stage-panel {
  padding: clamp(1.1rem, 3vw, 2rem);
}

.stage-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stage-column {
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
}

.stage-column h3 {
  margin-block-end: 0.8rem;
  color: var(--gold-bright);
  font-size: 1.15rem;
}

.stage-column ul {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.notice,
.empty-state {
  padding: clamp(1.25rem, 4vw, 2.2rem);
  border: 1px dashed var(--border-strong);
  background: rgba(0, 0, 0, 0.18);
  color: var(--ash);
  text-align: center;
}

.notice strong,
.empty-state strong {
  display: block;
  margin-block-end: 0.35rem;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.guide-toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.guide-toc a,
.guide-toc span {
  display: block;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  background: #191612;
  color: var(--parchment);
  text-decoration: none;
}

.guide-toc a:hover {
  border-color: var(--gold);
}

.guide-toc .coming-soon {
  color: var(--ash);
}

.guide-steps {
  display: grid;
  gap: 1rem;
  counter-reset: guide-step;
}

.guide-step {
  counter-increment: guide-step;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 42%);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #191612;
}

.guide-step-copy {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.guide-step-copy::before {
  content: counter(guide-step, decimal-leading-zero);
  display: block;
  margin-block-end: 1rem;
  color: var(--crimson);
  font-family: var(--font-display);
  font-size: 2rem;
}

.guide-step img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-inline-start: 1px solid var(--border);
}

.class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.class-card {
  display: grid;
  min-height: 195px;
  padding: 1rem;
  align-content: end;
}

.class-icon {
  width: 58px;
  height: 58px;
  margin-block-end: 1.5rem;
}

.class-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.class-card p {
  margin: 0.35rem 0 0;
  color: var(--ash);
  font-size: 0.78rem;
}

.class-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}

.class-portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--ink);
  image-rendering: auto;
}

.class-status {
  display: inline-block;
  margin-block-end: 1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--bronze-dark);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.class-equipment-section {
  padding-block-start: 0;
}

.equipment-board {
  position: relative;
  overflow: visible;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    linear-gradient(rgba(8, 7, 6, 0.7), rgba(8, 7, 6, 0.88)),
    repeating-linear-gradient(135deg, rgba(184, 139, 78, 0.035) 0 1px, transparent 1px 7px),
    #15120f;
}

.equipment-board-status {
  width: fit-content;
  margin: 0 auto 1.25rem;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--border-strong);
  color: var(--sand);
  background: #100e0c;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[dir="rtl"] .equipment-board-status {
  letter-spacing: 0;
}

.equipment-board-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 250px) minmax(180px, 1fr);
  gap: clamp(1rem, 3vw, 2.25rem);
  align-items: center;
}

.equipment-column {
  display: grid;
  gap: 0.7rem;
}

.equipment-slot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 0.42rem;
  border: 1px solid #51483b;
  border-radius: 2px;
  color: var(--parchment);
  background: linear-gradient(180deg, #24201a, #12100d);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75);
  text-align: start;
  cursor: help;
}

.equipment-slot[data-state="equipped"] {
  border-color: #7b6240;
  background: linear-gradient(180deg, #2a241c, #15110d);
}

.equipment-slot:hover,
.equipment-slot:focus-visible,
.equipment-slot:focus {
  z-index: 12;
  border-color: var(--gold);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(184, 139, 78, 0.3), 0 7px 24px rgba(0, 0, 0, 0.34);
}

.equipment-slot-icon,
.equipment-slot-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #75664f;
  background: #080807;
  box-shadow: inset 0 0 0 2px #1d1a16;
}

.equipment-slot-icon {
  object-fit: cover;
  image-rendering: auto;
}

.equipment-slot-mark {
  color: #746b5d;
  background:
    linear-gradient(135deg, transparent 47%, rgba(116, 107, 93, 0.18) 48% 52%, transparent 53%),
    #0d0c0a;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.equipment-slot[data-state="equipped"] .equipment-slot-icon {
  border-color: var(--gold);
}

.equipment-slot-copy {
  display: block;
  min-width: 0;
}

.equipment-slot-name,
.equipment-slot-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-slot-name {
  color: var(--sand);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

[dir="rtl"] .equipment-slot-name {
  letter-spacing: 0;
}

.equipment-slot-value {
  margin-block-start: 0.2rem;
  color: var(--ash);
  font-size: 0.78rem;
}

.equipment-slot[data-state="equipped"] .equipment-slot-value {
  color: var(--parchment);
}

.equipment-tooltip {
  position: absolute;
  top: 50%;
  z-index: 30;
  display: grid;
  gap: 0.28rem;
  width: clamp(220px, 22vw, 290px);
  padding: 0.85rem;
  border: 1px solid var(--gold);
  color: var(--ash);
  background: linear-gradient(180deg, #211b15, #0e0c0a);
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.62);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.98);
  transition: opacity 130ms ease, transform 130ms ease, visibility 130ms ease;
  pointer-events: none;
  text-align: start;
}

.equipment-column-primary .equipment-tooltip {
  left: calc(100% + 0.7rem);
}

.equipment-column-secondary .equipment-tooltip {
  right: calc(100% + 0.7rem);
}

[dir="rtl"] .equipment-column-primary .equipment-tooltip {
  right: calc(100% + 0.7rem);
  left: auto;
}

[dir="rtl"] .equipment-column-secondary .equipment-tooltip {
  right: auto;
  left: calc(100% + 0.7rem);
}

.equipment-slot:hover .equipment-tooltip,
.equipment-slot:focus-visible .equipment-tooltip,
.equipment-slot:focus .equipment-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.equipment-tooltip-kicker {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

[dir="rtl"] .equipment-tooltip-kicker {
  letter-spacing: 0;
}

.equipment-tooltip strong {
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 1rem;
}

.equipment-tooltip > span:last-child {
  font-size: 0.76rem;
  line-height: 1.55;
}

.equipment-avatar {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid #514533;
  background: radial-gradient(circle at 50% 35%, rgba(142, 101, 54, 0.2), transparent 42%), #0d0c0a;
  text-align: center;
}

.equipment-avatar-frame {
  display: grid;
  place-items: center;
  width: min(150px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--bronze);
  background: #070706;
  box-shadow: inset 0 0 30px rgba(184, 139, 78, 0.12);
}

.equipment-avatar img {
  width: min(92px, 72%);
  aspect-ratio: 1;
  object-fit: cover;
  image-rendering: auto;
}

.equipment-avatar strong {
  overflow-wrap: anywhere;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.game-equipment-shell {
  display: grid;
  justify-items: center;
  width: 100%;
  direction: ltr !important;
}

.game-equipment-window {
  --game-slot: clamp(27px, 9vw, 40px);
  position: relative;
  width: min(100%, 500px);
  direction: ltr !important;
  text-align: left;
  border: 1px solid #70644f;
  border-block-start-color: #a87a43;
  color: #9a9a96;
  background:
    linear-gradient(rgba(15, 20, 22, 0.97), rgba(9, 12, 13, 0.99)),
    repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.025) 5px 6px);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.66),
    0 0 0 1px #050607,
    inset 0 0 0 1px #252a2b;
  font: 11px/1.2 Arial, Tahoma, sans-serif;
  image-rendering: auto;
}

.game-equipment-window::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 120;
  border: 1px solid rgba(148, 125, 83, 0.16);
  pointer-events: none;
}

.game-equipment-titlebar {
  position: relative;
  display: grid;
  place-items: center;
  height: 27px;
  border-block-end: 1px solid #515759;
  color: #e5e5df;
  background:
    linear-gradient(90deg, transparent, rgba(153, 112, 57, 0.12) 50%, transparent),
    linear-gradient(180deg, #272d2f, #101416 76%);
  font-size: 16px;
  text-shadow: 1px 1px #000;
}

.game-equipment-close {
  position: absolute;
  top: 3px;
  right: 7px;
  left: auto;
  color: #e33235;
  font-size: 22px;
  font-weight: 700;
  line-height: 18px;
}

.game-equipment-main {
  display: grid;
  grid-template-columns: calc((var(--game-slot) * 2) + 3px) minmax(0, 1fr) calc((var(--game-slot) * 2) + 3px);
  gap: 6px;
  height: clamp(286px, 92vw, 390px);
  padding: 4px 3px 2px;
}

.game-equipment-side {
  min-width: 0;
}

.game-equipment-label {
  display: block;
  height: 15px;
  overflow: hidden;
  color: #999b98;
  white-space: nowrap;
}

.game-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, var(--game-slot));
  gap: 3px;
  margin-block-end: 6px;
}

.game-slot-grid-single {
  grid-template-columns: var(--game-slot);
  min-height: var(--game-slot);
}

.game-character-frame {
  position: relative;
  align-self: stretch;
  justify-self: center;
  width: min(100%, 230px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #5a6061;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(104, 73, 37, 0.22), transparent 47%),
    #020303;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 28px rgba(0, 0, 0, 0.78);
}

.game-character-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.game-character-controls {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 4px;
  z-index: 2;
  display: flex;
  gap: 2px;
}

.game-character-controls i {
  position: relative;
  width: 14px;
  height: 13px;
  border: 1px solid #6a7479;
  background: linear-gradient(135deg, #526675, #172127);
  box-shadow: inset 0 0 0 1px #10171b;
}

.game-character-controls i::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: solid #aeb7ba;
  border-width: 1px 0 0 1px;
}

.game-equipment-slot {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--game-slot);
  height: var(--game-slot);
  padding: 0;
  overflow: visible;
  border: 1px solid #5a6163;
  border-radius: 0;
  background: #060809;
  box-shadow:
    inset 0 0 0 1px #000,
    inset 1px 1px 0 rgba(164, 174, 177, 0.12),
    0 1px 0 #22292b;
  cursor: help;
}

.game-equipment-slot > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.76);
}

.game-equipment-slot[data-state="equipped"] {
  border-color: #78838a;
}

.game-equipment-slot[data-state="equipped"] > img {
  filter: none;
}

.game-equipment-slot[data-slot="wings"] {
  grid-column: 1 / -1;
  justify-self: center;
}

.game-equipment-slot:hover,
.game-equipment-slot:focus,
.game-equipment-slot:focus-visible {
  z-index: 50;
  border-color: #61a8d3;
  outline: 1px solid #1d587a;
  outline-offset: 0;
  box-shadow: 0 0 0 1px #0a0b0c, 0 0 8px rgba(97, 168, 211, 0.42);
}

.game-equipment-tooltip {
  position: absolute;
  top: 0;
  z-index: 100;
  display: grid;
  gap: 3px;
  width: min(220px, calc(100vw - 32px));
  padding: 8px 9px;
  border: 1px solid #78838a;
  color: #b8b9b3;
  background: rgba(8, 11, 12, 0.97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.72), inset 0 0 0 1px #171c1e;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: start;
}

.game-equipment-slot-mount .game-equipment-tooltip,
.game-equipment-slot-equip .game-equipment-tooltip {
  left: calc(100% + 5px);
}

.game-equipment-slot-booster .game-equipment-tooltip,
.game-equipment-slot-decoration .game-equipment-tooltip {
  right: calc(100% + 5px);
}

[dir="rtl"] .game-equipment-tooltip {
  direction: rtl;
  text-align: right;
}

.game-equipment-slot-accessories .game-equipment-tooltip,
.game-equipment-slot-belt .game-equipment-tooltip,
.game-equipment-slot-belt-item .game-equipment-tooltip,
.game-equipment-slot-lak .game-equipment-tooltip {
  top: auto;
  bottom: calc(100% + 5px);
}

.game-equipment-slot[data-tooltip-edge="start"] .game-equipment-tooltip {
  left: 0;
  right: auto;
}

.game-equipment-slot[data-tooltip-edge="end"] .game-equipment-tooltip {
  right: 0;
  left: auto;
}

.game-equipment-slot:hover .game-equipment-tooltip,
.game-equipment-slot:focus .game-equipment-tooltip,
.game-equipment-slot:focus-visible .game-equipment-tooltip {
  opacity: 1;
  visibility: visible;
}

.game-equipment-tooltip-kicker {
  color: #81a7bd;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

[dir="rtl"] .game-equipment-tooltip-kicker {
  letter-spacing: 0;
}

.game-equipment-tooltip strong {
  color: #f0e3bd;
  font: 700 12px/1.25 Arial, Tahoma, sans-serif;
}

.game-equipment-tooltip > span:last-child {
  color: #959994;
  font-size: 10px;
  line-height: 1.35;
}

.game-accessory-row {
  display: grid;
  grid-template-columns: repeat(8, var(--game-slot));
  justify-content: space-between;
  gap: 2px;
  padding: 4px 2px;
  border-block-start: 1px solid #313638;
}

.game-belt-row {
  display: grid;
  grid-template-columns: var(--game-slot) minmax(0, 1fr);
  gap: 3px;
  padding: 2px;
  border-block-start: 1px solid #303638;
}

.game-belt-slots {
  display: grid;
  grid-template-columns: repeat(8, var(--game-slot));
  justify-content: space-between;
  gap: 1px;
  min-width: 0;
}

.game-belt-slots .game-equipment-slot:nth-child(-n + 4) {
  border-color: #3f7b9f;
  box-shadow: inset 0 0 4px rgba(63, 123, 159, 0.4);
}

.game-belt-slots .game-equipment-slot:nth-child(5),
.game-belt-slots .game-equipment-slot:nth-child(6) {
  border-color: #bfa048;
  box-shadow: inset 0 0 4px rgba(191, 160, 72, 0.4);
}

.game-belt-slots .game-equipment-slot:nth-child(7),
.game-belt-slots .game-equipment-slot:nth-child(8) {
  border-color: #a83935;
  box-shadow: inset 0 0 4px rgba(168, 57, 53, 0.4);
}

.game-lak-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  grid-template-rows: auto 8px;
  gap: 1px 6px;
  align-items: center;
  padding: 4px 7px 5px;
  border-block-start: 1px solid #303638;
  color: #e2e2da;
  font-size: 13px;
}

.game-equipment-slot-lak {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border-color: #7b4f8a;
  box-shadow: 0 0 4px rgba(182, 24, 212, 0.35);
}

.game-lak-value {
  justify-self: end;
}

.game-lak-meter {
  position: relative;
  grid-column: 2 / 4;
  height: 6px;
  border: 1px solid #565d5f;
  background: #050607;
}

.game-lak-meter::before {
  content: "";
  position: absolute;
  inset-inline-start: -18px;
  inset-block-start: -3px;
  width: 10px;
  height: 10px;
  border: 1px solid #d696e8;
  border-radius: 50%;
  background: #b618d4;
  box-shadow: 0 0 2px #e9a7f4;
}

.game-lak-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: #8e42b1;
}

.site-footer {
  margin-block-start: 3rem;
  border-block-start: 1px solid var(--border-strong);
  background: #0b0a08;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 110px;
  color: var(--ash);
  font-size: 0.82rem;
}

.footer-mark {
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

[dir="rtl"] body {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .brand-name,
[dir="rtl"] .stat-value {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

[dir="rtl"] .eyebrow,
[dir="rtl"] .feature-kicker,
[dir="rtl"] .card-kicker,
[dir="rtl"] .stat-label,
[dir="rtl"] .rarity-label,
[dir="rtl"] .class-status {
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .equipment-board-grid {
    grid-template-columns: 1fr;
  }

  .equipment-avatar {
    order: -1;
    width: min(320px, 100%);
    margin-inline: auto;
  }

  .equipment-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-tooltip,
  .equipment-column-primary .equipment-tooltip,
  .equipment-column-secondary .equipment-tooltip,
  [dir="rtl"] .equipment-column-primary .equipment-tooltip,
  [dir="rtl"] .equipment-column-secondary .equipment-tooltip {
    position: static;
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    margin-block-start: 0.45rem;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .equipment-slot:hover .equipment-tooltip,
  .equipment-slot:focus-visible .equipment-tooltip,
  .equipment-slot:focus .equipment-tooltip {
    display: grid;
    transform: none;
  }
}

@media (max-width: 560px) {
  .equipment-board {
    padding: 0.8rem;
  }

  .equipment-column {
    grid-template-columns: 1fr;
  }

  .equipment-slot {
    min-height: 58px;
  }

  .equipment-avatar {
    padding: 1rem;
  }
}

@media (max-width: 1380px) {
  .masthead {
    gap: 0.5rem;
  }
  .brand {
    gap: 0.5rem;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-subtitle {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }
  .nav-link {
    padding-inline: 0.42rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 1240px) {
  .brand-subtitle {
    display: none;
  }
  .nav-link {
    padding-inline: 0.35rem;
    font-size: 0.74rem;
  }
  .season-toggle-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.74rem;
    gap: 0.32rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
}

@media (max-width: 1120px) {
  .category-grid,
  .class-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  :root {
    --header-height: 68px;
  }

  .masthead {
    width: min(calc(100% - 1.25rem), 1480px);
  }

  .brand-subtitle {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .primary-nav {
    position: fixed;
    z-index: 110;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(84vw, 340px);
    display: grid;
    align-content: start;
    justify-content: stretch;
    gap: 0.25rem;
    padding: 5.5rem 1rem 1rem;
    border-inline-end: 1px solid var(--border-strong);
    background: #100e0c;
    box-shadow: 18px 0 45px rgba(0, 0, 0, 0.48);
    transform: translateX(-104%);
    transition: transform 200ms ease;
  }

  [dir="rtl"] .primary-nav {
    transform: translateX(104%);
    box-shadow: -18px 0 45px rgba(0, 0, 0, 0.48);
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 47px;
    padding: 0.65rem 0.8rem;
    border: 1px solid transparent;
    border-inline-start: 3px solid transparent;
    font-size: 0.9rem;
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] {
    border-color: var(--border);
    border-inline-start-color: var(--crimson);
  }

  .nav-scrim {
    position: fixed;
    z-index: 105;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.68);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .nav-scrim.is-open {
    opacity: 1;
    visibility: visible;
  }

  .feature-grid,
  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid,
  .class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stage-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--content));
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .lang-button {
    min-width: 66px;
    padding-inline: 0.5rem;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 540px;
    background-position: 63% center;
  }

  [dir="rtl"] .hero {
    background-position: 37% center;
  }

  .hero-compact {
    min-height: 330px;
  }

  .hero-content {
    padding-block: 5rem 3rem;
  }

  .display-title {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .stat-block {
    border-inline-end: 0;
    border-block-end: 1px solid var(--border);
  }

  .stat-block:last-child {
    border-block-end: 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .feature-grid,
  .items-grid,
  .collection-grid,
  .guide-toc {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card {
    min-height: 135px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    flex-basis: auto;
    max-width: none;
  }

  .category-banner,
  .category-banner img {
    min-height: 180px;
    height: 180px;
  }

  .guide-step {
    grid-template-columns: 1fr;
  }

  .guide-step img {
    min-height: 210px;
    border-inline-start: 0;
    border-block-start: 1px solid var(--border);
  }

  .class-detail {
    grid-template-columns: 1fr;
  }

  .class-portrait {
    width: min(180px, 60vw);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1.5rem;
  }
}

@media (max-width: 390px) {
  .masthead {
    gap: 0.55rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-name {
    font-size: 0.9rem;
    letter-spacing: 0.09em;
  }

  .header-actions {
    margin-inline-start: auto;
    gap: 0.35rem;
  }

  .lang-button {
    min-width: 56px;
    font-size: 0.75rem;
  }

  .category-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .class-card {
    min-height: 120px;
  }

  .item-header,
  .pet-header,
  .collection-header {
    align-items: flex-start;
  }

  .hero-actions .button,
  .button-row .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dungeon atlas, class roles, saved records, and release ledger. */
.archive-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 1rem;
  margin-block-end: 2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(140, 106, 63, 0.12), rgba(13, 12, 10, 0.4));
}

.archive-note strong { color: var(--gold-bright); }
.archive-note span { color: var(--sand); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-inline-start: auto;
}

.footer-links a {
  color: var(--sand);
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold-bright); }
.archive-saved-all { width: 100%; margin-block-start: 0.9rem; text-align: center; }

.update-callout-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
}

.update-callout-inner > div { max-width: 760px; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--gold);
  color: #f3dfaf;
  box-shadow: inset 0 -2px 0 var(--crimson);
}

.save-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: linear-gradient(180deg, #28221b, #13100d);
  color: var(--sand);
  cursor: pointer;
}

.save-button:hover,
.save-button.is-saved {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.save-button.is-saved .saved-glyph::after {
  background: var(--gold-bright);
  box-shadow: none;
}

.dungeon-atlas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dungeon-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 340px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(0deg, rgba(13, 12, 10, 0.98) 10%, rgba(13, 12, 10, 0.78) 62%, rgba(13, 12, 10, 0.28)),
    var(--dungeon-image) center / cover;
  box-shadow: var(--shadow);
}

.dungeon-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-block-start: 3px solid transparent;
  pointer-events: none;
}

.dungeon-card.is-active { border-color: var(--gold); }
.dungeon-card.is-active::before { border-block-start-color: var(--crimson); }

.dungeon-card-head,
.dungeon-counts,
.dungeon-card-actions,
.build-card-title,
.build-mode-row,
.update-title-row,
.saved-page-heading {
  display: flex;
  align-items: center;
}

.dungeon-card-head { gap: 0.75rem; margin-block-end: 0.8rem; color: var(--gold); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; }
.dungeon-card-head img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 8px #000); }
.dungeon-card h3 { margin-block-end: 0.55rem; font-size: 1.65rem; }
.dungeon-card p { color: var(--sand); font-size: 0.91rem; }
.dungeon-counts { gap: 1rem; margin-block: auto 1rem; padding-block-start: 1rem; color: var(--ash); font-size: 0.76rem; }
.dungeon-counts strong { color: var(--gold-bright); font-size: 1rem; }
.dungeon-card-actions { gap: 0.65rem; }
.dungeon-card-actions .button { flex: 1 1 auto; }

.dungeon-record-section { scroll-margin-top: var(--header-height); }
.dungeon-record-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.dungeon-record-heading > div:first-child { max-width: 750px; }
.dungeon-access { min-width: 210px; padding: 1rem; border: 1px solid var(--border); background: rgba(13, 12, 10, 0.52); }
.dungeon-access small,
.dungeon-access strong { display: block; }
.dungeon-access small { color: var(--ash); text-transform: uppercase; letter-spacing: 0.09em; }
.dungeon-access strong { margin-block-start: 0.35rem; color: var(--parchment); }
.dungeon-ledger-heading { margin-block-start: 3rem; }
.dungeon-drop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-block-start: 1rem; }
.dungeon-drop-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; min-width: 0; padding: 0.85rem; border: 1px solid var(--border); border-radius: 3px; background: rgba(20, 17, 14, 0.86); color: inherit; text-decoration: none; }
.dungeon-drop-card:hover,
.dungeon-drop-card:focus-visible { border-color: var(--gold); background: #211b15; }
.dungeon-drop-card img { width: 58px; height: 58px; object-fit: cover; border: 1px solid var(--border-strong); background: #0d0c0a; }
.dungeon-drop-card > span { display: grid; min-width: 0; }
.dungeon-drop-card small { color: var(--crimson); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dungeon-drop-card strong { color: var(--parchment); overflow-wrap: anywhere; }
.dungeon-drop-card em { color: var(--ash); font-size: 0.78rem; font-style: normal; overflow-wrap: anywhere; }
.dungeon-drop-card b { color: var(--gold); font-size: 0.75rem; white-space: nowrap; }

.build-toolbar { margin-block-end: 1.5rem; }
.build-toolbar .filter-row { flex: 1 1 520px; justify-content: flex-end; }
.build-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.build-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--border); border-block-start: 3px solid var(--bronze); border-radius: var(--radius); background: linear-gradient(145deg, rgba(40, 36, 31, 0.88), rgba(17, 14, 11, 0.96)); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22); }
.build-card[data-role="damage"] { border-block-start-color: var(--crimson); }
.build-card[data-role="support"] { border-block-start-color: #8d8b64; }
.build-card[data-role="frontline"] { border-block-start-color: #9a7450; }
.build-card[data-role="control"] { border-block-start-color: #756c78; }
.build-card[data-role="summoner"] { border-block-start-color: #677458; }
.class-role-badge { align-self: flex-start; margin-block-start: auto; padding: 0.2rem 0.5rem; border: 1px solid var(--border); color: var(--gold); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.class-build-callout { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.class-strength-panel { padding: clamp(1.2rem, 3vw, 2rem); }
.class-strength-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem; }
.class-strength-heading > div:first-child { max-width: 760px; }
.class-strength-heading .build-mode-row { justify-content: flex-end; }
.build-card-portrait { display: flex; align-items: center; gap: 1rem; margin-block-end: 1rem; }
.build-card-portrait img { width: 92px; height: 92px; object-fit: cover; border: 1px solid var(--gold); background: #0d0c0a; }
.build-card-portrait span { color: var(--gold); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.build-card-title { justify-content: space-between; gap: 1rem; }
.build-card-title small { color: var(--ash); text-transform: uppercase; letter-spacing: 0.08em; }
.build-card-title h2 { margin-block-end: 0.45rem; font-size: 1.8rem; }
.build-identity { min-height: 3.3em; color: var(--sand); }
.build-mode-row { flex-wrap: wrap; gap: 0.45rem; margin-block: 1rem; }
.build-mode-row strong { margin-inline-end: 0.25rem; color: var(--ash); font-size: 0.76rem; text-transform: uppercase; }
.build-mode-row span { padding: 0.18rem 0.5rem; border: 1px solid var(--border); background: #15120f; color: var(--gold-bright); font-size: 0.74rem; }
.build-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1rem 1.25rem; padding-block: 1rem; border-block: 1px solid var(--border); }
.build-columns h3 { margin-block-end: 0.55rem; color: var(--gold); font-size: 0.92rem; text-transform: uppercase; }
.build-columns ul { margin: 0; padding-inline-start: 1.15rem; color: var(--sand); font-size: 0.86rem; }

.saved-page-heading { justify-content: space-between; gap: 1rem; margin-block-end: 1rem; }
.button-danger { border-color: rgba(125, 40, 36, 0.7); color: #d9b5aa; }
.saved-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-block-start: 1rem; }
.saved-page-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.7rem; border: 1px solid var(--border); background: #17130f; }
.saved-page-card > a { display: flex; min-width: 0; align-items: center; gap: 0.85rem; color: inherit; text-decoration: none; }
.saved-page-card img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--border-strong); background: #0d0c0a; }
.saved-page-card a span { display: grid; min-width: 0; }
.saved-page-card small { color: var(--gold); text-transform: uppercase; }
.saved-page-card strong { color: var(--parchment); overflow-wrap: anywhere; }
.saved-page-card > button { width: 38px; height: 38px; border: 1px solid var(--border); background: transparent; color: var(--ash); cursor: pointer; }
.saved-page-card > button:hover { border-color: var(--crimson); color: #e2b9ae; }
.saved-empty { grid-column: 1 / -1; display: grid; justify-items: start; gap: 1rem; }

.update-filters { margin-block-end: 1.5rem; }
.update-ledger { position: relative; display: grid; gap: 1rem; }
.update-ledger::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 132px; width: 1px; background: linear-gradient(var(--gold), var(--border), transparent); }
[dir="rtl"] .update-ledger::before { inset-inline-start: auto; inset-inline-end: 132px; }
.update-entry { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 3rem; }
.update-rail { display: grid; align-content: start; justify-items: end; gap: 0.45rem; padding-block-start: 1.2rem; }
[dir="rtl"] .update-rail { justify-items: start; }
.update-rail time { color: var(--sand); font-variant-numeric: tabular-nums; }
.update-rail span { padding: 0.14rem 0.45rem; border: 1px solid var(--border-strong); color: var(--gold); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.update-content { position: relative; padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(40, 36, 31, 0.8), rgba(17, 14, 11, 0.96)); }
.update-content::before { content: ""; position: absolute; inset-block-start: 1.6rem; inset-inline-start: -1.75rem; width: 10px; height: 10px; rotate: 45deg; border: 1px solid var(--gold); background: var(--crimson-dark); }
[dir="rtl"] .update-content::before { inset-inline-start: auto; inset-inline-end: -1.75rem; }
.update-title-row { justify-content: space-between; gap: 1rem; }
.update-content h2 { margin-block-end: 0.65rem; }
.update-content h3 { margin-block-start: 1.2rem; color: var(--gold); font-size: 0.9rem; text-transform: uppercase; }
.update-content p,
.update-content li { color: var(--sand); }

@media (max-width: 900px) {
  .dungeon-atlas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-grid,
  .saved-page-grid { grid-template-columns: 1fr; }
  .build-toolbar .filter-row { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .archive-note { grid-template-columns: 1fr; }
  .class-build-callout,
  .class-strength-heading { grid-template-columns: 1fr; }
  .class-strength-heading .build-mode-row { justify-content: flex-start; }
  .footer-links { margin-inline-start: 0; }
  .update-callout-inner { grid-template-columns: 1fr; }
  .dungeon-atlas,
  .dungeon-drop-grid { grid-template-columns: 1fr; }
  .dungeon-card { min-height: 300px; }
  .dungeon-record-heading { grid-template-columns: 1fr; }
  .dungeon-access { min-width: 0; }
  .dungeon-drop-card { grid-template-columns: 50px minmax(0, 1fr); }
  .dungeon-drop-card img { width: 50px; height: 50px; }
  .dungeon-drop-card b { grid-column: 2; white-space: normal; }
  .build-columns { grid-template-columns: 1fr; }
  .saved-page-heading { align-items: flex-start; flex-direction: column; }
  .update-ledger::before { inset-inline-start: 6px; }
  [dir="rtl"] .update-ledger::before { inset-inline-end: 6px; }
  .update-entry { grid-template-columns: 1fr; gap: 0.6rem; padding-inline-start: 1.5rem; }
  [dir="rtl"] .update-entry { padding-inline: 0 1.5rem; }
  .update-rail { display: flex; justify-content: space-between; padding-block-start: 0; }
  .update-content::before { inset-inline-start: -1.8rem; }
  [dir="rtl"] .update-content::before { inset-inline-end: -1.8rem; }
}

/* Shared field tools: archive search, saved records, breadcrumbs, and dashboard. */
.archive-action {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

.mobile-saved-button {
  display: none;
}

.search-glyph {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-glyph::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  inset-inline-end: -6px;
  inset-block-end: -3px;
  rotate: 45deg;
  background: currentColor;
  transform-origin: center;
}

.saved-glyph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 18px;
  color: inherit;
  transition: transform 150ms ease, color 150ms ease;
}

.saved-glyph svg {
  display: block;
  width: 100%;
  height: 100%;
}

.saved-glyph:empty {
  display: inline-block;
  width: 15px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.save-button.is-saved .saved-glyph svg,
.record-save-button[aria-pressed="true"] .saved-glyph svg {
  fill: currentColor;
}

.save-button.is-saved .saved-glyph:empty,
.record-save-button[aria-pressed="true"] .saved-glyph:empty {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  background-color: var(--gold-bright);
}

.archive-action-count {
  position: absolute;
  inset-block-start: -5px;
  inset-inline-end: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--crimson-dark);
  color: #fff0cc;
  font-size: 0.65rem;
  line-height: 1;
}

.breadcrumbs {
  border-block-end: 1px solid var(--border);
  background: #100e0b;
}

.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  overflow: hidden;
  color: var(--ash);
  font-size: 0.78rem;
  white-space: nowrap;
}

.breadcrumbs a {
  color: var(--gold);
  text-decoration: none;
}

.breadcrumbs [aria-current="page"] {
  overflow: hidden;
  color: var(--sand);
  text-overflow: ellipsis;
}

.archive-dialog {
  width: min(calc(100% - 2rem), 760px);
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #100e0b;
  color: var(--parchment);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.archive-dialog::backdrop,
.record-dialog::backdrop,
.compare-dialog::backdrop {
  background: rgba(3, 3, 2, 0.78);
  backdrop-filter: blur(3px);
}

.archive-dialog-frame {
  display: flex;
  flex-direction: column;
  max-height: min(82vh, 760px);
  padding: clamp(1rem, 3vw, 1.65rem);
  overflow: hidden;
  box-sizing: border-box;
  background:
    linear-gradient(135deg, rgba(199, 166, 103, 0.035), transparent 32%),
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(255, 255, 255, 0.012) 8px 9px),
    #100e0b;
}

.archive-dialog-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
  padding-block-end: 0.9rem;
  border-block-end: 1px solid var(--border);
}

.archive-dialog-heading h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.dialog-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: #18130f;
  color: var(--gold);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.dialog-lead {
  flex: 0 0 auto;
  margin-block-end: 1rem;
  color: var(--sand);
}

.archive-search-field {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 54px;
  padding-inline: 1rem;
  border: 1px solid var(--border-strong);
  background: #090806;
}

.archive-search-field input {
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--parchment);
}

.archive-search-field kbd {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  background: #211b15;
  color: var(--ash);
  font: 0.68rem var(--font-body);
}

.archive-search-results,
.archive-saved-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: calc(min(82vh, 760px) - 170px);
  margin-block-start: 0.85rem;
  padding-inline-end: 0.5rem;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #090806;
}

.archive-search-results::-webkit-scrollbar,
.archive-saved-list::-webkit-scrollbar {
  width: 7px;
}

.archive-search-results::-webkit-scrollbar-track,
.archive-saved-list::-webkit-scrollbar-track {
  background: #090806;
  border-radius: 4px;
}

.archive-search-results::-webkit-scrollbar-thumb,
.archive-saved-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c7a667, #7d2824);
  border-radius: 4px;
  border: 1px solid #14100c;
}

.archive-search-results::-webkit-scrollbar-thumb:hover,
.archive-saved-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #dfbe7d, #9e332e);
}

.archive-search-result {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 0.9rem;
  min-height: 64px;
  padding: 0.45rem 0.6rem;
  border-block-end: 1px solid var(--border);
  color: var(--parchment);
  text-decoration: none;
}

.archive-search-result:hover,
.archive-search-result:focus-visible {
  background: linear-gradient(90deg, rgba(125, 40, 36, 0.18), rgba(199, 166, 103, 0.04));
}

[dir="rtl"] .archive-search-result:hover,
[dir="rtl"] .archive-search-result:focus-visible {
  background: linear-gradient(270deg, rgba(125, 40, 36, 0.18), rgba(199, 166, 103, 0.04));
}

.archive-search-result img,
.archive-saved-record img {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  object-fit: cover;
  background: #070604;
}

.archive-search-result > span,
.archive-saved-record a > span {
  display: grid;
  min-width: 0;
}

.archive-search-result small,
.archive-saved-record small {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.archive-search-result strong,
.archive-saved-record strong {
  overflow: hidden;
  color: #eddfbd;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-search-result em {
  overflow: hidden;
  color: var(--ash);
  font-size: 0.76rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-search-empty {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 3.2rem 1rem;
  color: var(--ash);
  text-align: center;
}

.archive-search-empty .search-glyph {
  width: 34px;
  height: 34px;
  color: var(--bronze);
}

.archive-saved-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border-block-end: 1px solid var(--border);
}

.archive-saved-record a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding-block: 0.55rem;
  color: var(--parchment);
  text-decoration: none;
}

.archive-saved-record > button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ash);
  cursor: pointer;
}

.archive-loading {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 4rem;
}

.archive-loading span {
  width: 8px;
  height: 8px;
  rotate: 45deg;
  background: var(--bronze);
}

.archive-toast {
  position: fixed;
  z-index: 1000;
  inset-inline-start: 50%;
  inset-block-end: 1.5rem;
  padding: 0.65rem 1rem;
  translate: -50% 2rem;
  border: 1px solid var(--gold);
  background: #100e0b;
  color: #f0dfb7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, translate 150ms ease;
}

[dir="rtl"] .archive-toast {
  translate: 50% 2rem;
}

.archive-toast.is-visible {
  translate: -50% 0;
  opacity: 1;
}

[dir="rtl"] .archive-toast.is-visible {
  translate: 50% 0;
}

.field-dashboard-section {
  border-block: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 0, rgba(125, 40, 36, 0.11), transparent 34rem),
    #0f0d0a;
}

.field-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.field-dashboard-card {
  position: relative;
  min-height: 220px;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-block-start-color: var(--bronze);
  background:
    linear-gradient(145deg, rgba(199, 166, 103, 0.04), transparent 48%),
    #17130f;
}

.field-dashboard-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  inset-inline-end: -45px;
  inset-block-end: -45px;
  rotate: 45deg;
  border: 1px solid rgba(199, 166, 103, 0.16);
}

.field-dashboard-card h3 {
  margin-block: 0.5rem 1rem;
  font-size: 1.35rem;
}

.field-dashboard-links {
  display: grid;
  gap: 0.4rem;
}

.field-dashboard-links a,
.field-dashboard-links span {
  padding-block: 0.35rem;
  color: var(--sand);
  text-decoration: none;
}

.field-dashboard-links a::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 1px;
  margin-inline-end: 0.5rem;
  background: var(--crimson);
  vertical-align: middle;
}

.field-dashboard-tools .button {
  margin-block-start: 0.25rem;
}

@media (max-width: 960px) {
  .archive-action {
    width: 38px;
    height: 38px;
  }

  .mobile-saved-button {
    display: inline-flex;
    border-radius: 0;
    background: transparent;
    color: var(--sand);
  }

  .field-dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .field-dashboard-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .field-dashboard {
    grid-template-columns: 1fr;
  }

  .field-dashboard-card:last-child {
    grid-column: auto;
  }

  .archive-search-field kbd,
  .header-actions [data-global-saved] {
    display: none;
  }

  .archive-dialog {
    width: calc(100% - 1rem);
    max-height: 88vh;
  }

  .archive-dialog-frame {
    max-height: 88vh;
    padding: 0.9rem;
  }

  .archive-search-result {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .archive-search-result img {
    width: 40px;
    height: 40px;
  }
}

/* Interactive archive records. */
.toolbar {
  flex-wrap: wrap;
}

.compact-field {
  display: grid;
  gap: 0.25rem;
  flex: 0 1 180px;
  color: var(--ash);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compact-field select {
  min-width: 150px;
  min-height: 46px;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: #100e0c;
  color: var(--parchment);
}

[dir="rtl"] .compact-field select {
  padding: 0.55rem 0.75rem 0.55rem 2rem;
}

.span-grid {
  grid-column: 1 / -1;
}

.empty-action {
  justify-content: center;
  margin-block-start: 1rem;
}

.record-save-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #15110d;
  color: var(--ash);
  cursor: pointer;
}

.record-save-button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: #302315;
}

.record-open-button,
.collection-check,
.guide-check,
.guide-share {
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #17120e;
  color: var(--sand);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.record-open-button:hover,
.collection-check:hover,
.guide-check:hover,
.guide-share:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.item-card .record-open-button {
  width: 100%;
  margin-block-start: 0.85rem;
}

.ingredient-heading {
  margin-block-end: 0.55rem;
}

.record-dialog,
.compare-dialog {
  width: min(calc(100% - 2rem), 850px);
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #100e0b;
  color: var(--parchment);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.82);
}

.record-dialog-frame {
  max-height: 88vh;
  padding: clamp(1rem, 3vw, 1.75rem);
  overflow-y: auto;
  background:
    linear-gradient(145deg, rgba(125, 40, 36, 0.08), transparent 35%),
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(255, 255, 255, 0.012) 8px 9px),
    #100e0b;
}

.record-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--border);
}

.record-dialog-heading h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.record-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.record-hero > img {
  width: 116px;
  height: 116px;
  border: 1px solid var(--border-strong);
  object-fit: cover;
  background: #070604;
}

.record-hero > div {
  display: grid;
  gap: 0.45rem;
  color: var(--sand);
}

.record-hero ul {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
}

.record-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1rem 1.5rem;
}

.record-section + .record-section {
  margin-block-start: 1.5rem;
}

.record-section h3 {
  margin-block-end: 0.75rem;
  padding-inline-start: 0.65rem;
  border-inline-start: 2px solid var(--crimson);
  font-size: 1.15rem;
}

.record-materials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.record-material {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  background: #17130f;
}

.record-material img,
.record-related img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.record-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.record-related button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  background: #17130f;
  color: var(--sand);
  cursor: pointer;
  text-align: start;
}

.is-target-record {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(199, 166, 103, 0.14), var(--shadow);
}

/* Companion comparison. */
.compare-open-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pet-card.is-comparing {
  border-color: var(--pet-rarity);
  box-shadow: inset 0 0 0 1px var(--pet-rarity-wash);
}

.pet-stage-heading {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.8rem 1rem 0;
}

.pet-stage-heading span {
  color: var(--pet-rarity);
  font: 700 1.3rem var(--font-display);
}

.pet-stage-heading small {
  color: var(--ash);
}

.pet-stage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.8rem 1rem 1rem;
}

.pet-stage-summary > div,
.compare-stat-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--sand);
}

.pet-stage-summary strong,
.compare-stat-list strong {
  color: var(--pet-rarity, var(--gold));
}

.pet-card-actions {
  padding: 0 1rem 1rem;
}

.pet-card-actions .record-open-button {
  width: 100%;
}

.pet-all-stages {
  border-block-start: 1px solid var(--border);
}

.pet-all-stages summary {
  padding: 0.75rem 1rem;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.compare-pet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.compare-pet {
  --pet-rarity: var(--bronze);
  padding: 1rem;
  border: 1px solid var(--border);
  border-block-start: 3px solid var(--pet-rarity);
  background: #17130f;
}

.compare-pet[data-rarity="epic"] { --pet-rarity: #b34f43; }
.compare-pet[data-rarity="unique"] { --pet-rarity: #c99a45; }
.compare-pet[data-rarity="special"] { --pet-rarity: #4779ad; }
.compare-pet[data-rarity="rare"] { --pet-rarity: #70adc1; }
.compare-pet[data-rarity="basic"] { --pet-rarity: #6f965b; }

.compare-pet > img {
  width: 74px;
  height: 74px;
  border: 1px solid var(--pet-rarity);
  object-fit: cover;
}

.compare-pet h3 {
  margin: 0.6rem 0 0.8rem;
  font-size: 1.05rem;
}

.compare-stat-list {
  display: grid;
  gap: 0.45rem;
}

.compare-pet .record-open-button {
  width: 100%;
  margin-block-start: 0.8rem;
}

/* Collection completion. */
.collection-progress {
  margin-block: -0.5rem 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: #15120e;
}

.collection-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 0.5rem;
  color: var(--sand);
  font-size: 0.8rem;
}

.collection-progress-track,
.guide-progress-track {
  display: block;
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #070604;
}

.collection-progress-track i,
.guide-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width 180ms ease;
}

.collection-card.is-collected {
  border-color: rgba(119, 129, 92, 0.7);
  background: linear-gradient(145deg, rgba(119, 129, 92, 0.11), #1a1713 46%);
}

.collection-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-block-start: 1rem;
}

.collection-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.collection-check > span {
  width: 12px;
  height: 12px;
  border: 1px solid var(--ash);
}

.collection-check[aria-pressed="true"] > span {
  border-color: var(--success);
  background: var(--success);
  box-shadow: inset 0 0 0 3px #17130f;
}

/* Stage route. */
.stage-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(88px, 1fr));
  gap: 0;
  padding: 1rem 0;
  overflow-x: auto;
}

.stage-route::before {
  content: "";
  position: absolute;
  inset-inline: 4%;
  inset-block-start: 43px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--border-strong) 12%, var(--border) 12%);
}

[dir="rtl"] .stage-route::before {
  background: linear-gradient(270deg, var(--gold), var(--border-strong) 12%, var(--border) 12%);
}

.stage-route-node {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  min-width: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ash);
  cursor: pointer;
}

.stage-route-number,
.stage-record-seal {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  rotate: 45deg;
  border: 1px solid var(--border-strong);
  background: #15120e;
  color: var(--ash);
  font: 700 1.05rem var(--font-display);
}

.stage-route-number > i,
.stage-record-seal > i {
  rotate: -45deg;
  font-style: normal;
}

.stage-route-node[data-state="verified"] .stage-route-number,
.stage-record-seal[data-state="verified"] {
  border-color: var(--gold);
  background: var(--bronze-dark);
  color: #f3dfb3;
}

.stage-route-node[aria-selected="true"] .stage-route-number {
  box-shadow: 0 0 0 4px #100e0b, 0 0 0 5px var(--crimson);
}

.stage-route-copy {
  display: grid;
  text-align: center;
}

.stage-route-copy strong {
  color: var(--sand);
  font-size: 0.76rem;
}

.stage-route-copy small {
  color: var(--ash);
  font-size: 0.62rem;
}

.stage-record-heading {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 1rem;
  margin-block-end: 1.5rem;
}

.stage-record-seal {
  width: 62px;
  height: 62px;
}

.stage-record-heading h2 {
  margin: 0.3rem 0;
}

.stage-record-heading p {
  margin: 0;
  color: var(--ash);
}

.stage-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
}

.stage-navigation .button:last-child {
  justify-self: end;
}

.stage-navigation .button:disabled {
  opacity: 0.4;
}

.stage-empty {
  color: var(--ash);
}

/* Guide checklist and class verification map. */
.guide-progress {
  position: static;
  margin-block-end: 1rem;
  padding: 1rem;
}

.guide-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 0.55rem;
  color: var(--sand);
  font-size: 0.8rem;
}

.guide-step-links {
  display: flex;
  gap: 0.4rem;
  margin-block-start: 0.65rem;
}

.guide-step-links a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  color: var(--sand);
  text-decoration: none;
}

.guide-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 0.8rem;
}

.guide-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.guide-check em {
  font-style: normal;
}

.guide-check > span {
  width: 13px;
  height: 13px;
  border: 1px solid var(--ash);
}

.guide-check[aria-pressed="true"] > span {
  border-color: var(--success);
  background: var(--success);
  box-shadow: inset 0 0 0 3px #17130f;
}

.guide-step.is-complete {
  border-color: rgba(119, 129, 92, 0.7);
}

.guide-step.is-complete .guide-step-copy::before {
  color: var(--success);
}

.class-guide-roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.class-guide-roadmap article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  min-height: 110px;
  padding: 1rem;
  border: 1px solid var(--border);
  background: #17130f;
}

.class-guide-roadmap article > span {
  color: var(--crimson);
  font: 700 1.7rem var(--font-display);
}

.class-guide-roadmap article[data-state="verified"] {
  border-color: rgba(119, 129, 92, 0.7);
}

.class-guide-roadmap article[data-state="verified"] > span,
.class-guide-roadmap article[data-state="verified"] small {
  color: var(--success);
}

.class-guide-roadmap h3 {
  margin: 0;
  font-size: 1rem;
}

.class-guide-roadmap small {
  color: var(--ash);
}

.class-card[data-guide-state="verified"] {
  border-block-start: 2px solid var(--success);
}

@media (max-width: 900px) {
  .record-related,
  .compare-pet-grid,
  .class-guide-roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-route {
    grid-template-columns: repeat(10, 100px);
  }
}

@media (max-width: 620px) {
  .compact-field,
  .compact-field select,
  .compare-open-button {
    width: 100%;
    flex-basis: 100%;
  }

  .record-hero {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
  }

  .record-hero > img {
    width: 82px;
    height: 82px;
  }

  .record-materials,
  .record-related,
  .compare-pet-grid,
  .class-guide-roadmap,
  .pet-stage-summary {
    grid-template-columns: 1fr;
  }

  .collection-actions {
    grid-template-columns: 1fr;
  }

  .guide-progress {
    position: static;
  }

  .stage-navigation {
    grid-template-columns: 1fr 1fr;
  }

  .stage-navigation > span {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }

  .stage-navigation .button {
    width: 100%;
  }
}

/* Open-world Farming & Leveling Zones Styling */
.farming-zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-block-start: 1.5rem;
}

.farming-zone-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(18, 15, 12, 0.92);
  background-image: linear-gradient(180deg, rgba(13, 12, 10, 0.6) 0%, rgba(13, 12, 10, 0.96) 100%), var(--card-bg, none);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.farming-zone-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.farming-zone-card.zone-pvp {
  border-color: rgba(199, 50, 50, 0.35);
}

.farming-zone-card.zone-pvp:hover {
  border-color: #e04438;
  box-shadow: 0 8px 26px rgba(180, 40, 40, 0.25);
}

.zone-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.85rem;
  flex-wrap: wrap;
}

.zone-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: rgba(13, 12, 10, 0.8);
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.zone-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zone-mode-pve {
  background: rgba(58, 120, 60, 0.2);
  border: 1px solid rgba(80, 160, 85, 0.45);
  color: #79d682;
}

.zone-mode-pvp {
  background: rgba(180, 40, 40, 0.22);
  border: 1px solid rgba(230, 70, 60, 0.55);
  color: #ff6e63;
  box-shadow: 0 0 10px rgba(230, 70, 60, 0.2);
}

.zone-card-title {
  margin-block-end: 0.5rem;
  color: var(--parchment);
  font-size: 1.35rem;
  line-height: 1.3;
}

.zone-card-desc {
  color: var(--sand);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-block-end: 1rem;
}

.zone-meta-box {
  margin-block-start: auto;
  padding: 0.75rem;
  border: 1px solid rgba(199, 166, 103, 0.15);
  border-radius: 3px;
  background: rgba(10, 9, 8, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.zone-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.zone-meta-label {
  color: var(--ash);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.zone-meta-value {
  color: var(--gold);
  font-weight: 600;
  text-align: end;
}

.zone-bonus-highlight {
  color: #ffaa50;
  font-weight: 800;
}

/* Zone Drops Showcase */
.zone-drops-box {
  margin-block: 0.85rem;
  padding: 0.65rem 0.75rem;
  background: rgba(8, 7, 6, 0.65);
  border: 1px solid rgba(199, 166, 103, 0.2);
  border-radius: 4px;
}

.zone-drops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 0.5rem;
}

.zone-drops-title {
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.zone-drops-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(224, 185, 116, 0.6);
}

.zone-drops-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.zone-drop-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem 0.2rem 0.25rem;
  background: rgba(22, 19, 15, 0.9);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 3px;
  text-decoration: none;
  color: var(--parchment);
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.zone-drop-tag:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: rgba(45, 38, 28, 0.98);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.zone-drop-tag[data-rarity="uncommon"] {
  border-color: rgba(46, 204, 113, 0.4);
}
.zone-drop-tag[data-rarity="rare"] {
  border-color: rgba(52, 152, 219, 0.45);
}
.zone-drop-tag[data-rarity="epic"] {
  border-color: rgba(155, 89, 182, 0.5);
}
.zone-drop-tag[data-rarity="legendary"] {
  border-color: rgba(230, 126, 34, 0.55);
}
.zone-drop-tag[data-rarity="mythic"] {
  border-color: rgba(231, 76, 60, 0.6);
}

.zone-drop-icon {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.zone-drop-name {
  white-space: nowrap;
}

/* Class Combat Ratings & Evaluation */
.class-combat-ratings {
  margin-block-start: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(14, 12, 10, 0.75);
}

.ratings-heading {
  margin-block-end: 1rem;
}

.ratings-heading h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--parchment);
}

.ratings-heading small {
  color: var(--ash);
  font-size: 0.82rem;
}

.ratings-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.5rem;
}

.rating-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rating-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

.rating-stat-name {
  color: var(--sand);
  font-weight: 600;
}

.rating-stat-score {
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.9rem;
}

.rating-stat-track {
  height: 7px;
  border: 1px solid rgba(199, 166, 103, 0.25);
  border-radius: 3px;
  background: #0d0c0a;
  overflow: hidden;
}

.rating-stat-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width 0.3s ease;
}

/* Ultimate Skills Grid & Cards */
.ultimate-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-block-start: 1.5rem;
}

.ultimate-skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(18, 15, 12, 0.94);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ultimate-skill-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.ultimate-skill-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block-end: 1rem;
}

.ultimate-skill-icon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #0d0c0a;
  overflow: hidden;
}

.ultimate-skill-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ultimate-skill-slot-badge {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  padding: 0.1rem 0.35rem;
  border-start-start-radius: 3px;
  background: var(--crimson);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.ultimate-skill-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.ultimate-skill-tag {
  display: inline-block;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ultimate-skill-name {
  margin: 0;
  color: var(--parchment);
  font-size: 1.25rem;
  line-height: 1.3;
}

.ultimate-skill-desc {
  color: var(--sand);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-block-end: 1rem;
}

.ultimate-skill-footer {
  margin-block-start: auto;
  padding-block-start: 0.75rem;
  border-block-start: 1px dashed rgba(199, 166, 103, 0.2);
}

.ultimate-skill-hint {
  color: var(--ash);
  font-size: 0.76rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .ultimate-skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Class Ratings & Comparison in Builds */
.build-card.is-comparing {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 14px 34px rgba(0, 0, 0, 0.45);
}

.build-ratings-summary {
  margin-block: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(199, 166, 103, 0.2);
  border-radius: 4px;
  background: rgba(10, 8, 6, 0.6);
}

.build-ratings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 0.6rem;
  padding-block-end: 0.45rem;
  border-block-end: 1px solid rgba(199, 166, 103, 0.15);
}

.build-ratings-header span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.build-ratings-header strong {
  color: var(--gold-bright);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.build-ratings-bars {
  display: grid;
  gap: 0.42rem;
}

.build-bar-row {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
}

[dir="rtl"] .build-bar-row {
  grid-template-columns: 100px minmax(0, 1fr) 30px;
}

.build-bar-label {
  color: var(--sand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.build-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.build-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.build-bar-fill.stat-attack { background: linear-gradient(90deg, #b34f43, #e05a47); }
.build-bar-fill.stat-defense { background: linear-gradient(90deg, #2b6cb0, #4299e1); }
.build-bar-fill.stat-mobility { background: linear-gradient(90deg, #2f855a, #48bb78); }
.build-bar-fill.stat-control { background: linear-gradient(90deg, #6b46c1, #9f7aea); }
.build-bar-fill.stat-support { background: linear-gradient(90deg, #c05621, #ed8936); }

.build-bar-num {
  text-align: end;
  color: var(--parchment);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

[dir="rtl"] .build-bar-num {
  text-align: start;
}

.build-card-actions {
  display: flex;
  gap: 0.65rem;
  margin-block-start: 1.15rem;
}

.build-card-actions > * {
  flex: 1 1 0;
  text-align: center;
}

.build-compare-toggle {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sand);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.build-compare-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.build-compare-toggle.is-comparing {
  border-color: var(--gold);
  background: rgba(199, 166, 103, 0.16);
  color: var(--gold-bright);
}

/* Compare Classes Modal */
.compare-classes-dialog {
  width: min(calc(100% - 2rem), 1100px);
}

.compare-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.compare-class-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-block-start: 3px solid var(--gold);
  background: #14110e;
  border-radius: 4px;
}

.compare-class-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-block-end: 1rem;
  padding-block-end: 0.85rem;
  border-block-end: 1px solid var(--border);
}

.compare-class-head img {
  width: 64px;
  height: 64px;
  border: 1px solid var(--gold);
  object-fit: cover;
  background: #0d0c0a;
}

.compare-class-head-meta {
  flex: 1 1 0;
  min-width: 0;
}

.compare-class-head-meta h3 {
  margin: 0.2rem 0;
  font-size: 1.25rem;
}

.compare-class-remove {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ash);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.compare-class-remove:hover {
  border-color: var(--crimson);
  color: #ff9999;
}

.compare-section-title {
  margin: 0.85rem 0 0.45rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-ultimates-list {
  display: grid;
  gap: 0.45rem;
  margin-block-end: 1rem;
}

.compare-ultimate-pill {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(199, 166, 103, 0.25);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
}

.compare-ultimate-pill strong {
  display: block;
  color: var(--parchment);
}

.compare-ultimate-pill small {
  color: var(--gold);
  font-size: 0.72rem;
}



/* ==========================================================================
   Boss Cards Compendium & Belt Calculator
   ========================================================================== */

/* Boss Cards Grid */
.boss-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.boss-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-block-start: 3px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(35, 30, 25, 0.9), rgba(15, 12, 10, 0.98));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.boss-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
}

.boss-card.is-comparing {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold-bright), 0 12px 30px rgba(0, 0, 0, 0.5);
}

.boss-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-block-end: 0.85rem;
  padding-block-end: 0.75rem;
  border-block-end: 1px solid rgba(199, 166, 103, 0.18);
}

.boss-card-icon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.boss-card-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.boss-card-id-badge {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  padding: 0.05rem 0.25rem;
  border-start-start-radius: 3px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--gold-bright);
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.boss-card-title-meta {
  flex: 1 1 0;
  min-width: 0;
}

.boss-card-title-meta .class-role-badge {
  display: inline-block;
  margin-block-end: 0.25rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
}

.boss-card-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--parchment);
}

.boss-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
}

.boss-card-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.boss-sec-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boss-belt-text {
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(199, 166, 103, 0.25);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--gold-bright);
  font-weight: 650;
  font-size: 0.88rem;
}

.boss-skill-box {
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(10, 8, 6, 0.5);
}

.boss-skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.35rem;
}

.boss-skill-header strong {
  color: var(--parchment);
  font-size: 0.88rem;
}

.boss-skill-tag {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  background: rgba(199, 166, 103, 0.18);
  color: var(--gold-bright);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.boss-skill-desc {
  margin: 0;
  color: var(--sand);
  font-size: 0.82rem;
  line-height: 1.45;
}

.boss-drop-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  border-block-start: 1px dashed rgba(199, 166, 103, 0.15);
  padding-block-start: 0.45rem;
}

.boss-drop-text {
  color: var(--sand);
}

.boss-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-block-start: 1rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--border);
}

.boss-card-actions > * {
  flex: 1 1 0;
  text-align: center;
}

/* ==========================================================================
   Belt Calculator Layout
   ========================================================================== */
.belt-calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .belt-calc-layout {
    grid-template-columns: 1fr;
  }
}

.belt-slots-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.belt-group-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #14110e;
}

.belt-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-block-end: 1rem;
  padding-block-end: 0.65rem;
  border-block-end: 1px solid var(--border);
}

.belt-group-header h2 {
  margin: 0.15rem 0 0 0;
  font-size: 1.3rem;
}

.boss-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.pet-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.belt-slot-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(20, 17, 13, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
}

.belt-slot-card:hover {
  border-color: var(--gold);
  background: rgba(30, 25, 20, 0.95);
}

.belt-slot-card.is-empty {
  border-style: dashed;
  border-color: rgba(199, 166, 103, 0.35);
  justify-content: center;
}

.belt-slot-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px dashed var(--gold);
  border-radius: 4px;
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 300;
}

.belt-slot-card.is-equipped {
  border-color: rgba(199, 166, 103, 0.5);
}

.belt-slot-img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.belt-slot-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.belt-slot-info strong {
  font-size: 0.88rem;
  color: var(--parchment);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.belt-slot-info small {
  color: var(--ash);
  font-size: 0.75rem;
}

.belt-slot-stat-pill {
  color: var(--gold);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.belt-pet-stage-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--sand);
}

.belt-pet-stage-picker select {
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border);
  background: #0d0c0a;
  color: var(--gold-bright);
  font-size: 0.76rem;
  border-radius: 2px;
}

.belt-slot-remove {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.6);
  color: var(--ash);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.belt-slot-remove:hover {
  border-color: var(--crimson);
  color: #ff8888;
}

.belt-presets-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #110e0b;
}

/* Belt Stats Summary Column */
.belt-stats-panel {
  position: sticky;
  inset-block-start: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #13100d;
}

.belt-summary-header {
  margin-block-end: 0.85rem;
}

.belt-cap-note {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(199, 166, 103, 0.3);
  border-radius: 3px;
  background: rgba(199, 166, 103, 0.08);
  margin-block-end: 1rem;
  font-size: 0.8rem;
  color: var(--sand);
}

.belt-cap-note strong {
  display: block;
  color: var(--gold-bright);
  margin-block-end: 0.15rem;
}

.belt-core-stats-grid {
  display: grid;
  gap: 0.6rem;
}

.belt-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.belt-stat-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
}

.belt-stat-label {
  color: var(--sand);
  font-weight: 600;
}

.belt-stat-vals {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.belt-stat-vals strong {
  color: var(--parchment);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.belt-stat-row.is-capped .belt-stat-vals strong {
  color: #ff9944;
}

.belt-cap-badge {
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  background: #b34f43;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.belt-stat-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.belt-stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.belt-stat-bar-fill.fill-normal {
  background: linear-gradient(90deg, #996e38, #d4af37);
}

.belt-stat-bar-fill.fill-capped {
  background: linear-gradient(90deg, #d97706, #ef4444);
}

.belt-secondary-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.belt-secondary-stat-pill {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(199, 166, 103, 0.25);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  color: var(--sand);
}

.belt-secondary-stat-pill strong {
  color: var(--gold-bright);
  margin-inline-start: 0.3rem;
}

.belt-active-skills {
  margin-block-start: 1.25rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--border);
}

.belt-active-skills h3 {
  margin: 0 0 0.65rem 0;
  font-size: 0.95rem;
  color: var(--gold);
}

.active-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.belt-active-skill-card {
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.25);
}

.active-skill-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.active-skill-top img {
  border: 1px solid var(--gold);
  border-radius: 2px;
}

/* Modal Picker Grid */
.belt-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-inline-end: 0.5rem;
}

.belt-picker-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #17130f;
  cursor: pointer;
  transition: all 0.15s ease;
}

.belt-picker-card:hover {
  border-color: var(--gold);
  background: #221c16;
}

.belt-picker-card img {
  border: 1px solid var(--border);
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.belt-uncapped-badge {
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
  background: rgba(199, 166, 103, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.belt-stat-sub {
  color: var(--ash);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

html[data-active-season="season1"] [data-season1-hidden] {
  display: none !important;
}
