/* Class page + Equipment Lab — RoM layout, Mystic Forest theme. */

.page-gamedb {
  --color-gold: #a594ff;
  --gold: #a594ff;
  --gold-light: #c8beff;
}

.page-gamedb .gdb-hero h1,
.page-gamedb .gdb-dual__head h2,
.page-gamedb .gdb-sec__head h2,
.page-gamedb .gdb-classbtn.is-active {
  color: #c8beff;
}

.page-gamedb .gdb-classbtn.is-active {
  border-color: #a594ff;
  box-shadow: 0 0 14px #a594ff40;
}

.page-gamedb .gdb-classbtn:hover,
.page-gamedb .gdb-card:hover,
.page-gamedb .gdb-card.is-open {
  border-color: #a594ff99;
}

.page-gamedb .gdb-btn,
.page-gamedb .gdb-card__icon,
.page-gamedb .gdb-classbtn img {
  border-color: #a594ff66;
}

.page-gamedb .gdb-btn {
  color: #c8beff;
  background: #a594ff14;
}

.page-gamedb .gdb-btn:hover {
  background: #a594ff2b;
  border-color: #a594ff;
}

.page-gamedb .gdb-dual {
  background: linear-gradient(120deg, #161428e6, #0c0b14f2 55%, #14122ae6);
  border-color: #a594ff2e;
}

.page-gamedb .gdb-divider {
  background: linear-gradient(90deg, transparent, #a594ff, transparent);
}

.gdb-classpage {
  max-width: 1100px;
  padding-top: 28px;
}

.gdb-back {
  display: inline-block;
  color: #5ee4c8;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  margin: 0 0 22px;
  font-size: 0.68rem;
  font-weight: 700;
}

.gdb-back:hover { color: #c8beff; }

.mf-class {
  margin: 8px 0 42px;
}

.mf-class__top {
  align-items: center;
  gap: 28px;
  margin: 0 0 28px;
  display: flex;
}

.mf-class__art {
  flex: 0 0 220px;
  width: 220px;
  aspect-ratio: 10 / 8;
  background:
    radial-gradient(ellipse at 50% 30%, #2a2458, #0a0910);
  border: 1px solid #a594ff40;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px #00000080, inset 0 0 40px #5ee4c814;
}

.mf-class__art.is-empty { display: none; }

.mf-class__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  display: block;
  filter: saturate(1.08) brightness(0.95);
}

.mf-class__art:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #02030899, transparent 42%);
}

.mf-class__intro { min-width: 0; flex: 1; }

.gdb-classbtn__art {
  object-fit: cover;
  object-position: 50% 30%;
}

.page-gamedb .gdb-pop {
  background: linear-gradient(160deg, #1a1730fa, #0c0b14fc);
  border-color: #a594ff8c;
  box-shadow: 0 18px 50px #000000bf, 0 0 24px #a594ff26;
}

.page-gamedb .gdb-pop__title,
.page-gamedb .gdb-card__name {
  color: #c8beff;
}

.page-gamedb .gdb-pop__head img,
.page-gamedb .gdb-kv__cell {
  border-color: #a594ff33;
}

@media (max-width: 760px) {
  .mf-class__top { flex-direction: column; align-items: stretch; }
  .mf-class__art { width: 100%; flex-basis: auto; }
}

.mf-class__kicker {
  color: #5ee4c8;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-size: 0.62rem;
  font-weight: 800;
}

.mf-class__name {
  color: #f2f5fc;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  font-family: Cinzel, serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.mf-class__role {
  color: #a594ff;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  font-family: Cinzel, serif;
  font-size: 1.15rem;
}

.mf-class__desc {
  color: #9aa8c2;
  max-width: 640px;
  margin: 0 0 22px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.mf-class__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.mf-class__stat {
  min-width: 72px;
  background: #a594ff12;
  border: 1px solid #a594ff38;
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.mf-class__stat b {
  color: #f2f5fc;
  font-family: Cinzel, serif;
  font-size: 1.35rem;
  line-height: 1;
}

.mf-class__stat i {
  color: #a594ff;
  letter-spacing: 0.14em;
  font-style: normal;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 700;
}

.mf-labcta {
  color: inherit;
  text-decoration: none;
  background:
    radial-gradient(circle at 92% 50%, #a594ff14 0%, transparent 42%),
    linear-gradient(90deg, #0c0b12, #12101c 55%, #0a0910);
  border: 1px solid #a594ff3d;
  border-radius: 16px;
  align-items: center;
  gap: 16px;
  margin: 0 0 36px;
  padding: 16px 22px;
  display: flex;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px #00000073;
}

.mf-labcta:hover {
  border-color: #a594ff99;
  box-shadow: 0 0 0 1px #a594ff40, 0 16px 36px #0000008c;
}

.mf-labcta__icon {
  color: #c8beff;
  background: #1a1826;
  border: 1px solid #a594ff40;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
}

.mf-labcta__copy { flex: 1; min-width: 0; }

.mf-labcta__kicker {
  color: #c4b48a;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
}

.mf-labcta__title {
  color: #e8d48a;
  letter-spacing: 0.02em;
  display: block;
  margin: 2px 0 3px;
  font-family: Cinzel, serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.mf-labcta__meta {
  color: #9aa8c2;
  display: block;
  font-size: 0.82rem;
}

.mf-labcta__arrow {
  color: #e8d48a;
  font-size: 1.4rem;
}

[dir="rtl"] .mf-labcta__arrow { transform: scaleX(-1); }

.mf-class__lore h3 {
  color: #a594ff;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  font-family: Cinzel, serif;
  font-size: 1.05rem;
}

.mf-class__lore p {
  color: #c5cde0;
  max-width: 720px;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.mf-skillshead {
  margin: 8px 0 22px;
}

.mf-skillshead h2 {
  color: #c8beff;
  margin: 0 0 6px;
  font-family: Cinzel, serif;
  font-size: 1.55rem;
}

.mf-skillshead p {
  color: #9aa8c2;
  max-width: 720px;
  margin: 0;
  font-size: 0.9rem;
}

/* ---- Equipment Lab ---- */

.lab-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.lab-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 18px;
  display: grid;
}

.lab-panel {
  background: linear-gradient(180deg, #12111ae8, #0a0910f2);
  border: 1px solid #a594ff2e;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 16px 40px #00000073;
}

.lab-kicker {
  color: #e8d48a;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-size: 0.62rem;
  font-weight: 700;
}

.lab-title {
  color: #f2f5fc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-family: Cinzel, serif;
  font-size: 1.35rem;
}

.lab-title--gold {
  color: #e8d48a;
}

.lab-note {
  color: #6d7890;
  margin: 0 0 14px;
  font-size: 0.78rem;
}

.lab-races {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.lab-race {
  color: #c5cde0;
  cursor: pointer;
  background: #ffffff08;
  border: 1px solid #a594ff2b;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.75rem;
}

.lab-race:hover { border-color: #a594ff80; }
.lab-race.is-on {
  color: #1a1520;
  background: linear-gradient(90deg, #e8d48a, #c4b48a);
  border-color: #e8d48a;
  font-weight: 700;
}
.lab-race:disabled { opacity: 0.35; cursor: not-allowed; }

.lab-stage {
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  align-items: stretch;
  gap: 10px;
  min-height: 560px;
  display: grid;
}

.lab-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lab-slot {
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: #0d0c14;
  border: 1px solid #ffffff12;
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font: inherit;
  display: flex;
}

[dir="rtl"] .lab-slot { text-align: right; }

.lab-slot:hover { border-color: #a594ff66; }
.lab-slot.is-on {
  border-color: #a594ff;
  box-shadow: 0 0 0 1px #a594ff59, 0 0 18px #a594ff26;
}
.lab-slot.is-filled { border-color: color-mix(in srgb, var(--rare, #a594ff) 55%, #000 45%); }

.lab-slot__icon {
  background: #050508;
  border: 1px solid #ffffff14;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
}

.lab-slot__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lab-slot__copy { min-width: 0; flex: 1; }

.lab-slot__name {
  color: #9aa8c2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
}

.lab-slot__item {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--rare, #6d7890);
  font-size: 0.74rem;
}

.lab-viewport {
  background:
    radial-gradient(circle at 50% 42%, #352a6ae0 0%, #14102a 46%, #05060c 100%);
  border: 1px solid #a594ff33;
  border-radius: 18px;
  height: 100%;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 80px #5ee4c814;
}

.lab-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

.lab-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 90px #020308aa;
}

.lab-load {
  color: #c8beff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  position: absolute;
  inset: auto 12px 14px;
  z-index: 4;
  font-size: 0.68rem;
}

.lab-foot {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
}

.lab-hint {
  color: #6d7890;
  font-size: 0.72rem;
}

.lab-badge {
  color: #e8d48a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #ffffff08;
  border: 1px solid #e8d48a40;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.68rem;
  font-weight: 700;
}

.lab-archive__head {
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 12px;
  display: flex;
}

.lab-slotlabel {
  color: #c8beff;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.lab-remove {
  color: #c8beff;
  cursor: pointer;
  background: #a594ff14;
  border: 1px solid #a594ff55;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.7rem;
}

.lab-remove:hover { border-color: #a594ff; }

.lab-search {
  width: 100%;
  color: #f2f5fc;
  background: #ffffff09;
  border: 1px solid #a594ff2b;
  border-radius: 10px;
  outline: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  font: inherit;
}

.lab-search:focus { border-color: #a594ff94; box-shadow: 0 0 0 2px #a594ff14; }

.lab-count {
  color: #9aa8c2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-size: 0.68rem;
}

.lab-count b { color: #a594ff; }

.lab-list {
  max-height: 620px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lab-row {
  background: #0d0c14;
  border: 1px solid #ffffff12;
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  display: flex;
}

.lab-row.is-on {
  border-color: #5ee4c8;
  box-shadow: 0 0 0 1px #5ee4c855;
}

.lab-row__icon {
  border: 2px solid var(--rare, #666);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  background: #000;
}

.lab-row__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lab-row__copy { min-width: 0; flex: 1; }

.lab-row__name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--rare, #f2f5fc);
  font-size: 0.86rem;
  font-weight: 700;
}

.lab-row__meta {
  color: #6d7890;
  display: block;
  font-size: 0.72rem;
}

.lab-add {
  color: #c8beff;
  cursor: pointer;
  background: #a594ff14;
  border: 1px solid #a594ff55;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lab-add:hover { border-color: #a594ff; }
.lab-row.is-on .lab-add {
  color: #10241f;
  background: #5ee4c8;
  border-color: #5ee4c8;
}

.lab-empty {
  color: #6d7890;
  text-align: center;
  padding: 28px 8px;
  font-size: 0.86rem;
}

.lab-more {
  color: #c8beff;
  cursor: pointer;
  background: transparent;
  border: 1px solid #a594ff40;
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px;
  font: inherit;
  width: 100%;
}

@media (max-width: 980px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-stage { grid-template-columns: 1fr; }
  .lab-slots { display: grid; grid-template-columns: 1fr 1fr; }
  .lab-viewport { min-height: 420px; height: 420px; }
}
