:root {
  --bg-void: #0a0b0f;
  --bg-night: #0d1117;
  --bg-abyss: #10192b;
  --panel-glass: rgba(13, 18, 28, 0.78);
  --panel-strong: rgba(7, 11, 20, 0.92);
  --line-gold: #c9a84c;
  --line-bright: #f0c040;
  --line-ember: #8b1a1a;
  --line-ember-soft: #c0392b;
  --line-azure: #4d7ff0;
  --line-arcane: #7f55c7;
  --text-main: #e5e8f0;
  --text-muted: #a8b2c0;
  --text-dim: #718098;
  --site-font-stack: 'EB Garamond', Georgia, serif;
  --rare: #3d8bff;
  --epic: #8b5cf6;
  --legendary: #ffb347;
  --common: #b9c2d0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-core: 0 8px 26px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 18px rgba(240, 192, 64, 0.35);
  --shadow-arcane: 0 0 16px rgba(127, 85, 199, 0.32);
  --transition-fast: 180ms ease;
  --transition-mid: 300ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--site-font-stack, 'EB Garamond', Georgia, serif);
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% -10%, rgba(127, 85, 199, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(77, 127, 240, 0.16), transparent 34%),
    linear-gradient(145deg, var(--bg-void) 0%, var(--bg-night) 42%, #0a1120 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(201, 168, 76, 0.03) 0,
      rgba(201, 168, 76, 0.03) 2px,
      transparent 2px,
      transparent 9px
    ),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.03), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.65;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25),
    transparent 12%,
    transparent 78%,
    rgba(0, 0, 0, 0.35)
  );
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.38);
  background:
    linear-gradient(
      to bottom,
      rgba(10, 14, 24, 0.94),
      rgba(10, 14, 24, 0.78)
    );
  backdrop-filter: blur(8px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f6d98d;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(240, 192, 64, 0.7);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.25), transparent 75%);
  box-shadow: var(--shadow-gold);
  overflow: hidden;
}

.brand-mark-image,
.admin-brand-mark-image {
  padding: 0;
}

.brand-mark-image img,
.admin-brand-mark-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.25rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(16, 22, 35, 0.92);
  color: #f6e3bc;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
  transition: border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
  border-color: rgba(240, 192, 64, 0.75);
  color: #ffefc9;
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.admin-link {
  white-space: nowrap;
}

.version-switcher {
  position: relative;
}

.version-switcher summary {
  list-style: none;
}

.version-switcher summary::-webkit-details-marker {
  display: none;
}

.version-toggle {
  min-width: 166px;
  gap: 0.55rem;
}

.version-toggle-label {
  display: inline-flex;
  align-items: center;
}

.version-toggle-value {
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.32);
  background: rgba(240, 192, 64, 0.08);
  color: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.version-toggle-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.85;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.version-switcher[open] .version-toggle-caret {
  transform: rotate(180deg);
}

.version-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 260;
  min-width: 200px;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 76, 0.38);
  background: linear-gradient(180deg, rgba(13, 18, 28, 0.98), rgba(7, 11, 20, 0.96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), 0 0 18px rgba(240, 192, 64, 0.08);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
}

.version-switcher[open] .version-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.version-option {
  display: grid;
  gap: 0.1rem;
  appearance: none;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  min-height: 38px;
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.version-option small {
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.version-option:hover,
.version-option.active {
  color: #fff3cf;
  border-color: rgba(240, 192, 64, 0.44);
  background: rgba(240, 192, 64, 0.12);
  transform: translateX(2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-mid);
}

.nav-link:hover,
.nav-link.active {
  color: #fff3cf;
  background: rgba(240, 192, 64, 0.1);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: rgba(18, 24, 37, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.burger span {
  width: 18px;
  height: 2px;
  background: #f6d98d;
  border-radius: 99px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.icon-sidebar {
  position: fixed;
  top: 83px;
  left: 0.9rem;
  bottom: 1rem;
  z-index: 120;
  width: 64px;
  padding: 0.65rem 0.4rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: linear-gradient(
    to bottom,
    rgba(8, 12, 19, 0.8),
    rgba(8, 12, 19, 0.35)
  );
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.icon-link {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(168, 178, 192, 0.06);
  color: var(--text-dim);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.icon-link:hover,
.icon-link.active {
  transform: translateY(-2px);
  color: #ffe5aa;
  border-color: rgba(240, 192, 64, 0.6);
  box-shadow: var(--shadow-gold);
}

.site-main {
  position: relative;
  padding: 96px 1rem 2.5rem;
}

.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

.panel {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: var(--panel-glass);
  box-shadow: var(--shadow-core);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(168, 178, 192, 0.14);
  background: linear-gradient(90deg, rgba(240, 192, 64, 0.08), transparent);
}

.panel-header .panel-header-search.search-shell {
  flex: 0 1 220px;
  min-width: min(220px, 100%);
  margin-left: auto;
}

.panel-header .panel-header-search.search-shell input {
  min-height: 32px;
  font-size: 0.88rem;
  padding: 0 0.45rem;
}

.panel-title {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.96rem;
  color: #eed7a4;
}

.panel-body {
  padding: 1rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}

.breadcrumbs span {
  opacity: 0.6;
}

.ornament-divider {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.6), transparent),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 16px,
      rgba(255, 255, 255, 0.07) 16px,
      rgba(255, 255, 255, 0.07) 17px
    );
  opacity: 0.8;
}

.hero {
  position: relative;
  min-height: 340px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background:
    radial-gradient(circle at 10% 10%, rgba(201, 168, 76, 0.14), transparent 37%),
    radial-gradient(circle at 80% 20%, rgba(127, 85, 199, 0.22), transparent 42%),
    linear-gradient(160deg, rgba(8, 12, 22, 0.96), rgba(10, 18, 36, 0.86));
}

.hero-content {
  position: relative;
  z-index: 5;
  padding: 2.6rem 1.4rem 1.8rem;
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe7b2;
  border: 1px solid rgba(240, 192, 64, 0.45);
  background: rgba(240, 192, 64, 0.1);
}

.hero h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  letter-spacing: 0.07em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #f8ebcb;
  text-shadow: 0 0 18px rgba(240, 192, 64, 0.35);
}

.hero p {
  margin: 0.9rem 0 1.2rem;
  font-size: 1.1rem;
  color: #ced7e6;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.l2-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.35rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(201, 168, 76, 0.7);
  background:
    linear-gradient(
      to bottom,
      rgba(240, 192, 64, 0.2),
      rgba(114, 84, 28, 0.26)
    );
  color: #ffecc1;
  font-family: "Cinzel", serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.l2-btn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.l2-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  filter: brightness(1.08);
}

.l2-btn:active {
  transform: translateY(1px) scale(0.98);
}

.l2-btn.secondary {
  border-color: rgba(127, 85, 199, 0.75);
  background:
    linear-gradient(
      to bottom,
      rgba(127, 85, 199, 0.25),
      rgba(52, 30, 94, 0.4)
    );
  color: #ece1ff;
}

.l2-btn.secondary:hover {
  box-shadow: var(--shadow-arcane);
}

.l2-btn.danger {
  border-color: rgba(192, 57, 43, 0.82);
  background:
    linear-gradient(
      to bottom,
      rgba(192, 57, 43, 0.24),
      rgba(91, 22, 22, 0.42)
    );
  color: #ffe1db;
}

.l2-btn.danger:hover {
  box-shadow: 0 0 18px rgba(192, 57, 43, 0.3);
}

.magic-fog {
  position: absolute;
  inset: -50px;
  pointer-events: none;
}

.fog-layer {
  position: absolute;
  width: 40%;
  height: 56%;
  filter: blur(26px);
  opacity: 0.4;
  animation: drift 14s linear infinite;
}

.fog-gold {
  top: 12%;
  left: -5%;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.5), transparent 70%);
}

.fog-blue {
  right: -10%;
  top: 0;
  animation-delay: -5s;
  background: radial-gradient(circle, rgba(77, 127, 240, 0.5), transparent 70%);
}

.fog-arcane {
  left: 34%;
  bottom: 0;
  animation-delay: -9s;
  background: radial-gradient(circle, rgba(127, 85, 199, 0.5), transparent 70%);
}

#arcane-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.9;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
}

.stat-card {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(14, 20, 31, 0.72);
}

.stat-value {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.38rem;
  letter-spacing: 0.04em;
  color: #ffe3a5;
}

.stat-label {
  margin: 0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.portal-card {
  position: relative;
  min-height: 150px;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.22);
  background:
    linear-gradient(155deg, rgba(16, 26, 46, 0.88), rgba(14, 17, 29, 0.78));
  overflow: hidden;
  transition: transform var(--transition-mid), box-shadow var(--transition-mid), border-color var(--transition-mid);
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(240, 192, 64, 0.14), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-mid);
}

.portal-card h3 {
  margin: 0 0 0.35rem;
  font-family: "Cinzel", serif;
  color: #f3ddb0;
  letter-spacing: 0.04em;
}

.portal-card p {
  margin: 0;
  color: var(--text-muted);
}

.portal-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 168, 76, 0.6);
  box-shadow: var(--shadow-gold);
}

.portal-card:hover::after {
  opacity: 1;
}

.class-tree-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}

.class-tree-race {
  display: grid;
  gap: 0.7rem;
  padding: 1.05rem;
  width: 100%;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.22);
  background:
    linear-gradient(160deg, rgba(14, 21, 36, 0.9), rgba(8, 13, 24, 0.84));
}

.class-tree-race-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.class-tree-race-head h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  color: #f3ddb0;
}

.class-tree-link {
  text-decoration: none;
  min-height: 30px;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.28);
  background: rgba(13, 19, 31, 0.9);
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.class-tree-link:hover,
.class-tree-link:focus-visible {
  color: #fdebbf;
  border-color: rgba(240, 192, 64, 0.72);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.class-tree-branches {
  display: grid;
  gap: 0.6rem;
}

.class-tree-root-group {
  display: grid;
  gap: 0.62rem;
}

.class-tree-root-branch {
  padding-bottom: 0.1rem;
}

.class-tree-sub-branches {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.9rem;
  width: 100%;
}

.class-tree-sub-branch {
  padding: 0.42rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(10, 15, 25, 0.48);
}

.class-tree-branch {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.44rem;
}

.class-tree-lineage {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-align: center;
}

.class-tree-parent-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.class-tree-parent-node {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 30px;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.24);
  background: rgba(10, 16, 28, 0.72);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #ddcdad;
}

.class-tree-node-icon {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(168, 178, 192, 0.14);
}

.class-tree-node-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.class-tree-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2.34rem;
  width: 1px;
  height: 0.54rem;
  transform: translateX(-50%);
  background: rgba(201, 168, 76, 0.48);
}

.class-tree-children {
  list-style: none;
  margin: 0 auto;
  padding: 0.52rem 0.9rem 0;
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.72rem;
  width: fit-content;
  max-width: 100%;
}

.class-tree-children::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  top: 0;
  height: 1px;
  background: rgba(201, 168, 76, 0.42);
}

.class-tree-children li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.54rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.24);
  background: rgba(9, 15, 27, 0.68);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.class-tree-children li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.53rem;
  width: 1px;
  height: 0.53rem;
  transform: translateX(-50%);
  background: rgba(201, 168, 76, 0.42);
}

.class-tree-root-group .class-tree-branch {
  min-width: 0;
}

.index-layout {
  display: grid;
  gap: 1rem;
}

.world-table-wrap {
  overflow-x: auto;
}

.l2-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: rgba(5, 9, 16, 0.6);
}

.l2-table th,
.l2-table td {
  padding: 0.72rem;
  border-bottom: 1px solid rgba(168, 178, 192, 0.15);
  text-align: left;
  color: var(--text-main);
}

.item-source-for-value {
  white-space: pre-line;
}

.l2-table th {
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #ecd6a3;
  background: rgba(240, 192, 64, 0.08);
}

.l2-table tr:hover td {
  background: rgba(77, 127, 240, 0.1);
}

.page-banner {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 168, 76, 0.3);
  background:
    radial-gradient(circle at 10% 15%, rgba(240, 192, 64, 0.12), transparent 42%),
    linear-gradient(to right, rgba(12, 18, 31, 0.96), rgba(8, 13, 23, 0.72));
}

.page-banner h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.06em;
  color: #f3ddb0;
}

.page-banner p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mobs-pagination {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.mobs-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.mobs-panel-header .mobs-panel-title {
  justify-self: start;
}

.mobs-panel-header .mobs-view-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  justify-self: center;
}

.mobs-toolbar,
.item-source-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.item-source-toolbar {
  width: 100%;
}

.mobs-panel-header .mobs-toolbar {
  width: auto;
  justify-self: end;
}

.item-source-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.item-source-select {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.28);
  background: rgba(13, 19, 30, 0.9);
  color: var(--text-main);
  padding: 0.25rem 0.6rem;
  font-family: inherit;
}

.mobs-pagination .filter-pill {
  text-decoration: none;
}

.mobs-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.mobs-sort-indicator {
  display: inline-block;
  margin-left: 0.35rem;
  opacity: 0.6;
  font-size: 0.76rem;
}

.mobs-sortable.asc .mobs-sort-indicator::before {
  content: "\25B2";
}

.mobs-sortable.desc .mobs-sort-indicator::before {
  content: "\25BC";
}

.mobs-sortable:not(.active) .mobs-sort-indicator::before {
  content: "\21C5";
}

.mobs-sortable.active {
  color: #ffe5a4;
}

.mobs-sortable:focus-visible {
  outline: 2px solid rgba(240, 192, 64, 0.75);
  outline-offset: -2px;
}

.mobs-level-header {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
}

.mobs-level-label {
  display: inline-flex;
  align-items: center;
}

.mobs-level-input {
  width: 4.4rem;
  min-height: 28px;
  padding: 0 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(168, 178, 192, 0.28);
  background: rgba(13, 19, 30, 0.92);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1;
  outline: none;
  appearance: textfield;
}

.mobs-level-input::-webkit-outer-spin-button,
.mobs-level-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.mobs-level-input:focus-visible {
  border-color: rgba(240, 192, 64, 0.78);
  box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.16);
}

@media (max-width: 980px) {
  .mobs-panel-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobs-panel-header .mobs-panel-title,
  .mobs-panel-header .mobs-view-tabs,
  .mobs-panel-header .mobs-toolbar {
    justify-self: stretch;
  }

  .mobs-panel-header .mobs-view-tabs {
    justify-content: flex-start;
  }

  .mobs-panel-header .mobs-toolbar {
    width: 100%;
    justify-content: flex-start;
  }
}

.filter-pill.disabled,
.tab-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.npc-drop-list {
  margin: 0;
  padding-left: 1.05rem;
}

.npc-drop-entry {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.14rem 0;
}

.npc-drop-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.npc-image-cell {
  width: 72px;
}

.npc-link {
  color: inherit;
  text-decoration: none;
}

.npc-image-cell .npc-link {
  display: inline-flex;
}

.npc-name-link {
  color: #f7d982;
  font-weight: 600;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.npc-name-link:hover {
  color: #fff3cf;
  text-shadow: var(--shadow-gold);
}

.npc-image {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 178, 192, 0.22);
}

.npc-image-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px dashed rgba(168, 178, 192, 0.35);
  color: var(--text-dim);
}

.npc-detail-page {
  gap: 1rem;
}

.npc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.9fr);
  gap: 0.9rem;
  padding: 0.9rem;
  align-items: start;
}

.npc-hero-copy {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.npc-hero-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.npc-hero-heading-row h1 {
  margin: 0;
}

.npc-map-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.52);
  background: linear-gradient(180deg, rgba(240, 192, 64, 0.18), rgba(120, 77, 12, 0.2));
  color: #ffe8b2;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.npc-map-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 192, 64, 0.82);
  color: #fff4cf;
  box-shadow: var(--shadow-gold);
}

.npc-hero-copy p {
  margin: 0;
}

.npc-hero-side {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.npc-hero-art {
  display: grid;
  place-items: center;
  padding: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.npc-detail-image {
  width: min(280px, 100%);
  max-height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.35));
}

.npc-detail-placeholder {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed rgba(168, 178, 192, 0.28);
  color: var(--text-dim);
  background: rgba(13, 19, 30, 0.6);
}

.npc-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.npc-hero-profile-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(7, 11, 20, 0.46);
}

.npc-hero-profile-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.npc-hero-profile-table th,
.npc-hero-profile-table td {
  padding: 0.5rem 0.65rem;
  border-top: 1px solid rgba(168, 178, 192, 0.12);
  vertical-align: top;
}

.npc-hero-profile-table tr:first-child th,
.npc-hero-profile-table tr:first-child td {
  border-top: 0;
}

.npc-hero-profile-table th {
  width: 21%;
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  background: rgba(240, 192, 64, 0.05);
}

.npc-hero-profile-table td {
  width: 29%;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.npc-hero-profile-table td a {
  color: #f7d982;
}

.npc-hero-skills {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(8, 13, 22, 0.42);
}

.npc-hero-skills h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.94rem;
  color: #eed7a4;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  background: rgba(240, 192, 64, 0.08);
  color: #f1d8a0;
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.version-chip.active {
  border-color: rgba(77, 127, 240, 0.35);
  background: rgba(77, 127, 240, 0.12);
  color: #dce8ff;
}

.npc-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.npc-detail-body {
  display: grid;
  gap: 0.9rem;
}

.npc-summary {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
}

.npc-detail-specs {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.npc-detail-specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.npc-detail-specs dt {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.npc-detail-specs dd {
  margin: 0;
  text-align: right;
  color: var(--text-main);
  font-weight: 600;
}

.npc-stack-group {
  display: grid;
  gap: 0.6rem;
}

.npc-stack-group h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eed7a4;
}

.npc-skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 0.4rem;
}

.npc-skill-card {
  display: grid;
  place-items: center;
  padding: 0.22rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 192, 64, 0.12), transparent 56%),
    rgba(168, 178, 192, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  cursor: help;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.npc-skill-card:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow: 0 0 10px rgba(240, 192, 64, 0.28);
}

.npc-skill-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: linear-gradient(160deg, rgba(16, 23, 36, 0.96), rgba(8, 12, 19, 0.9));
  overflow: hidden;
}

.npc-skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.npc-skill-icon span {
  font-family: "Cinzel", serif;
  font-size: 0.56rem;
  letter-spacing: 0.03em;
  color: #ffe3a5;
}

.npc-skill-name,
.npc-skill-meta {
  display: none;
}

.npc-hero-skills .npc-badge-list li {
  padding: 0.25rem 0.52rem;
  font-size: 0.82rem;
}

.npc-badge-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
}

.npc-badge-list li {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.15);
  background: rgba(168, 178, 192, 0.05);
}

.npc-drop-detail-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
}

.npc-drop-detail-entry {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.npc-drop-sections {
  display: grid;
  gap: 1rem;
}

.npc-drop-section {
  display: grid;
  gap: 0.7rem;
  padding: 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(8, 13, 22, 0.45);
}

.npc-drop-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.npc-drop-section-header h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eed7a4;
}

.npc-drop-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 8px;
  gap: 0.65rem;
  align-items: start;
}

.npc-drop-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.68rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.npc-drop-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.npc-drop-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.npc-drop-group-icon {
  display: inline-flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: rgba(255, 255, 255, 0.04);
  object-fit: contain;
}

.npc-drop-group-copy {
  display: grid;
  gap: 0.08rem;
}

.npc-drop-group-copy strong {
  font-size: 0.96rem;
  color: var(--text-main);
  line-height: 1.1;
}

.npc-drop-group-copy span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.npc-drop-group-chance {
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(240, 192, 64, 0.08);
  color: #f6e3bc;
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.npc-drop-item-list {
  margin-left: 0;
  display: grid;
  gap: 0.45rem;
}

.npc-drop-item-list-dense {
  gap: 0.55rem;
}

.npc-drop-item {
  align-items: center;
  padding: 0.52rem 0.62rem;
}

.npc-drop-item-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.npc-drop-item-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.npc-drop-item-name {
  color: var(--text-main);
  line-height: 1.25;
}

.npc-drop-item-chance {
  margin-left: auto;
}

.npc-drop-item-statuses {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.npc-drop-status-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.npc-drop-status-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.95;
}

.npc-drop-status-link:hover .npc-drop-status-icon,
.npc-drop-status-link:focus-visible .npc-drop-status-icon {
  opacity: 1;
  transform: translateY(-1px);
}

.npc-spoil-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  gap: 0.45rem;
}

.npc-spoil-entry {
  justify-content: flex-start;
  padding: 0.56rem 0.65rem;
}

.npc-spoil-entry .npc-drop-item-copy {
  justify-items: start;
  text-align: left;
}

.npc-spoil-entry .npc-drop-group-chance {
  margin-left: auto;
}

.craft-item-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.craft-ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.craft-ingredient-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tab-btn,
.filter-pill {
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.28);
  background: rgba(17, 23, 37, 0.9);
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.tab-btn:hover,
.filter-pill:hover,
.tab-btn.active,
.filter-pill.active {
  color: #fdebbf;
  border-color: rgba(240, 192, 64, 0.72);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.search-shell {
  min-width: min(360px, 100%);
  flex: 1;
  display: flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.28);
  background: rgba(13, 19, 30, 0.9);
  padding: 0 0.65rem;
}

.search-shell input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-main);
  min-height: 38px;
  outline: none;
  font-family: inherit;
  font-size: 0.98rem;
}

.search-shell input::placeholder {
  color: var(--text-dim);
}

.item-grid,
.quest-grid,
.class-grid,
.race-grid {
  display: grid;
  gap: 0.75rem;
}

.item-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.item-catalog-page {
  gap: 1rem;
}

.item-catalog-panel .panel-body {
  display: grid;
  gap: 0.9rem;
}

.item-catalog-filter-header {
  align-items: flex-end;
}

.item-catalog-filter-copy {
  display: grid;
  gap: 0.25rem;
}

.item-catalog-filter-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.item-catalog-search {
  min-width: min(420px, 100%);
}

.item-catalog-tabs-wrap,
.item-catalog-subtabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.item-catalog-tabs-head {
  display: grid;
  gap: 0.12rem;
}

.item-catalog-group-kicker {
  color: #f1dbad;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.item-catalog-group-note {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.item-catalog-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.35rem;
  overflow: visible;
  padding: 0;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(168, 178, 192, 0.2);
}

.item-catalog-tabs::-webkit-scrollbar,
.item-catalog-subtabs::-webkit-scrollbar {
  display: none;
}

.item-catalog-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 52px;
  padding: 0.72rem 0.95rem 0.7rem;
  border: 1px solid rgba(168, 178, 192, 0.2);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.82), rgba(11, 16, 26, 0.72));
  color: var(--text-dim);
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.item-catalog-tab:hover {
  color: #fff2c9;
}

.item-catalog-tab.active {
  z-index: 1;
  color: #fff6d6;
  background: linear-gradient(180deg, rgba(28, 35, 51, 0.98), rgba(13, 17, 27, 0.98));
  border-color: rgba(201, 168, 76, 0.38);
  box-shadow: 0 -1px 0 rgba(201, 168, 76, 0.22), 0 -8px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(1px);
}

.item-catalog-tab.active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
}

.item-catalog-tab-label,
.item-catalog-subtab-label {
  display: inline-flex;
  align-items: center;
  text-align: center;
  line-height: 1.1;
}

.item-catalog-subtabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.35rem;
  scrollbar-width: none;
  overflow: visible;
  padding: 0;
}

.item-catalog-subtab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 26px;
  padding: 0.42rem 0.8rem 0.58rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.18);
  background: linear-gradient(180deg, rgba(16, 22, 35, 0.72), rgba(10, 15, 24, 0.56));
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.69rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.item-catalog-subtab:hover,
.item-catalog-subtab.active {
  color: #fff1c7;
  border-color: rgba(240, 192, 64, 0.52);
  background: linear-gradient(180deg, rgba(28, 35, 51, 0.92), rgba(16, 22, 35, 0.88));
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.item-catalog-summary {
  margin: 0;
}

.item-catalog-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.6rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(168, 178, 192, 0.16);
}

.item-catalog-results-header .panel-title {
  font-size: 0.9rem;
}

.item-catalog-results {
  display: grid;
  gap: 1rem;
}

.item-catalog-loading {
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(168, 178, 192, 0.22);
  background: rgba(168, 178, 192, 0.04);
  color: var(--text-muted);
}

.item-subtabs .tab-btn,
.item-crystal-tabs .tab-btn {
  font-size: 0.72rem;
}

.item-crystal-groups {
  display: grid;
  gap: 1rem;
}

.item-crystal-section {
  padding: 0.15rem 0.8rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(8, 13, 22, 0.42);
}

.item-crystal-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem 0.1rem;
  cursor: pointer;
  user-select: none;
}

.item-crystal-section > summary::-webkit-details-marker {
  display: none;
}

.item-crystal-section > summary span:first-child {
  font-family: "Cinzel", serif;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f2daa8;
}

.item-table-wrap {
  overflow-x: auto;
}

.item-table {
  min-width: 920px;
}

.item-table th,
.item-table td {
  vertical-align: top;
}

.item-table td {
  color: var(--text-main);
}

.item-table-name-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.item-table-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(240, 192, 64, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.item-table-icon-fallback {
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  color: #f5ddb0;
}

.item-table-meta {
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.item-table-note {
  max-width: 420px;
}

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.22);
  background: linear-gradient(160deg, rgba(17, 25, 39, 0.92), rgba(9, 13, 22, 0.76));
  padding: 0.85rem;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 192, 64, 0.65);
  box-shadow: var(--shadow-gold);
}

.item-card.is-hidden {
  display: none;
}

.item-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.item-card-copy {
  min-width: 0;
  flex: 1;
}

.item-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(240, 192, 64, 0.4);
  background:
    radial-gradient(circle at 30% 30%, rgba(240, 192, 64, 0.28), transparent 60%),
    linear-gradient(145deg, rgba(23, 30, 45, 0.92), rgba(11, 15, 24, 0.95));
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  color: #ffe4ac;
  margin-bottom: 0.62rem;
}

.item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-title {
  margin: 0;
  font-size: 1.02rem;
  color: #f6e3bc;
}

.item-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.item-link:hover {
  color: #fff3cf;
  text-shadow: var(--shadow-gold);
}

.item-meta {
  margin: 0.2rem 0 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.item-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.item-description {
  margin-top: 0.05rem;
}

.item-traits {
  margin-top: 0.15rem;
}

.item-footer-text {
  margin-top: auto;
}

.item-detail-page {
  gap: 1rem;
}

.item-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.95fr);
  gap: 0.9rem;
  padding: 0.9rem;
}

.item-detail-hero-main {
  display: grid;
  gap: 0.9rem;
}

.item-detail-hero-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.item-detail-hero-source-fields {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 14px;
}

.item-detail-hero-source-fields h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eed7a4;
}

.item-detail-icon-shell {
  flex: 0 0 auto;
}

.item-detail-icon {
  width: 82px;
  height: 82px;
  margin-bottom: 0;
}

.item-detail-copy h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  color: #f4deb0;
}

.item-detail-copy .item-meta {
  margin-top: 0.3rem;
}

.item-detail-copy .quest-details {
  margin: 0.5rem 0 0;
}

.item-detail-chips {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.item-detail-hero-side {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(7, 11, 20, 0.45);
}

.item-detail-hero-side h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eed7a4;
}

.item-detail-specs {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.item-detail-specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.58rem 0.68rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.item-detail-specs dt {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.item-detail-specs dd {
  margin: 0;
  text-align: right;
  color: var(--text-main);
  font-weight: 600;
}

.item-detail-effects {
  display: grid;
  gap: 0.8rem;
}

.item-detail-effects article {
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.04);
}

.item-detail-effects h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  text-transform: uppercase;
  color: #f2daa8;
}

.item-detail-effects pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "EB Garamond", Georgia, serif;
  color: var(--text-main);
}

.item-detail-stat-list {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
}

.item-detail-stat-list li {
  padding: 0.48rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.12);
  background: rgba(168, 178, 192, 0.05);
  color: var(--text-main);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.7rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge.common {
  color: var(--common);
}

.badge.rare {
  color: var(--rare);
}

.badge.epic {
  color: var(--epic);
}

.badge.legendary {
  color: var(--legendary);
}

.quest-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 0.85rem;
}

.quest-sidebar {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.slider-shell {
  display: grid;
  gap: 0.35rem;
}

.slider-shell input[type="range"] {
  width: 100%;
  accent-color: var(--line-bright);
}

.quest-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.quest-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.2);
  background:
    linear-gradient(
      to bottom,
      rgba(28, 22, 15, 0.26),
      rgba(15, 20, 31, 0.94)
    );
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.quest-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to bottom, rgba(240, 192, 64, 0.95), rgba(139, 26, 26, 0.7));
}

.quest-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 192, 64, 0.6);
  box-shadow: var(--shadow-gold);
}

.quest-content {
  padding: 0.85rem 0.85rem 0.85rem 1rem;
}

.quest-title {
  margin: 0;
  font-family: "Cinzel", serif;
  color: #f3ddb0;
}

.quest-meta {
  margin: 0.28rem 0 0.4rem;
  color: var(--text-muted);
}

.quest-details {
  margin: 0;
  color: #c9d3e2;
  font-size: 0.92rem;
  line-height: 1.25;
}

.quest-inline-reward-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.quest-inline-reward-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.quest-inline-reward-item strong {
  color: #f3ddb0;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.quest-detail-content {
  display: grid;
  gap: 0.8rem;
}

.quest-reward-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.quest-reward-meta-card {
  display: grid;
  gap: 0.22rem;
  padding: 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.05);
}

.quest-reward-meta-card span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quest-reward-meta-card strong {
  color: #f3ddb0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
}

.quest-reward-meta-card strong a {
  color: inherit;
}

.quest-reward-items-block {
  display: grid;
  gap: 0.6rem;
}

.quest-reward-items-block h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  color: #f3ddb0;
}

.quest-reward-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.quest-reward-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.05);
}

.quest-reward-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(168, 178, 192, 0.22);
  background: rgba(10, 15, 24, 0.45);
  overflow: hidden;
}

.quest-reward-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quest-reward-item-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.quest-reward-item-copy strong {
  line-height: 1.2;
}

.quest-reward-item-copy span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quest-detail-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.2);
}

.quest-markdown-body {
  display: grid;
  gap: 0.65rem;
}

.quest-markdown-body h1,
.quest-markdown-body h2,
.quest-markdown-body h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  color: #f3ddb0;
}

.quest-markdown-body p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.5;
}

.quest-markdown-body ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-main);
}

.quest-markdown-body li {
  margin: 0.2rem 0;
}

.quest-markdown-body a {
  color: #f7d982;
}

.quest-markdown-body img {
  width: min(100%, 760px);
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.2);
}

.admin-quest-list {
  display: grid;
  gap: 0.65rem;
}

.admin-quest-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.05);
}

.admin-quest-item.disabled {
  opacity: 0.72;
}

.admin-quest-item-copy {
  display: grid;
  gap: 0.28rem;
}

.admin-quest-item-copy strong {
  color: #f3ddb0;
}

.admin-quest-item-copy p {
  margin: 0;
  color: var(--text-main);
}

.admin-quest-item-copy span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.admin-quest-item-actions {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.admin-quest-delete-form {
  margin: 0;
  justify-self: end;
}

.admin-quest-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}

.admin-quest-race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.4rem;
}

.admin-quest-race-option {
  margin: 0;
}

.admin-quest-reward-card {
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.04);
  display: grid;
  gap: 0.55rem;
}

.admin-quest-reward-list {
  display: grid;
  gap: 0.5rem;
}

.admin-quest-reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.56rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.18);
  background: rgba(168, 178, 192, 0.04);
}

.admin-quest-reward-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.admin-quest-reward-item-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(168, 178, 192, 0.22);
  background: rgba(10, 14, 22, 0.44);
  overflow: hidden;
}

.admin-quest-reward-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-quest-reward-item-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.admin-quest-reward-item-copy strong {
  color: var(--text-main);
  line-height: 1.2;
}

.admin-quest-reward-item-copy span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-quest-item-suggest {
  display: grid;
  gap: 0.44rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.admin-quest-item-suggest-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.05);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.admin-quest-item-suggest-option:hover,
.admin-quest-item-suggest-option.active {
  border-color: rgba(240, 192, 64, 0.56);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.admin-quest-item-suggest-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid rgba(168, 178, 192, 0.22);
  background: rgba(10, 14, 22, 0.45);
  overflow: hidden;
}

.admin-quest-item-suggest-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-quest-item-suggest-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.admin-quest-item-suggest-copy strong {
  color: var(--text-main);
  line-height: 1.2;
}

.admin-quest-item-suggest-copy small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-quest-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-quest-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-quest-lang-panel {
  display: grid;
  gap: 0.6rem;
}

.admin-quest-preview {
  min-height: 300px;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.04);
  padding: 0.75rem;
}

.admin-quest-upload-card {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.04);
}

.admin-quest-upload-card h4 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  color: #f3ddb0;
}

.admin-quest-upload-list {
  display: grid;
  gap: 0.45rem;
}

.admin-quest-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 178, 192, 0.18);
  background: rgba(168, 178, 192, 0.04);
}

.admin-quest-upload-item a {
  color: #f7d982;
  word-break: break-all;
}

.class-race-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.class-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.class-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(168, 178, 192, 0.2);
  background: rgba(14, 21, 33, 0.9);
  padding: 0.9rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.class-card:hover {
  transform: translateY(-3px);
  border-color: rgba(77, 127, 240, 0.65);
  box-shadow: 0 0 14px rgba(77, 127, 240, 0.3);
}

.class-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.class-name {
  margin: 0;
  font-family: "Cinzel", serif;
  color: #f2e3bf;
}

.role-chip {
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 178, 192, 0.4);
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.class-path {
  margin: 0.45rem 0;
  color: var(--text-muted);
}

.bar-list {
  display: grid;
  gap: 0.42rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 0.45rem;
}

.bar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(168, 178, 192, 0.12);
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--line-azure), var(--line-arcane));
}

.race-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 380px);
  gap: 0.85rem;
}

.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.calc-field {
  display: grid;
  gap: 0.3rem;
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e7d7b4;
}

.calc-field input,
.calc-field select,
.calc-field textarea {
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(168, 178, 192, 0.35);
  background: rgba(12, 18, 29, 0.86);
  color: var(--text-main);
  padding: 0 0.55rem;
  font-size: 1rem;
  outline: none;
}

.calc-field textarea {
	padding: 0.5rem 0.55rem;
	resize: vertical;
	min-height: 92px;
}

.calc-field input:focus,
.calc-field select:focus,
.calc-field textarea:focus {
  border-color: rgba(240, 192, 64, 0.75);
  box-shadow: var(--shadow-gold);
}

.calc-field input[type="file"] {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  min-height: 44px;
}

.calc-results {
  display: grid;
  gap: 0.6rem;
}

.race-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(168, 178, 192, 0.22);
  background:
    linear-gradient(to bottom, rgba(18, 26, 41, 0.82), rgba(8, 12, 20, 0.94));
  overflow: hidden;
  transition: transform var(--transition-mid), border-color var(--transition-mid), box-shadow var(--transition-mid);
}

.race-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240, 192, 64, 0.65);
  box-shadow: var(--shadow-gold);
}

.race-art {
  height: 160px;
  background:
    radial-gradient(circle at 78% 20%, rgba(240, 192, 64, 0.4), transparent 38%),
    radial-gradient(circle at 18% 82%, rgba(77, 127, 240, 0.28), transparent 38%),
    linear-gradient(160deg, rgba(25, 33, 48, 0.95), rgba(10, 15, 26, 0.95));
  border-bottom: 1px solid rgba(168, 178, 192, 0.2);
  position: relative;
}

.race-art::after {
  content: attr(data-race-code);
  position: absolute;
  right: 0.75rem;
  bottom: 0.55rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.22);
  font-size: 1.4rem;
}

.race-body {
  padding: 0.9rem;
}

.race-body h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  color: #f1ddb0;
}

.race-body p {
  margin: 0.45rem 0;
  color: var(--text-muted);
  line-height: 1.3;
}

.bonus-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #d5dfed;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 4, 8, 0.66);
}

.modal.show {
  display: flex;
  animation: fadeIn 220ms ease;
}

.modal-content {
  width: min(680px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 168, 76, 0.55);
  background: linear-gradient(to bottom, rgba(15, 20, 34, 0.97), rgba(7, 11, 19, 0.98));
  box-shadow: var(--shadow-core), var(--shadow-gold);
  overflow: hidden;
}

.npc-map-modal .modal-content {
  width: min(96vw, 1440px);
  height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
}

.npc-map-modal .modal-body {
  flex: 1;
  min-height: 0;
}

.npc-map-modal-head {
  flex: 0 0 auto;
}

.npc-map-modal-body {
  display: grid;
  min-height: 0;
}

.npc-map-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 192, 64, 0.08), transparent 58%),
    linear-gradient(145deg, rgba(9, 13, 21, 0.96), rgba(4, 7, 12, 0.98));
  cursor: grab;
  touch-action: none;
}

.npc-map-viewport.is-dragging {
  cursor: grabbing;
}

.npc-map-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.npc-map-image {
  width: auto;
  max-width: none;
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(1.03) contrast(1.02);
}

.npc-map-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.raid-boss-map-header {
  display: grid;
  gap: 0.45rem;
}

.raid-boss-map-page .panel {
  display: flex;
  flex-direction: column;
}

.raid-boss-map-panel-body {
  padding: 0;
  display: flex;
  min-height: clamp(520px, calc(100vh - 240px), 1400px);
}

.raid-boss-map-shell {
  position: relative;
  flex: 1;
  min-height: 0;
}

.raid-boss-map-viewport {
  height: 100%;
  min-height: 100%;
}

.raid-boss-map-marker {
  cursor: pointer;
}

.raid-boss-map-tooltip {
  position: absolute;
  z-index: 6;
  width: 132px;
  padding: 0.52rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(7, 11, 19, 0.97);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.raid-boss-map-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.raid-boss-map-tooltip-media {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(168, 178, 192, 0.25);
  background: rgba(168, 178, 192, 0.08);
}

.raid-boss-map-tooltip-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.raid-boss-map-tooltip-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  color: #f6e3be;
}

.raid-boss-map-tooltip-level {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: #e3edf9;
}

.raid-boss-map-tooltip-name {
  margin-top: 0.38rem;
  display: block;
  font-size: 0.8rem;
  line-height: 1.25;
  font-weight: 600;
  color: #f5d993;
  text-decoration: none;
}

.raid-boss-map-tooltip-name:hover {
  color: #ffe6b4;
}

.raid-boss-map-tooltip-level strong {
  color: #ffe4a9;
}

.npc-map-polygons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}

.npc-map-polygon {
  fill: rgba(72, 198, 106, 0.18);
  stroke: rgba(110, 244, 150, 0.98);
  stroke-width: 3;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(72, 198, 106, 0.35));
  pointer-events: auto;
  cursor: help;
  vector-effect: non-scaling-stroke;
}

.npc-map-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background: radial-gradient(circle at 35% 35%, #fff9db 0%, #ffcf4a 42%, #d47d00 100%);
  box-shadow: 0 0 0 6px rgba(240, 192, 64, 0.18), 0 0 26px rgba(240, 192, 64, 0.58), 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
}

.npc-map-marker::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(255, 223, 154, 0.55);
  animation: npcMapPulse 2.2s ease-in-out infinite;
}

.npc-map-markers.polygon-mode .npc-map-marker {
  opacity: 0;
}

@keyframes npcMapPulse {
  0% {
    transform: scale(0.72);
    opacity: 0.95;
  }

  70% {
    transform: scale(1.08);
    opacity: 0.2;
  }

  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(168, 178, 192, 0.2);
}

.modal-head h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  color: #f4deb0;
}

.modal-close {
  border: 1px solid rgba(168, 178, 192, 0.4);
  background: rgba(168, 178, 192, 0.08);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 1rem;
}

.modal-close:hover {
  border-color: rgba(240, 192, 64, 0.7);
  color: #ffe8b5;
}

.modal-body {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
}

.data-chip {
  border-radius: 9px;
  border: 1px solid rgba(168, 178, 192, 0.22);
  background: rgba(168, 178, 192, 0.08);
  padding: 0.5rem;
}

.data-chip strong {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.data-chip span {
  color: #e8edf6;
}

.site-footer {
  margin: 1rem auto 0;
  max-width: 1280px;
  padding: 1rem 1rem 2rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer-top {
  margin-bottom: 0.7rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-links a:hover {
  color: #f4deb0;
}

.ui-tooltip {
  position: fixed;
  z-index: 380;
  max-width: 260px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(7, 11, 19, 0.95);
  color: #f6e3be;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  white-space: pre-line;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.ui-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.loading-curtain {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 46%, rgba(240, 192, 64, 0.16), transparent 36%),
    radial-gradient(circle at 50% 50%, rgba(13, 17, 30, 0.86), rgba(4, 6, 12, 0.98));
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.loading-curtain.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-core {
  position: relative;
  width: min(92vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.loader-core::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(240, 192, 64, 0.2);
  box-shadow: inset 0 0 30px rgba(240, 192, 64, 0.08), 0 0 55px rgba(240, 192, 64, 0.12);
  animation: pulse-ring 2.2s ease-in-out infinite;
}

.loader-runes {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  animation: spin 8.5s linear infinite;
}

.loader-rune {
  --rune-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--rune-size);
  height: var(--rune-size);
  margin: calc(var(--rune-size) / -2);
  border-radius: 50%;
  border: 1px solid rgba(240, 192, 64, 0.75);
  background: radial-gradient(circle, rgba(252, 227, 161, 0.95), rgba(185, 126, 36, 0.45));
  box-shadow: 0 0 10px rgba(240, 192, 64, 0.55);
}

.loader-rune:nth-child(1) { transform: rotate(0deg) translateY(-146px); }
.loader-rune:nth-child(2) { transform: rotate(60deg) translateY(-146px); }
.loader-rune:nth-child(3) { transform: rotate(120deg) translateY(-146px); }
.loader-rune:nth-child(4) { transform: rotate(180deg) translateY(-146px); }
.loader-rune:nth-child(5) { transform: rotate(240deg) translateY(-146px); }
.loader-rune:nth-child(6) { transform: rotate(300deg) translateY(-146px); }

.loader-emblem {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px solid rgba(240, 192, 64, 0.4);
  box-shadow: 0 0 24px rgba(240, 192, 64, 0.5), inset 0 0 24px rgba(240, 192, 64, 0.2);
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.24), rgba(13, 16, 24, 0.7));
}

.loader-orbit {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 2px dashed rgba(77, 127, 240, 0.45);
  animation: spin 1.6s linear infinite;
}

.loader-orbit-reverse {
  inset: 10%;
  border-color: rgba(240, 192, 64, 0.62);
  animation-direction: reverse;
  animation-duration: 2.4s;
}

.loader-core-gem {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 238, 192, 0.75);
  background: radial-gradient(circle at 35% 35%, #fff6db, #d2a23d 52%, #6f3a14 100%);
  box-shadow: 0 0 22px rgba(240, 192, 64, 0.62);
  animation: flare 1.1s ease-in-out infinite alternate;
}

.loader-text {
  position: absolute;
  bottom: 9%;
  font-family: "Cinzel", serif;
  letter-spacing: 0.16em;
  font-size: 0.86rem;
  text-align: center;
  text-transform: uppercase;
  color: #f6dfab;
  text-shadow: 0 0 12px rgba(240, 192, 64, 0.44);
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

@keyframes flare {
  from {
    transform: scale(0.9);
    box-shadow: 0 0 18px rgba(240, 192, 64, 0.44);
  }
  to {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(240, 192, 64, 0.75);
  }
}

@keyframes drift {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(36px) translateY(-18px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .icon-sidebar {
    display: none;
  }

  .site-main {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 0 0.75rem;
  }

  .brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .brand-text {
    display: none;
  }

  .burger {
    display: none;
    flex-shrink: 0;
  }

  .main-nav {
    position: static;
    min-width: auto;
    max-height: none;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    overflow-y: visible;
    overflow-x: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
    z-index: auto;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-link {
    width: 100%;
    padding: 0.72rem 0.8rem;
    font-size: 0.78rem;
  }

  .hero-content {
    padding: 2.2rem 1rem 1.6rem;
  }

  .theme-toggle {
    min-height: 36px;
    padding: 0.2rem 0.45rem;
    font-size: 0.66rem;
  }

  .version-toggle {
    min-width: 0;
  }

  .version-menu {
    min-width: 184px;
  }

  .version-toggle-label {
    display: none;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .quest-layout {
    grid-template-columns: 1fr;
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .item-detail-hero {
    grid-template-columns: 1fr;
  }

  .item-detail-hero-main {
    gap: 0.75rem;
  }

  .item-detail-hero-summary {
    flex-direction: column;
  }

  .item-detail-icon {
    width: 68px;
    height: 68px;
  }

  .item-subtabs .tab-btn,
  .item-crystal-tabs .tab-btn {
    font-size: 0.68rem;
    min-height: 34px;
    padding: 0.32rem 0.62rem;
  }
}

@media (max-width: 860px) {
  html[data-theme="light"] .main-nav {
    border-color: rgba(143, 108, 33, 0.32);
    background: rgba(252, 248, 240, 0.99);
    box-shadow: 0 16px 38px rgba(83, 61, 20, 0.16), 0 0 18px rgba(160, 115, 28, 0.05);
  }

  html[data-theme="light"] .nav-link {
    color: #5b4f3d;
  }

  html[data-theme="light"] .nav-link:hover,
  html[data-theme="light"] .nav-link.active {
    color: #2f2518;
    background: rgba(190, 142, 35, 0.16);
  }
}

@media (max-width: 620px) {
  .site-main {
    padding: 92px 0.75rem 2rem;
  }

  .panel-body,
  .panel-header,
  .page-banner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .panel-body.raid-boss-map-panel-body {
    padding-left: 0;
    padding-right: 0;
    min-height: calc(100vh - 200px);
  }

  .hero p {
    font-size: 1rem;
  }

  .l2-btn {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 72px 1fr;
  }
}

html[data-theme="light"] body {
  color: #1e2533;
  background:
    radial-gradient(circle at 15% -10%, rgba(189, 145, 39, 0.17), transparent 33%),
    radial-gradient(circle at 85% 0%, rgba(92, 139, 230, 0.16), transparent 34%),
    linear-gradient(145deg, #ece8dd 0%, #ddd5c3 52%, #d2c7b1 100%);
}

html[data-theme="light"] body::before {
  mix-blend-mode: multiply;
  opacity: 0.4;
}

html[data-theme="light"] body::after {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent 18%, transparent 85%, rgba(98, 72, 28, 0.12));
}

html[data-theme="light"] .site-header {
  border-bottom-color: rgba(143, 108, 33, 0.42);
  background: linear-gradient(to bottom, rgba(248, 243, 234, 0.95), rgba(233, 225, 210, 0.88));
  box-shadow: 0 5px 20px rgba(67, 48, 15, 0.18);
}

html[data-theme="light"] .brand {
  color: #7d5e20;
}

html[data-theme="light"] .brand-mark {
  border-color: rgba(156, 115, 28, 0.75);
  background: radial-gradient(circle, rgba(192, 146, 40, 0.22), rgba(255, 255, 255, 0.4));
  box-shadow: 0 0 10px rgba(156, 115, 28, 0.3);
}

html[data-theme="light"] .nav-link {
  color: #584f40;
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active {
  color: #342b20;
  background: rgba(190, 142, 35, 0.15);
}

html[data-theme="light"] .icon-link {
  color: #5f5545;
  border-color: rgba(120, 94, 44, 0.2);
  background: rgba(255, 252, 245, 0.8);
}

html[data-theme="light"] .icon-link:hover,
html[data-theme="light"] .icon-link.active {
  color: #2f2518;
  border-color: rgba(125, 93, 31, 0.65);
  box-shadow: 0 0 12px rgba(84, 62, 24, 0.2);
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .burger {
  border-color: rgba(143, 108, 33, 0.45);
  background: rgba(246, 240, 229, 0.95);
  color: #3f3326;
}

html[data-theme="light"] .version-menu {
  border-color: rgba(143, 108, 33, 0.35);
  background: linear-gradient(180deg, rgba(252, 248, 240, 0.98), rgba(236, 229, 217, 0.98));
  box-shadow: 0 16px 38px rgba(83, 61, 20, 0.12), 0 0 18px rgba(160, 115, 28, 0.05);
}

html[data-theme="light"] .version-toggle-value {
  border-color: rgba(143, 108, 33, 0.28);
  background: rgba(190, 142, 35, 0.1);
}

html[data-theme="light"] .version-option {
  color: #5c513f;
}

html[data-theme="light"] .version-option:hover,
html[data-theme="light"] .version-option.active {
  color: #2d2418;
  border-color: rgba(143, 108, 33, 0.45);
  background: rgba(190, 142, 35, 0.14);
}

html[data-theme="light"] .burger span {
  background: #6f5220;
}

html[data-theme="light"] .icon-sidebar,
html[data-theme="light"] .panel,
html[data-theme="light"] .quest-card,
html[data-theme="light"] .class-card,
html[data-theme="light"] .class-tree-race,
html[data-theme="light"] .race-card,
html[data-theme="light"] .item-card,
html[data-theme="light"] .portal-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .modal-content {
  border-color: rgba(130, 101, 42, 0.3);
  background: linear-gradient(160deg, rgba(250, 246, 238, 0.95), rgba(236, 228, 214, 0.93));
  box-shadow: 0 8px 20px rgba(76, 57, 21, 0.14);
}

html[data-theme="light"] .panel-header,
html[data-theme="light"] .page-banner,
html[data-theme="light"] .search-shell,
html[data-theme="light"] .tab-btn,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .l2-table,
html[data-theme="light"] .quest-sidebar .panel,
html[data-theme="light"] .data-chip {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(250, 246, 238, 0.82);
}

html[data-theme="light"] .item-source-select {
  border-color: rgba(130, 101, 42, 0.32);
  background: rgba(255, 251, 244, 0.9);
  color: #3e3326;
}

html[data-theme="light"] .filter-pill:hover,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .tab-btn:hover,
html[data-theme="light"] .tab-btn.active {
  color: #2f2418;
  border-color: rgba(143, 108, 33, 0.62);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(241, 229, 206, 0.96));
  box-shadow: 0 8px 18px rgba(84, 62, 24, 0.16);
}

html[data-theme="light"] .mobs-sortable.active {
  color: #412f1b;
}

html[data-theme="light"] .mobs-sortable:focus-visible {
  outline-color: rgba(143, 108, 33, 0.8);
}

html[data-theme="light"] .hero {
  border-color: rgba(143, 108, 33, 0.45);
  background:
    radial-gradient(circle at 10% 10%, rgba(190, 142, 35, 0.18), transparent 37%),
    radial-gradient(circle at 85% 16%, rgba(89, 110, 176, 0.24), transparent 42%),
    linear-gradient(160deg, rgba(253, 248, 239, 0.97), rgba(237, 228, 211, 0.95));
}

html[data-theme="light"] .calc-field {
  color: #5f5544;
}

html[data-theme="light"] .calc-field input {
  border-color: rgba(130, 101, 42, 0.32);
  background: rgba(255, 251, 244, 0.9);
  color: #3e3326;
}

html[data-theme="light"] .calc-field select,
html[data-theme="light"] .calc-field textarea {
	border-color: rgba(130, 101, 42, 0.32);
	background: rgba(255, 251, 244, 0.9);
	color: #3e3326;
}

html[data-theme="light"] .hero h1,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .item-title,
html[data-theme="light"] .quest-title,
html[data-theme="light"] .class-name,
html[data-theme="light"] .race-body h3,
html[data-theme="light"] .page-banner h1,
html[data-theme="light"] .portal-card h3 {
  color: #473821;
}

html[data-theme="light"] .hero p,
html[data-theme="light"] .item-meta,
html[data-theme="light"] .quest-meta,
html[data-theme="light"] .quest-details,
html[data-theme="light"] .class-path,
html[data-theme="light"] .class-tree-lineage,
html[data-theme="light"] .class-tree-parent-node,
html[data-theme="light"] .class-tree-children li,
html[data-theme="light"] .race-body p,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .page-banner p,
html[data-theme="light"] .portal-card p,
html[data-theme="light"] .breadcrumbs,
html[data-theme="light"] .site-footer,
html[data-theme="light"] .data-chip strong,
html[data-theme="light"] .role-chip {
  color: #5f5544;
}

html[data-theme="light"] .l2-btn {
  color: #3a2e1f;
  border-color: rgba(140, 103, 28, 0.72);
  background: linear-gradient(to bottom, rgba(233, 192, 92, 0.42), rgba(194, 149, 43, 0.26));
}

html[data-theme="light"] .item-catalog-tabs {
  border-bottom-color: rgba(130, 101, 42, 0.28);
}

html[data-theme="light"] .item-catalog-tab {
  color: #6a5c49;
  border-color: rgba(130, 101, 42, 0.24);
  background: linear-gradient(180deg, rgba(252, 247, 238, 0.96), rgba(237, 228, 210, 0.94));
}

html[data-theme="light"] .item-catalog-tab:hover {
  color: #362a1c;
}

html[data-theme="light"] .item-catalog-tab.active {
  color: #352619;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(242, 233, 217, 0.98));
  border-color: rgba(130, 101, 42, 0.34);
  box-shadow: 0 -1px 0 rgba(130, 101, 42, 0.14), 0 -12px 22px rgba(83, 61, 20, 0.08);
}

html[data-theme="light"] .item-catalog-tab.active::after {
  background: linear-gradient(90deg, transparent, rgba(160, 115, 28, 0.95), transparent);
}

html[data-theme="light"] .class-tree-link {
  border-color: rgba(130, 101, 42, 0.3);
  background: rgba(250, 246, 238, 0.82);
  color: #665847;
}

html[data-theme="light"] .class-tree-link:hover,
html[data-theme="light"] .class-tree-link:focus-visible {
  color: #2f2418;
  border-color: rgba(143, 108, 33, 0.62);
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(241, 229, 206, 0.96));
}

html[data-theme="light"] .class-tree-children li {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(255, 251, 244, 0.75);
}

html[data-theme="light"] .class-tree-sub-branch {
  border-color: rgba(130, 101, 42, 0.24);
  background: rgba(255, 251, 244, 0.58);
}

html[data-theme="light"] .class-tree-parent-node {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(255, 251, 244, 0.78);
}

html[data-theme="light"] .class-tree-node-icon {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(130, 101, 42, 0.16);
}

html[data-theme="light"] .class-tree-branch::before,
html[data-theme="light"] .class-tree-children::before,
html[data-theme="light"] .class-tree-children li::before {
  background: rgba(130, 101, 42, 0.5);
}

html[data-theme="light"] .item-catalog-subtab {
  color: #6a5c49;
  border-color: rgba(130, 101, 42, 0.22);
  background: linear-gradient(180deg, rgba(251, 247, 238, 0.96), rgba(237, 228, 210, 0.94));
}

html[data-theme="light"] .item-catalog-subtab:hover,
html[data-theme="light"] .item-catalog-subtab.active {
  color: #2f2416;
  border-color: rgba(160, 115, 28, 0.45);
  background: linear-gradient(180deg, rgba(255, 248, 228, 0.98), rgba(243, 227, 188, 0.96));
  box-shadow: 0 10px 20px rgba(83, 61, 20, 0.08);
}

@media (max-width: 980px) {
  .class-tree-sub-branches {
    grid-template-columns: 1fr;
  }

  .class-tree-lineage {
    font-size: 0.7rem;
  }

  .class-tree-parent-node {
    font-size: 0.74rem;
  }

  .class-tree-children li {
    font-size: 0.74rem;
  }

  .class-tree-node-icon {
    width: 19px;
    height: 19px;
  }

  .item-catalog-subtabs {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }
}

@media (max-width: 640px) {
  .item-catalog-tabs,
  .item-catalog-subtabs {
    grid-template-columns: 1fr;
  }

  .item-catalog-tab,
  .item-catalog-subtab {
    min-height: 48px;
  }
}

html[data-theme="light"] .item-icon {
  color: #3f3120;
  border-color: rgba(130, 101, 42, 0.42);
  background:
    radial-gradient(circle at 30% 30%, rgba(186, 140, 33, 0.2), transparent 60%),
    linear-gradient(145deg, rgba(250, 245, 236, 0.92), rgba(232, 222, 205, 0.95));
}

html[data-theme="light"] .item-crystal-section,
html[data-theme="light"] .item-detail-hero-side,
html[data-theme="light"] .item-detail-effects article {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(255, 252, 245, 0.78);
}

html[data-theme="light"] .item-crystal-section > summary span:first-child,
html[data-theme="light"] .item-detail-copy h1,
html[data-theme="light"] .item-detail-hero-side h2,
html[data-theme="light"] .item-detail-effects h3 {
  color: #4a3a24;
}

html[data-theme="light"] .item-link:hover {
  color: #3a2d1c;
}

html[data-theme="light"] .item-detail-specs dt {
  color: #6a5c45;
}

html[data-theme="light"] .item-detail-specs dd,
html[data-theme="light"] .item-detail-effects pre {
  color: #3f3326;
}

html[data-theme="light"] .item-detail-stat-list li {
  border-color: rgba(130, 101, 42, 0.22);
  background: rgba(178, 135, 41, 0.08);
  color: #3f3326;
}

html[data-theme="light"] .l2-table th {
  color: #433522;
  background: rgba(178, 135, 41, 0.2);
}

html[data-theme="light"] .l2-table td {
  color: #3f3325;
}

html[data-theme="light"] .item-source-for-value {
  color: #3f3325;
}

html[data-theme="light"] .l2-table tr:hover td {
  background: rgba(121, 92, 44, 0.14);
}

html[data-theme="light"] .badge.common {
  color: #4f5866;
}

html[data-theme="light"] .badge.rare {
  color: #1f4f96;
}

html[data-theme="light"] .badge.epic {
  color: #5f389c;
}

html[data-theme="light"] .badge.legendary {
  color: #7a4d03;
}

html[data-theme="light"] .l2-btn.secondary {
  color: #2f2844;
  border-color: rgba(90, 71, 146, 0.7);
  background: linear-gradient(to bottom, rgba(126, 96, 193, 0.3), rgba(91, 69, 147, 0.24));
}

html[data-theme="light"] .quest-markdown-body h1,
html[data-theme="light"] .quest-markdown-body h2,
html[data-theme="light"] .quest-markdown-body h3,
html[data-theme="light"] .admin-quest-item-copy strong,
html[data-theme="light"] .admin-quest-upload-card h4 {
  color: #473821;
}

html[data-theme="light"] .quest-markdown-body p,
html[data-theme="light"] .quest-markdown-body ul,
html[data-theme="light"] .admin-quest-item-copy p,
html[data-theme="light"] .admin-quest-item-copy span {
  color: #5f5544;
}

html[data-theme="light"] .quest-reward-meta-card span,
html[data-theme="light"] .quest-reward-item-copy span,
html[data-theme="light"] .admin-quest-reward-item-copy span,
html[data-theme="light"] .admin-quest-item-suggest-copy small {
  color: #655a49;
}

html[data-theme="light"] .quest-reward-meta-card strong,
html[data-theme="light"] .quest-reward-items-block h3,
html[data-theme="light"] .admin-quest-item-suggest-copy strong {
  color: #473821;
}

html[data-theme="light"] .quest-detail-cover,
html[data-theme="light"] .quest-markdown-body img,
html[data-theme="light"] .admin-quest-item,
html[data-theme="light"] .admin-quest-preview,
html[data-theme="light"] .admin-quest-upload-card,
html[data-theme="light"] .admin-quest-upload-item {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(255, 252, 245, 0.78);
}

html[data-theme="light"] .quest-reward-meta-card,
html[data-theme="light"] .quest-reward-item,
html[data-theme="light"] .admin-quest-reward-card,
html[data-theme="light"] .admin-quest-reward-item,
html[data-theme="light"] .admin-quest-item-suggest-option {
  border-color: rgba(130, 101, 42, 0.26);
  background: rgba(255, 252, 245, 0.78);
}

html[data-theme="light"] .ui-tooltip {
  border-color: rgba(140, 103, 28, 0.55);
  background: rgba(255, 250, 242, 0.97);
  color: #3f3326;
}

html[data-theme="light"] .npc-hero-profile-table-wrap,
html[data-theme="light"] .npc-hero-skills {
  border-color: rgba(130, 101, 42, 0.28);
  background: rgba(255, 252, 245, 0.78);
}

html[data-theme="light"] .npc-hero-profile-table th {
  color: #5f5544;
  background: rgba(190, 142, 35, 0.14);
  border-top-color: rgba(130, 101, 42, 0.22);
}

html[data-theme="light"] .npc-hero-profile-table td {
  color: #3f3325;
  border-top-color: rgba(130, 101, 42, 0.18);
}

html[data-theme="light"] .npc-hero-profile-table td a {
  color: #6c4a12;
}

html[data-theme="light"] .npc-map-trigger {
  border-color: rgba(140, 103, 28, 0.4);
  background: linear-gradient(180deg, rgba(255, 232, 182, 0.92), rgba(244, 219, 166, 0.78));
  color: #5c4314;
}

html[data-theme="light"] .npc-map-trigger:hover {
  border-color: rgba(140, 103, 28, 0.64);
  color: #3d2a08;
}

html[data-theme="light"] .npc-map-modal .modal-content {
  border-color: rgba(140, 103, 28, 0.38);
  background: linear-gradient(to bottom, rgba(255, 252, 245, 0.98), rgba(244, 235, 220, 0.98));
}

html[data-theme="light"] .npc-map-modal .modal-head {
  border-bottom-color: rgba(130, 101, 42, 0.22);
}

html[data-theme="light"] .npc-map-modal .modal-head h3,
html[data-theme="light"] .npc-map-modal .modal-close {
  color: #4a3412;
}

html[data-theme="light"] .npc-map-viewport {
  border-color: rgba(140, 103, 28, 0.18);
  background:
    radial-gradient(circle at 50% 50%, rgba(190, 142, 35, 0.1), transparent 58%),
    linear-gradient(145deg, rgba(255, 252, 245, 0.98), rgba(238, 231, 220, 0.98));
}

html[data-theme="light"] .npc-map-marker {
  border-color: rgba(255, 248, 234, 0.98);
  box-shadow: 0 0 0 5px rgba(190, 142, 35, 0.18), 0 0 18px rgba(190, 142, 35, 0.32);
}

html[data-theme="light"] .npc-map-polygon {
  stroke: rgba(43, 152, 76, 0.96);
  filter: drop-shadow(0 0 8px rgba(72, 198, 106, 0.24));
}

html[data-theme="light"] .npc-map-pattern-base {
  fill: rgba(72, 198, 106, 0.14);
}

html[data-theme="light"] .npc-map-pattern-stripe {
  stroke: rgba(43, 152, 76, 0.48);
}

.npc-map-tooltip {
  border-color: rgba(110, 244, 150, 0.75);
  background: rgba(6, 18, 10, 0.98);
  color: #dfffe8;
  box-shadow: 0 0 0 1px rgba(110, 244, 150, 0.12), 0 14px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .npc-map-tooltip {
  border-color: rgba(43, 152, 76, 0.55);
  background: rgba(244, 255, 247, 0.98);
  color: #12361d;
}

html[data-theme="light"] .raid-boss-map-tooltip {
  border-color: rgba(140, 103, 28, 0.42);
  background: rgba(255, 252, 245, 0.98);
}

html[data-theme="light"] .raid-boss-map-tooltip-media {
  border-color: rgba(130, 101, 42, 0.24);
  background: rgba(255, 251, 244, 0.82);
}

html[data-theme="light"] .raid-boss-map-tooltip-placeholder {
  color: #5a4219;
}

html[data-theme="light"] .raid-boss-map-tooltip-level {
  color: #4f4435;
}

html[data-theme="light"] .raid-boss-map-tooltip-name {
  color: #5b3d0c;
}

html[data-theme="light"] .raid-boss-map-tooltip-name:hover {
  color: #3f2806;
}

html[data-theme="light"] .raid-boss-map-tooltip-level strong {
  color: #5c4314;
}

html[data-theme="light"] .npc-map-marker::after {
  border-color: rgba(140, 103, 28, 0.26);
}

html[data-theme="light"] .npc-skill-card {
  border-color: rgba(130, 101, 42, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(190, 142, 35, 0.14), transparent 56%),
    rgba(255, 252, 245, 0.78);
}

html[data-theme="light"] .npc-skill-icon {
  border-color: rgba(130, 101, 42, 0.34);
  background: linear-gradient(160deg, rgba(251, 246, 238, 0.98), rgba(236, 228, 214, 0.94));
}

html[data-theme="light"] .npc-skill-icon span {
  color: #5a4219;
}

html[data-theme="light"] .loading-curtain {
  background:
    radial-gradient(circle at 50% 46%, rgba(197, 148, 56, 0.2), transparent 36%),
    radial-gradient(circle, rgba(248, 243, 234, 0.92), rgba(233, 226, 211, 0.97));
}

html[data-theme="light"] .loader-text {
  color: #6d5120;
}

html[data-theme="light"] .loader-emblem {
  border-color: rgba(144, 101, 21, 0.48);
  box-shadow: 0 0 24px rgba(149, 96, 22, 0.4), inset 0 0 24px rgba(199, 141, 48, 0.18);
}

html[data-theme="light"] .loader-rune {
  border-color: rgba(127, 88, 20, 0.68);
  box-shadow: 0 0 10px rgba(137, 91, 17, 0.42);
}

.admin-shell,
.admin-auth-shell {
  min-height: 100vh;
  display: flex;
  color: var(--text-main);
}

.admin-sidebar {
  width: 292px;
  flex: 0 0 292px;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(168, 178, 192, 0.18);
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(10, 15, 24, 0.72));
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: #f7dd9f;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(240, 192, 64, 0.55);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(240, 192, 64, 0.24), rgba(12, 18, 31, 0.98));
  box-shadow: 0 0 16px rgba(240, 192, 64, 0.18);
  font-size: 0.82rem;
  overflow: hidden;
}

.admin-brand-copy {
  display: grid;
  gap: 0.1rem;
}

.admin-brand-copy strong,
.admin-brand-copy small {
  line-height: 1;
}

.admin-brand-copy strong {
  font-size: 0.95rem;
}

.admin-brand-copy small {
  color: var(--text-muted);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 0.88rem;
  text-transform: none;
  letter-spacing: 0;
}

.admin-nav {
  display: grid;
  gap: 0.45rem;
}

.admin-nav-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(168, 178, 192, 0.05);
  color: var(--text-muted);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-nav-link:hover,
.admin-nav-link.active {
  transform: translateX(2px);
  color: #fff0c4;
  border-color: rgba(240, 192, 64, 0.42);
  background: linear-gradient(135deg, rgba(240, 192, 64, 0.12), rgba(127, 85, 199, 0.08));
  box-shadow: 0 0 18px rgba(240, 192, 64, 0.12);
}

.admin-nav-link-title {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-nav-link-description {
  font-size: 0.92rem;
  line-height: 1.3;
  color: inherit;
  opacity: 0.88;
}

.admin-sidebar-card {
  margin-top: auto;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  background: linear-gradient(180deg, rgba(13, 18, 28, 0.92), rgba(8, 12, 20, 0.84));
  display: grid;
  gap: 0.35rem;
}

.admin-sidebar-label,
.admin-card-eyebrow,
.admin-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d9b972;
}

.admin-sidebar-card strong {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.admin-sidebar-card p,
.admin-topbar-copy p,
.admin-hero-copy p,
.admin-hero-panel p,
.admin-card p,
.admin-checklist-item p,
.admin-feature-card p,
.admin-source-item p,
.admin-flow-step p,
.admin-event-row p {
  margin: 0;
  color: var(--text-muted);
}

.admin-message {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 192, 64, 0.22);
  background: rgba(240, 192, 64, 0.08);
  color: #f6e3bc;
}

.admin-message.success {
  border-color: rgba(78, 186, 96, 0.52);
  background: rgba(46, 122, 64, 0.32);
  color: #f3fff4;
}

.admin-message.error {
  border-color: rgba(204, 67, 67, 0.3);
  background: rgba(204, 67, 67, 0.12);
  color: #ffd7d7;
}

.admin-frame {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(168, 178, 192, 0.16);
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(8, 12, 20, 0.82));
  backdrop-filter: blur(12px);
}

.admin-topbar-copy {
  display: grid;
  gap: 0.3rem;
}

.admin-topbar-copy h1,
.admin-hero-copy h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f5ddb0;
}

.admin-topbar-copy h1 {
  font-size: 1.3rem;
}

.admin-topbar-copy p {
  max-width: 52rem;
  font-size: 0.95rem;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-link,
.admin-logout {
  white-space: nowrap;
}

.admin-main,
.admin-auth-main {
  padding: 1.4rem;
}

.admin-main {
  display: grid;
  gap: 1rem;
}

.admin-auth-shell {
  flex-direction: column;
}

.admin-auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(168, 178, 192, 0.16);
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(8, 12, 20, 0.82));
}

.admin-auth-main {
  display: grid;
  place-items: center;
  flex: 1;
}

.admin-auth-main > * {
  width: min(100%, 640px);
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1rem;
}

.admin-hero-copy,
.admin-hero-panel,
.admin-card {
  border-radius: 22px;
  border: 1px solid rgba(168, 178, 192, 0.18);
  background: linear-gradient(155deg, rgba(14, 20, 31, 0.94), rgba(8, 12, 20, 0.88));
  box-shadow: var(--shadow-core);
}

.admin-hero-copy {
  padding: 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.admin-hero-copy h2 {
  font-size: clamp(1.6rem, 2vw, 2.35rem);
}

.admin-hero-copy p {
  max-width: 56ch;
  font-size: 1.03rem;
}

.admin-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-settings-form {
  display: grid;
  gap: 0.85rem;
}

.admin-settings-form select,
.admin-settings-form input[type="text"],
.admin-settings-form input[type="file"],
.admin-settings-form textarea {
  width: 100%;
}

.admin-form-hint,
.admin-section-description {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.admin-settings-form-fonts {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(168, 178, 192, 0.16);
}

.admin-settings-form-game {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(168, 178, 192, 0.16);
}

.admin-version-list {
  display: grid;
  gap: 0.75rem;
}

.admin-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.admin-version-item {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(168, 178, 192, 0.05);
}

.admin-version-item.default {
  border-color: rgba(240, 192, 64, 0.32);
  box-shadow: 0 0 0 1px rgba(240, 192, 64, 0.08) inset;
}

.admin-version-item.disabled {
  opacity: 0.76;
}

.admin-catalog-map-grid {
  display: grid;
  gap: 0.7rem;
}

.admin-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.admin-catalog-map-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.16);
  background: rgba(8, 12, 20, 0.36);
}

.admin-catalog-map-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-version-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-version-item-header strong {
  display: block;
  margin-top: 0.1rem;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f2daa8;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-toggle-row input {
  width: auto;
  min-height: 18px;
  accent-color: #f0c040;
}

.admin-brand-preview-panel {
  gap: 1rem;
}

.admin-brand-preview {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 178, 192, 0.16);
  background: rgba(168, 178, 192, 0.05);
}

.admin-brand-preview-image {
  width: 92px;
  height: 92px;
  padding: 0.3rem;
  border-radius: 20px;
  border: 1px solid rgba(240, 192, 64, 0.24);
  background: rgba(10, 14, 24, 0.72);
  object-fit: contain;
}

.admin-brand-preview-mark {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  border: 1px solid rgba(240, 192, 64, 0.24);
  background: radial-gradient(circle at 30% 30%, rgba(240, 192, 64, 0.24), rgba(12, 18, 31, 0.98));
  display: grid;
  place-items: center;
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  color: #f6d98d;
}

.admin-brand-preview div {
  display: grid;
  gap: 0.2rem;
}

.admin-brand-preview span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-brand-preview strong {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #f2daa8;
}

.admin-font-preview {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(168, 178, 192, 0.05);
}

.admin-font-preview span,
.admin-font-item span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-font-preview strong {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.admin-config-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.admin-config-item {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(168, 178, 192, 0.05);
  display: grid;
  gap: 0.28rem;
}

.admin-config-item span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-config-item strong {
  font-family: "Cinzel", serif;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: #f5ddb0;
  word-break: break-word;
}

.admin-font-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-font-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(168, 178, 192, 0.05);
}

.admin-font-item.active {
  border-color: rgba(240, 192, 64, 0.34);
  background: rgba(240, 192, 64, 0.08);
}

.admin-font-item strong {
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  color: #f5ddb0;
}

.admin-font-item span:last-child {
  overflow-wrap: anywhere;
}

.admin-font-card {
  margin-top: 0.15rem;
}

.admin-chip {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 192, 64, 0.28);
  background: rgba(240, 192, 64, 0.08);
  color: #f3d99f;
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-chip.muted {
  color: var(--text-muted);
  border-color: rgba(168, 178, 192, 0.2);
  background: rgba(168, 178, 192, 0.06);
}

.admin-hero-panel {
  padding: 1.3rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.admin-hero-panel strong {
  font-family: "Cinzel", serif;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

.admin-hero-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-hero-stack > div {
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(168, 178, 192, 0.16);
  background: rgba(168, 178, 192, 0.05);
  display: grid;
  gap: 0.25rem;
}

.admin-hero-stack span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-hero-stack strong {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.admin-hero-panel-chart {
  gap: 1rem;
}

.admin-mini-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  min-height: 150px;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: radial-gradient(circle at 50% 0%, rgba(240, 192, 64, 0.12), transparent 62%);
}

.admin-mini-chart span {
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, rgba(240, 192, 64, 0.95), rgba(127, 85, 199, 0.8));
  box-shadow: 0 0 18px rgba(240, 192, 64, 0.16);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-metric {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 178, 192, 0.16);
  background: linear-gradient(160deg, rgba(14, 20, 31, 0.9), rgba(10, 14, 24, 0.84));
  box-shadow: var(--shadow-core);
}

.admin-metric-value {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.42rem;
  letter-spacing: 0.05em;
  color: #ffe3a5;
}

.admin-metric-label {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--text-main);
}

.admin-metric-detail {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-grid,
.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-card {
  padding: 1rem;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.admin-card-header h3 {
  margin: 0.1rem 0 0;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f2daa8;
}

.admin-feature-list,
.admin-checklist,
.admin-source-list,
.admin-flow-list,
.admin-event-table {
  display: grid;
  gap: 0.75rem;
}

.admin-feature-card,
.admin-checklist-item,
.admin-source-item,
.admin-flow-step,
.admin-event-row {
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(168, 178, 192, 0.14);
  background: rgba(168, 178, 192, 0.05);
}

.admin-feature-card h4,
.admin-checklist-item strong,
.admin-source-item strong,
.admin-flow-step strong,
.admin-event-row strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe9bc;
}

.admin-feature-card span,
.admin-source-top span,
.admin-flow-step > span,
.admin-event-row > span {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 192, 64, 0.22);
  background: rgba(240, 192, 64, 0.08);
  color: #f3d99f;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-feature-card.compact {
  padding: 0.85rem;
}

.admin-source-top,
.admin-flow-step,
.admin-event-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.admin-source-track {
  margin-top: 0.75rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(168, 178, 192, 0.12);
  overflow: hidden;
}

.admin-source-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(240, 192, 64, 0.98), rgba(127, 85, 199, 0.86));
}

.admin-flow-step-index {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 192, 64, 0.24);
  background: rgba(240, 192, 64, 0.08);
  color: #f3d99f;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
}

.admin-flow-step-copy {
  flex: 1;
  min-width: 0;
}

.admin-flow-step-copy strong,
.admin-event-row strong {
  margin-bottom: 0.2rem;
}

.admin-event-row {
  align-items: center;
}

.admin-event-row div {
  min-width: 0;
}

.admin-event-row p {
  font-size: 0.92rem;
}

.admin-event-row > span {
  margin-top: 0;
  flex-shrink: 0;
}

.admin-source-item p,
.admin-flow-step p,
.admin-event-row p,
.admin-feature-card p,
.admin-checklist-item p {
  line-height: 1.42;
}

.admin-card .admin-checklist-item:not(:last-child),
.admin-feature-list .admin-feature-card:not(:last-child) {
  margin-bottom: 0;
}

.admin-card .admin-checklist-item,
.admin-source-item,
.admin-flow-step,
.admin-event-row {
  min-width: 0;
}

.admin-auth-shell .admin-brand {
  color: #f7dd9f;
}

.admin-auth-shell .panel {
  width: 100%;
  max-width: 560px;
}

html[data-theme="light"] .admin-shell,
html[data-theme="light"] .admin-auth-shell {
  color: #2b2d33;
}

html[data-theme="light"] .admin-sidebar,
html[data-theme="light"] .admin-topbar,
html[data-theme="light"] .admin-auth-bar {
  border-color: rgba(130, 101, 42, 0.22);
  background: linear-gradient(180deg, rgba(248, 243, 234, 0.98), rgba(236, 228, 214, 0.94));
}

html[data-theme="light"] .admin-brand,
html[data-theme="light"] .admin-topbar-copy h1,
html[data-theme="light"] .admin-hero-copy h2,
html[data-theme="light"] .admin-card-header h3,
html[data-theme="light"] .admin-feature-card h4,
html[data-theme="light"] .admin-checklist-item strong,
html[data-theme="light"] .admin-source-item strong,
html[data-theme="light"] .admin-flow-step strong,
html[data-theme="light"] .admin-event-row strong,
html[data-theme="light"] .admin-metric-value {
  color: #473821;
}

html[data-theme="light"] .admin-brand-copy small,
html[data-theme="light"] .admin-sidebar-card p,
html[data-theme="light"] .admin-sidebar-card strong,
html[data-theme="light"] .admin-topbar-copy p,
html[data-theme="light"] .admin-hero-copy p,
html[data-theme="light"] .admin-hero-panel p,
html[data-theme="light"] .admin-card p,
html[data-theme="light"] .admin-checklist-item p,
html[data-theme="light"] .admin-feature-card p,
html[data-theme="light"] .admin-source-item p,
html[data-theme="light"] .admin-flow-step p,
html[data-theme="light"] .admin-event-row p,
html[data-theme="light"] .admin-metric-label,
html[data-theme="light"] .admin-metric-detail,
html[data-theme="light"] .admin-nav-link,
html[data-theme="light"] .admin-nav-link-description {
  color: #5f5544;
}

html[data-theme="light"] .admin-nav-link {
  background: rgba(255, 252, 245, 0.82);
}

html[data-theme="light"] .admin-nav-link:hover,
html[data-theme="light"] .admin-nav-link.active {
  color: #2d2418;
  border-color: rgba(143, 108, 33, 0.42);
  background: linear-gradient(135deg, rgba(190, 142, 35, 0.14), rgba(92, 139, 230, 0.08));
  box-shadow: 0 0 12px rgba(84, 62, 24, 0.14);
}

html[data-theme="light"] .admin-sidebar-card,
html[data-theme="light"] .admin-hero-copy,
html[data-theme="light"] .admin-hero-panel,
html[data-theme="light"] .admin-card,
html[data-theme="light"] .admin-metric,
html[data-theme="light"] .admin-feature-card,
html[data-theme="light"] .admin-checklist-item,
html[data-theme="light"] .admin-source-item,
html[data-theme="light"] .admin-flow-step,
html[data-theme="light"] .admin-event-row {
  border-color: rgba(130, 101, 42, 0.24);
  background: linear-gradient(160deg, rgba(250, 246, 238, 0.96), rgba(236, 228, 214, 0.94));
  box-shadow: 0 8px 20px rgba(76, 57, 21, 0.12);
}

html[data-theme="light"] .admin-message.success {
  border-color: rgba(59, 126, 73, 0.58);
  background: rgba(121, 190, 136, 0.34);
  color: #1f4028;
}

html[data-theme="light"] .admin-chip,
html[data-theme="light"] .admin-chip.muted,
html[data-theme="light"] .admin-feature-card span,
html[data-theme="light"] .admin-source-top span,
html[data-theme="light"] .admin-flow-step > span,
html[data-theme="light"] .admin-event-row > span {
  color: #5c4b2d;
  border-color: rgba(143, 108, 33, 0.22);
  background: rgba(190, 142, 35, 0.12);
}

html[data-theme="light"] .admin-mini-chart {
  border-color: rgba(130, 101, 42, 0.18);
  background: radial-gradient(circle at 50% 0%, rgba(190, 142, 35, 0.12), transparent 62%);
}

html[data-theme="light"] .admin-catalog-map-item {
	border-color: rgba(130, 101, 42, 0.2);
	background: rgba(255, 250, 241, 0.72);
}

html[data-theme="light"] .admin-mini-chart span,
html[data-theme="light"] .admin-source-track span {
  background: linear-gradient(90deg, rgba(190, 142, 35, 0.95), rgba(92, 139, 230, 0.82));
}

html[data-theme="light"] .item-catalog-group-kicker,
html[data-theme="light"] .item-catalog-group-note,
html[data-theme="light"] .item-catalog-filter-note,
html[data-theme="light"] .admin-sidebar-label,
html[data-theme="light"] .admin-card-eyebrow,
html[data-theme="light"] .admin-eyebrow {
  color: #6a5735;
}

html[data-theme="light"] .item-table-icon-fallback,
html[data-theme="light"] .version-chip,
html[data-theme="light"] .item-catalog-tab-label,
html[data-theme="light"] .item-catalog-subtab-label,
html[data-theme="light"] .item-link,
html[data-theme="light"] .npc-name-link,
html[data-theme="light"] .npc-hero-skills h2,
html[data-theme="light"] .npc-stack-group h3,
html[data-theme="light"] .npc-drop-section-header h3,
html[data-theme="light"] .npc-drop-group-copy strong,
html[data-theme="light"] .npc-drop-item-name,
html[data-theme="light"] .npc-drop-group-chance,
html[data-theme="light"] .admin-version-item-header strong,
html[data-theme="light"] .admin-config-item strong,
html[data-theme="light"] .admin-brand-preview strong,
html[data-theme="light"] .admin-hero-panel strong,
html[data-theme="light"] .admin-hero-stack strong {
  color: #352619;
}

html[data-theme="light"] .version-chip,
html[data-theme="light"] .npc-drop-group-chance {
  border-color: rgba(130, 101, 42, 0.3);
  background: rgba(178, 135, 41, 0.12);
}

html[data-theme="light"] .npc-drop-section,
html[data-theme="light"] .npc-drop-group,
html[data-theme="light"] .npc-drop-detail-entry {
  border-color: rgba(130, 101, 42, 0.24);
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(242, 233, 217, 0.92));
  box-shadow: 0 8px 20px rgba(76, 57, 21, 0.08);
}

html[data-theme="light"] .npc-drop-group-icon,
html[data-theme="light"] .npc-drop-item-icon {
  border-color: rgba(130, 101, 42, 0.24);
  background: linear-gradient(145deg, rgba(250, 245, 236, 0.94), rgba(232, 222, 205, 0.96));
}

html[data-theme="light"] .item-link:hover,
html[data-theme="light"] .npc-name-link:hover {
  color: #251b10;
  text-shadow: none;
}

@media (max-width: 1180px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(168, 178, 192, 0.18);
  }

  .admin-main,
  .admin-auth-main {
    padding: 1rem;
  }
}

@media (max-width: 980px) {
  .admin-hero,
  .admin-grid,
  .admin-analytics-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .npc-hero {
    grid-template-columns: 1fr;
  }

  .npc-map-modal .modal-content {
    width: min(98vw, 1440px);
    height: min(90vh, 920px);
  }

  .npc-hero-profile-table {
    min-width: 500px;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .npc-hero-heading-row {
    align-items: flex-start;
  }

  .npc-map-trigger {
    width: 100%;
  }

  .item-crystal-section {
    padding: 0.62rem;
  }

  .item-detail-hero-side,
  .item-detail-effects article {
    padding: 0.62rem;
  }

  .item-detail-specs > div {
    padding: 0.5rem 0.58rem;
  }

  .npc-hero-profile-table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .npc-hero-profile-table {
    min-width: 440px;
  }

  .npc-hero-profile-table th,
  .npc-hero-profile-table td {
    padding: 0.42rem 0.55rem;
  }

  .npc-map-modal .modal-body {
    padding: 0.8rem;
  }

  .npc-map-viewport {
    min-height: 52vh;
  }

  .raid-boss-map-viewport {
    min-height: 100%;
  }

  .npc-hero-profile-table th {
    white-space: nowrap;
  }

  .admin-sidebar {
    padding: 1rem 0.85rem;
  }

  .admin-nav-link {
    padding: 0.72rem 0.75rem;
  }

  .admin-main,
  .admin-auth-main {
    padding: 0.8rem;
  }

  .admin-hero-copy,
  .admin-hero-panel,
  .admin-card,
  .admin-metric {
    border-radius: 18px;
  }

  .admin-actions,
  .admin-topbar-actions {
    gap: 0.45rem;
  }

  .admin-hero-stack {
    grid-template-columns: 1fr;
  }

  .admin-source-top,
  .admin-flow-step,
  .admin-event-row {
    flex-direction: column;
  }

  .admin-event-row > span,
  .admin-flow-step > span,
  .admin-source-top > span {
    margin-top: 0;
  }
}
