:root {
  color-scheme: dark;
  --bg: #0a0514;
  --bg-deep: #070210;
  --panel: rgba(25, 15, 60, 0.55);
  --panel-solid: #140a30;
  --panel-hover: rgba(40, 20, 90, 0.70);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f1f5f9;
  --muted: #a3b3c7;
  --gold: #fbbf24;
  --gold-bright: #fde68a;
  --gold-dim: rgba(251, 191, 36, 0.15);
  --gold-glow: rgba(251, 191, 36, 0.55);
  --purple: #c084fc;
  --purple-dim: rgba(168, 85, 247, 0.20);
  --pink: #ec4899;
  --pink-dim: rgba(236, 72, 153, 0.15);
  --blue: #60a5fa;
  --blue-electric: #0ea5e9;
  --green: #34d399;
  --red: #f87171;
  --common: #cbd5e1;
  --uncommon: #34d399;
  --rare: #60a5fa;
  --epic: #c084fc;
  --legendary: #fbbf24;
  --mythic: #f472b6;
  --font-title: 'Cinzel', 'Cinzel', serif;
  --font-subtitle: 'Cinzel', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    none,
    none,
    none,
    var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.30);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.50);
}

::selection {
  background: rgba(251, 191, 36, 0.35);
  color: #fff;
}

button, input, select, textarea {
  font-family: var(--font-body);
}
button { cursor: pointer; }

/* Performance hints */
.item-card, .command-card, .stat-card, .world-card, .tab-btn, .class-character, .hero-bg {
  will-change: transform;
}
.modal-backdrop, .item-modal, .toast, .modal-icon-box img, .icon-box img {
  will-change: opacity, transform;
}

/* ── ITEM MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 2, 14, 0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.item-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 210;
  width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(20, 10, 50, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 60px rgba(124, 58, 237, 0.12), 0 0 30px rgba(251, 191, 36, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
.item-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.item-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: none;
  -webkit-mask: none content-box, none;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 200ms ease;
  z-index: 2;
}
.modal-close:hover {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--gold);
  transform: rotate(90deg);
}
.modal-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.modal-icon-box {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: rgba(12, 6, 40, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(251,191,36,0.10), 0 0 15px rgba(124,58,237,0.06);
  position: relative;
}
.modal-icon-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: none;
}
.modal-icon-box img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  position: relative;
  z-index: 1;
}
.modal-title {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.modal-subtitle {
  margin: 0 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.modal-spec {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}
.modal-spec span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.modal-spec strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.modal-desc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}
.modal-desc h4 {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--font-subtitle);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.modal-desc p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.modal-command-area {
  display: grid;
  gap: 10px;
}
.modal-command-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-qty {
  width: 90px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(12, 6, 40, 0.65);
  color: var(--text);
  padding: 0 10px;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.modal-qty:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12), 0 0 20px rgba(251,191,36,0.10);
}
.modal-cmd-preview {
  flex: 1;
  min-height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(12, 6, 40, 0.65);
  color: #dbeafe;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.modal-actions .copy-btn,
.modal-actions .clear-btn {
  height: 42px;
  font-size: 13px;
}
body.modal-open {
  overflow: hidden;
}
@media (max-width: 480px) {
  .item-modal {
    padding: 20px;
    width: calc(100% - 20px);
  }
  .modal-icon-box {
    width: 100px;
    height: 100px;
  }
  .modal-icon-box img {
    width: 80px;
    height: 80px;
  }
  .modal-title {
    font-size: 18px;
  }
  .modal-specs {
    grid-template-columns: 1fr;
  }
  .modal-command-row {
    flex-wrap: wrap;
  }
  .modal-qty {
    width: 100%;
  }
  .modal-cmd-preview {
    width: 100%;
    order: -1;
  }
  .modal-actions {
    grid-template-columns: 1fr;
  }
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  height: 85dvh;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url('../../capa.png') center 20% / cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    none,
    none,
    none,
    none;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  box-shadow: inset 0 0 180px 80px rgba(5,2,16,0.7);
}
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    none,
    none;
  animation: auroraMove 12s ease-in-out infinite alternate;
}
@keyframes auroraMove {
  0% { opacity: 0.6; transform: scale(1) translateY(0); }
  100% { opacity: 1; transform: scale(1.05) translateY(-10px); }
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
}
.site-brand {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0,0,0,0.8);
}
.site-brand img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 14px rgba(192,132,252,0.45));
}
.site-brand strong {
  display: block;
  font-family: var(--font-subtitle);
  font-size: 15px;
  letter-spacing: 0.16em;
}
.site-brand span {
  display: block;
  margin-top: 2px;
  color: var(--gold-bright);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.site-nav button,
.site-nav a {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d6d9e6;
  padding: 10px 15px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: 200ms ease;
}
.site-nav button:hover,
.site-nav button:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible {
  outline: none;
  background: rgba(251,191,36,0.12);
  color: var(--gold-bright);
}
.site-nav button.active {
  background: none;
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,0.25);
}
.site-nav .login-link {
  padding-right: 22px;
  padding-left: 22px;
  border: 1px solid rgba(240,199,102,0.42);
  background: none;
  color: #ffe39a;
  box-shadow: 0 0 24px rgba(226,183,82,0.1), inset 0 0 0 1px rgba(255,255,255,0.025);
}
.hero-intro {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  width: min(760px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 13px;
  border: 1px solid rgba(251,191,36,0.24);
  border-radius: 999px;
  background: rgba(7,2,16,0.55);
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
}
.hero-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}
.hero-intro p {
  max-width: 650px;
  margin: 0 auto 20px;
  color: #e3e6f1;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.7;
  text-shadow: 0 2px 14px rgba(0,0,0,0.95);
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.download-action {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 13px 20px;
  background: rgba(8,3,20,0.70);
  color: #fff;
  font-family: var(--font-subtitle);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
  transition: 250ms ease;
}
.hero-btn.download { text-decoration: none; }
.hero-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(251,191,36,0.50);
  color: var(--gold-bright);
  box-shadow: 0 14px 38px rgba(0,0,0,0.38), 0 0 24px rgba(251,191,36,0.10);
}
.hero-btn.primary {
  border-color: rgba(251,191,36,0.48);
  background: none;
  color: var(--gold-bright);
  box-shadow: 0 0 28px rgba(251,191,36,0.10);
}


/* ── HERO BOTTOM TRANSITION ── */
.hero-transition {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 30px;
  z-index: 2;
  background: none;
}
.hero-transition::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 75%);
  height: 1.5px;
  background: none;
  box-shadow: 0 0 20px rgba(251,191,36,0.15), 0 0 40px rgba(124,58,237,0.08);
}

/* ── APP ── */
.app {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ── STATS ── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 10, 50, 0.50);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  padding: 14px 22px;
  backdrop-filter: blur(16px) saturate(1.3);
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: none;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251,191,36,0.45);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 50px rgba(251,191,36,0.14), 0 0 25px rgba(124,58,237,0.10);
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: none;
  border: 1px solid rgba(251,191,36,0.25);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(251,191,36,0.08);
}
.stat-card strong {
  display: block;
  font-family: var(--font-subtitle);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 20px rgba(251,191,36,0.4), 0 0 40px rgba(124,58,237,0.15);
}
.stat-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── TOOLBAR ── */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(6, minmax(128px, 170px)) minmax(120px, 148px);
  gap: 12px;
  background: rgba(20, 10, 50, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(28px) saturate(1.5);
  margin-bottom: 24px;
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.35), 
    0 0 0 1px rgba(251,191,36,0.06) inset,
    0 1px 0 rgba(255,255,255,0.03) inset;
  transition: box-shadow 350ms ease;
}
.toolbar:hover {
  box-shadow: 
    0 16px 48px rgba(0,0,0,0.4), 
    0 0 0 1px rgba(251,191,36,0.10) inset,
    0 1px 0 rgba(255,255,255,0.03) inset;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.8;
}
.field input,
.field select {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(10, 5, 30, 0.60);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8c87a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.field select:hover {
  background: rgba(15, 8, 45, 0.75);
  border-color: rgba(251, 191, 36, 0.30);
  box-shadow: 0 0 24px rgba(251,191,36,0.10);
}
.field select option {
  background: #0f0a28;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  border: none;
}
.field select option:first-child {
  color: var(--gold);
  font-weight: 600;
}
.field select option:hover {
  background: rgba(232, 200, 122, 0.15);
  color: var(--gold);
}
.field select:focus {
  background: rgba(15, 8, 45, 0.80);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12), 0 0 30px rgba(251,191,36,0.12), 0 0 15px rgba(124,58,237,0.08);
}
.field select optgroup {
  background: #0f0a28;
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.field input::placeholder {
  color: rgba(148,163,184,0.35);
}

.field input:focus,
.field select:focus {
  background: rgba(15, 8, 45, 0.80);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12), 0 0 30px rgba(251,191,36,0.12), 0 0 15px rgba(124,58,237,0.08);
}
.filter-actions {
  display: flex;
  align-items: end;
}
.reset-filters-btn {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(251, 191, 36, 0.40);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.07);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.reset-filters-btn:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 30px rgba(251,191,36,0.15), 0 0 15px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.reset-filters-btn:active {
  transform: translateY(0);
}

/* ── CONTENT ── */
.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
  width: 100%;
}
.grid-wrapper {
  width: 100%;
  min-width: 0;
  max-width: 1600px;
}

.command-notepad {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  background: rgba(20, 10, 50, 0.50);
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 20px 56px rgba(0,0,0,0.35),
    0 0 0 1px rgba(251,191,36,0.05) inset;
  backdrop-filter: blur(24px) saturate(1.4);
  transition: box-shadow 350ms ease;
}
.command-notepad:hover {
  box-shadow:
    0 24px 64px rgba(0,0,0,0.40),
    0 0 0 1px rgba(251,191,36,0.08) inset,
    0 0 40px rgba(251,191,36,0.04);
}
.command-notepad::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1.5px;
  background: none;
}
.notepad-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.notepad-head h2 {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-subtitle);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.notepad-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border: 1px solid rgba(232, 200, 122, 0.18);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(232, 200, 122, 0.08);
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}
.command-notepad textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(12, 6, 40, 0.65);
  color: var(--text);
  padding: 12px;
  font: 12px/1.55 var(--font-mono);
  outline: none;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}
.command-notepad textarea:focus {
  background: rgba(15, 8, 45, 0.80);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12), 0 0 30px rgba(251,191,36,0.10);
}
.notepad-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.notepad-actions .copy-btn,
.notepad-actions .clear-btn {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
}

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-height: 400px;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.item-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  background: rgba(20, 10, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px;
  min-height: 220px;
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: cardIn 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  cursor: pointer;
  contain: layout paint;
}
.item-card:nth-child(1) { animation-delay: 0ms; }
.item-card:nth-child(2) { animation-delay: 30ms; }
.item-card:nth-child(3) { animation-delay: 60ms; }
.item-card:nth-child(4) { animation-delay: 90ms; }
.item-card:nth-child(5) { animation-delay: 120ms; }
.item-card:nth-child(6) { animation-delay: 150ms; }
.item-card:nth-child(7) { animation-delay: 180ms; }
.item-card:nth-child(8) { animation-delay: 210ms; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.item-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: none;
  -webkit-mask: none content-box, none;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 350ms ease;
}
.item-card:hover::before {
  opacity: 1;
  background: none;
}
.item-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: none;
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.item-card:hover {
  background: rgba(35, 18, 80, 0.55);
  border-color: rgba(251,191,36,0.35);
  transform: translateY(-5px) scale(1.015);
  box-shadow: 
    0 24px 56px rgba(0,0,0,0.45), 
    0 0 0 1px rgba(251,191,36,0.12) inset,
    0 0 50px rgba(124,58,237,0.10),
    0 0 30px rgba(251,191,36,0.06);
}
.item-card:hover::after {
  opacity: 1;
}

.icon-box {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: rgba(12, 6, 40, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
.icon-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: none;
  opacity: 0;
  transition: opacity 350ms ease;
}
.item-card:hover .icon-box {
  background: rgba(18, 10, 55, 0.80);
  border-color: rgba(251,191,36,0.35);
  box-shadow: 0 0 30px rgba(251,191,36,0.15), 0 0 15px rgba(124,58,237,0.10);
}
.item-card:hover .icon-box::before {
  opacity: 1;
}
.icon-box img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: auto;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
.item-card:hover .icon-box img {
  transform: scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)) drop-shadow(0 0 8px rgba(251,191,36,0.15));
}

.item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item-name {
  margin: 0;
  min-height: 40px;
  font-size: 15.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  white-space: nowrap;
  background: rgba(255,255,255,0.03);
  transition: all 200ms ease;
}
.badge-new {
  color: #fff4c2;
  border-color: rgba(251, 191, 36, 0.42);
  background: none;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.14);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.item-card:hover .badge {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.grade-1 { color: var(--common); text-shadow: 0 0 8px rgba(203,213,225,0.15); }
.grade-2 { color: var(--uncommon); text-shadow: 0 0 10px rgba(52,211,153,0.20); }
.grade-3 { color: var(--rare); text-shadow: 0 0 10px rgba(96,165,250,0.25); }
.grade-4 { color: var(--epic); text-shadow: 0 0 12px rgba(192,132,252,0.30); }
.grade-5 { color: var(--legendary); text-shadow: 0 0 14px rgba(251,191,36,0.35); }
.grade-6 { color: var(--mythic); text-shadow: 0 0 14px rgba(244,114,182,0.35); }

.specs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 2px;
}
.spec {
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 9px;
  transition: all 200ms ease;
}
.item-card:hover .spec {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.spec span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.spec strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  color: var(--text);
}

.command-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.item-qty {
  width: 82px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(12, 6, 40, 0.65);
  color: var(--text);
  padding: 0 8px;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.item-qty:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12), 0 0 20px rgba(251,191,36,0.10);
}
code.command {
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(12, 6, 40, 0.65);
  color: #dbeafe;
  padding: 0 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.copy-btn,
.load-more,
.clear-btn {
  height: 38px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  border: 1px solid rgba(251, 191, 36, 0.50);
  background: rgba(251, 191, 36, 0.09);
  color: var(--gold);
  padding: 0 18px;
  white-space: nowrap;
  text-align: center;
}
.copy-btn:hover {
  background: rgba(251, 191, 36, 0.20);
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 30px rgba(251,191,36,0.18), 0 0 15px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.copy-btn:active {
  transform: translateY(0);
}
.copy-btn.copied {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  box-shadow: 0 0 24px rgba(52,211,153,0.15);
}
.copy-btn.copy-error {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  box-shadow: 0 0 24px rgba(248,113,113,0.15);
}

.load-more {
  min-width: 200px;
  border: 1px solid rgba(251, 191, 36, 0.40);
  background: rgba(251, 191, 36, 0.07);
  color: var(--gold);
  padding: 0 22px;
}
.load-more:hover {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 30px rgba(251,191,36,0.15), 0 0 15px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}

.clear-btn {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0 12px;
}
.clear-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

/* ── PAGER / EMPTY / LOADING ── */
.pager {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.empty, .loading {
  grid-column: 1 / -1;
  background: rgba(20, 10, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 40px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  backdrop-filter: blur(16px) saturate(1.3);
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  transform: translateX(120px) scale(0.92);
  z-index: 100;
  padding: 16px 28px;
  border-radius: 16px;
  background: rgba(20, 10, 50, 0.96);
  border: 1.5px solid rgba(251, 191, 36, 0.40);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), 0 0 50px rgba(251, 191, 36, 0.18), 0 0 25px rgba(124,58,237,0.10);
  backdrop-filter: blur(28px) saturate(1.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease, transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.toast.toast-success {
  border-color: rgba(52, 211, 153, 0.50);
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), 0 0 50px rgba(52, 211, 153, 0.18), 0 0 25px rgba(52,211,153,0.08);
}
.toast.toast-error {
  border-color: rgba(248, 113, 113, 0.50);
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), 0 0 50px rgba(248, 113, 113, 0.18), 0 0 25px rgba(248,113,113,0.08);
}
.toast.toast-info {
  border-color: rgba(96, 165, 250, 0.50);
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), 0 0 50px rgba(96, 165, 250, 0.18), 0 0 25px rgba(96,165,250,0.08);
}
.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.toast-success .toast-icon { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.toast-error .toast-icon { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.toast-info .toast-icon { background: rgba(96, 165, 250, 0.15); color: var(--blue); }
.toast-default .toast-icon { background: rgba(251, 191, 36, 0.15); color: var(--gold); }

/* ── TABS ── */
.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 110px;
  flex-wrap: wrap;
}
.tab-btn {
  position: relative;
  padding: 10px 28px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(20, 10, 50, 0.45);
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(20px) saturate(1.4);
  transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  overflow: hidden;
}
.tab-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: none;
  -webkit-mask: none content-box, none;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 300ms ease;
}
.tab-btn:hover::before {
  opacity: 1;
}
.tab-btn:hover {
  border-color: rgba(251, 191, 36, 0.55);
  color: var(--text);
  background: rgba(35, 18, 80, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 30px rgba(251,191,36,0.10), 0 0 15px rgba(124,58,237,0.06);
}
.tab-btn.active {
  border-color: rgba(251, 191, 36, 0.70);
  background: rgba(251, 191, 36, 0.14);
  color: var(--gold);
  box-shadow: 0 0 30px rgba(251,191,36,0.15), 0 0 15px rgba(124,58,237,0.08);
}
.tab-btn.active::before {
  opacity: 1;
  background: none;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr);
  gap: 14px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 8, 38, 0.72);
}
.catalog-toolbar input,
.catalog-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  background: rgba(7, 2, 16, 0.8);
}
.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}
.catalog-card .icon-box {
  background: none;
}
.catalog-card .item-name {
  color: var(--gold-bright);
}
.catalog-card .specs {
  margin-top: auto;
}
.catalog-card-new {
  border-color: rgba(251, 191, 36, 0.34);
  box-shadow: 0 16px 38px rgba(251, 191, 36, 0.07), 0 12px 30px rgba(0,0,0,.24);
}
.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 24px;
}
.catalog-summary span {
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}
@media (max-width: 680px) {
  .catalog-toolbar { grid-template-columns: 1fr; }
  .commands-toolbar { justify-content: stretch; }
  .commands-toolbar .field { width: 100%; }
}

/* -- HOME -- */
.home-shell {
  display: grid;
  gap: 100px;
  padding-bottom: 60px;
}
.celestial-intro, .realm-stats, .classes-section, .celestial-world, .celestial-path, .journey, .celestial-final {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}
.section-heading.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: none;
}
.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.section-heading h1 span,
.section-heading h2 span {
  color: var(--gold-bright);
  text-shadow: 0 0 34px rgba(251,191,36,0.18);
}
.section-heading p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
.class-stage {
  --class-accent: #60a5fa;
  --class-accent-soft: rgba(96,165,250,0.22);
  --class-bg-a: #07172c;
  --class-bg-b: #13092c;
  position: relative;
  overflow: hidden;
  min-height: 650px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 28px;
  background:
    none,
    none,
    none;
  box-shadow: 0 34px 100px rgba(0,0,0,0.35);
  transition: background 480ms ease, border-color 480ms ease;
}
.class-stage::before {
  content: 'CLASSES';
  position: absolute;
  right: -20px;
  bottom: -40px;
  color: rgba(255,255,255,0.025);
  font-family: var(--font-title);
  font-size: clamp(90px, 14vw, 220px);
  font-weight: 900;
  letter-spacing: -0.05em;
}
.class-stage::after {
  content: '';
  position: absolute;
  top: 9%;
  right: 7%;
  width: 420px;
  height: 420px;
  border: 1px solid color-mix(in srgb, var(--class-accent) 20%, transparent);
  border-radius: 50%;
  background:
    none,
    none;
  opacity: 0.65;
  filter: blur(0.2px);
  pointer-events: none;
  transition: border-color 480ms ease;
}
.class-stage.changing .class-copy > * {
  animation: classCopyReveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-stage.changing .class-copy > *:nth-child(2) { animation-delay: 35ms; }
.class-stage.changing .class-copy > *:nth-child(3) { animation-delay: 70ms; }
.class-stage.changing .class-copy > *:nth-child(4) { animation-delay: 105ms; }
.class-stage.changing .class-copy > *:nth-child(5) { animation-delay: 140ms; }
@keyframes classCopyReveal {
  from { opacity: 0; transform: translateX(-22px); filter: blur(5px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}
.class-display {
  display: grid;
  grid-template-columns: minmax(330px, 0.85fr) minmax(420px, 1.15fr);
  min-height: 650px;
}
.class-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 72px);
  padding-left: clamp(96px, 7vw, 120px);
}
.class-index {
  color: rgba(251,191,36,0.45);
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 0.24em;
}
.class-copy h3 {
  margin: 12px 0 8px;
  color: color-mix(in srgb, var(--class-accent) 42%, #fff3bb);
  font-family: var(--font-title);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1;
  text-shadow: 0 0 38px var(--class-accent-soft);
  transition: color 380ms ease, text-shadow 380ms ease;
}
.class-role {
  margin: 0 0 24px;
  color: #d8ccf1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.class-description {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
.class-traits {
  display: flex;
  gap: 9px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.class-traits span {
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--class-accent) 34%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--class-accent) 10%, transparent);
  color: color-mix(in srgb, var(--class-accent) 35%, #fff);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.class-art {
  position: relative;
  z-index: 2;
  min-height: 650px;
}
.class-art::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 430px;
  height: 90px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--class-accent-soft);
  filter: blur(34px);
  transition: background 480ms ease;
}
.class-character {
  position: absolute;
  right: var(--class-right, 2%);
  bottom: 0;
  z-index: 3;
  width: min(var(--class-width, 640px), 100%);
  height: var(--class-height, 96%);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 28px 38px rgba(0,0,0,0.62)) drop-shadow(0 0 24px var(--class-accent-soft));
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.class-stage.changing:not(.arrow-prev):not(.arrow-next) .class-character {
  animation: classReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-stage.changing.arrow-prev .class-character {
  animation: classRevealPrev 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-stage.changing.arrow-next .class-character {
  animation: classRevealNext 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-character-fx {
  position: absolute;
  right: var(--class-right, 2%);
  bottom: 2%;
  z-index: 2;
  width: min(var(--class-width, 640px), 100%);
  height: 78%;
  border-radius: 50%;
  background: none;
  filter: blur(24px);
  opacity: 0.9;
  animation: classAuraPulse 3.6s ease-in-out infinite;
}
@keyframes classAuraPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.45; }
  50% { transform: scale(1.06); opacity: 0.95; }
}
@keyframes classReveal {
  from { opacity: 0; transform: translateX(25px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes classRevealPrev {
  from { opacity: 0; transform: translateX(-80px) rotate(-1.5deg) scale(0.94); filter: blur(8px) drop-shadow(0 0 45px var(--class-accent)); }
  to { opacity: 1; transform: translateX(0) rotate(0) scale(1); filter: blur(0) drop-shadow(0 28px 38px rgba(0,0,0,0.62)) drop-shadow(0 0 24px var(--class-accent-soft)); }
}
@keyframes classRevealNext {
  from { opacity: 0; transform: translateX(80px) rotate(1.5deg) scale(0.94); filter: blur(8px) drop-shadow(0 0 45px var(--class-accent)); }
  to { opacity: 1; transform: translateX(0) rotate(0) scale(1); filter: blur(0) drop-shadow(0 28px 38px rgba(0,0,0,0.62)) drop-shadow(0 0 24px var(--class-accent-soft)); }
}
.class-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--class-accent) 36%, rgba(255,255,255,0.10));
  border-radius: 50%;
  background: rgba(5,2,16,0.62);
  color: #fff;
  font-family: var(--font-subtitle);
  font-size: 25px;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.35), 0 0 24px var(--class-accent-soft);
  transition: 220ms ease;
}
.class-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: var(--class-accent);
  color: color-mix(in srgb, var(--class-accent) 45%, #fff);
}
.class-arrow.pressed {
  animation: classArrowPress 520ms cubic-bezier(0.2, 0.9, 0.25, 1);
}
.class-arrow::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid color-mix(in srgb, var(--class-accent) 18%, transparent);
  border-radius: 50%;
  animation: arrowOrbit 3.5s linear infinite;
}
@keyframes arrowOrbit {
  0% { transform: rotate(0deg) scale(0.92); opacity: 0.3; }
  50% { transform: rotate(180deg) scale(1.08); opacity: 0.75; }
  100% { transform: rotate(360deg) scale(0.92); opacity: 0.3; }
}
@keyframes classArrowPress {
  0% { transform: translateY(-50%) scale(1); }
  35% { transform: translateY(-50%) scale(0.82); background: var(--class-accent); color: #080314; }
  70% { transform: translateY(-50%) scale(1.18); box-shadow: 0 0 48px var(--class-accent); }
  100% { transform: translateY(-50%) scale(1); }
}
.class-arrow.prev { left: 20px; }
.class-arrow.next { right: 20px; }
.class-pagination {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(5,2,16,0.60);
  backdrop-filter: blur(14px);
}
.class-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  padding: 0;
  transition: 220ms ease;
}
.class-dot.active {
  width: 28px;
  border-radius: 99px;
  background: var(--class-accent);
  box-shadow: 0 0 14px var(--class-accent);
}
.class-current-name {
  position: absolute;
  right: 94px;
  bottom: 30px;
  z-index: 8;
  color: color-mix(in srgb, var(--class-accent) 38%, #fff);
  font-family: var(--font-subtitle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* -- CELESTIAL CLASS GALLERY -- */
.class-stage {
  min-height: 680px;
  border-radius: 6px;
  border-color: color-mix(in srgb, var(--class-accent) 28%, rgba(255,255,255,0.08));
  background: var(--class-bg-a);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  box-shadow: 0 45px 130px rgba(0,0,0,0.52);
}
.class-stage::before {
  content: attr(data-class-label);
  right: auto;
  left: 56px;
  bottom: -22px;
  z-index: 0;
  max-width: 55%;
  color: color-mix(in srgb, var(--class-accent) 7%, transparent);
  font-size: clamp(84px, 10vw, 160px);
  white-space: nowrap;
}
.class-stage::after {
  top: 50%;
  right: 7%;
  width: min(38vw, 520px);
  height: min(38vw, 520px);
  transform: translateY(-50%);
  opacity: 0.44;
}
.class-display {
  display: block;
  min-height: 680px;
}
.class-copy {
  width: min(610px, 48%);
  min-height: 680px;
  justify-content: center;
  padding: 72px 44px 72px 96px;
  text-shadow: 0 3px 18px rgba(0,0,0,0.72);
}
.class-copy::before {
  display: none;
}
.class-copy::after {
  display: none;
}
.class-index {
  color: color-mix(in srgb, var(--class-accent) 58%, #f5d986);
  font-size: 11px;
  font-weight: 800;
}
.class-copy h3 {
  max-width: 610px;
  margin: 14px 0 10px;
  color: color-mix(in srgb, var(--class-accent) 28%, #fff7df);
  font-size: clamp(42px, 5vw, 76px);
  letter-spacing: -0.045em;
  text-shadow:
    0 5px 28px rgba(0,0,0,0.88),
    0 0 42px var(--class-accent-soft);
}
.class-role {
  max-width: 540px;
  color: #eef0fa;
}
.class-description {
  max-width: 490px;
  color: #adb9ce;
  font-size: 14px;
}
.class-traits span {
  border-radius: 2px;
  padding: 9px 12px;
}
.class-art {
  position: absolute;
  inset: 0;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}
.class-art::before {
  display: none;
}
.class-art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    none,
    none;
}
.class-character {
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.04) drop-shadow(0 30px 50px rgba(0,0,0,0.52));
  -webkit-mask-image: none;
  mask-image: none;
  transform: scale(1);
}
.class-character-fx {
  inset: 8% 2% 2% 8%;
  width: auto;
  height: auto;
  opacity: 0.5;
}
.class-arrow {
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--class-accent) 44%, rgba(255,255,255,0.14));
  border-radius: 50%;
  background:
    none;
  clip-path: none;
  box-shadow:
    0 0 0 7px rgba(4,7,20,0.38),
    0 0 28px var(--class-accent-soft);
  color: color-mix(in srgb, var(--class-accent) 30%, #fff);
}
.class-arrow::before {
  inset: -9px;
  border: 1px dashed color-mix(in srgb, var(--class-accent) 34%, transparent);
  box-shadow: none;
  animation-duration: 10s;
}
.class-arrow::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--class-accent) 18%, transparent);
  border-radius: 50%;
}
.class-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: color-mix(in srgb, var(--class-accent) 22%, rgba(4,7,20,0.88));
  box-shadow:
    0 0 0 7px rgba(4,7,20,0.45),
    0 0 38px var(--class-accent-soft);
}
.class-arrow.prev { left: 22px; }
.class-arrow.next { right: 22px; }
.class-pagination {
  left: auto;
  right: 74px;
  top: 34px;
  bottom: auto;
  justify-content: flex-end;
  gap: 9px;
  transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.class-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  font-size: 0;
}
.class-dot::after {
  content: '';
}
.class-dot:hover {
  background: rgba(255,255,255,0.65);
}
.class-dot.active {
  width: 28px;
  flex-basis: 28px;
  border-radius: 99px;
  background: var(--class-accent);
  box-shadow: 0 0 16px var(--class-accent);
}
.class-current-name {
  display: none;
}
.class-stage.changing:not(.arrow-prev):not(.arrow-next) .class-character {
  animation: classSceneReveal 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-stage.changing.arrow-prev .class-character {
  animation: classScenePrev 660ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.class-stage.changing.arrow-next .class-character {
  animation: classSceneNext 660ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes classSceneReveal {
  from { opacity: 0; transform: scale(1.08); filter: blur(7px) saturate(1.35); }
  to { opacity: 1; transform: scale(1); filter: blur(0) saturate(1.04) contrast(1.04); }
}
@keyframes classScenePrev {
  from { opacity: 0; transform: translateX(-6%) scale(1.08); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes classSceneNext {
  from { opacity: 0; transform: translateX(6%) scale(1.08); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .class-character-fx,
  .class-arrow::before {
    animation: none !important;
  }
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 16px;
}
.world-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  background-color: #110828;
  background-position: center;
  background-size: cover;
  isolation: isolate;
  transition: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.world-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: none;
}
.world-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: none;
  opacity: 0;
  transition: opacity 300ms ease;
}
.world-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251,191,36,0.22);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.world-card:hover::after { opacity: 1; }
.world-card.large {
  grid-column: span 7;
  grid-row: span 2;
  background-image: url('../../capa.png');
  background-position: center 72%;
}
.world-card.tall {
  grid-column: span 5;
  grid-row: span 2;
  background:
    none,
    url('../classes/5.png') 70% 20% / 82% auto no-repeat,
    #10051f;
}
.world-card.small {
  grid-column: span 4;
  background: none;
}
.world-card.small:nth-child(4) {
  background: none;
}
.world-card.small:nth-child(5) {
  background: none;
}
.world-card-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
.world-card-number {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.world-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-subtitle);
  font-size: clamp(18px, 2vw, 28px);
}
.world-card p {
  margin: 0;
  color: #b7b4c6;
  font-size: 13px;
  line-height: 1.7;
}

.journey {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 6vw, 82px);
  border: 1px solid rgba(251,191,36,0.14);
  border-radius: 28px;
  background:
    none,
    none;
}
.journey-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.journey-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: none;
}
.journey-step {
  position: relative;
  z-index: 1;
  text-align: center;
}
.journey-step i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
  border: 1px solid rgba(251,191,36,0.38);
  border-radius: 50%;
  background: #140929;
  color: var(--gold-bright);
  font-family: var(--font-subtitle);
  font-size: 12px;
  font-style: normal;
  box-shadow: 0 0 22px rgba(251,191,36,0.10);
}
.journey-step h3 {
  margin: 0 0 9px;
  font-family: var(--font-subtitle);
  font-size: 15px;
}
.journey-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
/* ── COMMANDS ── */
.commands-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.commands-toolbar .field {
  width: min(100%, 220px);
}
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  min-height: 200px;
}
.command-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(20, 10, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  animation: cardIn 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.command-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: none;
  -webkit-mask: none content-box, none;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 350ms ease;
}
.command-card:hover::before {
  opacity: 1;
  background: none;
}
.command-card:hover {
  background: rgba(35, 18, 80, 0.55);
  border-color: rgba(14,165,233,0.35);
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 24px 56px rgba(0,0,0,0.45), 0 0 50px rgba(124,58,237,0.08), 0 0 30px rgba(14,165,233,0.05);
}
.command-card h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.command-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.command-card .desc {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
}
.command-card .desc strong {
  color: var(--gold);
  font-weight: 600;
}
.command-card .args {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.command-card .arg {
  background: rgba(251,191,36,0.09);
  border: 1px solid rgba(251,191,36,0.18);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(251,191,36,0.04);
}
.command-card .cmd-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding-top: 4px;
}
.command-card .cmd-row code {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.command-card .copy-btn {
  cursor: pointer;
}
.command-card .copy-btn:hover {
  background: rgba(251, 191, 36, 0.20);
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 30px rgba(251,191,36,0.18), 0 0 15px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.command-card .copy-btn.copied {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  box-shadow: 0 0 20px rgba(52,211,153,0.12);
}
.command-card .copy-btn.copy-error {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  box-shadow: 0 0 20px rgba(248,113,113,0.12);
}
.command-generator {
  position: relative;
  z-index: 80;
  background: rgba(20, 10, 50, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(28px) saturate(1.5);
  margin-bottom: 24px;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.35),
    0 0 0 1px rgba(251,191,36,0.06) inset,
    0 1px 0 rgba(255,255,255,0.03) inset;
  transition: box-shadow 350ms ease;
}
.command-generator:hover {
  box-shadow:
    0 16px 48px rgba(0,0,0,0.40),
    0 0 0 1px rgba(251,191,36,0.10) inset,
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 0 40px rgba(124,58,237,0.05);
}
.command-generator:focus-within {
  z-index: 140;
}
#currencyGenerator {
  z-index: 180;
}
#currencyGenerator:focus-within {
  z-index: 220;
}
#levelGenerator {
  z-index: 70;
}
.command-generator h2 {
  margin: 0 0 16px;
  font-family: var(--font-subtitle);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.generator-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.generator-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.generator-preview code {
  min-height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(12, 6, 40, 0.65);
  color: #dbeafe;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.generator-preview .copy-btn,
.generator-preview .clear-btn {
  min-width: 132px;
  cursor: pointer;
}
/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .class-display {
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  }
  .toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .content {
    grid-template-columns: 1fr;
  }
  .command-notepad {
    position: static;
  }
}
@media (max-width: 720px) {
  .hero {
    min-height: 100svh;
  }
  .site-header {
    width: calc(100% - 28px);
    padding-top: 14px;
  }
  .site-brand strong {
    font-size: 12px;
  }
  .site-brand span span {
    display: none;
  }
  .site-nav {
    display: none;
  }
  .hero-intro {
    bottom: 24px;
    width: calc(100% - 48px);
  }
  .hero-intro p {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .hero-btn {
    width: min(270px, 100%);
    min-width: 0;
    padding-inline: 14px;
  }
  .hero-actions {
    align-items: center;
    flex-direction: column;
  }
  .app {
    width: min(100% - 20px, 1480px);
    padding-top: 0;
  }
  .toolbar {
    position: static;
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 6px;
    margin-bottom: 36px;
  }
  .tab-btn {
    padding: 10px 16px;
    font-size: 11px;
  }
  .home-shell {
    gap: 68px;
  }
  .class-display {
    grid-template-columns: 1fr;
  }
  .class-copy {
    min-height: 410px;
    justify-content: flex-start;
    padding: 34px 24px 0;
  }
  .class-art {
    min-height: 410px;
    margin-top: -110px;
  }
  .class-character {
    right: 50%;
    width: min(470px, 100%);
    transform: translateX(50%);
  }
  @keyframes classReveal {
    from { opacity: 0; transform: translateX(50%) translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
  }
  @keyframes classRevealPrev {
    from { opacity: 0; transform: translateX(32%) translateY(20px) scale(0.94); filter: blur(7px); }
    to { opacity: 1; transform: translateX(50%) translateY(0) scale(1); filter: blur(0); }
  }
  @keyframes classRevealNext {
    from { opacity: 0; transform: translateX(68%) translateY(20px) scale(0.94); filter: blur(7px); }
    to { opacity: 1; transform: translateX(50%) translateY(0) scale(1); filter: blur(0); }
  }
  .class-arrow {
    top: 67%;
    width: 46px;
    height: 46px;
    font-size: 22px;
  }
  .class-arrow.prev { left: 10px; }
  .class-arrow.next { right: 10px; }
  .class-pagination {
    bottom: 16px;
  }
  .class-current-name {
    display: none;
  }
  .world-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .world-card.large,
  .world-card.tall,
  .world-card.small {
    grid-column: auto;
    grid-row: auto;
    min-height: 290px;
  }
  .world-card.tall {
    min-height: 420px;
    background-size: auto 90%;
    background-position: 70% 20%;
  }
  .journey {
    padding: 42px 22px;
  }
  .journey-steps {
    grid-template-columns: 1fr 1fr;
  }
  .journey-steps::before {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .item-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .icon-box {
    width: 70px;
    height: 70px;
  }
  .icon-box img {
    width: 56px;
    height: 56px;
  }
  .command-row {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .copy-btn {
    width: 100%;
  }
  .item-qty {
    width: 100%;
  }
  .generator-form,
  .generator-preview {
    grid-template-columns: 1fr;
  }
  .generator-preview .copy-btn,
  .generator-preview .clear-btn {
    width: 100%;
  }
}

/* -- CELESTIAL HOME 2026 -- */
.hero {
  min-height: 760px;
  height: 100svh;
  max-height: 980px;
  align-items: center;
  justify-content: flex-start;
}
.hero-bg {
  background-image: url('../home/celestial-hero.jpg');
  background-position: center center;
  transform: scale(1.015);
  animation: celestialHeroDrift 18s ease-in-out infinite alternate;
}
.hero-overlay {
  background:
    none,
    none;
}
.hero-vignette {
  box-shadow: inset 0 0 180px 45px rgba(2,5,18,0.62);
}
.hero-aurora {
  background:
    none,
    none,
    none;
}
@keyframes celestialHeroDrift {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.055) translate3d(-0.7%, -0.5%, 0); }
}
.site-header {
  width: min(1560px, calc(100% - 64px));
  padding-top: 28px;
  justify-content: flex-end;
}
.hero-intro {
  position: relative;
  left: auto;
  bottom: auto;
  width: min(1560px, calc(100% - 64px));
  margin: 80px auto 0;
  transform: none;
  text-align: left;
}
.hero-copy {
  position: relative;
  width: min(790px, 58vw);
  isolation: isolate;
}
.hero-kicker {
  gap: 15px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #efd48c;
  font-family: var(--font-subtitle);
  font-size: 11px;
  letter-spacing: 0.46em;
  text-shadow: 0 0 20px rgba(239,212,140,0.35);
  backdrop-filter: none;
}
.hero-kicker::before {
  width: 38px;
  height: 1px;
  border-radius: 0;
  background: none;
  box-shadow: 0 0 14px rgba(241,203,112,0.55);
}
.hero-title {
  position: relative;
  margin: 0;
  width: max-content;
  max-width: 100%;
  font-family: "Cinzel", var(--font-title);
  line-height: 0.72;
  text-transform: uppercase;
  filter: drop-shadow(0 18px 45px rgba(0,0,0,0.78));
}
.hero-title .hero-celestial {
  position: relative;
  z-index: 2;
  display: block;
  width: max-content;
  padding: 0 0.08em 0.1em 0.04em;
  color: transparent;
  background:
    none;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(62px, 7vw, 112px);
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 0.96;
  -webkit-text-stroke: 0.7px rgba(255,255,255,0.46);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.95),
    0 0 18px rgba(255,235,174,0.24),
    0 0 48px rgba(113,174,255,0.28),
    0 14px 38px rgba(0,0,0,0.92);
  filter: drop-shadow(0 0 22px rgba(170,207,255,0.18));
}
.hero-title .hero-celestial::before {
  content: '';
  position: absolute;
  left: -2%;
  right: -5%;
  top: 44%;
  z-index: -1;
  height: 70%;
  border-radius: 50%;
  background: none;
  filter: blur(18px);
}
.hero-title .hero-celestial::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 3%;
  bottom: 0;
  height: 1px;
  background: none;
  box-shadow: 0 0 16px rgba(180,220,255,0.48);
}
.hero-title::after {
  content: '';
  position: absolute;
  right: -7%;
  bottom: 5%;
  z-index: -1;
  width: 64%;
  height: 55%;
  margin: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  filter: blur(22px);
  pointer-events: none;
}
.hero-title .hero-mir {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.02em;
  padding: 0 0.08em 0.08em 0;
  color: transparent;
  background:
    none;
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Cinzel", var(--font-title);
  font-size: clamp(108px, 12.2vw, 196px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.105em;
  -webkit-text-stroke: 1px rgba(255,239,186,0.34);
  filter:
    drop-shadow(0 0 8px rgba(255,220,132,0.18))
    drop-shadow(0 0 32px rgba(96,165,250,0.22))
    drop-shadow(0 16px 25px rgba(0,0,0,0.74));
}
.hero-title .hero-mir::after {
  content: '';
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -15px;
  height: 1px;
  background: none;
  box-shadow: 0 0 20px rgba(128,190,255,0.48);
}
.hero-intro p {
  max-width: 570px;
  margin: 38px 0 28px;
  color: #d8deeb;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.78;
  text-shadow: 0 3px 18px rgba(0,0,0,0.92);
}
.hero-actions {
  justify-content: flex-start;
  gap: 14px;
}
.download-action { justify-content: flex-start; }
.hero-btn {
  position: relative;
  overflow: hidden;
  min-width: 210px;
  border: 1px solid rgba(174,194,234,0.22);
  border-radius: 0;
  padding: 17px 25px;
  background:
    none,
    rgba(5,8,25,0.76);
  color: #f5f1e8;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: 0.15em;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 34px rgba(0,0,0,0.3);
}
.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 34%;
  transform: skewX(-22deg);
  background: none;
  transition: left 500ms ease;
}
.hero-btn:hover::before {
  left: 120%;
}
.hero-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(179,215,255,0.48);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 42px rgba(0,0,0,0.38),
    0 0 26px rgba(94,159,255,0.12);
}
.hero-btn.primary {
  border-color: rgba(255,224,145,0.86);
  background:
    none,
    none;
  color: #100b04;
  text-shadow: 0 1px rgba(255,255,255,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,251,225,0.48),
    inset 0 -10px 28px rgba(88,49,6,0.18),
    0 16px 45px rgba(221,174,73,0.22);
}
.hero-btn.primary:hover {
  color: #080604;
  border-color: #fff0b0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.64),
    0 20px 52px rgba(232,185,83,0.34),
    0 0 32px rgba(255,219,130,0.16);
}
.hero-proof {
  position: relative;
  display: flex;
  gap: 0;
  width: max-content;
  max-width: 100%;
  margin-top: 30px;
  padding: 17px 2px 14px;
  border-top: 1px solid rgba(228,196,118,0.22);
  border-bottom: 1px solid rgba(116,161,224,0.1);
  background: none;
}
.hero-proof div {
  position: relative;
  min-width: 160px;
  padding: 0 25px;
  border-left: 1px solid rgba(230,193,108,0.2);
}
.hero-proof div:first-child {
  padding-left: 4px;
  border-left: 0;
}
.hero-proof strong {
  display: block;
  color: #f9edc8;
  font-family: "Cinzel", serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.035em;
  text-shadow: 0 0 18px rgba(244,207,119,0.16);
}
.hero-proof span {
  display: block;
  margin-top: 6px;
  color: #8e9bb7;
  font-family: "Inter", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-scroll {
  position: absolute;
  right: 32px;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 70px;
  background: none;
}

.home-shell {
  gap: 120px;
  padding-bottom: 30px;
}
.world-section {
  display: none;
}
.celestial-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(44px, 8vw, 120px);
  align-items: center;
  padding: 54px clamp(12px, 3vw, 44px) 0;
}
.celestial-intro .section-heading {
  margin: 0;
}
.celestial-intro .section-heading h1 {
  font-size: clamp(38px, 5vw, 72px);
}
.intro-manifesto {
  position: relative;
  padding: 34px 0 34px 36px;
  border-left: 1px solid rgba(225,190,103,0.3);
}
.intro-manifesto::before {
  content: 'C';
  position: absolute;
  top: -62px;
  right: 0;
  color: rgba(226,196,126,0.035);
  font-family: var(--font-title);
  font-size: 230px;
  line-height: 1;
}
.intro-manifesto p {
  position: relative;
  margin: 0;
  color: #b4bdd0;
  font-size: 15px;
  line-height: 1.95;
}
.intro-signature {
  display: block;
  margin-top: 24px;
  color: #e9cd85;
  font-family: var(--font-subtitle);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.realm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: none;
}
.realm-stat {
  padding: 28px 24px;
  text-align: center;
}
.realm-stat + .realm-stat {
  border-left: 1px solid rgba(255,255,255,0.07);
}
.realm-stat strong {
  display: block;
  color: #f5da96;
  font-family: var(--font-title);
  font-size: clamp(23px, 2.6vw, 38px);
}
.realm-stat span {
  display: block;
  margin-top: 7px;
  color: #7f8aa3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.classes-section {
  scroll-margin-top: 24px;
}
.class-stage {
  border-color: rgba(218,181,95,0.16);
  box-shadow: 0 42px 120px rgba(0,0,0,0.46), 0 0 0 1px rgba(255,255,255,0.025) inset;
}
.world-section {
  scroll-margin-top: 24px;
}
.world-grid {
  grid-auto-rows: 230px;
  gap: 18px;
}
.world-card {
  padding: 34px;
  contain: paint;
  border-radius: 4px;
  border: 0;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  box-shadow: inset 0 0 0 1px rgba(221,190,116,0.14);
}
.world-card:hover {
  box-shadow:
    inset 0 0 0 1px rgba(251,191,36,0.22),
    0 24px 60px rgba(0,0,0,0.35);
}
.world-card::before {
  background:
    none,
    none;
}
.world-card.large {
  background-image: url('../home/mir4-hidden-valley.jpg');
  background-position: center;
}
.world-card.tall {
  background: url('../home/mir4-bicheon-siege.jpg') center / cover no-repeat;
}
.world-card.boss {
  grid-column: span 8;
  background: url('../home/mir4-raid-boss.jpg') center 44% / cover no-repeat;
}
.world-card.armory {
  grid-column: span 4;
  background:
    url('../home/mir4-progression.jpg') 63% center / cover no-repeat;
}
.world-card.armory::after {
  background: none;
}
.world-card-number {
  color: #efd58f;
}
.world-card h3 {
  font-size: clamp(22px, 2.4vw, 34px);
}
.world-card p {
  max-width: 500px;
  color: #c0c7d7;
}
.celestial-path {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  min-height: 560px;
  border: 1px solid rgba(222,188,109,0.14);
  background:
    none,
    url('../home/celestial-boss.jpg') right center / 70% auto no-repeat;
}
.path-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 6vw, 82px);
}
.path-copy .section-heading {
  margin-bottom: 28px;
}
.path-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.path-link {
  border: 1px solid rgba(225,191,107,0.3);
  border-radius: 3px;
  background: rgba(10,10,30,0.68);
  color: #f6e7bb;
  padding: 13px 18px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: 220ms ease;
}
.path-link:hover {
  border-color: #e5c36c;
  background: rgba(225,191,107,0.12);
  transform: translateY(-2px);
}
.path-runes {
  position: relative;
  min-height: 560px;
}
.path-runes::before,
.path-runes::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(162,199,255,0.18);
  border-radius: 50%;
  animation: runeSpin 22s linear infinite;
}
.path-runes::before {
  top: 15%;
  right: 12%;
  width: 310px;
  height: 310px;
}
.path-runes::after {
  top: 23%;
  right: 18%;
  width: 210px;
  height: 210px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 15s;
}
@keyframes runeSpin {
  to { transform: rotate(360deg); }
}
.celestial-final {
  position: relative;
  overflow: hidden;
  padding: 110px 32px;
  border: 0;
  text-align: center;
  background:
    none,
    none;
}
.celestial-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}
.celestial-final::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 20px;
  width: 1px;
  height: 60px;
  background: none;
}
.celestial-final h2 {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  font-family: var(--font-title);
  font-size: clamp(34px, 5vw, 70px);
  line-height: 1.12;
}
.celestial-final h2 span {
  color: #edd28e;
}
.celestial-final p {
  position: relative;
  max-width: 650px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}
.final-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 28px;
  border: 1px solid rgba(229,196,112,0.38);
  border-radius: 50%;
  color: #eed58f;
  font-family: var(--font-title);
  font-size: 28px;
  box-shadow: 0 0 45px rgba(147,104,255,0.12);
}

@media (max-width: 900px) {
  .hero-copy {
    width: min(680px, 78vw);
  }
  .celestial-intro,
  .celestial-path {
    grid-template-columns: 1fr;
  }
  .realm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .realm-stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .realm-stat:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .world-card.boss,
  .world-card.armory {
    grid-column: span 6;
  }
  .path-runes {
    display: none;
  }
  .class-display {
    grid-template-columns: minmax(330px, 0.9fr) minmax(380px, 1.1fr);
  }
  .class-copy {
    padding: 74px 32px 112px 72px;
  }
  .class-copy h3 {
    font-size: clamp(38px, 5vw, 60px);
  }
  .class-dot {
    font-size: 0;
  }
  .class-dot::after {
    content: '';
  }
  .class-dot {
    flex: 0 0 28px;
  }
}
@media (max-width: 720px) {
  .hero {
    min-height: 760px;
    height: 100svh;
  }
  .hero-bg {
    background-position: 61% center;
  }
  .hero-overlay {
    background:
      none,
      none;
  }
  .site-header {
    width: calc(100% - 30px);
  }
  .hero-intro {
    width: calc(100% - 38px);
    margin-top: auto;
    margin-bottom: 54px;
  }
  .hero-copy {
    width: 100%;
  }
  .hero-title {
    max-width: 100%;
    white-space: nowrap;
  }
  .hero-title .hero-celestial {
    font-size: clamp(42px, 12.8vw, 62px);
    letter-spacing: 0.018em;
  }
  .hero-title .hero-mir {
    font-size: clamp(82px, 26vw, 124px);
  }
  .hero-intro p {
    max-width: 100%;
    margin: 18px 0 22px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .hero-actions {
    align-items: stretch;
  }
  .hero-btn {
    width: 100%;
  }
  .hero-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0;
    margin-top: 26px;
  }
  .hero-proof div {
    min-width: 0;
    padding: 0 10px;
  }
  .hero-proof div:first-child {
    padding-left: 0;
  }
  .hero-proof strong {
    font-size: 11px;
  }
  .hero-scroll {
    display: none;
  }
  .home-shell {
    gap: 76px;
  }
  .celestial-intro {
    gap: 26px;
    padding-top: 24px;
  }
  .intro-manifesto {
    padding: 24px 0 0;
    border-top: 1px solid rgba(225,190,103,0.25);
    border-left: 0;
  }
  .world-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 330px;
  }
  .world-card.large,
  .world-card.tall,
  .world-card.boss,
  .world-card.armory {
    grid-column: auto;
    grid-row: auto;
  }
  .world-card {
    padding: 25px;
  }
  .celestial-path {
    min-height: 520px;
    background:
      none,
      url('../home/celestial-boss.jpg') 64% top / auto 72% no-repeat;
  }
  .path-copy {
    justify-content: flex-end;
    padding: 245px 24px 36px;
  }
  .celestial-final {
    padding: 90px 18px 70px;
  }
  .class-stage {
    min-height: 760px;
    border-radius: 4px;
  }
  .class-stage::before {
    left: 18px;
    bottom: 260px;
    max-width: 100%;
    font-size: 64px;
  }
  .class-stage::after {
    top: 25%;
    right: -18%;
    width: 390px;
    height: 390px;
  }
  .class-display {
    display: flex;
    min-height: 760px;
    flex-direction: column-reverse;
  }
  .class-art {
    position: relative;
    inset: auto;
    min-height: 390px;
    height: 390px;
    margin: 0;
  }
  .class-art::after {
    background:
      none,
      none;
  }
  .class-character {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: 68% center;
    -webkit-mask-image: none;
    mask-image: none;
    transform: scale(1);
  }
  .class-copy {
    width: 100%;
    min-height: 360px;
    justify-content: flex-start;
    padding: 12px 28px 92px;
  }
  .class-copy::before {
    display: none;
  }
  .class-copy::after {
    display: none;
  }
  .class-copy h3 {
    font-size: clamp(35px, 12vw, 52px);
  }
  .class-role {
    margin-bottom: 15px;
    font-size: 9px;
  }
  .class-description {
    font-size: 12px;
    line-height: 1.7;
  }
  .class-traits {
    margin-top: 17px;
  }
  .class-traits span {
    padding: 7px 9px;
    font-size: 8px;
  }
  .class-arrow {
    top: 28%;
    width: 46px;
    height: 46px;
    box-shadow:
      0 0 0 5px rgba(4,7,20,0.42),
      0 0 22px var(--class-accent-soft);
  }
  .class-arrow.prev { left: 9px; }
  .class-arrow.next { right: 9px; }
  .class-pagination {
    top: 18px;
    right: 20px;
    left: auto;
    bottom: auto;
  }
  .class-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
  }
  .class-dot.active {
    width: 24px;
    flex-basis: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .path-runes::before,
  .path-runes::after {
    animation: none !important;
  }
}

/* Flat visual system: artwork, spacing and typography carry the interface. */
:root {
  --bg: #080d1a;
  --bg-deep: #040814;
  --panel: rgba(10, 17, 34, 0.92);
  --panel-solid: #0b1326;
  --panel-hover: #101b33;
  --gold: #d8bc72;
  --gold-bright: #f0d994;
  --purple: #9b8ac7;
  --pink: #bf789b;
  --blue: #79a9d8;
}

body { background: var(--bg-deep); }
.hero-aurora, .path-runes, .final-mark { display: none !important; }
.hero-overlay { background: rgba(3, 7, 18, 0.48); }
.hero-vignette { box-shadow: inset 0 0 100px 24px rgba(2, 5, 15, 0.48); }
.hero-title .hero-celestial,
.hero-title .hero-mir,
.section-heading h1 span,
.section-heading h2 span,
.celestial-final h2 span,
.hero-title .hero-mir { color: #d8bc72; }
.hero-title .hero-celestial::before,
.hero-title .hero-celestial::after,
.hero-title::after,
.hero-title .hero-mir::after,
.hero-btn::before,
.item-card::before,
.item-card::after,
.stat-card::before,
.world-card::after,
.celestial-final::before { display: none; }
.hero-btn, .path-link, .copy-btn, .clear-btn, .load-more, .reset-filters-btn {
  background: #0b1428;
  border-color: rgba(216, 188, 114, 0.38);
  box-shadow: none;
}
.hero-btn.primary { background: #d8bc72; color: #090b10; border-color: #ead493; box-shadow: none; }
.hero-btn:hover, .path-link:hover, .copy-btn:hover, .clear-btn:hover, .load-more:hover { box-shadow: none; }
.item-card, .stat-card, .toolbar, .command-notepad, .command-generator, .catalog-toolbar,
.journey, .celestial-path, .celestial-final, .item-modal {
  background: var(--panel);
  box-shadow: none;
}
.world-card-content { background: rgba(4, 8, 18, 0.82); }
.site-nav .discord-link {
  border: 1px solid rgba(216, 188, 114, 0.52);
  border-radius: 10px;
  background: #080f20;
  color: #d8bc72;
}
.discord-link {
  display: inline-grid;
  width: 42px;
  min-width: 42px !important;
  height: 38px;
  place-items: center;
  padding: 0 !important;
  line-height: 1;
}
.discord-link svg { display: block; width: 24px; height: 24px; overflow: visible; }
.discord-sigil-mark { fill: currentColor; transform: translate(-2px, 1.5px); }
.discord-link:hover, .discord-link:focus-visible {
  border-color: #f0d994 !important;
  background: #121a2c !important;
  color: #f0d994 !important;
}
.site-download-link {
  display: inline-flex;
  width: auto;
  min-width: 42px !important;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px !important;
  border: 1px solid rgba(216, 188, 114, 0.52) !important;
  background: #080f20 !important;
  color: #d8bc72 !important;
}
.site-download-link svg { display: block; width: 23px; height: 23px; }
.site-download-label { font-size: 10px; letter-spacing: 0.08em; }
.site-download-link:hover, .site-download-link:focus-visible {
  border-color: #f0d994 !important;
  background: #121a2c !important;
  color: #f0d994 !important;
}

select {
  appearance: auto;
  background: #091225;
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  background: #f0d994;
  color: #070b14;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #f0d994;
  outline-offset: 3px;
}
.item-card:focus-visible { border-color: #f0d994; }

@media (max-width: 720px) {
  .site-header { justify-content: flex-end; }
  .site-nav { display: flex; }
  .discord-link { border-color: rgba(216, 188, 114, 0.62) !important; }
  .hero { min-height: 700px; height: auto; }
  .hero-intro { margin: auto 0 36px; align-self: stretch; }
  .hero-title { width: 100%; white-space: normal; }
  .hero-title .hero-celestial { font-size: clamp(36px, 11.4vw, 52px); letter-spacing: 0; }
  .hero-title .hero-mir { font-size: clamp(72px, 23vw, 104px); }
  .hero-intro p { max-width: 34ch; }
  .hero-proof { overflow: hidden; }
  .hero-proof div { padding-inline: 7px; }
  .hero-proof strong { font-size: 10px; }
  .hero-proof span { font-size: 7px; letter-spacing: 0.12em; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; scrollbar-width: none; }
  .tab-btn { flex: 0 0 auto; }
}
